diff options
author | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-11-28 02:49:05 +0000 |
---|---|---|
committer | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-11-28 02:49:05 +0000 |
commit | 24fe49ade1524c1c2b4a6e97d7281457ece4912c (patch) | |
tree | 6e5fcccfc17f647ecfcb97c5192e6a53f838ad13 /muse2/muse | |
parent | 460049b88bcd2aa374895a0fdaac2608f25418a8 (diff) |
See ChangeLog
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/app.h | 5 | ||||
-rw-r--r-- | muse2/muse/arranger/arranger.cpp | 1 | ||||
-rw-r--r-- | muse2/muse/arranger/arranger.h | 4 | ||||
-rw-r--r-- | muse2/muse/arranger/trackinfo.cpp | 24 | ||||
-rw-r--r-- | muse2/muse/dssihost.cpp | 9 | ||||
-rw-r--r-- | muse2/muse/dssihost.h | 7 | ||||
-rw-r--r-- | muse2/muse/icons.cpp | 3 | ||||
-rw-r--r-- | muse2/muse/icons.h | 1 | ||||
-rw-r--r-- | muse2/muse/synth.cpp | 11 | ||||
-rw-r--r-- | muse2/muse/synth.h | 10 | ||||
-rw-r--r-- | muse2/muse/ticksynth.cpp | 6 | ||||
-rw-r--r-- | muse2/muse/vst.h | 6 | ||||
-rw-r--r-- | muse2/muse/widgets/appearancebase.ui | 29 | ||||
-rw-r--r-- | muse2/muse/widgets/combobox.cpp | 13 | ||||
-rw-r--r-- | muse2/muse/widgets/combobox.h | 9 |
15 files changed, 50 insertions, 88 deletions
diff --git a/muse2/muse/app.h b/muse2/muse/app.h index 5618b181..6d2519b9 100644 --- a/muse2/muse/app.h +++ b/muse2/muse/app.h @@ -11,12 +11,11 @@ #include "config.h" -//#include <q3mainwindow.h> #include <QMainWindow> #include <QRect> //Added by qt3to4: #include <Qt3Support> -//#include <Q3PopupMenu> + #include <QMenu> #include <QFocusEvent> #include <QCloseEvent> @@ -32,8 +31,6 @@ class Transport; class BigTime; class Arranger; class Instrument; -class Q3ListView; -class Q3ListViewItem; class QPoint; class QToolButton; class PopupMenu; diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp index 89bde276..cf9bdac4 100644 --- a/muse2/muse/arranger/arranger.cpp +++ b/muse2/muse/arranger/arranger.cpp @@ -21,7 +21,6 @@ //#include <q3toolbar.h> #include <QToolBar> //#include <QToolTip> -#include <q3popupmenu.h> #include <q3hbox.h> #include <QStringList> #include <q3filedialog.h> diff --git a/muse2/muse/arranger/arranger.h b/muse2/muse/arranger/arranger.h index 90b36ca8..b95b9379 100644 --- a/muse2/muse/arranger/arranger.h +++ b/muse2/muse/arranger/arranger.h @@ -15,7 +15,7 @@ #include <q3whatsthis.h> //Added by qt3to4: #include <QWheelEvent> -#include <Q3PopupMenu> +#include <QMenu> #include "midieditor.h" #include "pcanvas.h" @@ -117,7 +117,7 @@ class Arranger : public QWidget { QToolButton* ib; int trackInfoType; Splitter* split; - Q3PopupMenu* pop; + QMenu* pop; int songType; PosLabel* cursorPos; SpinBox* globalTempoSpinBox; diff --git a/muse2/muse/arranger/trackinfo.cpp b/muse2/muse/arranger/trackinfo.cpp index 8437563d..d3ea73b5 100644 --- a/muse2/muse/arranger/trackinfo.cpp +++ b/muse2/muse/arranger/trackinfo.cpp @@ -5,23 +5,11 @@ // (C) Copyright 1999-2004 Werner Schweer (ws@seh.de) //========================================================= -#include <QLayout> -#include <QComboBox> -#include <QToolButton> -#include <QLabel> #include <QPalette> #include <QColor> #include <QMenu> -#include <QMessageBox> -//#include <q3hbox.h> -#include <QCheckBox> -#include <QPushButton> -//#include <q3widgetstack.h> -#include <QLineEdit> -#include <QTimer> -//#include <QModelIndex> -//Added by qt3to4: #include <QPixmap> + #include <math.h> #include <string.h> @@ -40,7 +28,6 @@ #include "mixer/amixer.h" #include "midi.h" #include "midictrl.h" -#include "xpm/muse_leftside_logo.xpm" #include "mixer/astrip.h" #include "icons.h" #include "app.h" @@ -359,7 +346,7 @@ void Arranger::genTrackInfo(QWidget* parent) noTrackInfo = new QWidget(trackInfo); QPixmap *noInfoPix = new QPixmap(160, 1000); //muse_leftside_logo_xpm); - const QPixmap *logo = new QPixmap(muse_leftside_logo_xpm); + const QPixmap *logo = new QPixmap(*museLeftSideLogo); noInfoPix->fill(noTrackInfo->paletteBackgroundColor() ); copyBlt(noInfoPix, 10, 0, logo, 0,0, logo->width(), logo->height()); noTrackInfo->setPaletteBackgroundPixmap(*noInfoPix); @@ -1000,8 +987,9 @@ void Arranger::instrPopup() if(pop->count() == 0) return; - int rv = pop->exec(midiTrackInfo->iPatch->mapToGlobal(QPoint(10,5))); - if (rv != -1) { + QAction *act = pop->exec(midiTrackInfo->iPatch->mapToGlobal(QPoint(10,5))); + if (act) { + int rv = act->data().toInt(); MidiPlayEvent ev(0, port, channel, ME_CONTROLLER, CTRL_PROGRAM, rv); audio->msgPlayMidiEvent(&ev); updateTrackInfo(-1); @@ -1228,7 +1216,7 @@ void Arranger::genMidiTrackInfo() connect(midiTrackInfo->iPatch, SIGNAL(released()), SLOT(instrPopup())); - pop = new Q3PopupMenu(midiTrackInfo->iPatch); + pop = new QMenu(midiTrackInfo->iPatch); pop->setCheckable(false); // Removed by Tim. p3.3.9 diff --git a/muse2/muse/dssihost.cpp b/muse2/muse/dssihost.cpp index 3a3c55f1..93ede9bd 100644 --- a/muse2/muse/dssihost.cpp +++ b/muse2/muse/dssihost.cpp @@ -37,7 +37,7 @@ #include <qdir.h> //#include <qstringlist.h> #include <QFileInfo> -#include <q3popupmenu.h> +#include <QMenu> //#include <qprocess.h> #include "dssihost.h" @@ -2870,7 +2870,7 @@ const char* DssiSynthIF::getPatchName(int /*chan*/, int prog, MType /*type*/, bo //--------------------------------------------------------- //void DssiSynthIF::populatePatchPopup(QMenu* menu, int) -void DssiSynthIF::populatePatchPopup(Q3PopupMenu* menu, int /*ch*/, MType /*type*/, bool /*drum*/) +void DssiSynthIF::populatePatchPopup(QMenu* menu, int /*ch*/, MType /*type*/, bool /*drum*/) { // The plugin can change the programs, patches etc. // So make sure we're up to date by calling queryPrograms. @@ -2884,9 +2884,8 @@ void DssiSynthIF::populatePatchPopup(Q3PopupMenu* menu, int /*ch*/, MType /*type int prog = i->Program; int id = (bank << 16) + prog; - //QAction* a = menu->addAction(QString(i->Name)); - //a->setData(id); - menu->insertItem(QString(i->Name), id); + QAction *act = menu->addAction(QString(i->Name)); + act->setData(id); } } diff --git a/muse2/muse/dssihost.h b/muse2/muse/dssihost.h index 046343f5..c574a719 100644 --- a/muse2/muse/dssihost.h +++ b/muse2/muse/dssihost.h @@ -41,8 +41,8 @@ #include "stringparam.h" #include "plugin.h" -//Added by qt3to4: -#include <Q3PopupMenu> + +#include <QMenu> #define DSSI_PARAMSAVE_VERSION_MAJOR 0 #define DSSI_PARAMSAVE_VERSION_MINOR 1 @@ -52,7 +52,6 @@ class DssiPluginIF; //class LadspaPort; class Port; -class Q3Process; //--------------------------------------------------------- // DssiSynth @@ -191,7 +190,7 @@ class DssiSynthIF : public SynthIF, public PluginIBase virtual const char* getPatchName(int, int, MType, bool); //virtual void populatePatchPopup(QMenu*, int); - virtual void populatePatchPopup(Q3PopupMenu*, int, MType, bool); + virtual void populatePatchPopup(QMenu*, int, MType, bool); //virtual void write(Xml& xml) const; virtual void write(int level, Xml& xml) const; diff --git a/muse2/muse/icons.cpp b/muse2/muse/icons.cpp index e3be2b26..7e93d037 100644 --- a/muse2/muse/icons.cpp +++ b/muse2/muse/icons.cpp @@ -211,6 +211,7 @@ #include "xpm/stereo.xpm" #include "xpm/muse_icon.xpm" #include "xpm/about_muse.xpm" +#include "xpm/muse_leftside_logo.xpm" #include "xpm/global.xpm" #include "xpm/project.xpm" @@ -432,6 +433,7 @@ QPixmap* monoIcon; QPixmap* stereoIcon; QPixmap* museIcon; QPixmap* aboutMuseImage; +QPixmap* museLeftSideLogo; QIcon* globalIcon; QIcon* projectIcon; @@ -650,6 +652,7 @@ void initIcons() museIcon = new MPIXMAP(muse_icon_xpm, NULL); aboutMuseImage = new MPIXMAP(about_muse_xpm, NULL); + museLeftSideLogo = new MPIXMAP(muse_leftside_logo_xpm, NULL); globalIcon = new MICON(global_xpm, "folder"); userIcon = new MICON(user_xpm, "user-home"); projectIcon = new MICON(project_xpm, "folder-sound"); diff --git a/muse2/muse/icons.h b/muse2/muse/icons.h index f0fd89c2..5f518958 100644 --- a/muse2/muse/icons.h +++ b/muse2/muse/icons.h @@ -218,6 +218,7 @@ extern QPixmap* stereoIcon; extern QPixmap* museIcon; extern QPixmap* aboutMuseImage; +extern QPixmap* museLeftSideLogo; extern QIcon* globalIcon; extern QIcon* projectIcon; diff --git a/muse2/muse/synth.cpp b/muse2/muse/synth.cpp index b6e06e65..8955bd3b 100644 --- a/muse2/muse/synth.cpp +++ b/muse2/muse/synth.cpp @@ -14,10 +14,10 @@ #include <sys/mman.h> #include <vector> #include <fcntl.h> - -#include <qdir.h> #include <dlfcn.h> -#include <q3popupmenu.h> + +#include <QDir> +#include <QMenu> #include "app.h" #include "synth.h" @@ -818,7 +818,7 @@ const char* MessSynthIF::getPatchName(int channel, int prog, MType type, bool dr // populatePatchPopup //--------------------------------------------------------- -void MessSynthIF::populatePatchPopup(Q3PopupMenu* menu, int ch, MType, bool) +void MessSynthIF::populatePatchPopup(QMenu* menu, int ch, MType, bool) { menu->clear(); const MidiPatch* mp = _mess->getPatchInfo(ch, 0); @@ -834,7 +834,8 @@ void MessSynthIF::populatePatchPopup(Q3PopupMenu* menu, int ch, MType, bool) itemnum = } */ - menu->insertItem(QString(mp->name), id); + QAction *act = menu->addAction(QString(mp->name)); + act->setData(id); mp = _mess->getPatchInfo(ch, mp); } } diff --git a/muse2/muse/synth.h b/muse2/muse/synth.h index 627d276f..f2f06978 100644 --- a/muse2/muse/synth.h +++ b/muse2/muse/synth.h @@ -9,8 +9,8 @@ #define __SYNTH_H__ #include <QFileInfo> -//Added by qt3to4: -#include <Q3PopupMenu> +#include <QMenu> + #include <string> #include <vector> #include <map> @@ -132,7 +132,7 @@ class SynthIF { virtual void deactivate3() = 0; virtual const char* getPatchName(int, int, int, bool) const = 0; virtual const char* getPatchName(int, int, MType, bool) = 0; - virtual void populatePatchPopup(Q3PopupMenu*, int, MType, bool) = 0; + virtual void populatePatchPopup(QMenu*, int, MType, bool) = 0; virtual void write(int level, Xml& xml) const = 0; virtual float getParameter(unsigned long idx) const = 0; virtual void setParameter(unsigned long idx, float value) = 0; @@ -214,7 +214,7 @@ class SynthI : public AudioTrack, public MidiDevice, return _sif->getPatchName(ch, prog, t, dr); } - virtual void populatePatchPopup(Q3PopupMenu* m, int i, MType t, bool d) { + virtual void populatePatchPopup(QMenu* m, int i, MType t, bool d) { _sif->populatePatchPopup(m, i, t, d); } @@ -278,7 +278,7 @@ class MessSynthIF : public SynthIF { virtual void deactivate3(); virtual const char* getPatchName(int, int, int, bool) const { return ""; } virtual const char* getPatchName(int, int, MType, bool); - virtual void populatePatchPopup(Q3PopupMenu*, int, MType, bool); + virtual void populatePatchPopup(QMenu*, int, MType, bool); virtual void write(int level, Xml& xml) const; virtual float getParameter(unsigned long) const { return 0.0; } virtual void setParameter(unsigned long, float) {} diff --git a/muse2/muse/ticksynth.cpp b/muse2/muse/ticksynth.cpp index d6d327db..69f3bf2d 100644 --- a/muse2/muse/ticksynth.cpp +++ b/muse2/muse/ticksynth.cpp @@ -8,8 +8,8 @@ #include "audio.h" #include "ticksynth.h" #include "default_click.h" -//Added by qt3to4: -#include <Q3PopupMenu> + +#include <QMenu> // Added by Tim. p3.3.18 //#define METRONOME_DEBUG @@ -84,7 +84,7 @@ class MetronomeSynthIF : public SynthIF virtual void deactivate3() {} virtual const char* getPatchName(int, int, int, bool) const { return ""; } virtual const char* getPatchName(int, int, MType, bool) { return ""; } - virtual void populatePatchPopup(Q3PopupMenu*, int, MType, bool) {}; + virtual void populatePatchPopup(QMenu*, int, MType, bool) {}; virtual void write(int, Xml&) const {} virtual float getParameter(unsigned long) const { return 0.0; } virtual void setParameter(unsigned long, float) {} diff --git a/muse2/muse/vst.h b/muse2/muse/vst.h index 38585e8e..ef3c6f11 100644 --- a/muse2/muse/vst.h +++ b/muse2/muse/vst.h @@ -9,8 +9,8 @@ #define __VST_H__ #include "synth.h" -//Added by qt3to4: -#include <Q3PopupMenu> + +#include <QMenu> struct _FSTHandle; struct _FST; @@ -71,7 +71,7 @@ class VstSynthIF : public SynthIF virtual void deactivate3(); virtual const char* getPatchName(int, int, int, bool) const { return ""; } virtual const char* getPatchName(int, int, MType, bool) { return ""; } - virtual void populatePatchPopup(Q3PopupMenu*, int, MType, bool) {}; + virtual void populatePatchPopup(QMenu*, int, MType, bool) {}; virtual void write(int level, Xml& xml) const; virtual float getParameter(unsigned long idx) const; virtual void setParameter(unsigned long idx, float value); diff --git a/muse2/muse/widgets/appearancebase.ui b/muse2/muse/widgets/appearancebase.ui index dd0c1960..047f34b9 100644 --- a/muse2/muse/widgets/appearancebase.ui +++ b/muse2/muse/widgets/appearancebase.ui @@ -746,7 +746,7 @@ </attribute> <layout class="QVBoxLayout"> <item> - <widget class="Q3GroupBox" name="GroupBox18"> + <widget class="QGroupBox" name="GroupBox18"> <property name="sizePolicy"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <horstretch>0</horstretch> @@ -881,7 +881,7 @@ </widget> </item> <item> - <widget class="Q3GroupBox" name="GroupBox6"> + <widget class="QGroupBox" name="GroupBox6"> <property name="title"> <string>Fonts</string> </property> @@ -1372,31 +1372,6 @@ </widget> <layoutdefault spacing="6" margin="11"/> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> - <customwidget> - <class>Q3GroupBox</class> - <extends>QGroupBox</extends> - <header>Qt3Support/Q3GroupBox</header> - <container>1</container> - </customwidget> - <customwidget> - <class>Q3Frame</class> - <extends>QFrame</extends> - <header>Qt3Support/Q3Frame</header> - <container>1</container> - </customwidget> - <customwidget> - <class>Q3ButtonGroup</class> - <extends>Q3GroupBox</extends> - <header>Qt3Support/Q3ButtonGroup</header> - <container>1</container> - </customwidget> - <customwidget> - <class>Q3ListView</class> - <extends>Q3Frame</extends> - <header>q3listview.h</header> - </customwidget> - </customwidgets> <tabstops> <tabstop>TabWidget2</tabstop> <tabstop>itemList</tabstop> diff --git a/muse2/muse/widgets/combobox.cpp b/muse2/muse/widgets/combobox.cpp index 6e5b100d..3104181a 100644 --- a/muse2/muse/widgets/combobox.cpp +++ b/muse2/muse/widgets/combobox.cpp @@ -5,12 +5,12 @@ // (C) Copyright 2004 Werner Schweer (ws@seh.de) //========================================================= -#include <q3popupmenu.h> -#include <qcursor.h> -//Added by qt3to4: +#include <QCursor> +#include <QMenu> #include <QMouseEvent> #include <QFrame> #include <QLabel> + #include "combobox.h" //--------------------------------------------------------- @@ -22,7 +22,7 @@ ComboBox::ComboBox(QWidget* parent, const char* name) { _currentItem = 0; _id = -1; - list = new Q3PopupMenu(0, "comboPopup"); + list = new QMenu(0); connect(list, SIGNAL(activated(int)), SLOT(activatedIntern(int))); setFrameStyle(QFrame::Panel | QFrame::Raised); setLineWidth(2); @@ -67,8 +67,9 @@ void ComboBox::setCurrentItem(int i) // insertItem //--------------------------------------------------------- -void ComboBox::insertItem(const QString& s, int id, int idx) +void ComboBox::insertItem(const QString& s, int id) { - list->insertItem(s, id, idx); + QAction *act = list->addAction(s); + act->setData(id); } diff --git a/muse2/muse/widgets/combobox.h b/muse2/muse/widgets/combobox.h index 99bb382c..54ed597d 100644 --- a/muse2/muse/widgets/combobox.h +++ b/muse2/muse/widgets/combobox.h @@ -9,11 +9,10 @@ #define __COMBOBOX_H__ #include <qlabel.h> -//Added by qt3to4: -#include <Q3PopupMenu> + #include <QMouseEvent> -class Q3PopupMenu; +class QMenu; //--------------------------------------------------------- // ComboBox @@ -25,7 +24,7 @@ class ComboBox : public QLabel { int _id; int _currentItem; - Q3PopupMenu* list; + QMenu* list; virtual void mousePressEvent(QMouseEvent*); private slots: @@ -38,7 +37,7 @@ class ComboBox : public QLabel { ComboBox(QWidget* parent, const char* name = 0); ~ComboBox(); void setCurrentItem(int); - void insertItem(const QString& s, int id = -1, int idx=-1); + void insertItem(const QString& s, int id = -1); int id() const { return _id; } void setId(int i) { _id = i; } }; |