summaryrefslogtreecommitdiff
path: root/muse2/synti
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2010-11-24 19:23:36 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2010-11-24 19:23:36 +0000
commit94e5d45e8703b2c03bc4b642ce236758dde76a1a (patch)
tree4c9da9dfcfd2ec734dc7aa220041269480757d47 /muse2/synti
parent8c1c0f8433225f5c6783106722d294a7f720a5aa (diff)
ported fluidgui to Qt4
Diffstat (limited to 'muse2/synti')
-rw-r--r--muse2/synti/fluid/CMakeLists.txt4
-rw-r--r--muse2/synti/fluid/fluid.cpp2
-rw-r--r--muse2/synti/fluid/fluidgui.cpp20
-rw-r--r--muse2/synti/fluid/fluidgui.h6
-rw-r--r--muse2/synti/fluid/fluidguibase.ui279
5 files changed, 129 insertions, 182 deletions
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 <unistd.h>
#include <stdlib.h>
-#include <qapplication.h>
-#include <qpixmap.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qtoolbutton.h>
-#include <qpushbutton.h>
-#include <q3filedialog.h>
-#include <qmessagebox.h>
+
+#include <QFileDialog>
+#include <QFileInfo>
+#include <QMessageBox>
#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 @@
-<!DOCTYPE UI><UI>
-<class>FLUIDGuiBase</class>
-<widget>
- <class>QDialog</class>
- <property stdset="1">
- <name>name</name>
- <cstring>FLUIDGuiBase</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>0</x>
- <y>0</y>
- <width>248</width>
- <height>94</height>
- </rect>
- </property>
- <property stdset="1">
- <name>caption</name>
- <string>Form1</string>
- </property>
- <vbox>
- <property stdset="1">
- <name>margin</name>
- <number>11</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget>
- <class>QLayoutWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Layout1</cstring>
- </property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>TextLabel1</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Soundfont</string>
- </property>
- </widget>
- <widget>
- <class>QLineEdit</class>
- <property stdset="1">
- <name>name</name>
- <cstring>pathEntry</cstring>
- </property>
- </widget>
- <widget>
- <class>QToolButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>fdialogButton</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string></string>
- </property>
- <property stdset="1">
- <name>pixmap</name>
- <pixmap>image0</pixmap>
- </property>
- </widget>
- </hbox>
- </widget>
- <spacer>
- <property>
- <name>name</name>
- <cstring>Spacer2</cstring>
- </property>
- <property stdset="1">
- <name>orientation</name>
- <enum>Vertical</enum>
- </property>
- <property stdset="1">
- <name>sizeType</name>
- <enum>Expanding</enum>
- </property>
- <property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget>
- <class>QLayoutWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Layout2</cstring>
- </property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget>
- <class>QPushButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>loadButton</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Load</string>
- </property>
- </widget>
- <spacer>
- <property>
- <name>name</name>
- <cstring>Spacer1</cstring>
- </property>
- <property stdset="1">
- <name>orientation</name>
- <enum>Horizontal</enum>
- </property>
- <property stdset="1">
- <name>sizeType</name>
- <enum>Expanding</enum>
- </property>
- <property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
- </vbox>
-</widget>
-<images>
- <image>
- <name>image0</name>
- <data format="XPM.GZ" length="469">789c5d8fb10ac2301040f77c45e86d45ac955607f1131447411c2e97141daaa07510f1dfcd256992fadae1de23e9d1aa94c7c34e9695780e385c49d2051fb2d4afbe7f9fcedb8f28ea95b4ef5ad6c54c147349727fbf199ec1ceb070b01a566cb0c68655b3524b4b6a5989551b7e5891b5eb105b64555eb541725b1c60f1536c36b80aa9417636dd1de37fcbcea5cfc71d804a2178625316f4406a90e31b02254203d216f7db06c20ed77c1adb34a516526cd314ce6570fb6ec40ff56a68fe</data>
- </image>
-</images>
-</UI>
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>FLUIDGuiBase</class>
+ <widget class="QDialog" name="FLUIDGuiBase">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>248</width>
+ <height>94</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form1</string>
+ </property>
+ <layout class="QVBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="TextLabel1">
+ <property name="text">
+ <string>Soundfont</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="pathEntry"/>
+ </item>
+ <item>
+ <widget class="QToolButton" name="fdialogButton">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="Spacer2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QPushButton" name="loadButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Load</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="Spacer1">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>