From 94e5d45e8703b2c03bc4b642ce236758dde76a1a Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Wed, 24 Nov 2010 19:23:36 +0000 Subject: ported fluidgui to Qt4 --- muse2/synti/fluid/CMakeLists.txt | 4 +- muse2/synti/fluid/fluid.cpp | 2 +- muse2/synti/fluid/fluidgui.cpp | 20 ++- muse2/synti/fluid/fluidgui.h | 6 +- muse2/synti/fluid/fluidguibase.ui | 279 +++++++++++++++----------------------- 5 files changed, 129 insertions(+), 182 deletions(-) (limited to 'muse2/synti/fluid') diff --git a/muse2/synti/fluid/CMakeLists.txt b/muse2/synti/fluid/CMakeLists.txt index 0007537f..f2b07929 100644 --- a/muse2/synti/fluid/CMakeLists.txt +++ b/muse2/synti/fluid/CMakeLists.txt @@ -19,8 +19,8 @@ #============================================================================= QT4_WRAP_CPP ( fluid_mocs fluidgui.h ) -# QT4_WRAP_UI ( fluid_uis fluidgui.ui ) -QT4_WRAP_UI3 ( fluid_uis fluidguibase.ui ) + +QT4_WRAP_UI ( fluid_uis fluidguibase.ui ) add_library ( fluid SHARED fluid.cpp diff --git a/muse2/synti/fluid/fluid.cpp b/muse2/synti/fluid/fluid.cpp index 13cfbef3..17a5119e 100644 --- a/muse2/synti/fluid/fluid.cpp +++ b/muse2/synti/fluid/fluid.cpp @@ -38,7 +38,7 @@ class QWidget; -static Mess* instantiate(int sr, QWidget*, QString *projectPathPtr, const char* name) +static Mess* instantiate(int sr, QWidget*, QString* /* projectPathPtr */, const char* name) { ISynth* synth = new ISynth(); synth->setSampleRate(sr); diff --git a/muse2/synti/fluid/fluidgui.cpp b/muse2/synti/fluid/fluidgui.cpp index 909b5086..46a735cd 100644 --- a/muse2/synti/fluid/fluidgui.cpp +++ b/muse2/synti/fluid/fluidgui.cpp @@ -11,26 +11,24 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include + +#include +#include +#include #include "fluidgui.h" #include "muse/midi.h" +#include "muse/icons.h" //--------------------------------------------------------- // FLUIDGui //--------------------------------------------------------- FLUIDGui::FLUIDGui() - : FLUIDGuiBase(0, "fluidgui", Qt::Window), MessGui() + : QDialog(0, Qt::Window), MessGui() { + setupUi(this); + fdialogButton->setIcon(QIcon(*openIcon)); connect(fdialogButton, SIGNAL(clicked()), SLOT(soundFontFileDialog())); connect(loadButton, SIGNAL(clicked()), SLOT(loadFont())); @@ -74,7 +72,7 @@ void FLUIDGui::loadFont() void FLUIDGui::soundFontFileDialog() { - QString s = Q3FileDialog::getOpenFileName(QString::null, QString("*.[Ss][Ff]2"), this); + QString s = QFileDialog::getOpenFileName(QString::null, QString("*.[Ss][Ff]2"), this); if (!s.isEmpty()) { pathEntry->setText(s); } diff --git a/muse2/synti/fluid/fluidgui.h b/muse2/synti/fluid/fluidgui.h index 9aeaa73b..3e564538 100644 --- a/muse2/synti/fluid/fluidgui.h +++ b/muse2/synti/fluid/fluidgui.h @@ -9,14 +9,16 @@ #ifndef __GUI_H__ #define __GUI_H -#include "fluidguibase.h" +#include "ui_fluidguibase.h" #include "libsynti/gui.h" +class QDialog; + //--------------------------------------------------------- // FLUIDGui //--------------------------------------------------------- -class FLUIDGui : public FLUIDGuiBase, public MessGui { +class FLUIDGui : public QDialog, public Ui::FLUIDGuiBase, public MessGui { Q_OBJECT diff --git a/muse2/synti/fluid/fluidguibase.ui b/muse2/synti/fluid/fluidguibase.ui index 80f79e7b..f6709e36 100644 --- a/muse2/synti/fluid/fluidguibase.ui +++ b/muse2/synti/fluid/fluidguibase.ui @@ -1,166 +1,113 @@ - -FLUIDGuiBase - - QDialog - - name - FLUIDGuiBase - - - geometry - - 0 - 0 - 248 - 94 - - - - caption - Form1 - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout1 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel1 - - - text - Soundfont - - - - QLineEdit - - name - pathEntry - - - - QToolButton - - name - fdialogButton - - - text - - - - pixmap - image0 - - - - - - - name - Spacer2 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLayoutWidget - - name - Layout2 - - - - margin - 0 - - - spacing - 6 - - - QPushButton - - name - loadButton - - - sizePolicy - - 5 - 0 - - - - text - Load - - - - - name - Spacer1 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - - - - image0 - 789c5d8fb10ac2301040f77c45e86d45ac955607f1131447411c2e97141daaa07510f1dfcd256992fadae1de23e9d1aa94c7c34e9695780e385c49d2051fb2d4afbe7f9fcedb8f28ea95b4ef5ad6c54c147349727fbf199ec1ceb070b01a566cb0c68655b3524b4b6a5989551b7e5891b5eb105b64555eb541725b1c60f1536c36b80aa9417636dd1de37fcbcea5cfc71d804a2178625316f4406a90e31b02254203d216f7db06c20ed77c1adb34a516526cd314ce6570fb6ec40ff56a68fe - - - + + + FLUIDGuiBase + + + + 0 + 0 + 248 + 94 + + + + Form1 + + + + 6 + + + 11 + + + + + 6 + + + 0 + + + + + Soundfont + + + false + + + + + + + + + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + 6 + + + 0 + + + + + + 0 + 0 + + + + Load + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + qPixmapFromMimeSource + + + -- cgit v1.2.3