summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse2/ChangeLog1
-rw-r--r--muse2/muse/app.cpp2
-rw-r--r--muse2/muse/transpose.cpp15
-rw-r--r--muse2/muse/transpose.h11
-rw-r--r--muse2/muse/widgets/CMakeLists.txt5
-rw-r--r--muse2/muse/widgets/didyouknow.h37
-rw-r--r--muse2/muse/widgets/didyouknow.ui192
-rw-r--r--muse2/muse/widgets/transposebase.ui473
8 files changed, 377 insertions, 359 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index 40292831..dbb8a4f9 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,6 +1,7 @@
21.11.2010
- All menus now use QActions. Some shortcuts are left to be assigned correctly (Orcan)
- Clean up: Remove submenu integer ids from the MusE class in favor of QActions (Orcan)
+ - Ported the following .ui widgets to Qt4: didyouknow, transposebase (Orcan)
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)
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index 941d9e5d..d9beef13 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -3302,7 +3302,7 @@ void MusE::showDidYouKnowDialog()
{
if ((bool)config.showDidYouKnow == true) {
printf("show did you know dialog!!!!\n");
- DidYouKnow dyk;
+ DidYouKnowWidget dyk;
dyk.tipText->setText("To get started with MusE why don't you try some demo songs available at http://demos.muse-sequencer.org/");
dyk.show();
if( dyk.exec()) {
diff --git a/muse2/muse/transpose.cpp b/muse2/muse/transpose.cpp
index 3090b450..3462dfc4 100644
--- a/muse2/muse/transpose.cpp
+++ b/muse2/muse/transpose.cpp
@@ -2,7 +2,6 @@
#include <stdio.h>
#include <qcombobox.h>
#include <qspinbox.h>
-#include <q3buttongroup.h>
#include <qradiobutton.h>
#include "transpose.h"
#include "track.h"
@@ -14,15 +13,23 @@
// Transpose
//---------------------------------------------------------
-Transpose::Transpose(QWidget* parent, const char* name)
- : TransposeDialogBase(parent, name)
+Transpose::Transpose(QWidget* parent)
+ : QDialog(parent)
{
+ setupUi(this);
+ buttonGroup1 = new QButtonGroup(this);
+ buttonGroup1->addButton(time_all);
+ buttonGroup1->addButton(time_selected);
+ buttonGroup2 = new QButtonGroup(this);
+ buttonGroup2->addButton(parts_all);
+ buttonGroup2->addButton(parts_selected);
+
if (song->lpos() != song->rpos()) {
time_selected->setChecked(true);
}
else {
// time_all->setChecked(true);
- ButtonGroup1->setEnabled(false);
+ ButtonBox1->setEnabled(false);
}
// parts_all->setSelected(true);
}
diff --git a/muse2/muse/transpose.h b/muse2/muse/transpose.h
index a5e004f8..a5d2a1bb 100644
--- a/muse2/muse/transpose.h
+++ b/muse2/muse/transpose.h
@@ -2,20 +2,25 @@
#ifndef __TRANSPOSE_H__
#define __TRANSPOSE_H__
-#include "transposebase.h"
+#include "ui_transposebase.h"
+
+class QButtonGroup;
//---------------------------------------------------------
// transpose widget
//---------------------------------------------------------
-class Transpose : public TransposeDialogBase {
+class Transpose : public QDialog, public Ui::TransposeDialogBase {
Q_OBJECT
+ QButtonGroup* buttonGroup1;
+ QButtonGroup* buttonGroup2;
+
private slots:
virtual void accept();
public:
- Transpose(QWidget* parent=0, const char* name=0);
+ Transpose(QWidget* parent=0);
};
#endif
diff --git a/muse2/muse/widgets/CMakeLists.txt b/muse2/muse/widgets/CMakeLists.txt
index b4b304f2..d91e362d 100644
--- a/muse2/muse/widgets/CMakeLists.txt
+++ b/muse2/muse/widgets/CMakeLists.txt
@@ -129,12 +129,14 @@ QT4_WRAP_CPP (widget_mocs
vscale.h
action.h
songinfo.h
+ didyouknow.h
)
QT4_WRAP_UI (UIC
aboutbox.ui
appearancebase.ui
commentbase.ui
+ didyouknow.ui
editnotedialogbase.ui
editsysexdialogbase.ui
fdialogbuttons.ui
@@ -147,6 +149,7 @@ QT4_WRAP_UI (UIC
shortcutconfigbase.ui
songinfo.ui
transformbase.ui
+ transposebase.ui
velocitybase.ui
)
@@ -155,14 +158,12 @@ QT4_WRAP_UI (UIC
QT4_WRAP_UI3 (widget_ui_headers
midisync.ui
gensetbase.ui
- transposebase.ui
synthconfigbase.ui
editctrl7dialogbase.ui
editmetadialogbase.ui
gatetimebase.ui
wtrackinfobase.ui
cliplisteditorbase.ui
- didyouknow.ui
configmidifilebase.ui
)
diff --git a/muse2/muse/widgets/didyouknow.h b/muse2/muse/widgets/didyouknow.h
new file mode 100644
index 00000000..7dbc03c5
--- /dev/null
+++ b/muse2/muse/widgets/didyouknow.h
@@ -0,0 +1,37 @@
+//=============================================================================
+// MusE
+// Linux Music Editor
+// $Id: didyouknow.h,v 1.0.0.0 2010/11/21 01:01:01 ogetbilo Exp $
+//
+// Copyright (C) 1999-2010 by Werner Schweer and others
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//=============================================================================
+
+#include "ui_didyouknow.h"
+
+class QDialog;
+
+
+//---------------------------------------------------------
+// DidYouKnowWidget
+// Wrapper around Ui::DidYouKnow
+//---------------------------------------------------------
+
+class DidYouKnowWidget : public QDialog, public Ui::DidYouKnow
+{
+ Q_OBJECT
+
+ public:
+ DidYouKnowWidget(QDialog *parent = 0) : QDialog(parent) { setupUi(this); }
+};
diff --git a/muse2/muse/widgets/didyouknow.ui b/muse2/muse/widgets/didyouknow.ui
index 005fa7b6..ee7bab6a 100644
--- a/muse2/muse/widgets/didyouknow.ui
+++ b/muse2/muse/widgets/didyouknow.ui
@@ -1,102 +1,92 @@
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>DidYouKnow</class>
-<widget class="QDialog">
- <property name="name">
- <cstring>DidYouKnow</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>494</width>
- <height>249</height>
- </rect>
- </property>
- <property name="caption">
- <string>Did you know?</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>layout6</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QTextEdit">
- <property name="name">
- <cstring>tipText</cstring>
- </property>
- <property name="readOnly">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>layout5</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>dontShowCheckBox</cstring>
- </property>
- <property name="text">
- <string>Don't show on startup</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>spacer7</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>121</width>
- <height>31</height>
- </size>
- </property>
- </spacer>
- <widget class="QPushButton">
- <property name="name">
- <cstring>nextButton</cstring>
- </property>
- <property name="text">
- <string>Next tip</string>
- </property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>closeButton</cstring>
- </property>
- <property name="text">
- <string>Close</string>
- </property>
- </widget>
- </hbox>
- </widget>
- </vbox>
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DidYouKnow</class>
+ <widget class="QDialog" name="DidYouKnow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>494</width>
+ <height>249</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Did you know?</string>
+ </property>
+ <layout class="QVBoxLayout">
+ <item>
+ <layout class="QVBoxLayout">
+ <item>
+ <widget class="QTextEdit" name="tipText">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout">
+ <item>
+ <widget class="QCheckBox" name="dontShowCheckBox">
+ <property name="text">
+ <string>Don't show on startup</string>
+ </property>
</widget>
- </vbox>
-</widget>
-<connections>
- <connection>
- <sender>closeButton</sender>
- <signal>clicked()</signal>
- <receiver>DidYouKnow</receiver>
- <slot>accept()</slot>
- </connection>
-</connections>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
+ </item>
+ <item>
+ <spacer name="spacer7">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>121</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="nextButton">
+ <property name="text">
+ <string>Next tip</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="closeButton">
+ <property name="text">
+ <string>Close</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>closeButton</sender>
+ <signal>clicked()</signal>
+ <receiver>DidYouKnow</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/muse2/muse/widgets/transposebase.ui b/muse2/muse/widgets/transposebase.ui
index caca7a35..bc570b0d 100644
--- a/muse2/muse/widgets/transposebase.ui
+++ b/muse2/muse/widgets/transposebase.ui
@@ -1,252 +1,229 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>TransposeDialogBase</class>
-<widget class="QDialog">
- <property name="name">
- <cstring>TransposeDialogBase</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>289</width>
- <height>317</height>
- </rect>
- </property>
- <property name="caption">
- <string>MusE: Midi Transpose</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>TransposeDialogBase</class>
+ <widget class="QDialog" name="TransposeDialogBase">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>289</width>
+ <height>340</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MusE: Midi Transpose</string>
+ </property>
+ <layout class="QVBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="GroupBox1">
+ <property name="title">
+ <string>Value</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>11</number>
+ <number>0</number>
</property>
- <property name="spacing">
- <number>6</number>
+ <item>
+ <widget class="QSpinBox" name="delta">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimum">
+ <number>-99</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="TextLabel1">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>halftones</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="ButtonBox1">
+ <property name="title">
+ <string>Time</string>
+ </property>
+ <layout class="QVBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="time_all">
+ <property name="text">
+ <string>all</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="time_selected">
+ <property name="text">
+ <string>between markers</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="ButtonBox2">
+ <property name="title">
+ <string>Parts</string>
+ </property>
+ <layout class="QVBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="parts_all">
+ <property name="text">
+ <string>all</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="parts_selected">
+ <property name="windowTitle">
+ <string/>
+ </property>
+ <property name="text">
+ <string>all in selected tracks</string>
</property>
- <widget class="QGroupBox">
- <property name="name">
- <cstring>GroupBox1</cstring>
- </property>
- <property name="title">
- <string>Value</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout2</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QSpinBox">
- <property name="name">
- <cstring>delta</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minValue">
- <number>-99</number>
- </property>
- </widget>
- <widget class="QLabel">
- <property name="name">
- <cstring>TextLabel1</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>halftones</string>
- </property>
- </widget>
- </hbox>
- </widget>
- </vbox>
- </widget>
- <widget class="QButtonGroup">
- <property name="name">
- <cstring>ButtonGroup1</cstring>
- </property>
- <property name="title">
- <string>Time</string>
- </property>
- <property name="exclusive">
- <bool>true</bool>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>time_all</cstring>
- </property>
- <property name="text">
- <string>all</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>time_selected</cstring>
- </property>
- <property name="text">
- <string>between markers</string>
- </property>
- </widget>
- </vbox>
- </widget>
- <widget class="QButtonGroup">
- <property name="name">
- <cstring>ButtonGroup2</cstring>
- </property>
- <property name="title">
- <string>Parts</string>
- </property>
- <property name="exclusive">
- <bool>true</bool>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>parts_all</cstring>
- </property>
- <property name="text">
- <string>all</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>parts_selected</cstring>
- </property>
- <property name="caption">
- <string></string>
- </property>
- <property name="text">
- <string>all in selected tracks</string>
- </property>
- </widget>
- </vbox>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout3</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer>
- <property name="name" stdset="0">
- <cstring>Spacer1</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="QPushButton">
- <property name="name">
- <cstring>okButton</cstring>
- </property>
- <property name="text">
- <string>OK</string>
- </property>
- <property name="autoDefault">
- <bool>false</bool>
- </property>
- <property name="default">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>cancelButton</cstring>
- </property>
- <property name="text">
- <string>Cancel</string>
- </property>
- </widget>
- </hbox>
- </widget>
- </vbox>
-</widget>
-<connections>
- <connection>
- <sender>okButton</sender>
- <signal>clicked()</signal>
- <receiver>TransposeDialogBase</receiver>
- <slot>accept()</slot>
- </connection>
- <connection>
- <sender>cancelButton</sender>
- <signal>clicked()</signal>
- <receiver>TransposeDialogBase</receiver>
- <slot>reject()</slot>
- </connection>
-</connections>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <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>
+ <item>
+ <widget class="QPushButton" name="okButton">
+ <property name="text">
+ <string>OK</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton">
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>TransposeDialogBase</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>TransposeDialogBase</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>