diff options
author | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-10 09:38:40 +0000 |
---|---|---|
committer | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-10 09:38:40 +0000 |
commit | 4f11ef1b0124517e14712ffae284198db47d4d8d (patch) | |
tree | 208cc8bb89e18969686aeac346c5195010275995 /muse2/muse | |
parent | d225bb1f574a68a56b96fa33ebb33dcbc009383b (diff) |
Fixes in plugin and save dialogs. Please see the ChangeLog.
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/mixer/rack.cpp | 8 | ||||
-rw-r--r-- | muse2/muse/plugin.cpp | 15 | ||||
-rw-r--r-- | muse2/muse/plugin.h | 22 | ||||
-rw-r--r-- | muse2/muse/widgets/filedialog.cpp | 1 |
4 files changed, 35 insertions, 11 deletions
diff --git a/muse2/muse/mixer/rack.cpp b/muse2/muse/mixer/rack.cpp index b979b420..a8bd1c62 100644 --- a/muse2/muse/mixer/rack.cpp +++ b/muse2/muse/mixer/rack.cpp @@ -504,7 +504,13 @@ void EffectRack::mousePressEvent(QMouseEvent *event) menuRequested(itemAt(event->pos())); return; } - + else if(event->button() & Qt::MiddleButton) { + int idx = row(itemAt(event->pos())); + bool flag = !track->efxPipe()->isOn(idx); + track->efxPipe()->setOn(idx, flag); + updateContents(); + } + QListWidget::mousePressEvent(event); } diff --git a/muse2/muse/plugin.cpp b/muse2/muse/plugin.cpp index 7786424a..3ddb0baf 100644 --- a/muse2/muse/plugin.cpp +++ b/muse2/muse/plugin.cpp @@ -2574,10 +2574,11 @@ PluginDialog::PluginDialog(QWidget* parent) QBoxLayout* w5 = new QHBoxLayout; layout->addLayout(w5); - QPushButton* okB = new QPushButton(tr("Ok"), this); + okB = new QPushButton(tr("Ok"), this); okB->setDefault(true); QPushButton* cancelB = new QPushButton(tr("Cancel"), this); okB->setFixedWidth(80); + okB->setEnabled(false); cancelB->setFixedWidth(80); w5->addWidget(okB); w5->addSpacing(12); @@ -2646,6 +2647,7 @@ PluginDialog::PluginDialog(QWidget* parent) fillPlugs(selectedPlugType); connect(pList, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), SLOT(accept())); + connect(pList, SIGNAL(itemClicked(QTreeWidgetItem*,int)), SLOT(enableOkB())); connect(cancelB, SIGNAL(clicked()), SLOT(reject())); connect(okB, SIGNAL(clicked()), SLOT(accept())); connect(plugSel, SIGNAL(buttonClicked(QAbstractButton*)), SLOT(fillPlugs(QAbstractButton*))); @@ -2654,12 +2656,21 @@ PluginDialog::PluginDialog(QWidget* parent) } //--------------------------------------------------------- +// enableOkB +//--------------------------------------------------------- + +void PluginDialog::enableOkB() + { + okB->setEnabled(true); + } + +//--------------------------------------------------------- // value //--------------------------------------------------------- Plugin* PluginDialog::value() { - QTreeWidgetItem* item = pList->selectedItems().at(0); + QTreeWidgetItem* item = pList->currentItem(); if (item) return plugins.find(item->text(0), item->text(1)); printf("plugin not found\n"); diff --git a/muse2/muse/plugin.h b/muse2/muse/plugin.h index fbe6169e..24173de4 100644 --- a/muse2/muse/plugin.h +++ b/muse2/muse/plugin.h @@ -523,6 +523,7 @@ class PluginDialog : public QDialog { QRadioButton* onlyM; QRadioButton* onlyS; QRadioButton* onlySM; + QPushButton *okB; Q_OBJECT @@ -531,14 +532,19 @@ class PluginDialog : public QDialog { static Plugin* getPlugin(QWidget* parent); Plugin* value(); void accept(); -public slots: - void fillPlugs(QAbstractButton*); - void fillPlugs(int i); - void fillPlugs(const QString& sortValue); - private: - QComboBox *sortBox; - static int selectedPlugType; - static QStringList sortItems; + + public slots: + void fillPlugs(QAbstractButton*); + void fillPlugs(int i); + void fillPlugs(const QString& sortValue); + + private slots: + void enableOkB(); + + private: + QComboBox *sortBox; + static int selectedPlugType; + static QStringList sortItems; }; extern void initPlugins(); diff --git a/muse2/muse/widgets/filedialog.cpp b/muse2/muse/widgets/filedialog.cpp index b02aefbc..81791f6b 100644 --- a/muse2/muse/widgets/filedialog.cpp +++ b/muse2/muse/widgets/filedialog.cpp @@ -185,6 +185,7 @@ MFileDialog::MFileDialog(const QString& dir, connect(this, SIGNAL(directoryEntered(const QString&)), SLOT(directoryChanged(const QString&))); if (writeFlag) { + setAcceptMode(QFileDialog::AcceptSave); buttons.globalButton->setEnabled(false); switch (lastViewUsed) { case GLOBAL_VIEW: |