From eba45fdf11a98113b439db0510b55f14845db8fb Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Mon, 22 Apr 2019 00:16:50 +0800 Subject: New development cycle! Partially reintroduce High DPI handling. Pressing enter when a preset is focused now opens the preset selection dialog. Close all functionality windows before shutting down. Temporary fix for switching all channels of an external synth to mono mode unintentionally. And the most important one of them all: simple visualization! I'm ditching the 0.8.6 cycle because there was no clear goal for that release now (as the OPL3 emulation is now delayed indefinitely). In contrast, the 0.8.7 release has a pretty good-looking feature set mainly focused on improving support for external synthesizers: - Per-device initialization profile. - Instrument mapping files. - And a simple visualization ~~for showing off your external synthesizers~~. As always no ETA is set, nor will I promise the implementaion of all the features listed above. --- qmidiplayer-desktop/qmpchannelswindow.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'qmidiplayer-desktop/qmpchannelswindow.cpp') diff --git a/qmidiplayer-desktop/qmpchannelswindow.cpp b/qmidiplayer-desktop/qmpchannelswindow.cpp index 6b1b8b4..3b54069 100644 --- a/qmidiplayer-desktop/qmpchannelswindow.cpp +++ b/qmidiplayer-desktop/qmpchannelswindow.cpp @@ -71,6 +71,7 @@ qmpChannelsWindow::qmpChannelsWindow(QWidget *parent) : ui->twChannels->setColumnWidth(3,192); ui->twChannels->setColumnWidth(4,208); ui->twChannels->setColumnWidth(5,32); + ui->twChannels->installEventFilter(this); qmpMainWindow::getInstance()->registerFunctionality( chnlf=new qmpChannelFunc(this), std::string("Channel"), @@ -224,6 +225,18 @@ void qmpChannelsWindow::changeMidiMapping(int chid,int idx) qmpMainWindow::getInstance()->getPlayer()->setChannelOutput(chid,idx); } +bool qmpChannelsWindow::eventFilter(QObject *o,QEvent *e) +{ + if(e->type()==QEvent::KeyPress&&ui->twChannels->currentColumn()==4) + { + QKeyEvent *ke=static_cast(e); + if(ke->key()!=Qt::Key_Enter&&ke->key()!=Qt::Key_Return)return false; + showPresetWindow(ui->twChannels->currentRow(),4); + return true; + } + return false; +} + qmpChannelFunc::qmpChannelFunc(qmpChannelsWindow *par) {p=par;} void qmpChannelFunc::show() -- cgit v1.2.3