summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2010-10-28 00:03:09 +0000
committerTim E. Real <termtech@rogers.com>2010-10-28 00:03:09 +0000
commitff3cde3dfc18ed4214a8d5f79490469216ae2f71 (patch)
tree1cde9b04ecf607663af6047b16db936ce1326bd5 /muse2
parent7591e44b99f770272e47a54ebcf7affc2ee78c45 (diff)
Toolbars: Marker, list, master(s) windows. Fixes for others. Some new style headers fixes.
Diffstat (limited to 'muse2')
-rw-r--r--muse2/muse/app.cpp22
-rw-r--r--muse2/muse/app.h2
-rw-r--r--muse2/muse/arranger/arranger.cpp52
-rw-r--r--muse2/muse/arranger/arranger.h2
-rw-r--r--muse2/muse/liste/listedit.cpp48
-rw-r--r--muse2/muse/marker/markerview.cpp38
-rw-r--r--muse2/muse/marker/markerview.h2
-rw-r--r--muse2/muse/master/lmaster.cpp44
-rw-r--r--muse2/muse/master/lmaster.h8
-rw-r--r--muse2/muse/master/master.cpp10
-rw-r--r--muse2/muse/master/master.h2
-rw-r--r--muse2/muse/master/masteredit.cpp78
-rw-r--r--muse2/muse/master/masteredit.h4
-rw-r--r--muse2/muse/midiedit/drumedit.cpp38
-rw-r--r--muse2/muse/midiedit/drumedit.h6
-rw-r--r--muse2/muse/midiedit/pianoroll.cpp32
-rw-r--r--muse2/muse/midiedit/pianoroll.h4
-rw-r--r--muse2/muse/widgets/lcombo.cpp13
-rw-r--r--muse2/muse/widgets/lcombo.h11
-rw-r--r--muse2/muse/widgets/noteinfo.cpp4
-rw-r--r--muse2/muse/widgets/pitchlabel.cpp4
-rw-r--r--muse2/muse/widgets/pitchlabel.h2
-rw-r--r--muse2/muse/widgets/poslabel.cpp4
-rw-r--r--muse2/muse/widgets/sigedit.cpp13
-rw-r--r--muse2/muse/widgets/sigedit.h4
-rw-r--r--muse2/muse/widgets/spinbox.cpp2
-rw-r--r--muse2/muse/widgets/spinbox.h2
-rw-r--r--muse2/muse/widgets/tb1.cpp16
-rw-r--r--muse2/muse/widgets/tb1.h4
29 files changed, 226 insertions, 245 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index f23a3283..e07b6c6e 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -25,17 +25,17 @@
#include <QButtonGroup>
//#include <q3popupmenu.h>
#include <QMenu>
-#include <qmessagebox.h>
-#include <qclipboard.h>
-#include <qsocketnotifier.h>
-#include <qtextcodec.h>
-#include <qstylefactory.h>
-#include <qmenubar.h>
-#include <qapplication.h>
-#include <qtimer.h>
-#include <qstyle.h>
-#include <qsplashscreen.h>
-#include <qobject.h>
+#include <QMessageBox>
+#include <QClipboard>
+#include <QSocketNotifier>
+#include <QTextCodec>
+#include <QStyleFactory>
+#include <QMenuBar>
+#include <QApplication>
+#include <QTimer>
+#include <QStyle>
+#include <QSplashScreen>
+#include <QObject>
//Added by qt3to4:
#include <QTimerEvent>
#include <Q3CString>
diff --git a/muse2/muse/app.h b/muse2/muse/app.h
index b3dd701a..4728f74f 100644
--- a/muse2/muse/app.h
+++ b/muse2/muse/app.h
@@ -13,7 +13,7 @@
//#include <q3mainwindow.h>
#include <QMainWindow>
-#include <qrect.h>
+#include <QRect>
//Added by qt3to4:
#include <Qt3Support>
//#include <Q3PopupMenu>
diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp
index baae70e2..99d0e181 100644
--- a/muse2/muse/arranger/arranger.cpp
+++ b/muse2/muse/arranger/arranger.cpp
@@ -10,27 +10,27 @@
#include <stdio.h>
#include <values.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qtoolbutton.h>
+#include <QLayout>
+//#include <qcombobox.h>
+#include <QToolButton>
#include <QButtonGroup>
-#include <qlabel.h>
+#include <QLabel>
//#include <q3accel.h>
-#include <qcombobox.h>
+#include <QComboBox>
//#include <q3whatsthis.h>
//#include <q3toolbar.h>
#include <QToolBar>
-#include <qtooltip.h>
+//#include <QToolTip>
#include <q3popupmenu.h>
#include <q3hbox.h>
-#include <qstringlist.h>
+#include <QStringList>
#include <q3filedialog.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <QCheckBox>
+#include <QPushButton>
//#include <q3mainwindow.h>
#include <QMainWindow>
#include <q3widgetstack.h>
-#include <qscrollbar.h>
+#include <QScrollBar>
//Added by qt3to4:
#include <QKeyEvent>
#include <Q3ValueList>
@@ -134,8 +134,8 @@ Arranger::Arranger(QMainWindow* parent, const char* name)
toolbar->addWidget(label);
QComboBox* raster = new QComboBox();
for (int i = 0; i < 6; i++)
- raster->insertItem(tr(rastval[i]), i);
- raster->setCurrentItem(1);
+ raster->insertItem(i, tr(rastval[i]));
+ raster->setCurrentIndex(1);
toolbar->addWidget(raster);
connect(raster, SIGNAL(activated(int)), SLOT(_setRaster(int)));
raster->setFocusPolicy(Qt::NoFocus);
@@ -151,19 +151,19 @@ Arranger::Arranger(QMainWindow* parent, const char* name)
//
lenEntry = new SpinBox(1, 10000, 1);
lenEntry->setValue(song->len());
- QToolTip::add(lenEntry, tr("song length - bars"));
+ lenEntry->setToolTip(tr("song length - bars"));
Q3WhatsThis::add(lenEntry, tr("song length - bars"));
toolbar->addWidget(lenEntry);
connect(lenEntry, SIGNAL(valueChanged(int)), SLOT(songlenChanged(int)));
typeBox = new LabelCombo(tr("Type"), 0);
- typeBox->insertItem(tr("NO"), 0);
- typeBox->insertItem(tr("GM"), 1);
- typeBox->insertItem(tr("GS"), 2);
- typeBox->insertItem(tr("XG"), 3);
- typeBox->setCurrentItem(0);
- QToolTip::add(typeBox, tr("midi song type"));
- Q3WhatsThis::add(typeBox, tr("midi song type"));
+ typeBox->insertItem(0, tr("NO"));
+ typeBox->insertItem(1, tr("GM"));
+ typeBox->insertItem(2, tr("GS"));
+ typeBox->insertItem(3, tr("XG"));
+ typeBox->setCurrentIndex(0);
+ typeBox->setToolTip(tr("midi song type"));
+ typeBox->setWhatsThis(tr("midi song type"));
typeBox->setFocusPolicy(Qt::NoFocus);
toolbar->addWidget(typeBox);
connect(typeBox, SIGNAL(activated(int)), SLOT(modeChange(int)));
@@ -175,8 +175,8 @@ Arranger::Arranger(QMainWindow* parent, const char* name)
globalPitchSpinBox = new SpinBox(-127, 127, 1);
globalPitchSpinBox->setValue(song->globalPitchShift());
- QToolTip::add(globalPitchSpinBox, tr("midi pitch"));
- Q3WhatsThis::add(globalPitchSpinBox, tr("global midi pitch shift"));
+ globalPitchSpinBox->setToolTip(tr("midi pitch"));
+ globalPitchSpinBox->setWhatsThis(tr("global midi pitch shift"));
toolbar->addWidget(globalPitchSpinBox);
connect(globalPitchSpinBox, SIGNAL(valueChanged(int)), SLOT(globalPitchChanged(int)));
@@ -188,8 +188,8 @@ Arranger::Arranger(QMainWindow* parent, const char* name)
globalTempoSpinBox = new SpinBox(50, 200, 1, toolbar);
globalTempoSpinBox->setSuffix(QString("%"));
globalTempoSpinBox->setValue(tempomap.globalTempo());
- QToolTip::add(globalTempoSpinBox, tr("midi tempo"));
- Q3WhatsThis::add(globalTempoSpinBox, tr("midi tempo"));
+ globalTempoSpinBox->setToolTip(tr("midi tempo"));
+ globalTempoSpinBox->setWhatsThis(tr("midi tempo"));
toolbar->addWidget(globalTempoSpinBox);
connect(globalTempoSpinBox, SIGNAL(valueChanged(int)), SLOT(globalTempoChanged(int)));
@@ -506,7 +506,7 @@ void Arranger::songChanged(int type)
trackSelectionChanged();
canvas->partsChanged();
- typeBox->setCurrentItem(int(song->mtype()));
+ typeBox->setCurrentIndex(int(song->mtype()));
if (type & SC_SIG)
time->redraw();
if (type & SC_TEMPO)
@@ -572,7 +572,7 @@ void Arranger::modeChange(int mode)
void Arranger::setMode(int mode)
{
- typeBox->setCurrentItem(mode);
+ typeBox->setCurrentIndex(mode);
}
//---------------------------------------------------------
diff --git a/muse2/muse/arranger/arranger.h b/muse2/muse/arranger/arranger.h
index a5ca269d..37b4c55e 100644
--- a/muse2/muse/arranger/arranger.h
+++ b/muse2/muse/arranger/arranger.h
@@ -10,7 +10,7 @@
#include <vector>
-#include <qwidget.h>
+#include <QWidget>
#include <q3header.h>
#include <q3whatsthis.h>
//Added by qt3to4:
diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp
index c081b68d..1879b6a8 100644
--- a/muse2/muse/liste/listedit.cpp
+++ b/muse2/muse/liste/listedit.cpp
@@ -7,23 +7,24 @@
//#include <q3toolbar.h>
#include <QToolBar>
-#include <qtooltip.h>
-#include <qtoolbutton.h>
-#include <qlayout.h>
+#include <QToolTip>
+#include <QToolButton>
+#include <QLayout>
#include <q3hbox.h>
-#include <qscrollbar.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
+#include <QScrollBar>
+#include <QLabel>
+#include <QPushButton>
+#include <QRadioButton>
#include <QButtonGroup>
#include <q3listbox.h>
#include <q3listview.h>
#include <q3header.h>
#include <q3popupmenu.h>
-#include <qmenubar.h>
-#include <qaction.h>
+#include <QMenuBar>
+//#include <qaction.h>
#include <q3accel.h>
#include <Qt3Support>
+#include <QAction>
//Added by qt3to4:
#include <QKeyEvent>
#include <QActionGroup>
@@ -420,22 +421,6 @@ QString EventListItem::text(int col) const
ListEdit::ListEdit(PartList* pl)
: MidiEditor(0, 0, pl)
{
- // ORCAN - CHECK:
- /*
- insertItems = new QActionGroup(this, "InsertItems", false);
- insertNote = new QAction(tr("Insert Note"), QIcon(*note1Icon), tr("insert Note"),
- 0, insertItems);
- insertSysEx = new QAction(tr("Insert SysEx"), QIcon(*sysexIcon), tr("insert SysEx"),
- 0, insertItems);
- insertCtrl = new QAction(tr("Insert Ctrl"), QIcon(*ctrlIcon), tr("insert Ctrl"),
- 0, insertItems);
- insertMeta = new QAction(tr("Insert Meta"), QIcon(*metaIcon), tr("insert Meta"),
- 0, insertItems);
- insertCAfter = new QAction(tr("Insert Channel Aftertouch"), QIcon(*cafterIcon), tr("insert Channel Aftertouch"),
- 0, insertItems);
- insertPAfter = new QAction(tr("Insert Key Aftertouch"), QIcon(*pafterIcon), tr("insert Poly Aftertouch"),
- 0, insertItems);
- */
insertItems = new QActionGroup(this);
insertItems->setExclusive(false);
insertNote = new QAction(QIcon(*note1Icon), tr("insert Note"), insertItems);
@@ -453,6 +438,7 @@ ListEdit::ListEdit(PartList* pl)
connect(insertPAfter, SIGNAL(activated()), SLOT(editInsertPAfter()));
//---------Pulldown Menu----------------------------
+
menuEdit = new Q3PopupMenu(this);
menuBar()->insertItem(tr("&Edit"), menuEdit);
undoRedo->addTo(menuEdit);
@@ -480,12 +466,12 @@ ListEdit::ListEdit(PartList* pl)
connect(menuEdit, SIGNAL(activated(int)), SLOT(cmd(int)));
//---------ToolBar----------------------------------
- listTools = new QToolBar(this, "list-tools");
- listTools->setLabel(tr("List Tools"));
- undoRedo->addTo(listTools);
- QToolBar* insertTools = new QToolBar(this, "insert");
- insertTools->setLabel(tr("Insert Tools"));
- insertItems->addTo(insertTools);
+
+ listTools = addToolBar(tr("List tools"));
+ listTools->addActions(undoRedo->actions());
+
+ QToolBar* insertTools = addToolBar(tr("Insert tools"));
+ insertTools->addActions(insertItems->actions());
//
//---------------------------------------------------
diff --git a/muse2/muse/marker/markerview.cpp b/muse2/muse/marker/markerview.cpp
index f26f3a78..eb210829 100644
--- a/muse2/muse/marker/markerview.cpp
+++ b/muse2/muse/marker/markerview.cpp
@@ -16,16 +16,17 @@
//#include <q3toolbar.h>
#include <QToolBar>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qsizegrip.h>
+#include <QToolButton>
+#include <QToolTip>
+#include <QLayout>
+#include <QSizeGrip>
#include <q3popupmenu.h>
-#include <qmenubar.h>
-#include <qaction.h>
+#include <QMenuBar>
+//#include <qaction.h>
#include <q3groupbox.h>
-#include <qlineedit.h>
+#include <QLineEdit>
#include <Qt3Support>
+#include <QAction>
//Added by qt3to4:
#include <QCloseEvent>
#include <Q3VBoxLayout>
@@ -155,15 +156,6 @@ MarkerView::MarkerView(QWidget* parent)
{
setCaption(tr("MusE: Marker"));
- //---------Actions----------------------------
- // CHECK - ORCAN:
- //QAction* markerAdd = new QAction(tr("add marker"),
- // QIcon(*flagIcon), tr("Add Marker"),
- // 0, this, "add marker");
- //QAction* markerDelete = new QAction(tr("delete marker"),
- // QIcon(*deleteIcon), tr("Delete Marker"),
- // 0, this, "delete marker");
-
QAction* markerAdd = new QAction(QIcon(*flagIcon), tr("add marker"), this);
connect(markerAdd, SIGNAL(activated()), SLOT(addMarker()));
@@ -179,12 +171,12 @@ MarkerView::MarkerView(QWidget* parent)
markerDelete->addTo(editMenu);
//---------ToolBar----------------------------------
- tools = new QToolBar(this, "marker-tools");
- undoRedo->addTo(tools);
+ tools = addToolBar(tr("marker-tools"));
+ tools->addActions(undoRedo->actions());
- QToolBar* edit = new QToolBar(this, "edit tools");
- markerAdd->addTo(edit);
- markerDelete->addTo(edit);
+ QToolBar* edit = addToolBar(tr("edit tools"));
+ edit->addAction(markerAdd);
+ edit->addAction(markerDelete);
//---------------------------------------------------
// master
@@ -222,8 +214,8 @@ MarkerView::MarkerView(QWidget* parent)
QSizePolicy::Fixed));
lock = new QToolButton(props);
- lock->setPixmap(*lockIcon);
- lock->setToggleButton(true);
+ lock->setIcon(*lockIcon);
+ lock->setCheckable(true);
editName = new QLineEdit(props);
editName->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
diff --git a/muse2/muse/marker/markerview.h b/muse2/muse/marker/markerview.h
index 07857923..4aaf75c9 100644
--- a/muse2/muse/marker/markerview.h
+++ b/muse2/muse/marker/markerview.h
@@ -9,7 +9,7 @@
#define __MARKERVIEW_H__
#include "cobject.h"
-#include <q3mainwindow.h>
+//#include <q3mainwindow.h>
#include <q3listview.h>
//Added by qt3to4:
#include <QCloseEvent>
diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp
index f50635b4..02b4810c 100644
--- a/muse2/muse/master/lmaster.cpp
+++ b/muse2/muse/master/lmaster.cpp
@@ -17,17 +17,17 @@
//#include <q3toolbar.h>
#include <QToolBar>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qsizegrip.h>
-#include <q3popupmenu.h>
-#include <qmenubar.h>
-#include <q3listview.h>
-#include <qmessagebox.h>
-#include <qstyle.h>
-#include <q3accel.h>
-#include <qaction.h>
+#include <QToolButton>
+#include <QToolTip>
+#include <QLayout>
+#include <QSizeGrip>
+#include <Q3PopupMenu>
+#include <QMenuBar>
+#include <Q3ListView>
+#include <QMessageBox>
+#include <QStyle>
+#include <Q3Accel>
+#include <QAction>
//Added by qt3to4:
#include <QCloseEvent>
@@ -89,16 +89,22 @@ LMaster::LMaster()
connect(menuEdit, SIGNAL(activated(int)), SLOT(cmd(int)));
//---------ToolBar----------------------------------
- tools = new QToolBar(this, "list-tools");
- undoRedo->addTo(tools);
-
- QToolBar* edit = new QToolBar(this, "edit tools");
- QToolButton* tempoButton = new QToolButton(edit);
- QToolButton* timeSigButton = new QToolButton(edit);
+ tools = addToolBar(tr("Master tools"));
+ tools->addActions(undoRedo->actions());
+
+ //QToolBar* edit = new QToolBar(this, "edit tools");
+ QToolBar* edit = addToolBar(tr("Edit tools"));
+ //QToolButton* tempoButton = new QToolButton(edit);
+ QToolButton* tempoButton = new QToolButton();
+ //QToolButton* timeSigButton = new QToolButton(edit);
+ QToolButton* timeSigButton = new QToolButton();
tempoButton->setText(tr("Tempo"));
timeSigButton->setText(tr("Timesig"));
- QToolTip::add(tempoButton, tr("new tempo"));
- QToolTip::add(timeSigButton, tr("new signature"));
+ tempoButton->setToolTip(tr("new tempo"));
+ timeSigButton->setToolTip(tr("new signature"));
+ edit->addWidget(tempoButton);
+ edit->addWidget(timeSigButton);
+
Q3Accel* qa = new Q3Accel(this);
qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Z), song, SLOT(undo()));
qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Y), song, SLOT(redo()));
diff --git a/muse2/muse/master/lmaster.h b/muse2/muse/master/lmaster.h
index 9be2daf6..bb74a903 100644
--- a/muse2/muse/master/lmaster.h
+++ b/muse2/muse/master/lmaster.h
@@ -8,8 +8,8 @@
#ifndef __LMASTER_EDIT_H__
#define __LMASTER_EDIT_H__
-#include <qwidget.h>
-#include <qlineedit.h>
+#include <QWidget>
+#include <QLineEdit>
//Added by qt3to4:
#include <QMouseEvent>
#include <Q3PopupMenu>
@@ -17,8 +17,8 @@
#include "midieditor.h"
#include "noteinfo.h"
#include "cobject.h"
-#include <q3mainwindow.h>
-#include <q3listview.h>
+//#include <q3mainwindow.h>
+#include <Q3ListView>
#include "tempo.h"
#include "sig.h"
diff --git a/muse2/muse/master/master.cpp b/muse2/muse/master/master.cpp
index 65204bef..2c6b5bf7 100644
--- a/muse2/muse/master/master.cpp
+++ b/muse2/muse/master/master.cpp
@@ -8,11 +8,11 @@
#include <stdio.h>
#include <values.h>
-#include <qlineedit.h>
-#include <q3popupmenu.h>
-#include <qpainter.h>
-#include <q3header.h>
-#include <qcursor.h>
+#include <QLineEdit>
+#include <Q3PopupMenu>
+#include <QPainter>
+#include <Q3Header>
+#include <QCursor>
//Added by qt3to4:
#include <QMouseEvent>
#include <QEvent>
diff --git a/muse2/muse/master/master.h b/muse2/muse/master/master.h
index ee5bfd21..a5b2dc71 100644
--- a/muse2/muse/master/master.h
+++ b/muse2/muse/master/master.h
@@ -8,7 +8,7 @@
#ifndef __MASTER_H__
#define __MASTER_H__
-#include <qpoint.h>
+#include <QPoint>
//Added by qt3to4:
#include <QMouseEvent>
#include <QEvent>
diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp
index 3adcae3f..ae7dbecb 100644
--- a/muse2/muse/master/masteredit.cpp
+++ b/muse2/muse/master/masteredit.cpp
@@ -24,23 +24,23 @@
#include <values.h>
//#include <q3toolbar.h>
#include <QToolBar>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <QToolButton>
+#include <QToolTip>
#include <q3accel.h>
-#include <qlayout.h>
+#include <QLayout>
#include <q3hbox.h>
-#include <qsizegrip.h>
-#include <qscrollbar.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
+#include <QSizeGrip>
+#include <QScrollBar>
+#include <QLabel>
+#include <QPushButton>
+#include <QRadioButton>
#include <q3buttongroup.h>
#include <q3listbox.h>
-#include <qcombobox.h>
+#include <QComboBox>
#include <q3header.h>
#include <q3popupmenu.h>
-#include <qmenubar.h>
-#include <qaction.h>
+#include <QMenuBar>
+#include <QAction>
//Added by qt3to4:
#include <QCloseEvent>
@@ -101,47 +101,57 @@ MasterEdit::MasterEdit()
// menuBar()->insertItem("&File", file);
//---------ToolBar----------------------------------
- tools = new QToolBar(tr("edit tools"), this);
- undoRedo->addTo(tools);
+
+ tools = addToolBar(tr("Master tools"));
+ tools->addActions(undoRedo->actions());
EditToolBar* tools2 = new EditToolBar(this, PointerTool | PencilTool | RubberTool);
+ addToolBar(tools2);
- QToolBar* enableMaster = new QToolBar(tr("EnableMaster"), this);
- enableButton = new QToolButton(enableMaster);
- enableButton->setToggleButton(true);
+ QToolBar* enableMaster = addToolBar(tr("Enable master"));
+ enableButton = new QToolButton();
+ enableButton->setCheckable(true);
enableButton->setText(tr("Enable"));
- QToolTip::add(enableButton, tr("Enable usage of master track"));
+ enableButton->setToolTip(tr("Enable usage of master track"));
enableButton->setOn(song->masterFlag());
+ enableMaster->addWidget(enableButton);
connect(enableButton, SIGNAL(toggled(bool)), song, SLOT(setMasterFlag(bool)));
- QToolBar* info = new QToolBar(tr("Info"), this);
- QLabel* label = new QLabel(tr("Cursor"), info);
+ QToolBar* info = addToolBar(tr("Info"));
+ QLabel* label = new QLabel(tr("Cursor"));
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
label->setIndent(3);
+ info->addWidget(label);
- cursorPos = new PosLabel(info);
- tempo = new TempoLabel(info);
+ cursorPos = new PosLabel(0);
+ cursorPos->setFixedHeight(22);
+ cursorPos->setToolTip(tr("time at cursor position"));
+ info->addWidget(cursorPos);
+ tempo = new TempoLabel(0);
+ tempo->setFixedHeight(22);
+ tempo->setToolTip(tr("tempo at cursor position"));
+ info->addWidget(tempo);
const char* rastval[] = {
QT_TR_NOOP("Off"), "Bar", "1/2", "1/4", "1/8", "1/16"
};
- rasterLabel = new LabelCombo(tr("Snap"), info);
- rasterLabel->setFocusPolicy(Qt::NoFocus);
+ rasterLabel = new LabelCombo(tr("Snap"), 0);
+ rasterLabel->setFocusPolicy(Qt::NoFocus);
for (int i = 0; i < 6; i++)
- rasterLabel->insertItem(tr(rastval[i]), i);
- rasterLabel->setCurrentItem(1);
+ rasterLabel->insertItem(i, tr(rastval[i]));
+ rasterLabel->setCurrentIndex(1);
+ info->addWidget(rasterLabel);
connect(rasterLabel, SIGNAL(activated(int)), SLOT(_setRaster(int)));
- QToolTip::add(cursorPos, tr("time at cursor position"));
- QToolTip::add(tempo, tr("tempo at cursor position"));
-
//---------values for current position---------------
- new QLabel(tr("CurPos "), info);
- curTempo = new TempoEdit(info);
- curSig = new SigEdit(info);
+ info->addWidget(new QLabel(tr("CurPos ")));
+ curTempo = new TempoEdit(0);
+ curSig = new SigEdit(0);
curSig->setValue(Sig(4, 4));
- QToolTip::add(curTempo, tr("tempo at current position"));
- QToolTip::add(curSig, tr("time signature at current position"));
+ curTempo->setToolTip(tr("tempo at current position"));
+ curSig->setToolTip(tr("time signature at current position"));
+ info->addWidget(curTempo);
+ info->addWidget(curSig);
connect(curSig, SIGNAL(valueChanged(int,int)), song, SLOT(setSig(int,int)));
connect(curTempo, SIGNAL(valueChanged(double)), song, SLOT(setTempo(double)));
@@ -276,7 +286,7 @@ void MasterEdit::readStatus(Xml& xml)
case 96: item = 5; break;
}
_rasterInit = _raster;
- rasterLabel->setCurrentItem(item);
+ rasterLabel->setCurrentIndex(item);
return;
}
default:
diff --git a/muse2/muse/master/masteredit.h b/muse2/muse/master/masteredit.h
index 04ef09eb..62de4d58 100644
--- a/muse2/muse/master/masteredit.h
+++ b/muse2/muse/master/masteredit.h
@@ -8,13 +8,13 @@
#ifndef __MASTER_EDIT_H__
#define __MASTER_EDIT_H__
-#include <qwidget.h>
+#include <QWidget>
//Added by qt3to4:
#include <QCloseEvent>
#include "midieditor.h"
#include "noteinfo.h"
#include "cobject.h"
-#include <q3mainwindow.h>
+//#include <q3mainwindow.h>
class QToolButton;
class Master;
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index 645dc349..b8422e03 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -5,24 +5,24 @@
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
//=========================================================
-#include <qtoolbutton.h>
+#include <QToolButton>
#include <q3accel.h>
-#include <qlayout.h>
+#include <QLayout>
#include <q3hbox.h>
-#include <qsizegrip.h>
-#include <qscrollbar.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
+#include <QSizeGrip>
+#include <QScrollBar>
+#include <QLabel>
+#include <QPushButton>
+#include <QRadioButton>
#include <q3buttongroup.h>
#include <q3listbox.h>
#include <q3popupmenu.h>
-#include <qmenubar.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qmessagebox.h>
-#include <qaction.h>
+#include <QMenuBar>
+#include <QToolTip>
+#include <QApplication>
+#include <QClipboard>
+#include <QMessageBox>
+#include <QAction>
#include <QWhatsThis>
//Added by qt3to4:
@@ -223,16 +223,16 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
// Toolbars
//---------------------------------------------------
- tools = addToolBar(tr("drum-tools"));
+ tools = addToolBar(tr("Drum tools"));
QToolButton *ldm = new QToolButton();
- QToolTip::add(ldm, tr("Load Drummap"));
+ ldm->setToolTip(tr("Load Drummap"));
ldm->setIcon(*openIcon);
connect(ldm, SIGNAL(clicked()), SLOT(load()));
tools->addWidget(ldm);
QToolButton *sdm = new QToolButton();
- QToolTip::add(sdm, tr("Store Drummap"));
+ sdm->setToolTip(tr("Store Drummap"));
sdm->setIcon(*saveIcon);
connect(sdm, SIGNAL(clicked()), SLOT(save()));
tools->addWidget(sdm);
@@ -244,13 +244,13 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
tools->addSeparator();
srec = new QToolButton();
- QToolTip::add(srec, tr("Step Record"));
+ srec->setToolTip(tr("Step Record"));
srec->setIcon(*steprecIcon);
srec->setCheckable(true);
tools->addWidget(srec);
midiin = new QToolButton();
- QToolTip::add(midiin, tr("Midi Input"));
+ midiin->setToolTip(tr("Midi Input"));
midiin->setIcon(*midiinIcon);
midiin->setCheckable(true);
tools->addWidget(midiin);
@@ -282,7 +282,7 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
ctrl->setFont(config.fonts[3]);
hscroll = new ScrollScale(-25, -2, xscale, 20000, Qt::Horizontal, mainw);
ctrl->setFixedSize(40, hscroll->sizeHint().height());
- QToolTip::add(ctrl, tr("Add Controller View"));
+ ctrl->setToolTip(tr("Add Controller View"));
QSizeGrip* corner = new QSizeGrip(mainw);
corner->setFixedHeight(hscroll->sizeHint().height());
diff --git a/muse2/muse/midiedit/drumedit.h b/muse2/muse/midiedit/drumedit.h
index a1c8583b..affb0b19 100644
--- a/muse2/muse/midiedit/drumedit.h
+++ b/muse2/muse/midiedit/drumedit.h
@@ -8,9 +8,9 @@
#ifndef __DRUM_EDIT_H__
#define __DRUM_EDIT_H__
-#include <qwidget.h>
-#include <q3mainwindow.h>
-#include <qtooltip.h>
+#include <QWidget>
+//#include <q3mainwindow.h>
+#include <QToolTip>
#include <q3whatsthis.h>
//Added by qt3to4:
#include <QResizeEvent>
diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp
index 2a757f01..85057bba 100644
--- a/muse2/muse/midiedit/pianoroll.cpp
+++ b/muse2/muse/midiedit/pianoroll.cpp
@@ -6,20 +6,20 @@
//=========================================================
#include <q3accel.h>
-#include <qlayout.h>
+#include <QLayout>
#include <q3hbox.h>
-#include <qsizegrip.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <QSizeGrip>
+#include <QLabel>
+#include <QPushButton>
#include <q3buttongroup.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <QToolButton>
+#include <QToolTip>
#include <q3popupmenu.h>
-#include <qmenubar.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qdir.h>
-#include <qaction.h>
+#include <QMenuBar>
+#include <QApplication>
+#include <QClipboard>
+#include <QDir>
+#include <QAction>
//Added by qt3to4:
#include <QKeyEvent>
#include <QGridLayout>
@@ -185,26 +185,26 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
connect(menuFunctions, SIGNAL(activated(int)), SLOT(cmd(int)));
//---------ToolBar----------------------------------
- tools = addToolBar(tr("pianoroll-tools"));
+ tools = addToolBar(tr("Pianoroll tools"));
tools->addActions(undoRedo->actions());
tools->addSeparator();
// Does not like this, draws on top of other buttons! Must use QToolBar::addWidget()
//srec = new QToolButton(tools);
srec = new QToolButton();
- QToolTip::add(srec, tr("Step Record"));
+ srec->setToolTip(tr("Step Record"));
srec->setIcon(*steprecIcon);
srec->setCheckable(true);
tools->addWidget(srec);
midiin = new QToolButton();
- QToolTip::add(midiin, tr("Midi Input"));
+ midiin->setToolTip(tr("Midi Input"));
midiin->setIcon(*midiinIcon);
midiin->setCheckable(true);
tools->addWidget(midiin);
speaker = new QToolButton();
- QToolTip::add(speaker, tr("Play Events"));
+ speaker->setToolTip(tr("Play Events"));
speaker->setIcon(*speakerIcon);
speaker->setCheckable(true);
tools->addWidget(speaker);
@@ -235,7 +235,7 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
splitter = new Splitter(Qt::Vertical, mainw, "splitter");
QPushButton* ctrl = new QPushButton(tr("ctrl"), mainw, "Ctrl");
ctrl->setFont(config.fonts[3]);
- QToolTip::add(ctrl, tr("Add Controller View"));
+ ctrl->setToolTip(tr("Add Controller View"));
hscroll = new ScrollScale(-25, -2, xscale, 20000, Qt::Horizontal, mainw);
ctrl->setFixedSize(pianoWidth, hscroll->sizeHint().height());
diff --git a/muse2/muse/midiedit/pianoroll.h b/muse2/muse/midiedit/pianoroll.h
index b24f1c1c..2d4c7780 100644
--- a/muse2/muse/midiedit/pianoroll.h
+++ b/muse2/muse/midiedit/pianoroll.h
@@ -8,8 +8,8 @@
#ifndef __PIANOROLL_H__
#define __PIANOROLL_H__
-#include <qwidget.h>
-#include <q3mainwindow.h>
+#include <QWidget>
+//#include <q3mainwindow.h>
//#include <QMenu>
//Added by qt3to4:
#include <QCloseEvent>
diff --git a/muse2/muse/widgets/lcombo.cpp b/muse2/muse/widgets/lcombo.cpp
index beb34255..2200cca7 100644
--- a/muse2/muse/widgets/lcombo.cpp
+++ b/muse2/muse/widgets/lcombo.cpp
@@ -36,16 +36,3 @@ LabelCombo::LabelCombo(const QString& txt, QWidget* parent,
connect(box, SIGNAL(activated(int)), SIGNAL(activated(int)));
}
-void LabelCombo::insertItem(const QString& txt, int index)
- {
- box->insertItem(txt, index);
- }
-
-void LabelCombo::clearFocus()
-{
- box->clearFocus();
-}
-void LabelCombo::setFocusPolicy ( Qt::FocusPolicy fp )
-{
- box->setFocusPolicy(fp);
-}
diff --git a/muse2/muse/widgets/lcombo.h b/muse2/muse/widgets/lcombo.h
index a0adda7d..6b0441c0 100644
--- a/muse2/muse/widgets/lcombo.h
+++ b/muse2/muse/widgets/lcombo.h
@@ -31,16 +31,17 @@ class LabelCombo : public QWidget {
void activated(int);
public slots:
- void clearFocus();
+ void clearFocus() { box->clearFocus(); }
+
public:
LabelCombo(const QString& label, QWidget* parent,
const char* name=0);
- void insertItem(const QString& txt, int index=-1);
- void setCurrentItem(int i) { box->setCurrentItem(i); }
+ void addItem(const QString& txt, const QVariant & userData = QVariant()) { box->addItem(txt, userData); }
+ void insertItem(int index, const QString& txt, const QVariant & userData = QVariant()) { box->insertItem(index, txt, userData); }
+ void setCurrentIndex(int i) { box->setCurrentIndex(i); }
//void setListBox(Q3ListBox* lb) { box->setListBox(lb); } // ddskrjo
void setView(QAbstractItemView* v) { box->setModel(v->model()); box->setView(v); } // p4.0.3
- void setFocusPolicy ( Qt::FocusPolicy fp );
-
+ void setFocusPolicy ( Qt::FocusPolicy fp ) { box->setFocusPolicy(fp); }
};
#endif
diff --git a/muse2/muse/widgets/noteinfo.cpp b/muse2/muse/widgets/noteinfo.cpp
index e3d869e0..4e3a0304 100644
--- a/muse2/muse/widgets/noteinfo.cpp
+++ b/muse2/muse/widgets/noteinfo.cpp
@@ -8,8 +8,8 @@
#include "config.h"
#include "noteinfo.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <QLayout>
+#include <QLabel>
#include "song.h"
#include "globals.h"
#include "posedit.h"
diff --git a/muse2/muse/widgets/pitchlabel.cpp b/muse2/muse/widgets/pitchlabel.cpp
index 66af63fb..50b63410 100644
--- a/muse2/muse/widgets/pitchlabel.cpp
+++ b/muse2/muse/widgets/pitchlabel.cpp
@@ -5,8 +5,8 @@
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
//=========================================================
-#include <qapplication.h>
-#include <qstyle.h>
+#include <QApplication>
+#include <QStyle>
//Added by qt3to4:
#include <QLabel>
#include "pitchedit.h"
diff --git a/muse2/muse/widgets/pitchlabel.h b/muse2/muse/widgets/pitchlabel.h
index 1da83ecc..6372f711 100644
--- a/muse2/muse/widgets/pitchlabel.h
+++ b/muse2/muse/widgets/pitchlabel.h
@@ -8,7 +8,7 @@
#ifndef __PITCHLABEL_H__
#define __PITCHLABEL_H__
-#include <qlabel.h>
+#include <QLabel>
//---------------------------------------------------------
// PitchLabel
diff --git a/muse2/muse/widgets/poslabel.cpp b/muse2/muse/widgets/poslabel.cpp
index e71fea49..feb1486b 100644
--- a/muse2/muse/widgets/poslabel.cpp
+++ b/muse2/muse/widgets/poslabel.cpp
@@ -7,8 +7,8 @@
#include <stdlib.h>
#include <cmath>
-#include <qapplication.h>
-#include <qstyle.h>
+#include <QApplication>
+#include <QStyle>
//Added by qt3to4:
#include <QLabel>
diff --git a/muse2/muse/widgets/sigedit.cpp b/muse2/muse/widgets/sigedit.cpp
index 4d8c30b4..cbfa0cd1 100644
--- a/muse2/muse/widgets/sigedit.cpp
+++ b/muse2/muse/widgets/sigedit.cpp
@@ -9,12 +9,11 @@
#include <stdio.h>
#include <q3rangecontrol.h>
-#include <qapplication.h>
-#include <qpixmap.h>
-#include <qapplication.h>
+#include <QApplication>
+#include <QPixmap>
#include <q3valuelist.h>
-#include <qstring.h>
-#include <qstyle.h>
+#include <QString>
+#include <QStyle>
//Added by qt3to4:
#include <QTimerEvent>
#include <QPaintEvent>
@@ -23,8 +22,8 @@
#include <QKeyEvent>
#include <QEvent>
#include <values.h>
-#include <qpainter.h>
-#include <qtimer.h>
+#include <QPainter>
+#include <QTimer>
#include "sig.h"
extern int mtcType;
diff --git a/muse2/muse/widgets/sigedit.h b/muse2/muse/widgets/sigedit.h
index f600c44f..89cc96bc 100644
--- a/muse2/muse/widgets/sigedit.h
+++ b/muse2/muse/widgets/sigedit.h
@@ -8,8 +8,8 @@
#ifndef __SIGEDIT_H__
#define __SIGEDIT_H__
-#include <qwidget.h>
-#include <qstring.h>
+#include <QWidget>
+#include <QString>
//Added by qt3to4:
#include <QResizeEvent>
#include <QTimerEvent>
diff --git a/muse2/muse/widgets/spinbox.cpp b/muse2/muse/widgets/spinbox.cpp
index 6eed0ba6..de8f5593 100644
--- a/muse2/muse/widgets/spinbox.cpp
+++ b/muse2/muse/widgets/spinbox.cpp
@@ -4,7 +4,7 @@
// $Id: spinbox.cpp,v 1.1.2.3 2009/07/09 18:27:11 terminator356 Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
//=========================================================
-#include <qlineedit.h>
+//#include <qlineedit.h>
//Added by qt3to4:
#include <QKeyEvent>
#include <QEvent>
diff --git a/muse2/muse/widgets/spinbox.h b/muse2/muse/widgets/spinbox.h
index 6eaa2da7..8e391702 100644
--- a/muse2/muse/widgets/spinbox.h
+++ b/muse2/muse/widgets/spinbox.h
@@ -12,7 +12,7 @@
#ifndef __SPINBOX_H__
#define __SPINBOX_H__
-#include <qspinbox.h>
+#include <QSpinBox>
//Added by qt3to4:
#include <QEvent>
diff --git a/muse2/muse/widgets/tb1.cpp b/muse2/muse/widgets/tb1.cpp
index a779760c..f65ce54b 100644
--- a/muse2/muse/widgets/tb1.cpp
+++ b/muse2/muse/widgets/tb1.cpp
@@ -188,10 +188,10 @@ Toolbar1::Toolbar1(QWidget* parent, int r, int q, bool sp)
addWidget(new QLabel(tr("To")));
QComboBox* toList = new QComboBox;
toList->setFixedHeight(22);
- toList->addItem(tr("All Events"), 0);
- toList->addItem(tr("Looped Ev."), CMD_RANGE_LOOP);
- toList->addItem(tr("Selected Ev."), CMD_RANGE_SELECTED);
- toList->addItem(tr("Looped+Sel."), CMD_RANGE_LOOP | CMD_RANGE_SELECTED);
+ toList->insertItem(0, tr("All Events"));
+ toList->insertItem(CMD_RANGE_LOOP, tr("Looped Ev."));
+ toList->insertItem(CMD_RANGE_SELECTED, tr("Selected Ev."));
+ toList->insertItem(CMD_RANGE_LOOP | CMD_RANGE_SELECTED, tr("Looped+Sel."));
addWidget(toList);
connect(raster, SIGNAL(activated(int)), SLOT(_rasterChanged(int)));
@@ -266,12 +266,12 @@ void Toolbar1::setRaster(int val)
{
for (unsigned i = 0; i < sizeof(rasterTable)/sizeof(*rasterTable); i++) {
if (val == rasterTable[i]) {
- raster->setCurrentItem(i);
+ raster->setCurrentIndex(i);
return;
}
}
printf("setRaster(%d) not defined\n", val);
- raster->setCurrentItem(0);
+ raster->setCurrentIndex(0);
}
//---------------------------------------------------------
@@ -282,12 +282,12 @@ void Toolbar1::setQuant(int val)
{
for (unsigned i = 0; i < sizeof(quantTable)/sizeof(*quantTable); i++) {
if (val == quantTable[i]) {
- quant->setCurrentItem(i);
+ quant->setCurrentIndex(i);
return;
}
}
printf("setQuant(%d) not defined\n", val);
- quant->setCurrentItem(0);
+ quant->setCurrentIndex(0);
}
//---------------------------------------------------------
diff --git a/muse2/muse/widgets/tb1.h b/muse2/muse/widgets/tb1.h
index b330ee85..ced2e8b8 100644
--- a/muse2/muse/widgets/tb1.h
+++ b/muse2/muse/widgets/tb1.h
@@ -11,8 +11,8 @@
//#include <qwidget.h>
//#include <q3toolbar.h>
-#include <QWidget> // p4.0.4
-#include <QToolBar> //
+#include <QWidget>
+#include <QToolBar>
class PosLabel;
class PitchLabel;