From ef43b13d1eff9563108b681d0a0e4a7afb394c42 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Sat, 20 Nov 2010 20:38:09 +0000 Subject: ported .ui widgets to Qt4 --- muse2/ChangeLog | 2 + muse2/muse/app.cpp | 4 +- muse2/muse/appearance.cpp | 75 +- muse2/muse/appearance.h | 12 +- muse2/muse/widgets/CMakeLists.txt | 8 +- muse2/muse/widgets/appearancebase.ui | 3390 +++++++++++------------ muse2/muse/widgets/mixdowndialog.cpp | 23 +- muse2/muse/widgets/mixdowndialog.h | 11 +- muse2/muse/widgets/mixdowndialogbase.ui | 439 ++- muse2/muse/widgets/shortcutcapturedialog.cpp | 12 +- muse2/muse/widgets/shortcutcapturedialog.h | 10 +- muse2/muse/widgets/shortcutcapturedialogbase.ui | 258 +- muse2/muse/widgets/shortcutconfig.cpp | 32 +- muse2/muse/widgets/shortcutconfig.h | 21 +- muse2/muse/widgets/shortcutconfigbase.ui | 383 ++- 15 files changed, 2259 insertions(+), 2421 deletions(-) (limited to 'muse2') diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 002b3956..839275e7 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,6 +1,8 @@ 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) + - Ported the following .ui widgets to Qt4: appearancebase, mixdowndialogbase, + shortcutcapturedialogbase, shortcutconfigbase (Orcan) 19.11.2010 - Started some conversions of midieditor, pianoroll, drumedit, incl. their QGridLayouts. (Tim) - More icon conversion work (Orcan) diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 457726e8..fb36c849 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -4124,7 +4124,7 @@ void MusE::configMetronome() void MusE::configShortCuts() { if (!shortcutConfig) - shortcutConfig = new ShortcutConfig(this, "shortcutconfig"); + shortcutConfig = new ShortcutConfig(this); shortcutConfig->_config_changed = false; if (shortcutConfig->exec()) changeConfig(true); @@ -4555,7 +4555,7 @@ void MusE::bounceToFile(AudioOutput* ao) if (checkRegionNotNull()) return; - SndFile* sf = getSndFile(0, this, 0); + SndFile* sf = getSndFile(0, this); if (sf == 0) return; diff --git a/muse2/muse/appearance.cpp b/muse2/muse/appearance.cpp index e47653d5..adcc51ba 100644 --- a/muse2/muse/appearance.cpp +++ b/muse2/muse/appearance.cpp @@ -5,27 +5,13 @@ //========================================================= #include + #include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include #include "icons.h" #include "appearance.h" @@ -44,17 +30,17 @@ // IdListViewItem //--------------------------------------------------------- -class IdListViewItem : public Q3ListViewItem { +class IdListViewItem : public QTreeWidgetItem { int _id; public: - IdListViewItem(int id, Q3ListViewItem* parent, QString s) - : Q3ListViewItem(parent, s) + IdListViewItem(int id, QTreeWidgetItem* parent, QString s) + : QTreeWidgetItem(parent, QStringList(s)) { _id = id; } - IdListViewItem(int id, Q3ListView* parent, QString s) - : Q3ListViewItem(parent, s) + IdListViewItem(int id, QTreeWidget* parent, QString s) + : QTreeWidgetItem(parent, QStringList(s)) { _id = id; } @@ -65,9 +51,10 @@ class IdListViewItem : public Q3ListViewItem { // Appearance //--------------------------------------------------------- -Appearance::Appearance(Arranger* a, QWidget* parent, const char* name) - : AppearanceDialogBase(parent, name) +Appearance::Appearance(Arranger* a, QWidget* parent) + : QDialog(parent) { + setupUi(this); arr = a; color = 0; config = new GlobalConfigValues; @@ -103,6 +90,27 @@ Appearance::Appearance(Arranger* a, QWidget* parent, const char* name) eventButtonGroup->setEnabled(config->canvasShowPartType == 2); arrGrid->setChecked(config->canvasShowGrid); */ + colorframe->setAutoFillBackground(true); + aPalette = new QButtonGroup(aPaletteBox); + + // There must be an easier way to do this by a for loop. No? : + aPalette->addButton(palette0, 0); + aPalette->addButton(palette1, 1); + aPalette->addButton(palette2, 2); + aPalette->addButton(palette3, 3); + aPalette->addButton(palette4, 4); + aPalette->addButton(palette5, 5); + aPalette->addButton(palette6, 6); + aPalette->addButton(palette7, 7); + aPalette->addButton(palette8, 8); + aPalette->addButton(palette9, 9); + aPalette->addButton(palette10, 10); + aPalette->addButton(palette11, 11); + aPalette->addButton(palette12, 12); + aPalette->addButton(palette13, 13); + aPalette->addButton(palette14, 14); + aPalette->addButton(palette15, 15); + aPalette->setExclusive(true); // COLORS IdListViewItem* id; @@ -150,8 +158,8 @@ Appearance::Appearance(Arranger* a, QWidget* parent, const char* name) id = new IdListViewItem(0, itemList, "Wave Editor"); new IdListViewItem(0x300, id, "background"); - connect(itemList, SIGNAL(selectionChanged()), SLOT(colorItemSelectionChanged())); - connect(aPalette, SIGNAL(clicked(int)), SLOT(paletteClicked(int))); + connect(itemList, SIGNAL(itemSelectionChanged()), SLOT(colorItemSelectionChanged())); + connect(aPalette, SIGNAL(buttonClicked(int)), SLOT(paletteClicked(int))); connect(rslider, SIGNAL(valueChanged(int)), SLOT(rsliderChanged(int))); connect(gslider, SIGNAL(valueChanged(int)), SLOT(gsliderChanged(int))); connect(bslider, SIGNAL(valueChanged(int)), SLOT(bsliderChanged(int))); @@ -464,7 +472,7 @@ void Appearance::clearBackground() void Appearance::colorItemSelectionChanged() { - IdListViewItem* item = (IdListViewItem*)itemList->selectedItem(); + IdListViewItem* item = (IdListViewItem*)itemList->selectedItems()[0]; QString txt = item->text(0); int id = item->id(); if (id == 0) { @@ -645,7 +653,8 @@ void Appearance::addToPaletteClicked() { if (!color) return; - QAbstractButton* button = (QAbstractButton*)aPalette->selected(); // ddskrjo + QAbstractButton* button = (QAbstractButton*)aPalette->checkedButton(); // ddskrjo + int r, g, b; QColor c; if (button) { @@ -659,9 +668,9 @@ void Appearance::addToPaletteClicked() c.getRgb(&r, &g, &b); if (r == 0xff && g == 0xff && b == 0xff) { // found empty slot - aPalette->setButton(i); + aPalette->button(i)->toggle(); //aPalette->moveFocus(i); ddskrjo - button = (QAbstractButton*)aPalette->find(i); // ddskrjo + button = (QAbstractButton*)aPalette->button(i); // ddskrjo break; } } @@ -682,7 +691,7 @@ void Appearance::paletteClicked(int id) { if (!color) return; - QAbstractButton* button = (QAbstractButton*)aPalette->find(id); // ddskrjo + QAbstractButton* button = (QAbstractButton*)aPalette->button(id); // ddskrjo if (button) { QColor c = button->paletteBackgroundColor(); int r, g, b; diff --git a/muse2/muse/appearance.h b/muse2/muse/appearance.h index 1225d96a..e2755aef 100644 --- a/muse2/muse/appearance.h +++ b/muse2/muse/appearance.h @@ -1,23 +1,25 @@ #ifndef __APPEARANCE_H__ #define __APPEARANCE_H__ -#include "appearancebase.h" -#include +#include "ui_appearancebase.h" + +class QColor; +class QDialog; class MusE; class Arranger; -class QColor; class GlobalConfigValues; //--------------------------------------------------------- // Appearance Dialog //--------------------------------------------------------- -class Appearance : public AppearanceDialogBase { +class Appearance : public QDialog, public Ui::AppearanceDialogBase { Arranger* arr; QColor* color; QString currentBg; GlobalConfigValues* config; + QButtonGroup* aPalette; Q_OBJECT void updateFonts(); @@ -48,7 +50,7 @@ class Appearance : public AppearanceDialogBase { void paletteClicked(int); public: - Appearance(Arranger*, QWidget* parent=0, const char* name=0); + Appearance(Arranger*, QWidget* parent=0); ~Appearance(); void resetValues(); }; diff --git a/muse2/muse/widgets/CMakeLists.txt b/muse2/muse/widgets/CMakeLists.txt index f5592990..0b438ea7 100644 --- a/muse2/muse/widgets/CMakeLists.txt +++ b/muse2/muse/widgets/CMakeLists.txt @@ -132,12 +132,16 @@ QT4_WRAP_CPP (widget_mocs ) QT4_WRAP_UI (UIC + appearancebase.ui commentbase.ui fdialogbuttons.ui itransformbase.ui metronomebase.ui mittransposebase.ui + mixdowndialogbase.ui mtrackinfobase.ui + shortcutcapturedialogbase.ui + shortcutconfigbase.ui songinfo.ui transformbase.ui velocitybase.ui @@ -148,9 +152,7 @@ QT4_WRAP_UI (UIC QT4_WRAP_UI3 (widget_ui_headers midisync.ui gensetbase.ui - mixdowndialogbase.ui transposebase.ui - appearancebase.ui synthconfigbase.ui gatetimebase.ui wtrackinfobase.ui @@ -159,8 +161,6 @@ QT4_WRAP_UI3 (widget_ui_headers editnotedialogbase.ui editsysexdialogbase.ui cliplisteditorbase.ui - shortcutconfigbase.ui - shortcutcapturedialogbase.ui aboutbox.ui didyouknow.ui configmidifilebase.ui diff --git a/muse2/muse/widgets/appearancebase.ui b/muse2/muse/widgets/appearancebase.ui index 7c9a3e97..ce046b58 100644 --- a/muse2/muse/widgets/appearancebase.ui +++ b/muse2/muse/widgets/appearancebase.ui @@ -1,1764 +1,1640 @@ - -AppearanceDialogBase - - - AppearanceDialogBase - - - - 0 - 0 - 591 - 597 - - - - MusE: Appearance settings - - - - unnamed - - - - TabWidget2 + + + AppearanceDialogBase + + + + 0 + 0 + 591 + 597 + + + + MusE: Appearance settings + + + + + + + 0 + 0 + + + + + Arranger + + + + 11 + + + 6 + + + + + Parts + + + + 6 + + + 11 + + + + + show names + + + + + + show events + + + + + + + show Cakewalk Style + + + + + + + + + + Events + + + + 11 + + + 6 + + + + + note on + + + + + + + poly pressure + + + + + + + controller + + + + + + + aftertouch + + + + + + + pitch bend + + + + + + + program change + + + + + + + special + + + + + + + + + + Background picture + + + + 6 + + + 11 + + + - - 3 - 7 - 0 - 0 - - - - - tab - - - Arranger - - - - unnamed - - - 11 - - - 6 - - - - ButtonGroup3 - - - Parts - - - true - - - - unnamed - - - 11 - - - 6 - - - - partShownames - - - show names - - - - - partShowevents - - - show events - - - - - partShowCakes - - - show Cakewalk Style - - - - - - - eventButtonGroup - - - Events - - - - unnamed - - - 11 - - - 6 - - - - eventNoteon - - - note on - - - - - eventPolypressure - - - poly pressure - - - - - eventController - - - controller - - - - - eventAftertouch - - - aftertouch - - - - - eventPitchbend - - - pitch bend - - - - - eventProgramchange - - - program change - - - - - eventSpecial - - - special - - - - - - - GroupBox2 - - - Background picture - - - - unnamed - - - 11 - - - 6 - - - - currentBgLabel - - - - 7 - 1 - 0 - 0 - - - - bg - - - AlignVCenter|AlignLeft - - - -1 - - - - - - - selectBgButton - - - select... - - - - - clearBgButton - - - clear - - - - - - - arrGrid - - - show snap grid - - - + + 0 + 0 + + + + bg + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + false + + + -1 + + + + + + + select... + + + + + + + clear + + + + + + + + + + show snap grid + + + + + + + + Colors + + + + + + + + Qt::NoFocus + + + Palette + + + 0 + + + + 0 + + + + + + 0 + 0 + + + + + + + true + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + + + add to palette + + + + + + + + 0 + 0 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + + + + 255 + + + + + + + 255 + + + Qt::Horizontal + + + + + + + B + + + Qt::AlignCenter + + + false + + + + + + + S + + + Qt::AlignCenter + + + false + + + + + + + H + + + Qt::AlignCenter + + + false + + + + + + + 255 + + + + + + + 255 + + + Qt::Horizontal + + + + + + + V + + + Qt::AlignCenter + + + false + + + + + + + G + + + Qt::AlignCenter + + + false + + + + + + + 255 + + + + + + + 255 + + + Qt::Horizontal + - - - tab - - - Colors - - - - - unnamed - - - - aPalette - - - NoFocus - - - Palette - - - true - - - 0 - - - - unnamed - - - 0 - - - - palette0 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - true - - - - - palette1 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 1 - - - - - palette2 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 2 - - - - - palette3 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 3 - - - - - palette4 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 4 - - - - - palette5 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 5 - - - - - palette8 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 8 - - - - - palette9 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 9 - - - - - palette10 - - - - 7 - 7 - 0 - 0 - - - - - 238 - 222 - 222 - - - - - - - true - - - 10 - - - - - palette11 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 11 - - - - - palette12 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 12 - - - - - palette13 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 13 - - - - - palette7 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 7 - - - - - palette6 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 6 - - - - - palette15 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 15 - - - - - palette14 - - - - 7 - 7 - 0 - 0 - - - - - - - true - - - 14 - - - - - - - addToPalette - - - add to palette - - - - - colorframe - - - - 7 - 7 - 0 - 0 - - - - StyledPanel - - - Sunken - - - - - layout4 - - - - unnamed - - - - rval - - - 255 - - - - - hslider - - - 255 - - - Horizontal - - - - - textLabel3_2 - - - B - - - AlignCenter - - - - - textLabel5_2 - - - S - - - AlignCenter - - - - - textLabel4_2 - - - H - - - AlignCenter - - - - - bval - - - 255 - - - - - vslider - - - 255 - - - Horizontal - - - - - textLabel6_2 - - - V - - - AlignCenter - - - - - textLabel2_2 - - - G - - - AlignCenter - - - - - sval - - - 255 - - - - - gslider - - - 255 - - - Horizontal - - - - - sslider - - - 255 - - - Horizontal - - - - - bslider - - - 255 - - - Horizontal - - - - - gval - - - 255 - - - - - rslider - - - - 7 - 7 - 0 - 0 - - - - 0 - - - 255 - - - true - - - Horizontal - - - NoMarks - - - - - vval - - - 255 - - - - - hval - - - 255 - - - - - textLabel1 - - - R - - - AlignCenter - - - - - - - - Items - - - false - - - false - - - - itemList - - - true - - - true - - - AllColumns - - - - - - botColorSpacer - - - Vertical - - - Expanding - - - - 20 - 40 - - - - + + + + + 255 + + + Qt::Horizontal + - - - tab - - - Style/Fonts - - - - unnamed - - - - GroupBox18 - - - - 7 - 5 - 0 - 0 - - - - QT Theme - - - - unnamed - - - 11 - - - 6 - - - - layout4 - - - - unnamed - - - - - Windows - - - - - MusE - - - - - Metal - - - - - Norwegian Wood - - - - - Platinum - - - - - CDE - - - - - Motif - - - - - Motif Plus - - - - themeComboBox - - - - 1 - 0 - 0 - 0 - - - - - - Spacer2 - - - Horizontal - - - Expanding - - - - 190 - 20 - - - - - - - - spacer3 - - - Vertical - - - Expanding - - - - 20 - 40 - - - - - - - - GroupBox6 - - - Fonts - - - - unnamed - - - 11 - - - 6 - - - - textLabel2 - - - Family - - - - - TextLabel1_1 - - - Size - - - - - textLabel4 - - - Font 1 - - - - - textLabel5 - - - Font 2 - - - - - textLabel6 - - - Font 3 - - - - - fontName0 - - - - 7 - 0 - 0 - 0 - - - - - - fontName1 - - - - 7 - 0 - 0 - 0 - - - - - - fontName2 - - - - 7 - 0 - 0 - 0 - - - - - - fontName3 - - - - 7 - 0 - 0 - 0 - - - - - - textLabel3 - - - Font 0 - - - - - fontSize0 - - - - 4 - 0 - 0 - 0 - - - - - - fontSize1 - - - - 4 - 0 - 0 - 0 - - - - - - fontSize2 - - - - 4 - 0 - 0 - 0 - - - - - - fontSize3 - - - - 4 - 0 - 0 - 0 - - - - - - bold1 - - - Bold - - - - - bold2 - - - Bold - - - - - bold3 - - - Bold - - - - - bold0 - - - Bold - - - - - italic2 - - - Italic - - - - - italic3 - - - Italic - - - - - italic1 - - - Italic - - - - - italic0 - - - Italic - - - - - fontBrowse0 - - - - 4 - 1 - 0 - 0 - - - - ... - - - - - fontBrowse1 - - - - 4 - 1 - 0 - 0 - - - - ... - - - - - fontBrowse2 - - - - 4 - 1 - 0 - 0 - - - - ... - - - - - fontBrowse3 - - - - 4 - 1 - 0 - 0 - - - - ... - - - - - textLabel7 - - - Font 4 - - - - - fontName4 - - - - 7 - 0 - 0 - 0 - - - - - - textLabel7_2 - - - Font 5 - - - - - fontName5 - - - - 7 - 0 - 0 - 0 - - - - - - textLabel7_3 - - - Font 6 - - - - - fontName6 - - - - 7 - 0 - 0 - 0 - - - - - - fontSize6 - - - - 4 - 0 - 0 - 0 - - - - - - bold6 - - - Bold - - - - - italic6 - - - Italic - - - - - fontBrowse6 - - - - 4 - 1 - 0 - 0 - - - - ... - - - - - fontSize4 - - - - 4 - 0 - 0 - 0 - - - - - - fontSize5 - - - - 4 - 0 - 0 - 0 - - - - - - bold4 - - - Bold - - - - - bold5 - - - Bold - - - - - italic4 - - - Italic - - - - - italic5 - - - Italic - - - - - fontBrowse4 - - - - 4 - 1 - 0 - 0 - - - - ... - - - - - fontBrowse5 - - - - 4 - 1 - 0 - 0 - - - - ... - - - - - + + + + + 255 + + + Qt::Horizontal + + + + + + 255 + + + + + + + + 0 + 0 + + + + 0 + + + 255 + + + true + + + Qt::Horizontal + + + QSlider::NoTicks + + + + + + + 255 + + + + + + + 255 + + + + + + + R + + + Qt::AlignCenter + + + false + + + + + + + + + true + + + true + + + + Items + + + false + + + false + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 40 + + + + + + + + + Style/Fonts + + + + + + + 0 + 0 + + + + QT Theme + + + + 6 + + + 11 + + + + + + + + 0 + 0 + + + + + Windows + + + + + MusE + + + + + Metal + + + + + Norwegian Wood + + + + + Platinum + + + + + CDE + + + + + Motif + + + + + Motif Plus + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 190 + 20 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 40 + + + + + - - - Layout2 - - - - unnamed - - - 0 - - - 6 - - - - Spacer1 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - applyButton - - - Apply - - - - - okButton - - - Ok - - - true - - - - - cancelButton - - - Cancel - - - + + + + + Fonts + + + + 11 + + + 6 + + + + + Family + + + false + + + + + + + Size + + + false + + + + + + + Font 1 + + + false + + + + + + + Font 2 + + + false + + + + + + + Font 3 + + + false + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + Font 0 + + + false + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + Bold + + + + + + + Bold + + + + + + + Bold + + + + + + + Bold + + + + + + + Italic + + + + + + + Italic + + + + + + + Italic + + + + + + + Italic + + + + + + + + 0 + 0 + + + + ... + + + + + + + + 0 + 0 + + + + ... + + + + + + + + 0 + 0 + + + + ... + + + + + + + + 0 + 0 + + + + ... + + + + + + + Font 4 + + + false + + + + + + + + 0 + 0 + + + + + + + + Font 5 + + + false + + + + + + + + 0 + 0 + + + + + + + + Font 6 + + + false + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + Bold + + + + + + + Italic + + + + + + + + 0 + 0 + + + + ... + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + Bold + + + + + + + Bold + + + + + + + Italic + + + + + + + Italic + + + + + + + + 0 + 0 + + + + ... + + + + + + + + 0 + 0 + + + + ... + + + + - - - - - rslider - valueChanged(int) - rval - setValue(int) - - - gslider - valueChanged(int) - gval - setValue(int) - - - bslider - valueChanged(int) - bval - setValue(int) - - - hslider - valueChanged(int) - hval - setValue(int) - - - sslider - valueChanged(int) - sval - setValue(int) - - - vslider - valueChanged(int) - vval - setValue(int) - - - rval - valueChanged(int) - rslider - setValue(int) - - - gval - valueChanged(int) - gslider - setValue(int) - - - bval - valueChanged(int) - bslider - setValue(int) - - - hval - valueChanged(int) - hslider - setValue(int) - - - sval - valueChanged(int) - sslider - setValue(int) - - - vval - valueChanged(int) - vslider - setValue(int) - - - - TabWidget2 - itemList - palette0 - palette1 - palette2 - palette3 - palette4 - palette5 - palette6 - palette7 - palette8 - palette9 - palette10 - palette11 - palette12 - palette13 - palette14 - palette15 - addToPalette - rval - rslider - gval - gslider - bval - bslider - hval - hslider - sval - sslider - vval - vslider - applyButton - okButton - cancelButton - partShownames - partShowevents - partShowCakes - eventNoteon - eventPolypressure - eventController - eventAftertouch - eventPitchbend - eventProgramchange - eventSpecial - selectBgButton - arrGrid - themeComboBox - fontName0 - fontName1 - fontName2 - fontName3 - fontSize0 - fontSize1 - fontSize2 - fontSize3 - bold1 - bold2 - bold3 - bold0 - italic2 - italic3 - italic1 - italic0 - fontName4 - fontName5 - fontSize4 - fontSize5 - bold4 - bold5 - italic4 - italic5 - - - new_slot() - - - + + + + + + + + + 6 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + Apply + + + + + + + Ok + + + true + + + + + + + Cancel + + + + + + + + + qPixmapFromMimeSource + + + Q3GroupBox + QGroupBox +
Qt3Support/Q3GroupBox
+ 1 +
+ + Q3Frame + QFrame +
Qt3Support/Q3Frame
+ 1 +
+ + Q3ButtonGroup + Q3GroupBox +
Qt3Support/Q3ButtonGroup
+ 1 +
+ + Q3ListView + Q3Frame +
q3listview.h
+
+
+ + TabWidget2 + itemList + palette0 + palette1 + palette2 + palette3 + palette4 + palette5 + palette6 + palette7 + palette8 + palette9 + palette10 + palette11 + palette12 + palette13 + palette14 + palette15 + addToPalette + rval + rslider + gval + gslider + bval + bslider + hval + hslider + sval + sslider + vval + vslider + applyButton + okButton + cancelButton + partShownames + partShowevents + partShowCakes + eventNoteon + eventPolypressure + eventController + eventAftertouch + eventPitchbend + eventProgramchange + eventSpecial + selectBgButton + arrGrid + themeComboBox + fontName0 + fontName1 + fontName2 + fontName3 + fontSize0 + fontSize1 + fontSize2 + fontSize3 + bold1 + bold2 + bold3 + bold0 + italic2 + italic3 + italic1 + italic0 + fontName4 + fontName5 + fontSize4 + fontSize5 + bold4 + bold5 + italic4 + italic5 + + + + + rslider + valueChanged(int) + rval + setValue(int) + + + 20 + 20 + + + 20 + 20 + + + + + gslider + valueChanged(int) + gval + setValue(int) + + + 20 + 20 + + + 20 + 20 + + + + + bslider + valueChanged(int) + bval + setValue(int) + + + 20 + 20 + + + 20 + 20 + + + + + hslider + valueChanged(int) + hval + setValue(int) + + + 20 + 20 + + + 20 + 20 + + + + + sslider + valueChanged(int) + sval + setValue(int) + + + 20 + 20 + + + 20 + 20 + + + + + vslider + valueChanged(int) + vval + setValue(int) + + + 20 + 20 + + + 20 + 20 + + + + + rval + valueChanged(int) + rslider + setValue(int) + + + 20 + 20 + + + 20 + 20 + + + + + gval + valueChanged(int) + gslider + setValue(int) + + + 20 + 20 + + + 20 + 20 + + + + + bval + valueChanged(int) + bslider + setValue(int) + + + 20 + 20 + + + 20 + 20 + + + + + hval + valueChanged(int) + hslider + setValue(int) + + + 20 + 20 + + + 20 + 20 + + + + + sval + valueChanged(int) + sslider + setValue(int) + + + 20 + 20 + + + 20 + 20 + + + + + vval + valueChanged(int) + vslider + setValue(int) + + + 20 + 20 + + + 20 + 20 + + + + + diff --git a/muse2/muse/widgets/mixdowndialog.cpp b/muse2/muse/widgets/mixdowndialog.cpp index 0681ca2e..1e2ecc5b 100644 --- a/muse2/muse/widgets/mixdowndialog.cpp +++ b/muse2/muse/widgets/mixdowndialog.cpp @@ -5,13 +5,10 @@ // (C) Copyright 2001 Werner Schweer (ws@seh.de) //========================================================= -#include "mixdowndialog.h" +#include + #include "globals.h" -#include -#include -#include -#include -#include +#include "mixdowndialog.h" #include "wave.h" //--------------------------------------------------------- @@ -19,10 +16,9 @@ // sf - old soundfile, used to preset file parameters //--------------------------------------------------------- -SndFile* getSndFile(const SndFile* sf, QWidget* parent, const char* name) +SndFile* getSndFile(const SndFile* sf, QWidget* parent) { - MixdownFileDialog* dialog = new MixdownFileDialog(sf, parent, - name, true); + MixdownFileDialog* dialog = new MixdownFileDialog(sf, parent); dialog->exec(); SndFile* sndFile = dialog->sndFile(); delete dialog; @@ -34,9 +30,10 @@ SndFile* getSndFile(const SndFile* sf, QWidget* parent, const char* name) //--------------------------------------------------------- MixdownFileDialog::MixdownFileDialog(const SndFile* _sf, - QWidget* parent, const char* name, bool /*modal*/, Qt::WFlags fl) - : MixdownFileDialogBase(parent, name, true, fl) + QWidget* parent, Qt::WFlags fl) + : QDialog(parent, fl) { + setupUi(this); sf = 0; connect(buttonPath, SIGNAL(clicked()), SLOT(fdialog())); if (_sf) { @@ -100,8 +97,8 @@ void MixdownFileDialog::fdialog() QString oldpath; if (sf) oldpath = sf->path(); - QString path = Q3FileDialog::getSaveFileName( - oldpath, tr("Wave Files (*.wav);;All Files (*)"), this, "MixdownFileDialog"); + QString path = QFileDialog::getSaveFileName( + this, 0, oldpath, tr("Wave Files (*.wav);;All Files (*)")); if (!path.isEmpty()) editPath->setText(path); } diff --git a/muse2/muse/widgets/mixdowndialog.h b/muse2/muse/widgets/mixdowndialog.h index 95440b38..750acd28 100644 --- a/muse2/muse/widgets/mixdowndialog.h +++ b/muse2/muse/widgets/mixdowndialog.h @@ -8,18 +8,19 @@ #ifndef __MIXDOWNDIALOG_H__ #define __MIXDOWNDIALOG_H__ -#include "mixdowndialogbase.h" +#include "ui_mixdowndialogbase.h" + +class QWidget; class SndFile; -extern SndFile* getSndFile(const SndFile* sf, QWidget* parent, - const char* name); +extern SndFile* getSndFile(const SndFile* sf, QWidget* parent); //--------------------------------------------------------- // MixdownFileDialog //--------------------------------------------------------- -class MixdownFileDialog : public MixdownFileDialogBase { +class MixdownFileDialog : public QDialog, public Ui::MixdownFileDialogBase { Q_OBJECT SndFile* sf; @@ -29,7 +30,7 @@ class MixdownFileDialog : public MixdownFileDialogBase { public: MixdownFileDialog(const SndFile* f, QWidget* parent = 0, - const char* name = 0, bool modal = false, Qt::WFlags fl = 0); + Qt::WFlags fl = 0); SndFile* sndFile() { return sf; } }; diff --git a/muse2/muse/widgets/mixdowndialogbase.ui b/muse2/muse/widgets/mixdowndialogbase.ui index 830d2a8e..486518fb 100644 --- a/muse2/muse/widgets/mixdowndialogbase.ui +++ b/muse2/muse/widgets/mixdowndialogbase.ui @@ -1,224 +1,217 @@ - -MixdownFileDialogBase - - - MixdownFileDialogBase - - - - 0 - 0 - 381 - 116 - - - - MusE: Set Mixdown Wavefile - - + + + MixdownFileDialogBase + + + + 0 + 0 + 381 + 116 + + + + MusE: Set Mixdown Wavefile + + + true + + + + 11 + + + 6 + + + + + 6 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + &OK + + true - - - - unnamed - - - 11 - - - 6 - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - true - - - true - - - - - buttonCancel - - - &Cancel - - - true - - - - - - - TextLabel1 - - - File Path - - - - - TextLabel2 - - - Channel - - - - - Layout5 - - - - unnamed - - - 0 - - - 6 - - - - editPath - - - - - buttonPath - - - - - - image0 - - - - - - - - Stereo - - - - - Mono - - - - - 5.1 - - - - comboChannel - - - - - - wav,16 Bit - - - - - wav, 24 Bit - - - - - wav, 32 Bit (float) - - - - comboFormat - - - - - TextLabel3 - - - Format - - - - - Spacer1 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - - - 789c5d8fb10ac2301040f77c45e86d45ac955607f1131447411c2e97141daaa07510f1dfcd256992fadae1de23e9d1aa94c7c34e9695780e385c49d2051fb2d4afbe7f9fcedb8f28ea95b4ef5ad6c54c147349727fbf199ec1ceb070b01a566cb0c68655b3524b4b6a5989551b7e5891b5eb105b64555eb541725b1c60f1536c36b80aa9417636dd1de37fcbcea5cfc71d804a2178625316f4406a90e31b02254203d216f7db06c20ed77c1adb34a516526cd314ce6570fb6ec40ff56a68fe - - - - - buttonOk - clicked() - MixdownFileDialogBase - accept() - - - buttonCancel - clicked() - MixdownFileDialogBase - reject() - - - - + + + true + + + + + + + &Cancel + + + true + + + + + + + + + File Path + + + false + + + + + + + Channel + + + false + + + + + + + 6 + + + 0 + + + + + + + + + + + + + + + + + + Stereo + + + + + Mono + + + + + 5.1 + + + + + + + + + wav,16 Bit + + + + + wav, 24 Bit + + + + + wav, 32 Bit (float) + + + + + + + + Format + + + false + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + + + buttonOk + clicked() + MixdownFileDialogBase + accept() + + + 20 + 20 + + + 20 + 20 + + + + + buttonCancel + clicked() + MixdownFileDialogBase + reject() + + + 20 + 20 + + + 20 + 20 + + + + + diff --git a/muse2/muse/widgets/shortcutcapturedialog.cpp b/muse2/muse/widgets/shortcutcapturedialog.cpp index c33b32bf..07482bbd 100644 --- a/muse2/muse/widgets/shortcutcapturedialog.cpp +++ b/muse2/muse/widgets/shortcutcapturedialog.cpp @@ -11,16 +11,14 @@ // #include "shortcutcapturedialog.h" #include "shortcuts.h" -#include -#include -#include -#include -//Added by qt3to4: + #include +#include -ShortcutCaptureDialog::ShortcutCaptureDialog(QWidget* parent, const char* name, int index) - : ShortcutCaptureDialogBase(parent, name, true) +ShortcutCaptureDialog::ShortcutCaptureDialog(QWidget* parent, int index) + : QDialog(parent) { + setupUi(this); QKeySequence q = QKeySequence(shortcuts[index].key); oshrtLabel->setText(q); connect(okButton, SIGNAL( clicked() ), this, SLOT( apply() ) ); diff --git a/muse2/muse/widgets/shortcutcapturedialog.h b/muse2/muse/widgets/shortcutcapturedialog.h index 5a16a90f..a7ba69c7 100644 --- a/muse2/muse/widgets/shortcutcapturedialog.h +++ b/muse2/muse/widgets/shortcutcapturedialog.h @@ -12,11 +12,11 @@ #include "shortcuts.h" #include "filedialog.h" -#include "shortcutcapturedialogbase.h" -//Added by qt3to4: -#include +#include "ui_shortcutcapturedialogbase.h" -class ShortcutCaptureDialog : public ShortcutCaptureDialogBase +class QKeyEvent; + +class ShortcutCaptureDialog : public QDialog, public Ui::ShortcutCaptureDialogBase { Q_OBJECT private: @@ -29,7 +29,7 @@ class ShortcutCaptureDialog : public ShortcutCaptureDialogBase void cancel() { reject(); }; public: - ShortcutCaptureDialog(QWidget* parent, const char* name = 0, int index=0); + ShortcutCaptureDialog(QWidget* parent, int index=0); ~ShortcutCaptureDialog(); }; diff --git a/muse2/muse/widgets/shortcutcapturedialogbase.ui b/muse2/muse/widgets/shortcutcapturedialogbase.ui index 031c86e1..2bcbc798 100644 --- a/muse2/muse/widgets/shortcutcapturedialogbase.ui +++ b/muse2/muse/widgets/shortcutcapturedialogbase.ui @@ -1,134 +1,124 @@ - -ShortcutCaptureDialogBase - - - ShortcutCaptureDialogBase - - - - 0 - 0 - 323 - 285 - - - - Enter shortcut sequence - - - true - - - - unnamed - - - - descrLabel - - - Press keys to enter shortcut sequence! - - - AlignCenter - - - - - messageLabel - - - - - - - - layout11 - - - - unnamed - - - - oshrtTextLabel - - - Old shortcut: - - - - - oshrtLabel - - - Undefined - - - - - - - layout12 - - - - unnamed - - - - nshrtTextLabel - - - New shortcut: - - - - - nshrtLabel - - - Undefined - - - - - - - layout7 - - - - unnamed - - - - okButton - - - false - - - OK - - - - - - - - cancelButton - - - Cancel - - - - - - - - - - - + + + ShortcutCaptureDialogBase + + + + 0 + 0 + 323 + 285 + + + + Enter shortcut sequence + + + true + + + + + + Press keys to enter shortcut sequence! + + + Qt::AlignCenter + + + false + + + + + + + + + + false + + + + + + + + + Old shortcut: + + + false + + + + + + + Undefined + + + false + + + + + + + + + + + New shortcut: + + + false + + + + + + + Undefined + + + false + + + + + + + + + + + false + + + OK + + + + + + + + + + Cancel + + + + + + + + + + + + qPixmapFromMimeSource + + + diff --git a/muse2/muse/widgets/shortcutconfig.cpp b/muse2/muse/widgets/shortcutconfig.cpp index b3288e6d..b41250e1 100644 --- a/muse2/muse/widgets/shortcutconfig.cpp +++ b/muse2/muse/widgets/shortcutconfig.cpp @@ -9,27 +9,28 @@ // Copyright: Mathias Lundgren (lunar_shuttle@users.sourceforge.net) (C) 2003 // // -#include -#include -//Added by qt3to4: #include +#include + #include "shortcutconfig.h" #include "shortcutcapturedialog.h" #include "shortcuts.h" -ShortcutConfig::ShortcutConfig(QWidget* parent, const char* name) - : ShortcutConfigBase(parent, name, true) +ShortcutConfig::ShortcutConfig(QWidget* parent) + : QDialog(parent) { - connect(cgListView, SIGNAL(selectionChanged(Q3ListViewItem* )), - this, SLOT(categorySelChanged(Q3ListViewItem*))); - connect(scListView, SIGNAL(selectionChanged(Q3ListViewItem* )), - this, SLOT(shortcutSelChanged(Q3ListViewItem*))); + setupUi(this); + connect(cgListView, SIGNAL(itemActivated(QTreeWidgetItem*, int )), + this, SLOT(categorySelChanged(QTreeWidgetItem*, int))); + connect(scListView, SIGNAL(itemActivated(QTreeWidgetItem*, int )), + this, SLOT(shortcutSelChanged(QTreeWidgetItem*, int))); + connect(defineButton, SIGNAL(pressed()), this, SLOT(assignShortcut())); connect(clearButton, SIGNAL(pressed()), this, SLOT(clearShortcut())); connect(applyButton, SIGNAL(pressed()), this, SLOT(assignAll())); current_category = ALL_SHRT; - cgListView->setSorting(SHRT_CATEGORY_COL, -1); + cgListView->sortItems(SHRT_CATEGORY_COL, Qt::AscendingOrder); _config_changed = false; //Fill up category listview: @@ -37,7 +38,6 @@ ShortcutConfig::ShortcutConfig(QWidget* parent, const char* name) for (int i=0; i < SHRT_NUM_OF_CATEGORIES; i++) { newItem = new SCListViewItem(cgListView, i); newItem->setText(SHRT_CATEGORY_COL, shortcut_category[i].name); - cgListView->insertItem(newItem); } updateSCListView(); } @@ -58,9 +58,9 @@ void ShortcutConfig::updateSCListView(int category) void ShortcutConfig::assignShortcut() { - SCListViewItem* active = (SCListViewItem*) scListView->selectedItem(); + SCListViewItem* active = (SCListViewItem*) scListView->selectedItems()[0]; int shortcutindex = active->getIndex(); - ShortcutCaptureDialog* sc = new ShortcutCaptureDialog(this, "sccapture", shortcutindex); + ShortcutCaptureDialog* sc = new ShortcutCaptureDialog(this, shortcutindex); int key = sc->exec(); delete(sc); if (key != Rejected) { @@ -75,7 +75,7 @@ void ShortcutConfig::assignShortcut() void ShortcutConfig::clearShortcut() { - SCListViewItem* active = (SCListViewItem*) scListView->selectedItem(); + SCListViewItem* active = (SCListViewItem*) scListView->selectedItems()[0]; int shortcutindex = active->getIndex(); shortcuts[shortcutindex].key = 0; //Cleared active->setText(SHRT_SHRTCUT_COL,""); @@ -84,14 +84,14 @@ void ShortcutConfig::clearShortcut() _config_changed = true; } -void ShortcutConfig::categorySelChanged(Q3ListViewItem* i) +void ShortcutConfig::categorySelChanged(QTreeWidgetItem* i, int /*column*/) { SCListViewItem* item = (SCListViewItem*) i; current_category = shortcut_category[item->getIndex()].id_flag; updateSCListView(current_category); } -void ShortcutConfig::shortcutSelChanged(Q3ListViewItem* in_item) +void ShortcutConfig::shortcutSelChanged(QTreeWidgetItem* in_item, int /*column*/) { defineButton->setEnabled(true); SCListViewItem* active = (SCListViewItem*) in_item; diff --git a/muse2/muse/widgets/shortcutconfig.h b/muse2/muse/widgets/shortcutconfig.h index b1f2857f..0cc11dd7 100644 --- a/muse2/muse/widgets/shortcutconfig.h +++ b/muse2/muse/widgets/shortcutconfig.h @@ -12,10 +12,9 @@ #ifndef __SHORTCUTCONFIG_H #define __SHORTCUTCONFIG_H -#include "shortcutconfigbase.h" -#include -//Added by qt3to4: -#include +class QCloseEvent; + +#include "ui_shortcutconfigbase.h" #define SHRT_CATEGORY_COL 0 enum @@ -24,19 +23,19 @@ enum SHRT_SHRTCUT_COL }; -class SCListViewItem : public Q3ListViewItem { +class SCListViewItem : public QTreeWidgetItem { private: int index; public: - SCListViewItem(Q3ListView* parent, int i) - : Q3ListViewItem(parent), index(i) { } + SCListViewItem(QTreeWidget* parent, int i) + : QTreeWidgetItem(parent), index(i) { } int getIndex() { return index; } }; -class ShortcutConfig : public ShortcutConfigBase { +class ShortcutConfig : public QDialog, public Ui::ShortcutConfigBase { Q_OBJECT private: int current_category; @@ -45,15 +44,15 @@ class ShortcutConfig : public ShortcutConfigBase { void closeEvent(QCloseEvent *e); private slots: - void categorySelChanged(Q3ListViewItem*); - void shortcutSelChanged(Q3ListViewItem*); + void categorySelChanged(QTreeWidgetItem*, int); + void shortcutSelChanged(QTreeWidgetItem*, int); void assignShortcut(); void clearShortcut(); void assignAll(); public: - ShortcutConfig(QWidget* parent, const char* name = 0); + ShortcutConfig(QWidget* parent); bool _config_changed; }; diff --git a/muse2/muse/widgets/shortcutconfigbase.ui b/muse2/muse/widgets/shortcutconfigbase.ui index 2947106c..f91fda1c 100644 --- a/muse2/muse/widgets/shortcutconfigbase.ui +++ b/muse2/muse/widgets/shortcutconfigbase.ui @@ -1,207 +1,178 @@ - -ShortcutConfigBase - - - ShortcutConfigBase - - - - 0 - 0 - 466 - 403 - - - - Configure Keyboard Shortcuts - - - true - - - - unnamed + + + ShortcutConfigBase + + + + 0 + 0 + 466 + 403 + + + + Configure Keyboard Shortcuts + + + true + + + + + + + + + + 3 + + + 0 + + + + + + 1 + 0 + - - - groupBox3 - - - 0 - - - 0 - - - - - - - unnamed - - - 0 - - - 3 - - - - - Shortcut Category - - - true - - - false - - - - cgListView - - - - 1 - 7 - 1 - 0 - - - - - 105 - 200 - - - - - - - Description - - - true - - - true - - - - - Shortcut - - - true - - - true - - - - scListView - - - - 5 - 7 - 2 - 0 - - - - - 170 - 230 - - - - - - - - layout5 - - - - unnamed - - - - spacer3 - - - Horizontal - - - Expanding - - - - 150 - 21 - - - - - - clearButton - - - false - - - &Clear - - - Alt+C - - - - - defineButton - - - false - - - &Define - - - Alt+D - - - - - spacer2 - - - Horizontal - - - Expanding - - - - 30 - 21 - - - - - - applyButton - - - &Apply - - - Alt+A - - - - - - - - + + + 105 + 200 + + + + + Shortcut Category + + + true + + + false + + + + + + + + + 2 + 0 + + + + + 170 + 230 + + + + + Description + + + true + + + true + + + + + Shortcut + + + true + + + true + + + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 150 + 21 + + + + + + + + false + + + &Clear + + + Alt+C + + + + + + + false + + + &Define + + + Alt+D + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 30 + 21 + + + + + + + + &Apply + + + Alt+A + + + + + + + + + qPixmapFromMimeSource + + + -- cgit v1.2.3