diff options
Diffstat (limited to 'muse2')
-rw-r--r-- | muse2/ChangeLog | 3 | ||||
-rw-r--r-- | muse2/muse/arranger/arranger.h | 16 | ||||
-rw-r--r-- | muse2/muse/miditransform.cpp | 3 | ||||
-rw-r--r-- | muse2/muse/miditransform.h | 15 | ||||
-rw-r--r-- | muse2/muse/mplugins/midifilterimpl.cpp | 3 | ||||
-rw-r--r-- | muse2/muse/mplugins/midifilterimpl.h | 15 | ||||
-rw-r--r-- | muse2/muse/mplugins/midiitransform.cpp | 3 | ||||
-rw-r--r-- | muse2/muse/mplugins/midiitransform.h | 15 | ||||
-rw-r--r-- | muse2/muse/mplugins/mittranspose.cpp | 3 | ||||
-rw-r--r-- | muse2/muse/mplugins/mittranspose.h | 15 | ||||
-rw-r--r-- | muse2/muse/mplugins/mrconfig.cpp | 3 | ||||
-rw-r--r-- | muse2/muse/mplugins/mrconfig.h | 18 | ||||
-rw-r--r-- | muse2/muse/widgets/comment.cpp | 3 | ||||
-rw-r--r-- | muse2/muse/widgets/comment.h | 15 | ||||
-rw-r--r-- | muse2/muse/widgets/metronome.cpp | 7 | ||||
-rw-r--r-- | muse2/muse/widgets/metronome.h | 15 | ||||
-rw-r--r-- | muse2/muse/widgets/velocity.cpp | 5 | ||||
-rw-r--r-- | muse2/muse/widgets/velocity.h | 18 |
18 files changed, 32 insertions, 143 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 64036d4b..002b3956 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,3 +1,6 @@ +20.11.2010 + - Remove most wrapper classes around .ui widgets. I was wrapping them too much. Some widgets + (e.g. songinfo) still need wrappers though. (Orcan) 19.11.2010 - Started some conversions of midieditor, pianoroll, drumedit, incl. their QGridLayouts. (Tim) - More icon conversion work (Orcan) diff --git a/muse2/muse/arranger/arranger.h b/muse2/muse/arranger/arranger.h index c223b0d6..4d830b58 100644 --- a/muse2/muse/arranger/arranger.h +++ b/muse2/muse/arranger/arranger.h @@ -79,25 +79,13 @@ class WidgetStack : public QWidget { //--------------------------------------------------------- -// MidiTrackInfoBaseWidget -// Wrapper around Ui::MidiTrackInfoBase -//--------------------------------------------------------- -class MidiTrackInfoBaseWidget : public QWidget, public Ui::MidiTrackInfoBase -{ - Q_OBJECT - - public: - MidiTrackInfoBaseWidget(QWidget *parent = 0) : QWidget(parent) { setupUi(this); } -}; - -//--------------------------------------------------------- // MidiTrackInfo //--------------------------------------------------------- -class MidiTrackInfo : public MidiTrackInfoBaseWidget { +class MidiTrackInfo : public QWidget, public Ui::MidiTrackInfoBase { public: bool _midiDetect; - MidiTrackInfo(QWidget* parent) : MidiTrackInfoBaseWidget(parent) { _midiDetect = false; } + MidiTrackInfo(QWidget* parent) : QWidget(parent) { setupUi(this); _midiDetect = false; } }; //--------------------------------------------------------- diff --git a/muse2/muse/miditransform.cpp b/muse2/muse/miditransform.cpp index 0f9f247c..ef77badf 100644 --- a/muse2/muse/miditransform.cpp +++ b/muse2/muse/miditransform.cpp @@ -153,8 +153,9 @@ static MidiTransformationList mtlist; //--------------------------------------------------------- MidiTransformerDialog::MidiTransformerDialog(QDialog* parent, Qt::WFlags fl) - : MidiTransformDialogBaseWidget(parent, fl) + : QDialog(parent, fl) { + setupUi(this); data = new MidiTransformPrivate; data->cmt = 0; data->cindex = -1; diff --git a/muse2/muse/miditransform.h b/muse2/muse/miditransform.h index 0c71b98b..4cf444bd 100644 --- a/muse2/muse/miditransform.h +++ b/muse2/muse/miditransform.h @@ -34,23 +34,10 @@ enum TransformOperator { }; //--------------------------------------------------------- -// MidiTransformDialogBaseWidget -// Wrapper around Ui::MidiTransformDialogBase -//--------------------------------------------------------- - -class MidiTransformDialogBaseWidget : public QDialog, public Ui::MidiTransformDialogBase -{ - Q_OBJECT - - public: - MidiTransformDialogBaseWidget(QDialog *parent = 0, Qt::WFlags f = 0) : QDialog(parent, f) { setupUi(this); } -}; - -//--------------------------------------------------------- // MidiTransformDialog //--------------------------------------------------------- -class MidiTransformerDialog : public MidiTransformDialogBaseWidget { +class MidiTransformerDialog : public QDialog, public Ui::MidiTransformDialogBase { Q_OBJECT MidiTransformPrivate* data; diff --git a/muse2/muse/mplugins/midifilterimpl.cpp b/muse2/muse/mplugins/midifilterimpl.cpp index d02296ba..2c678968 100644 --- a/muse2/muse/mplugins/midifilterimpl.cpp +++ b/muse2/muse/mplugins/midifilterimpl.cpp @@ -39,8 +39,9 @@ void MidiFilterConfig::setCtrl4(int n) //--------------------------------------------------------- MidiFilterConfig::MidiFilterConfig(QDialog* parent) - : MidiFilterConfigBaseWidget(parent) + : QDialog(parent) { + setupUi(this); cb1->setCurrentItem(midiFilterCtrl1); cb2->setCurrentItem(midiFilterCtrl2); cb3->setCurrentItem(midiFilterCtrl3); diff --git a/muse2/muse/mplugins/midifilterimpl.h b/muse2/muse/mplugins/midifilterimpl.h index aec17ada..bbda7757 100644 --- a/muse2/muse/mplugins/midifilterimpl.h +++ b/muse2/muse/mplugins/midifilterimpl.h @@ -15,23 +15,10 @@ class QCloseEvent; //--------------------------------------------------------- -// MidiFilterConfigBaseWidget -// Wrapper around Ui::MidiFilterConfigBase -//--------------------------------------------------------- - -class MidiFilterConfigBaseWidget : public QDialog, public Ui::MidiFilterConfigBase -{ - Q_OBJECT - - public: - MidiFilterConfigBaseWidget(QDialog *parent = 0) : QDialog(parent) { setupUi(this); } -}; - -//--------------------------------------------------------- // MidiFilterConfig //--------------------------------------------------------- -class MidiFilterConfig : public MidiFilterConfigBaseWidget { +class MidiFilterConfig : public QDialog, public Ui::MidiFilterConfigBase { Q_OBJECT void rChanged(bool f, int val) { diff --git a/muse2/muse/mplugins/midiitransform.cpp b/muse2/muse/mplugins/midiitransform.cpp index e7d8763b..32fcbea0 100644 --- a/muse2/muse/mplugins/midiitransform.cpp +++ b/muse2/muse/mplugins/midiitransform.cpp @@ -592,8 +592,9 @@ bool MidiInputTransformation::typesMatch(MidiRecordEvent& e, int selType) const //--------------------------------------------------------- MidiInputTransformDialog::MidiInputTransformDialog(QDialog* parent, Qt::WFlags fl) - : MidiInputTransformDialogBaseWidget(parent, fl) + : QDialog(parent, fl) { + setupUi(this); cindex = 0; cmodul = 0; cmt = 0; diff --git a/muse2/muse/mplugins/midiitransform.h b/muse2/muse/mplugins/midiitransform.h index 3180bf23..b9288319 100644 --- a/muse2/muse/mplugins/midiitransform.h +++ b/muse2/muse/mplugins/midiitransform.h @@ -25,23 +25,10 @@ class Xml; enum InputTransformProcEventOp { KeepType, FixType }; //--------------------------------------------------------- -// MidiInputTransformDialogBaseWidget -// Wrapper around Ui::MidiInputTransformDialogBase -//--------------------------------------------------------- - -class MidiInputTransformDialogBaseWidget : public QDialog, public Ui::MidiInputTransformDialogBase -{ - Q_OBJECT - - public: - MidiInputTransformDialogBaseWidget(QDialog *parent = 0, Qt::WFlags f = 0) : QDialog(parent, f) { setupUi(this); } -}; - -//--------------------------------------------------------- // MidiInputTransform //--------------------------------------------------------- -class MidiInputTransformDialog : public MidiInputTransformDialogBaseWidget { +class MidiInputTransformDialog : public QDialog, public Ui::MidiInputTransformDialogBase { Q_OBJECT MidiInputTransformation* cmt; int cindex; // current index in preset list diff --git a/muse2/muse/mplugins/mittranspose.cpp b/muse2/muse/mplugins/mittranspose.cpp index 95b3b3de..d64022be 100644 --- a/muse2/muse/mplugins/mittranspose.cpp +++ b/muse2/muse/mplugins/mittranspose.cpp @@ -23,8 +23,9 @@ MITPluginTranspose* mitPluginTranspose; //--------------------------------------------------------- MITPluginTranspose::MITPluginTranspose(QWidget* parent, Qt::WFlags fl) - : MITTransposeBaseWidget(parent, fl) + : QWidget(parent, fl) { + setupUi(this); on = false; transpose = 0; trigger = 24; diff --git a/muse2/muse/mplugins/mittranspose.h b/muse2/muse/mplugins/mittranspose.h index b794e274..fcbc96e3 100644 --- a/muse2/muse/mplugins/mittranspose.h +++ b/muse2/muse/mplugins/mittranspose.h @@ -34,23 +34,10 @@ typedef KeyOnList::iterator iKeyOn; class Xml; //--------------------------------------------------------- -// MITTransposeBaseWidget -// Wrapper around Ui::MITTransposeBase -//--------------------------------------------------------- - -class MITTransposeBaseWidget : public QWidget, public Ui::MITTransposeBase -{ - Q_OBJECT - - public: - MITTransposeBaseWidget(QWidget *parent = 0, Qt::WFlags f = 0) : QWidget(parent, f) { setupUi(this); } -}; - -//--------------------------------------------------------- // MITPluginTranspose //--------------------------------------------------------- -class MITPluginTranspose : public MITTransposeBaseWidget, public MITPlugin { +class MITPluginTranspose : public QWidget, public Ui::MITTransposeBase, public MITPlugin { Q_OBJECT KeyOnList keyOnList; diff --git a/muse2/muse/mplugins/mrconfig.cpp b/muse2/muse/mplugins/mrconfig.cpp index 290aba67..f64384af 100644 --- a/muse2/muse/mplugins/mrconfig.cpp +++ b/muse2/muse/mplugins/mrconfig.cpp @@ -18,8 +18,9 @@ //--------------------------------------------------------- MRConfig::MRConfig(QWidget* parent, Qt::WFlags fl) - : MRConfigBaseWidget(parent, fl) + : QWidget(parent, fl) { + setupUi(this); b1->setChecked(rcEnable); sb1->setValue(rcStopNote); sb2->setValue(rcRecordNote); diff --git a/muse2/muse/mplugins/mrconfig.h b/muse2/muse/mplugins/mrconfig.h index c58ddc19..e829c15c 100644 --- a/muse2/muse/mplugins/mrconfig.h +++ b/muse2/muse/mplugins/mrconfig.h @@ -15,26 +15,10 @@ class QCloseEvent; class QWidget; //--------------------------------------------------------- -// MRConfigBaseWidget -// Wrapper around Ui::MRConfigBase -//--------------------------------------------------------- - -class MRConfigBaseWidget : public QWidget, public Ui::MRConfigBase -{ - Q_OBJECT - - public: - MRConfigBaseWidget(QWidget *parent = 0, Qt::WFlags f = 0) : QWidget(parent, f) { setupUi(this); } -}; - - - - -//--------------------------------------------------------- // MRConfig //--------------------------------------------------------- -class MRConfig : public MRConfigBaseWidget { +class MRConfig : public QWidget, public Ui::MRConfigBase { Q_OBJECT virtual void closeEvent(QCloseEvent*); diff --git a/muse2/muse/widgets/comment.cpp b/muse2/muse/widgets/comment.cpp index 4a091ddb..46747d0e 100644 --- a/muse2/muse/widgets/comment.cpp +++ b/muse2/muse/widgets/comment.cpp @@ -16,8 +16,9 @@ //--------------------------------------------------------- Comment::Comment(QWidget* parent) - : CommentBaseWidget(parent) + : QWidget(parent) { + setupUi(this); } //--------------------------------------------------------- diff --git a/muse2/muse/widgets/comment.h b/muse2/muse/widgets/comment.h index f2dfbccc..688d7b2f 100644 --- a/muse2/muse/widgets/comment.h +++ b/muse2/muse/widgets/comment.h @@ -15,23 +15,10 @@ class Track; class QWidget; //--------------------------------------------------------- -// CommentBaseWidget -// Wrapper around Ui::CommentBase -//--------------------------------------------------------- - -class CommentBaseWidget : public QWidget, public Ui::CommentBase -{ - Q_OBJECT - - public: - CommentBaseWidget(QWidget *parent = 0) : QWidget(parent) { setupUi(this); } -}; - -//--------------------------------------------------------- // Comment //--------------------------------------------------------- -class Comment : public CommentBaseWidget { +class Comment : public QWidget, public Ui::CommentBase { Q_OBJECT private: diff --git a/muse2/muse/widgets/metronome.cpp b/muse2/muse/widgets/metronome.cpp index da854450..0a333b59 100644 --- a/muse2/muse/widgets/metronome.cpp +++ b/muse2/muse/widgets/metronome.cpp @@ -20,8 +20,9 @@ //--------------------------------------------------------- MetronomeConfig::MetronomeConfig(QDialog* parent) - : MetronomeConfigBaseWidget(parent) + : QDialog(parent) { + setupUi(this); connect(buttonApply, SIGNAL(clicked()), SLOT(apply())); connect(midiClick, SIGNAL(toggled(bool)), SLOT(midiClickChanged(bool))); connect(precountEnable, SIGNAL(toggled(bool)), SLOT(precountEnableChanged(bool))); @@ -105,7 +106,7 @@ void MetronomeConfig::audioBeepRoutesClicked() void MetronomeConfig::accept() { apply(); - MetronomeConfigBaseWidget::accept(); + QDialog::accept(); } //--------------------------------------------------------- @@ -140,7 +141,7 @@ void MetronomeConfig::apply() void MetronomeConfig::reject() { - MetronomeConfigBaseWidget::reject(); + QDialog::reject(); } //--------------------------------------------------------- diff --git a/muse2/muse/widgets/metronome.h b/muse2/muse/widgets/metronome.h index 57d04f52..976dfcd0 100644 --- a/muse2/muse/widgets/metronome.h +++ b/muse2/muse/widgets/metronome.h @@ -14,23 +14,10 @@ class QDialog; //--------------------------------------------------------- -// MetronomeConfigBaseWidget -// Wrapper around Ui::MetronomeConfigBase -//--------------------------------------------------------- - -class MetronomeConfigBaseWidget : public QDialog, public Ui::MetronomeConfigBase -{ - Q_OBJECT - - public: - MetronomeConfigBaseWidget(QDialog *parent = 0) : QDialog(parent) { setupUi(this); } -}; - -//--------------------------------------------------------- // MetronomeConfig //--------------------------------------------------------- -class MetronomeConfig : public MetronomeConfigBaseWidget { +class MetronomeConfig : public QDialog, public Ui::MetronomeConfigBase { Q_OBJECT private slots: diff --git a/muse2/muse/widgets/velocity.cpp b/muse2/muse/widgets/velocity.cpp index 209caa72..309beb4d 100644 --- a/muse2/muse/widgets/velocity.cpp +++ b/muse2/muse/widgets/velocity.cpp @@ -13,8 +13,9 @@ //--------------------------------------------------------- Velocity::Velocity(QDialog* parent) - : VelocityBaseWidget(parent) + : QDialog(parent) { + setupUi(this); rangeGroup = new QButtonGroup; rangeGroup->addButton(allEvents,0); rangeGroup->addButton(selectedEvents,1); @@ -31,7 +32,7 @@ void Velocity::accept() _range = rangeGroup->checkedId(); _rateVal = rate->value(); _offsetVal = offset->value(); - VelocityBaseWidget::accept(); + QDialog::accept(); } //--------------------------------------------------------- diff --git a/muse2/muse/widgets/velocity.h b/muse2/muse/widgets/velocity.h index ad8a3b8d..cf5b2779 100644 --- a/muse2/muse/widgets/velocity.h +++ b/muse2/muse/widgets/velocity.h @@ -13,26 +13,10 @@ class QButtonGroup; //--------------------------------------------------------- -// VelocityBaseWidget -// Wrapper around Ui::VelocityBase -//--------------------------------------------------------- - -class VelocityBaseWidget : public QDialog, public Ui::VelocityBase -{ - Q_OBJECT - - public: - VelocityBaseWidget(QDialog *parent = 0) - : QDialog(parent) - { setupUi(this); } -}; - - -//--------------------------------------------------------- // Velocity //--------------------------------------------------------- -class Velocity : public VelocityBaseWidget { +class Velocity : public QDialog, public Ui::VelocityBase { int _range; int _rateVal; int _offsetVal; |