From 2794fe038e5e3d200a9a1c549043580bb85149da Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Thu, 18 Nov 2010 16:58:09 +0000 Subject: ported .ui widget to Qt4 --- muse2/ChangeLog | 2 +- muse2/muse/mplugins/CMakeLists.txt | 5 +- muse2/muse/mplugins/mrconfig.cpp | 7 +- muse2/muse/mplugins/mrconfig.h | 27 ++- muse2/muse/mplugins/mrconfigbase.ui | 392 ++++++++++++++++++------------------ 5 files changed, 222 insertions(+), 211 deletions(-) (limited to 'muse2') diff --git a/muse2/ChangeLog b/muse2/ChangeLog index b05cd8de..c632dc75 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -2,7 +2,7 @@ - Updated build part README file - read it! Tell user to specify Release build type. (Tim) - Added printout of build type in top level cmake. (Tim) - Removed duplicate LASH detection in top level cmake. (Tim) - - Ported the following .ui widgets to Qt4: transformbase, itransformbase (Orcan) + - Ported the following .ui widgets to Qt4: transformbase, itransformbase, mrconfigbase (Orcan) 17.11.2010 - Removed a fix which cured graphic corruption for me in MusE-1. Not required now. (Tim) - Small change to Orcan's filedialog, re-enabled global button. (Tim) diff --git a/muse2/muse/mplugins/CMakeLists.txt b/muse2/muse/mplugins/CMakeLists.txt index da2ad902..242540a5 100644 --- a/muse2/muse/mplugins/CMakeLists.txt +++ b/muse2/muse/mplugins/CMakeLists.txt @@ -39,7 +39,9 @@ QT4_WRAP_CPP ( mplugins_mocs mittranspose.h midiitransform.h midifilterimpl.h mrconfig.h rhythm.h ) # QT4_WRAP_UI ( mplugins_uis transform.ui ) -QT4_WRAP_UI3 ( mplugins_uis midifilter.ui mrconfigbase.ui rhythmbase.ui ) + +QT4_WRAP_UI ( mplugins_UIC mrconfigbase.ui ) +QT4_WRAP_UI3 ( mplugins_uis midifilter.ui rhythmbase.ui ) # add_library ( mplugins SHARED add_library ( mplugins STATIC @@ -52,6 +54,7 @@ add_library ( mplugins STATIC random.cpp random.h ${mplugins_mocs} ${mplugins_uis} + ${mplugins_UIC} ) add_dependencies(mplugins widgets) diff --git a/muse2/muse/mplugins/mrconfig.cpp b/muse2/muse/mplugins/mrconfig.cpp index 38b67de3..290aba67 100644 --- a/muse2/muse/mplugins/mrconfig.cpp +++ b/muse2/muse/mplugins/mrconfig.cpp @@ -9,8 +9,7 @@ #include "pitchedit.h" #include "mrconfig.h" #include "globals.h" -#include -//Added by qt3to4: + #include //--------------------------------------------------------- @@ -18,8 +17,8 @@ // Midi Remote Control Config //--------------------------------------------------------- -MRConfig::MRConfig(QWidget* parent, const char* name, Qt::WFlags fl) - : MRConfigBase(parent, name, fl) +MRConfig::MRConfig(QWidget* parent, Qt::WFlags fl) + : MRConfigBaseWidget(parent, fl) { b1->setChecked(rcEnable); sb1->setValue(rcStopNote); diff --git a/muse2/muse/mplugins/mrconfig.h b/muse2/muse/mplugins/mrconfig.h index 67b1976c..c58ddc19 100644 --- a/muse2/muse/mplugins/mrconfig.h +++ b/muse2/muse/mplugins/mrconfig.h @@ -9,15 +9,32 @@ #ifndef __MRCONFIG_H__ #define __MRCONFIG_H__ -#include "mrconfigbase.h" -//Added by qt3to4: -#include +#include "ui_mrconfigbase.h" + +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 MRConfigBase { +class MRConfig : public MRConfigBaseWidget { Q_OBJECT virtual void closeEvent(QCloseEvent*); @@ -33,7 +50,7 @@ class MRConfig : public MRConfigBase { void setRcPlayNote(int); public: - MRConfig(QWidget* parent=0, const char* name=0, Qt::WFlags fl = 0); + MRConfig(QWidget* parent=0, Qt::WFlags fl = 0); }; #endif diff --git a/muse2/muse/mplugins/mrconfigbase.ui b/muse2/muse/mplugins/mrconfigbase.ui index 299f9183..c4d3b1d7 100644 --- a/muse2/muse/mplugins/mrconfigbase.ui +++ b/muse2/muse/mplugins/mrconfigbase.ui @@ -1,200 +1,192 @@ - -MRConfigBase - - - MRConfigBase - - - - 0 - 0 - 298 - 203 - - - - MusE: Midi Input Plugin: Remote Control - - - - unnamed - - - 11 - - - 6 - - - - GroupBox2 - - - Activate - - - - unnamed - - - 11 - - - 6 - - - - b1 - - - On - - - - - - - GroupBox1 - - - Actions - - - - unnamed - - - 11 - - - 6 - - - - TextLabel1 - - - Stop - - - - - TextLabel2 - - - Record - - - - - TextLabel3 - - - Goto Left Mark - - - - - TextLabel4 - - - Play - - - - - sb1 - - - - - sb2 - - - - - sb3 - - - - - sb4 - - - - - Spacer1 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - Spacer2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - Spacer3 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - Spacer4 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - - - - - pitchedit.h - - + + + MRConfigBase + + + + 0 + 0 + 298 + 249 + + + + MusE: Midi Input Plugin: Remote Control + + + + 6 + + + 11 + + + + + Activate + + + + 6 + + + 11 + + + + + On + + + + + + + + + + Actions + + + + 11 + + + 6 + + + + + Stop + + + false + + + + + + + Record + + + false + + + + + + + Goto Left Mark + + + false + + + + + + + Play + + + false + + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + + + qPixmapFromMimeSource + + + PitchEdit + QWidget +
pitchedit.h
+
+
+ + pitchedit.h + + + +
-- cgit v1.2.3