summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse2/ChangeLog1
-rw-r--r--muse2/muse/app.cpp6
-rw-r--r--muse2/muse/midiedit/dcanvas.cpp2
-rw-r--r--muse2/muse/midiedit/prcanvas.cpp2
-rw-r--r--muse2/muse/mplugins/mitplugin.cpp2
-rw-r--r--muse2/muse/mplugins/mittranspose.cpp10
-rw-r--r--muse2/muse/mplugins/mittranspose.h23
-rw-r--r--muse2/muse/muse.pro1
-rw-r--r--muse2/muse/widgets/CMakeLists.txt7
-rw-r--r--muse2/muse/widgets/mittransposebase.ui232
-rw-r--r--muse2/muse/widgets/songinfo.h37
-rw-r--r--muse2/muse/widgets/songinfo.ui222
-rw-r--r--muse2/muse/widgets/velocity.cpp23
-rw-r--r--muse2/muse/widgets/velocity.h25
-rw-r--r--muse2/muse/widgets/velocitybase.ui438
15 files changed, 534 insertions, 497 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index 3585d00a..27a35b8c 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,6 +1,7 @@
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)
+ - Ported the following .ui widgets to Qt4: songinfo, mittransposebase, velocitybase (Orcan)
16.11.2010
- Fixed track info sizing problems. In Arranger::switchInfo() added tgrid->update(). (Tim)
QLayout::update() seems to be a new method, we needed to call it here.
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index 1bdcee8e..234897be 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -3124,13 +3124,13 @@ void MusE::startWaveEditor(PartList* pl)
void MusE::startSongInfo(bool editable)
{
printf("startSongInfo!!!!\n");
- SongInfo info;
- info.songInfoText->setText(song->getSongInfo());
+ SongInfoWidget info;
+ info.songInfoText->setPlainText(song->getSongInfo());
info.songInfoText->setReadOnly(!editable);
info.show();
if( info.exec() == QDialog::Accepted) {
if (editable)
- song->setSongInfo(info.songInfoText->text());
+ song->setSongInfo(info.songInfoText->toPlainText());
}
}
diff --git a/muse2/muse/midiedit/dcanvas.cpp b/muse2/muse/midiedit/dcanvas.cpp
index 65138bb4..9ad99b0e 100644
--- a/muse2/muse/midiedit/dcanvas.cpp
+++ b/muse2/muse/midiedit/dcanvas.cpp
@@ -765,7 +765,7 @@ void DrumCanvas::cmd(int cmd)
break;
case CMD_MODIFY_VELOCITY:
{
- Velocity w(this);
+ Velocity w;
w.setRange(0); //TODO: Make this work! Probably put _to & _toInit in ecanvas instead
if (!w.exec())
break;
diff --git a/muse2/muse/midiedit/prcanvas.cpp b/muse2/muse/midiedit/prcanvas.cpp
index 484a12ad..b9116628 100644
--- a/muse2/muse/midiedit/prcanvas.cpp
+++ b/muse2/muse/midiedit/prcanvas.cpp
@@ -1055,7 +1055,7 @@ void PianoCanvas::cmd(int cmd, int quantStrength,
case CMD_MODIFY_VELOCITY:
{
- Velocity w(this);
+ Velocity w;
w.setRange(range);
if (!w.exec())
break;
diff --git a/muse2/muse/mplugins/mitplugin.cpp b/muse2/muse/mplugins/mitplugin.cpp
index d8066e2c..1923f1d6 100644
--- a/muse2/muse/mplugins/mitplugin.cpp
+++ b/muse2/muse/mplugins/mitplugin.cpp
@@ -6,8 +6,6 @@
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
//=========================================================
-#include <q3popupmenu.h>
-
#include "mitplugin.h"
#include "app.h"
#include "event.h"
diff --git a/muse2/muse/mplugins/mittranspose.cpp b/muse2/muse/mplugins/mittranspose.cpp
index b9a260c9..95b3b3de 100644
--- a/muse2/muse/mplugins/mittranspose.cpp
+++ b/muse2/muse/mplugins/mittranspose.cpp
@@ -6,12 +6,8 @@
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
//=========================================================
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qtimer.h>
-//Added by qt3to4:
#include <QCloseEvent>
+#include <QWidget>
#include "mittranspose.h"
#include "song.h"
@@ -26,8 +22,8 @@ MITPluginTranspose* mitPluginTranspose;
// MITPluginTranspose
//---------------------------------------------------------
-MITPluginTranspose::MITPluginTranspose(QWidget* parent, const char* name, Qt::WFlags fl)
- : MITTransposeBase(parent, name, fl)
+MITPluginTranspose::MITPluginTranspose(QWidget* parent, Qt::WFlags fl)
+ : MITTransposeBaseWidget(parent, fl)
{
on = false;
transpose = 0;
diff --git a/muse2/muse/mplugins/mittranspose.h b/muse2/muse/mplugins/mittranspose.h
index b942eddf..b794e274 100644
--- a/muse2/muse/mplugins/mittranspose.h
+++ b/muse2/muse/mplugins/mittranspose.h
@@ -10,10 +10,10 @@
#define __MITTRANSPOSE_H__
#include "mitplugin.h"
-#include "mittransposebase.h"
+#include "ui_mittransposebase.h"
#include <list>
-//Added by qt3to4:
-#include <QCloseEvent>
+
+class QCloseEvent;
struct KeyOn {
unsigned char pitch;
@@ -34,10 +34,23 @@ 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 MITTransposeBase, public MITPlugin {
+class MITPluginTranspose : public MITTransposeBaseWidget, public MITPlugin {
Q_OBJECT
KeyOnList keyOnList;
@@ -58,7 +71,7 @@ class MITPluginTranspose : public MITTransposeBase, public MITPlugin {
void noteReceived();
public:
- MITPluginTranspose(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0);
+ MITPluginTranspose(QWidget* parent = 0, Qt::WFlags fl = 0);
virtual void process(MEvent&);
virtual void readStatus(Xml&);
virtual void writeStatus(int, Xml&) const;
diff --git a/muse2/muse/muse.pro b/muse2/muse/muse.pro
index 183ac3a8..2931e82d 100644
--- a/muse2/muse/muse.pro
+++ b/muse2/muse/muse.pro
@@ -153,6 +153,7 @@ HEADERS = \
./widgets/sliderbase.h \
./widgets/scldraw.h \
./widgets/citem.h \
+ ./widgets/songinfo.h \
./mididev.h \
./midictrl.h \
./midiseq.h \
diff --git a/muse2/muse/widgets/CMakeLists.txt b/muse2/muse/widgets/CMakeLists.txt
index f7be819a..7cbcb959 100644
--- a/muse2/muse/widgets/CMakeLists.txt
+++ b/muse2/muse/widgets/CMakeLists.txt
@@ -128,10 +128,14 @@ QT4_WRAP_CPP (widget_mocs
checkbox.h
vscale.h
action.h
+ songinfo.h
)
QT4_WRAP_UI (UIC
fdialogbuttons.ui
+ mittransposebase.ui
+ songinfo.ui
+ velocitybase.ui
)
@@ -147,7 +151,6 @@ QT4_WRAP_UI3 (widget_ui_headers
commentbase.ui
synthconfigbase.ui
gatetimebase.ui
- velocitybase.ui
metronomebase.ui
mtrackinfobase.ui
wtrackinfobase.ui
@@ -156,11 +159,9 @@ QT4_WRAP_UI3 (widget_ui_headers
editnotedialogbase.ui
editsysexdialogbase.ui
cliplisteditorbase.ui
- mittransposebase.ui
shortcutconfigbase.ui
shortcutcapturedialogbase.ui
aboutbox.ui
- songinfo.ui
didyouknow.ui
configmidifilebase.ui
)
diff --git a/muse2/muse/widgets/mittransposebase.ui b/muse2/muse/widgets/mittransposebase.ui
index 60cd4d9b..20b8c8c3 100644
--- a/muse2/muse/widgets/mittransposebase.ui
+++ b/muse2/muse/widgets/mittransposebase.ui
@@ -1,117 +1,115 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>MITTransposeBase</class>
-<widget class="QWidget">
- <property name="name">
- <cstring>MITTransposeBase</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>423</width>
- <height>50</height>
- </rect>
- </property>
- <property name="caption">
- <string>MusE: Midi Input Plugin: Transpose</string>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>onCheckBox</cstring>
- </property>
- <property name="text">
- <string>On</string>
- </property>
- </widget>
- <widget class="QLabel">
- <property name="name">
- <cstring>TextLabel1</cstring>
- </property>
- <property name="text">
- <string>TriggerKey</string>
- </property>
- <property name="alignment">
- <set>AlignVCenter|AlignRight</set>
- </property>
- <property name="indent">
- <number>5</number>
- </property>
- </widget>
- <widget class="PitchEdit">
- <property name="name">
- <cstring>triggerKeySpinBox</cstring>
- </property>
- </widget>
- <widget class="QLabel">
- <property name="name">
- <cstring>TextLabel2</cstring>
- </property>
- <property name="text">
- <string>Transpose:</string>
- </property>
- <property name="alignment">
- <set>AlignVCenter|AlignRight</set>
- </property>
- <property name="indent">
- <number>5</number>
- </property>
- </widget>
- <widget class="QLabel">
- <property name="name">
- <cstring>transposeLabel</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="paletteBackgroundColor">
- <color>
- <red>255</red>
- <green>255</green>
- <blue>255</blue>
- </color>
- </property>
- <property name="frameShape">
- <enum>Panel</enum>
- </property>
- <property name="lineWidth">
- <number>2</number>
- </property>
- <property name="margin">
- <number>2</number>
- </property>
- <property name="midLineWidth">
- <number>2</number>
- </property>
- <property name="text">
- <string>+0</string>
- </property>
- <property name="alignment">
- <set>AlignVCenter|AlignRight</set>
- </property>
- <property name="indent">
- <number>5</number>
- </property>
- </widget>
- </hbox>
-</widget>
-<layoutdefaults spacing="6" margin="11"/>
-<includes>
- <include location="local" impldecl="in declaration">pitchedit.h</include>
-</includes>
-</UI>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MITTransposeBase</class>
+ <widget class="QWidget" name="MITTransposeBase">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>423</width>
+ <height>50</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MusE: Midi Input Plugin: Transpose</string>
+ </property>
+ <layout class="QHBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QCheckBox" name="onCheckBox">
+ <property name="text">
+ <string>On</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="TextLabel1">
+ <property name="text">
+ <string>TriggerKey</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ <property name="indent">
+ <number>5</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="PitchEdit" name="triggerKeySpinBox" native="true"/>
+ </item>
+ <item>
+ <widget class="QLabel" name="TextLabel2">
+ <property name="text">
+ <string>Transpose:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ <property name="indent">
+ <number>5</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="transposeLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="midLineWidth">
+ <number>2</number>
+ </property>
+ <property name="text">
+ <string>+0</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ <property name="margin">
+ <number>2</number>
+ </property>
+ <property name="indent">
+ <number>5</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>PitchEdit</class>
+ <extends>QWidget</extends>
+ <header>pitchedit.h</header>
+ </customwidget>
+ </customwidgets>
+ <includes>
+ <include location="local">pitchedit.h</include>
+ </includes>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/muse2/muse/widgets/songinfo.h b/muse2/muse/widgets/songinfo.h
new file mode 100644
index 00000000..d566e00a
--- /dev/null
+++ b/muse2/muse/widgets/songinfo.h
@@ -0,0 +1,37 @@
+//=============================================================================
+// MusE
+// Linux Music Editor
+// $Id: songinfo.h,v 1.0.0.0 2010/11/17 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_songinfo.h"
+
+class QDialog;
+
+
+//---------------------------------------------------------
+// SongInfoWidget
+// Wrapper around Ui::SongInfo
+//---------------------------------------------------------
+
+class SongInfoWidget : public QDialog, public Ui::SongInfo
+{
+ Q_OBJECT
+
+ public:
+ SongInfoWidget(QDialog *parent = 0) : QDialog(parent) { setupUi(this); }
+};
diff --git a/muse2/muse/widgets/songinfo.ui b/muse2/muse/widgets/songinfo.ui
index 2e4e7e80..f98c2ffa 100644
--- a/muse2/muse/widgets/songinfo.ui
+++ b/muse2/muse/widgets/songinfo.ui
@@ -1,115 +1,109 @@
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>SongInfo</class>
-<widget class="QDialog">
- <property name="name">
- <cstring>SongInfo</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>403</width>
- <height>274</height>
- </rect>
- </property>
- <property name="caption">
- <string>Song Information</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>layout2</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <widget class="QTextEdit">
- <property name="name">
- <cstring>songInfoText</cstring>
- </property>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>layout1</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <spacer>
- <property name="name">
- <cstring>spacer1</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>311</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="QPushButton">
- <property name="name">
- <cstring>buttonCancel</cstring>
- </property>
- <property name="text">
- <string>&amp;Cancel</string>
- </property>
- <property name="accel">
- <string>Alt+C</string>
- </property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>buttonOk</cstring>
- </property>
- <property name="text">
- <string>&amp;Ok</string>
- </property>
- <property name="accel">
- <string>Alt+O</string>
- </property>
- <property name="default">
- <bool>true</bool>
- </property>
- </widget>
- </hbox>
- </widget>
- </vbox>
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SongInfo</class>
+ <widget class="QDialog" name="SongInfo">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>403</width>
+ <height>274</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Song Information</string>
+ </property>
+ <layout class="QVBoxLayout">
+ <item>
+ <layout class="QVBoxLayout">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QTextEdit" name="songInfoText"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout">
+ <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>311</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="buttonCancel">
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="shortcut">
+ <string>Alt+C</string>
+ </property>
</widget>
- </vbox>
-</widget>
-<connections>
- <connection>
- <sender>buttonOk</sender>
- <signal>clicked()</signal>
- <receiver>SongInfo</receiver>
- <slot>accept()</slot>
- </connection>
- <connection>
- <sender>buttonCancel</sender>
- <signal>clicked()</signal>
- <receiver>SongInfo</receiver>
- <slot>reject()</slot>
- </connection>
-</connections>
-<includes>
- <include location="local" impldecl="in implementation">songinfo.ui.h</include>
-</includes>
-<slots>
- <slot>buttonOk_clicked()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
+ </item>
+ <item>
+ <widget class="QPushButton" name="buttonOk">
+ <property name="text">
+ <string>&amp;Ok</string>
+ </property>
+ <property name="shortcut">
+ <string>Alt+O</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>SongInfo</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>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>SongInfo</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>
diff --git a/muse2/muse/widgets/velocity.cpp b/muse2/muse/widgets/velocity.cpp
index 42eed7c9..209caa72 100644
--- a/muse2/muse/widgets/velocity.cpp
+++ b/muse2/muse/widgets/velocity.cpp
@@ -5,22 +5,21 @@
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
//=========================================================
-#include <q3buttongroup.h>
-#include <qspinbox.h>
-//#include <qbutton.h>
-#include <QtGui>
-
+#include <QButtonGroup>
#include "velocity.h"
-#include "song.h"
-
//---------------------------------------------------------
// Velocity
//---------------------------------------------------------
-Velocity::Velocity(QWidget* parent, const char* name)
- : VelocityBase(parent, name, true)
+Velocity::Velocity(QDialog* parent)
+ : VelocityBaseWidget(parent)
{
+ rangeGroup = new QButtonGroup;
+ rangeGroup->addButton(allEvents,0);
+ rangeGroup->addButton(selectedEvents,1);
+ rangeGroup->addButton(loopedEvents,2);
+ rangeGroup->addButton(selectedLooped,3);
}
//---------------------------------------------------------
@@ -29,10 +28,10 @@ Velocity::Velocity(QWidget* parent, const char* name)
void Velocity::accept()
{
- _range = rangeGroup->id(rangeGroup->selected());
+ _range = rangeGroup->checkedId();
_rateVal = rate->value();
_offsetVal = offset->value();
- VelocityBase::accept();
+ VelocityBaseWidget::accept();
}
//---------------------------------------------------------
@@ -41,6 +40,6 @@ void Velocity::accept()
void Velocity::setRange(int id)
{
- rangeGroup->setButton(id);
+ rangeGroup->button(id)->setChecked(true);
}
diff --git a/muse2/muse/widgets/velocity.h b/muse2/muse/widgets/velocity.h
index 6d2ca60a..ad8a3b8d 100644
--- a/muse2/muse/widgets/velocity.h
+++ b/muse2/muse/widgets/velocity.h
@@ -8,24 +8,43 @@
#ifndef __VELOCITY_H__
#define __VELOCITY_H__
-#include "velocitybase.h"
+#include "ui_velocitybase.h"
+
+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 VelocityBase {
+class Velocity : public VelocityBaseWidget {
int _range;
int _rateVal;
int _offsetVal;
Q_OBJECT
+ QButtonGroup* rangeGroup;
protected slots:
void accept();
public:
- Velocity(QWidget* parent, const char* name = 0);
+ Velocity(QDialog* parent = 0);
void setRange(int id);
int range() const { return _range; }
int rateVal() const { return _rateVal; }
diff --git a/muse2/muse/widgets/velocitybase.ui b/muse2/muse/widgets/velocitybase.ui
index e1510348..9b169c3a 100644
--- a/muse2/muse/widgets/velocitybase.ui
+++ b/muse2/muse/widgets/velocitybase.ui
@@ -1,232 +1,212 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>VelocityBase</class>
-<widget class="QDialog">
- <property name="name">
- <cstring>VelocityBase</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>275</width>
- <height>274</height>
- </rect>
- </property>
- <property name="caption">
- <string>MusE: Modify Velocity</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>VelocityBase</class>
+ <widget class="QDialog" name="VelocityBase">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>275</width>
+ <height>316</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MusE: Modify Velocity</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="rangeBox">
+ <property name="title">
+ <string>Range</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="allEvents">
+ <property name="text">
+ <string>All Events</string>
</property>
- <property name="margin">
- <number>11</number>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="selectedEvents">
+ <property name="text">
+ <string>Selected Events</string>
</property>
- <property name="spacing">
- <number>6</number>
+ <property name="checked">
+ <bool>true</bool>
</property>
- <widget class="QButtonGroup">
- <property name="name">
- <cstring>rangeGroup</cstring>
- </property>
- <property name="title">
- <string>Range</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>RadioButton5</cstring>
- </property>
- <property name="text">
- <string>All Events</string>
- </property>
- <property name="buttonGroupId">
- <number>0</number>
- </property>
- </widget>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>RadioButton6</cstring>
- </property>
- <property name="text">
- <string>Selected Events</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- <property name="buttonGroupId">
- <number>1</number>
- </property>
- </widget>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>RadioButton7</cstring>
- </property>
- <property name="text">
- <string>Looped Events</string>
- </property>
- <property name="buttonGroupId">
- <number>2</number>
- </property>
- </widget>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>RadioButton8</cstring>
- </property>
- <property name="text">
- <string>Selected &amp; Looped</string>
- </property>
- <property name="buttonGroupId">
- <number>3</number>
- </property>
- </widget>
- </vbox>
- </widget>
- <widget class="QGroupBox">
- <property name="name">
- <cstring>GroupBox3</cstring>
- </property>
- <property name="title">
- <string>Values</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLabel" row="0" column="0">
- <property name="name">
- <cstring>TextLabel3</cstring>
- </property>
- <property name="text">
- <string>Rate:</string>
- </property>
- </widget>
- <widget class="QLabel" row="1" column="0">
- <property name="name">
- <cstring>TextLabel4</cstring>
- </property>
- <property name="text">
- <string>Offset:</string>
- </property>
- </widget>
- <widget class="QSpinBox" row="0" column="1">
- <property name="name">
- <cstring>rate</cstring>
- </property>
- <property name="suffix">
- <string>%</string>
- </property>
- <property name="maxValue">
- <number>200</number>
- </property>
- <property name="value">
- <number>100</number>
- </property>
- </widget>
- <widget class="QSpinBox" row="1" column="1">
- <property name="name">
- <cstring>offset</cstring>
- </property>
- <property name="maxValue">
- <number>127</number>
- </property>
- <property name="minValue">
- <number>1</number>
- </property>
- <property name="lineStep">
- <number>1</number>
- </property>
- </widget>
- </grid>
- </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>VelocityBase</receiver>
- <slot>accept()</slot>
- </connection>
- <connection>
- <sender>cancelButton</sender>
- <signal>clicked()</signal>
- <receiver>VelocityBase</receiver>
- <slot>reject()</slot>
- </connection>
-</connections>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="loopedEvents">
+ <property name="text">
+ <string>Looped Events</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="selectedLooped">
+ <property name="text">
+ <string>Selected &amp; Looped</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
+ <string>Values</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="TextLabel3">
+ <property name="text">
+ <string>Rate:</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="rate">
+ <property name="suffix">
+ <string>%</string>
+ </property>
+ <property name="maximum">
+ <number>200</number>
+ </property>
+ <property name="value">
+ <number>100</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="TextLabel4">
+ <property name="text">
+ <string>Offset:</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="offset">
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>127</number>
+ </property>
+ <property name="singleStep">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>6</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>VelocityBase</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>VelocityBase</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>