diff options
Diffstat (limited to 'muse2')
-rw-r--r-- | muse2/muse/app.cpp | 123 | ||||
-rw-r--r-- | muse2/muse/arranger/arranger.cpp | 42 | ||||
-rw-r--r-- | muse2/muse/midiedit/drumedit.cpp | 21 | ||||
-rw-r--r-- | muse2/muse/midiedit/pianoroll.cpp | 17 | ||||
-rw-r--r-- | muse2/muse/waveedit/waveedit.cpp | 32 | ||||
-rw-r--r-- | muse2/muse/widgets/tb1.cpp | 2 |
6 files changed, 48 insertions, 189 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index fffd542b..085127ad 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -868,19 +868,12 @@ MusE::MusE(int argc, char** argv) : QMainWindow() //--------------------------------------------------- // undo/redo //--------------------------------------------------- - // ORCAN - CHECK: - /* - undoRedo = new QActionGroup(this, tr("UndoRedo"), false); - undoAction = new QAction(tr("undo"), QIcon(*undoIconS), tr("Und&o"), // ddskrjo - Qt::CTRL+Qt::Key_Z, undoRedo, "undo"); - redoAction = new QAction(tr("redo"), QIcon(*redoIconS), tr("Re&do"), // ddskrjo - Qt::CTRL+Qt::Key_Y, undoRedo, "redo"); - */ + undoRedo = new QActionGroup(this); undoRedo->setExclusive(false); - undoAction = new QAction(QIcon(*undoIconS), tr("Und&o"), // ddskrjo + undoAction = new QAction(QIcon(*undoIconS), tr("Und&o"), undoRedo); - redoAction = new QAction(QIcon(*redoIconS), tr("Re&do"), // ddskrjo + redoAction = new QAction(QIcon(*redoIconS), tr("Re&do"), undoRedo); undoAction->setWhatsThis(tr("undo last change to song")); @@ -893,13 +886,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow() //--------------------------------------------------- // Transport //--------------------------------------------------- - // ORCAN - CHECK: - /* - transportAction = new QActionGroup(this, tr("Transport"), false); - - loopAction = new QAction(tr("loop"), QIcon(*loop1Icon), - tr("Loop"), 0, transportAction, "loop", true); - */ + transportAction = new QActionGroup(this); transportAction->setExclusive(false); @@ -909,11 +896,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow() loopAction->setWhatsThis(tr(infoLoopButton)); connect(loopAction, SIGNAL(toggled(bool)), song, SLOT(setLoop(bool))); - // ORCAN - CHECK: - /* - punchinAction = new QAction(tr("punchin"), QIcon(*punchin1Icon), - tr("Punchin"), 0, transportAction, "Punchin", true); - */ + punchinAction = new QAction(QIcon(*punchin1Icon), tr("Punchin"), transportAction); punchinAction->setCheckable(true); @@ -921,11 +904,6 @@ MusE::MusE(int argc, char** argv) : QMainWindow() punchinAction->setWhatsThis(tr(infoPunchinButton)); connect(punchinAction, SIGNAL(toggled(bool)), song, SLOT(setPunchin(bool))); - // ORCAN - CHECK: - /* - punchoutAction = new QAction(tr("punchout"), QIcon(*punchout1Icon), - tr("Punchout"), 0, transportAction, "punchout", true); - */ punchoutAction = new QAction(QIcon(*punchout1Icon), tr("Punchout"), transportAction); punchoutAction->setCheckable(true); @@ -935,44 +913,24 @@ MusE::MusE(int argc, char** argv) : QMainWindow() transportAction->addSeparator(); - // ORCAN - CHECK: - /* - startAction = new QAction(tr("start"), QIcon(*startIcon), - tr("Start"), 0, transportAction, "start"); - */ startAction = new QAction(QIcon(*startIcon), tr("Start"), transportAction); startAction->setWhatsThis(tr(infoStartButton)); connect(startAction, SIGNAL(activated()), song, SLOT(rewindStart())); - // ORCAN - CHECK: - /* - rewindAction = new QAction(tr("rewind"), QIcon(*frewindIcon), - tr("Rewind"), 0, transportAction, "rewind"); - */ rewindAction = new QAction(QIcon(*frewindIcon), tr("Rewind"), transportAction); rewindAction->setWhatsThis(tr(infoRewindButton)); connect(rewindAction, SIGNAL(activated()), song, SLOT(rewind())); - // ORCAN - CHECK: - /* - forwardAction = new QAction(tr("forward"), QIcon(*fforwardIcon), - tr("Forward"), 0, transportAction, "forward"); - */ forwardAction = new QAction(QIcon(*fforwardIcon), tr("Forward"), transportAction); forwardAction->setWhatsThis(tr(infoForwardButton)); connect(forwardAction, SIGNAL(activated()), song, SLOT(forward())); - // ORCAN - CHECK: - /* - stopAction = new QAction(tr("stop"), QIcon(*stopIcon), - tr("Stop"), 0, transportAction, "stop", true); - */ stopAction = new QAction(QIcon(*stopIcon), tr("Stop"), transportAction); stopAction->setCheckable(true); @@ -981,11 +939,6 @@ MusE::MusE(int argc, char** argv) : QMainWindow() stopAction->setOn(true); connect(stopAction, SIGNAL(toggled(bool)), song, SLOT(setStop(bool))); - // ORCAN - CHECK: - /* - playAction = new QAction(tr("play"), QIcon(*playIcon), - tr("Play"), 0, transportAction, "play", true); - */ playAction = new QAction(QIcon(*playIcon), tr("Play"), transportAction); playAction->setCheckable(true); @@ -994,22 +947,12 @@ MusE::MusE(int argc, char** argv) : QMainWindow() playAction->setOn(false); connect(playAction, SIGNAL(toggled(bool)), song, SLOT(setPlay(bool))); - // ORCAN - CHECK: - /* - recordAction = new QAction(tr("record"), QIcon(*recordIcon), - tr("Record"), 0, transportAction, "record", true); - */ recordAction = new QAction(QIcon(*recordIcon), tr("Record"), transportAction); recordAction->setCheckable(true); recordAction->setWhatsThis(tr(infoRecordButton)); connect(recordAction, SIGNAL(toggled(bool)), song, SLOT(setRecord(bool))); - // ORCAN - CHECK: - /* - panicAction = new QAction(tr("panic"), QIcon(*panicIcon), - tr("Panic"), 0, 0, "panic", false); - */ panicAction = new QAction(QIcon(*panicIcon), tr("Panic"), 0); @@ -1022,47 +965,21 @@ MusE::MusE(int argc, char** argv) : QMainWindow() //----Actions - // ORCAN - CHECK: - /* - fileNewAction = new QAction(tr("new"), - QIcon(*filenewIcon), tr("&New"), 0, this, "new"); // ddskrjo - */ - fileNewAction = new QAction( - QIcon(*filenewIcon), tr("&New"), this); // ddskrjo - + fileNewAction = new QAction(QIcon(*filenewIcon), tr("&New"), this); fileNewAction->setToolTip(tr(fileNewText)); fileNewAction->setWhatsThis(tr(fileNewText)); - // ORCAN - CHECK: - /* - fileOpenAction = new QAction(tr("open"), - QIcon(*openIcon), tr("&Open"), 0, this, "open"); // ddskrjo - */ - fileOpenAction = new QAction( - QIcon(*openIcon), tr("&Open"), this); // ddskrjo + fileOpenAction = new QAction(QIcon(*openIcon), tr("&Open"), this); fileOpenAction->setToolTip(tr(fileOpenText)); fileOpenAction->setWhatsThis(tr(fileOpenText)); - // ORCAN - CHECK: - /* - fileSaveAction = new QAction(tr("save"), - QIcon(*saveIcon), tr("&Save"), 0, this, "save"); // ddskrjo - */ - fileSaveAction = new QAction( - QIcon(*saveIcon), tr("&Save"), this); // ddskrjo + fileSaveAction = new QAction(QIcon(*saveIcon), tr("&Save"), this); fileSaveAction->setToolTip(tr(fileSaveText)); fileSaveAction->setWhatsThis(tr(fileSaveText)); - // ORCAN - CHECK: - /* - pianoAction = new QAction(tr("pianoroll"), - *pianoIconSet, tr("Pianoroll"), 0, this, "pianoroll"); - */ - pianoAction = new QAction( - *pianoIconSet, tr("Pianoroll"), this); - + pianoAction = new QAction(*pianoIconSet, tr("Pianoroll"), this); connect(pianoAction, SIGNAL(activated()), SLOT(startPianoroll())); // markerAction = new QAction(tr("marker"), QIconSet(*view_markerIcon), tr("Marker"), @@ -1076,13 +993,9 @@ MusE::MusE(int argc, char** argv) : QMainWindow() //-------------------------------------------------- // Toolbar //-------------------------------------------------- - // FIXME - Orcan - //tools = new QToolBar(tr("File Buttons"), this); + tools = addToolBar(tr("File Buttons")); - //fileNewAction->addTo(tools); - //fileOpenAction->addTo(tools); - //fileSaveAction->addTo(tools); tools->addAction(fileNewAction); tools->addAction(fileOpenAction); tools->addAction(fileSaveAction); @@ -1090,30 +1003,19 @@ MusE::MusE(int argc, char** argv) : QMainWindow() // // Whats This // - // FIXME - Orcan: Do we need this? - //Q3WhatsThis::whatsThisButton(tools); tools->addAction(QWhatsThis::createAction(this)); tools->addSeparator(); - //undoRedo->addTo(tools); tools->addActions(undoRedo->actions()); - //addToolBar(tools); tools1 = new EditToolBar(this, arrangerTools); addToolBar(tools1); - //QToolBar* transportToolbar = new QToolBar(this); QToolBar* transportToolbar = addToolBar(tr("Transport")); - //transportAction->addTo(transportToolbar); transportToolbar->addActions(transportAction->actions()); - //addToolBar(transportToolbar); - //QToolBar* panicToolbar = new QToolBar(this); QToolBar* panicToolbar = addToolBar(tr("Panic")); - //panicAction->addTo(panicToolbar); panicToolbar->addAction(panicAction); - //addToolBar(panicToolbar); - if (realTimePriority < sched_get_priority_min(SCHED_FIFO)) realTimePriority = sched_get_priority_min(SCHED_FIFO); @@ -1153,8 +1055,6 @@ MusE::MusE(int argc, char** argv) : QMainWindow() menu_file = new QMenu(this); menuBar()->insertItem(tr("&File"), menu_file); - //fileNewAction->addTo(menu_file); - //fileOpenAction->addTo(menu_file); menu_file->addAction(fileNewAction); menu_file->addAction(fileOpenAction); openRecent = new QMenu(menu_file); @@ -1162,7 +1062,6 @@ MusE::MusE(int argc, char** argv) : QMainWindow() connect(openRecent, SIGNAL(activated(int)), this, SLOT(selectProject(int))); menu_ids[CMD_OPEN_RECENT] = menu_file->insertItem(tr("Open &Recent"), openRecent, 0); menu_file->insertSeparator(); - //fileSaveAction->addTo(menu_file); menu_file->addAction(fileSaveAction); menu_ids[CMD_SAVE_AS] = menu_file->insertItem(tr("Save &As"), this, SLOT(saveAs()), 0, -2); menu_file->insertSeparator(); @@ -1181,7 +1080,6 @@ MusE::MusE(int argc, char** argv) : QMainWindow() //------------------------------------------------------------- menuEdit = new QMenu(this); - //undoRedo->addTo(menuEdit); menuEdit->addActions(undoRedo->actions()); menuEdit->insertSeparator(); menuBar()->insertItem(tr("&Edit"), menuEdit); @@ -1232,7 +1130,6 @@ MusE::MusE(int argc, char** argv) : QMainWindow() tr("Select"), select); menuEdit->insertSeparator(); - //pianoAction->addTo(menuEdit); menuEdit->addAction(pianoAction); menu_ids[CMD_OPEN_DRUMS] = menuEdit->insertItem( QIcon(*edit_drummsIcon), tr("Drums"), this, SLOT(startDrumEditor()), 0); diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp index 386267e2..baae70e2 100644 --- a/muse2/muse/arranger/arranger.cpp +++ b/muse2/muse/arranger/arranger.cpp @@ -113,17 +113,13 @@ Arranger::Arranger(QMainWindow* parent, const char* name) // create toolbar in toplevel widget //--------------------------------------------------- - // FIXME - Orcan: This toolbar needs a hand - //QToolBar* toolbar = new QToolBar(tr("Arranger"), parent); parent->addToolBarBreak(); QToolBar* toolbar = parent->addToolBar(tr("Arranger")); - //QLabel* label = new QLabel(tr("Cursor"), toolbar, "Cursor"); QLabel* label = new QLabel(tr("Cursor")); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); label->setIndent(3); toolbar->addWidget(label); - //cursorPos = new PosLabel(toolbar); cursorPos = new PosLabel(0); cursorPos->setEnabled(false); cursorPos->setFixedHeight(22); @@ -132,22 +128,19 @@ Arranger::Arranger(QMainWindow* parent, const char* name) const char* rastval[] = { QT_TR_NOOP("Off"), QT_TR_NOOP("Bar"), "1/2", "1/4", "1/8", "1/16" }; - //label = new QLabel(tr("Snap"), toolbar, "Snap"); label = new QLabel(tr("Snap")); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); label->setIndent(3); toolbar->addWidget(label); - //QComboBox* raster = new QComboBox(toolbar); QComboBox* raster = new QComboBox(); for (int i = 0; i < 6; i++) raster->insertItem(tr(rastval[i]), i); raster->setCurrentItem(1); + toolbar->addWidget(raster); connect(raster, SIGNAL(activated(int)), SLOT(_setRaster(int))); raster->setFocusPolicy(Qt::NoFocus); - toolbar->addWidget(raster); // Song len - //label = new QLabel(tr("Len"), toolbar, "Len"); label = new QLabel(tr("Len")); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); label->setIndent(3); @@ -156,40 +149,37 @@ Arranger::Arranger(QMainWindow* parent, const char* name) // song length is limited to 10000 bars; the real song len is limited // by overflows in tick computations // - //lenEntry = new SpinBox(1, 10000, 1, toolbar); lenEntry = new SpinBox(1, 10000, 1); lenEntry->setValue(song->len()); - connect(lenEntry, SIGNAL(valueChanged(int)), SLOT(songlenChanged(int))); QToolTip::add(lenEntry, 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"), toolbar); 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); - connect(typeBox, SIGNAL(activated(int)), SLOT(modeChange(int))); QToolTip::add(typeBox, tr("midi song type")); Q3WhatsThis::add(typeBox, tr("midi song type")); typeBox->setFocusPolicy(Qt::NoFocus); toolbar->addWidget(typeBox); + connect(typeBox, SIGNAL(activated(int)), SLOT(modeChange(int))); - //label = new QLabel(tr("Pitch"), toolbar, "Pitch"); label = new QLabel(tr("Pitch")); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); label->setIndent(3); toolbar->addWidget(label); - //globalPitchSpinBox = new SpinBox(-127, 127, 1, toolbar); + globalPitchSpinBox = new SpinBox(-127, 127, 1); globalPitchSpinBox->setValue(song->globalPitchShift()); QToolTip::add(globalPitchSpinBox, tr("midi pitch")); Q3WhatsThis::add(globalPitchSpinBox, tr("global midi pitch shift")); - connect(globalPitchSpinBox, SIGNAL(valueChanged(int)), SLOT(globalPitchChanged(int))); toolbar->addWidget(globalPitchSpinBox); - //label = new QLabel(tr("Tempo"), toolbar, "Tempo"); + connect(globalPitchSpinBox, SIGNAL(valueChanged(int)), SLOT(globalPitchChanged(int))); + label = new QLabel(tr("Tempo")); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); label->setIndent(3); @@ -200,25 +190,23 @@ Arranger::Arranger(QMainWindow* parent, const char* name) globalTempoSpinBox->setValue(tempomap.globalTempo()); QToolTip::add(globalTempoSpinBox, tr("midi tempo")); Q3WhatsThis::add(globalTempoSpinBox, tr("midi tempo")); - connect(globalTempoSpinBox, SIGNAL(valueChanged(int)), SLOT(globalTempoChanged(int))); toolbar->addWidget(globalTempoSpinBox); + connect(globalTempoSpinBox, SIGNAL(valueChanged(int)), SLOT(globalTempoChanged(int))); - //QToolButton* tempo50 = new QToolButton(toolbar, "tempo50"); QToolButton* tempo50 = new QToolButton(); tempo50->setText(QString("50%")); - connect(tempo50, SIGNAL(clicked()), SLOT(setTempo50())); toolbar->addWidget(tempo50); - //QToolButton* tempo100 = new QToolButton(toolbar, "tempo100"); + connect(tempo50, SIGNAL(clicked()), SLOT(setTempo50())); + QToolButton* tempo100 = new QToolButton(); tempo100->setText(tr("N")); - connect(tempo100, SIGNAL(clicked()), SLOT(setTempo100())); toolbar->addWidget(tempo100); - //QToolButton* tempo200 = new QToolButton(toolbar, "tempo200"); + connect(tempo100, SIGNAL(clicked()), SLOT(setTempo100())); + QToolButton* tempo200 = new QToolButton(); tempo200->setText(QString("200%")); - connect(tempo200, SIGNAL(clicked()), SLOT(setTempo200())); toolbar->addWidget(tempo200); - //parent->addToolBar(toolbar); + connect(tempo200, SIGNAL(clicked()), SLOT(setTempo200())); QVBoxLayout* box = new QVBoxLayout(this); box->addWidget(hLine(this), Qt::AlignTop); @@ -256,14 +244,10 @@ Arranger::Arranger(QMainWindow* parent, const char* name) // Track-Info Button ib = new QToolButton(tracklist); ib->setText(tr("TrackInfo")); - ib->setToggleButton(true); + ib->setCheckable(true); ib->setOn(showTrackinfoFlag); - connect(ib, SIGNAL(toggled(bool)), SLOT(showTrackInfo(bool))); - // Changed by T356 Mar 8 2008. Did someone accidentally change to header1 recently? - // Muse was saying Tlist: unknown tag <header> at line 32 - //header = new Header(tracklist, "header1"); header = new Header(tracklist, "header"); header->setFixedHeight(30); diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp index acfd3a03..645dc349 100644 --- a/muse2/muse/midiedit/drumedit.cpp +++ b/muse2/muse/midiedit/drumedit.cpp @@ -223,18 +223,8 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini // Toolbars //--------------------------------------------------- - //tools = new QToolBar(this, "drum-tools"); tools = addToolBar(tr("drum-tools")); - //new QToolButton(*openIcon, tr("Load Drummap"), - // QString::null, this, SLOT(load()), - // tools, "load drummap from file"); - - //new QToolButton(*saveIcon, tr("Store Drummap"), - // QString::null, - // this, SLOT(save()), - // tools, "store drummap to file"); - QToolButton *ldm = new QToolButton(); QToolTip::add(ldm, tr("Load Drummap")); ldm->setIcon(*openIcon); @@ -247,38 +237,31 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini connect(sdm, SIGNAL(clicked()), SLOT(save())); tools->addWidget(sdm); - //Q3WhatsThis::whatsThisButton(tools); tools->addAction(QWhatsThis::createAction(this)); tools->addSeparator(); - //undoRedo->addTo(tools); tools->addActions(undoRedo->actions()); tools->addSeparator(); - //srec = new QToolButton(tools, "srec"); srec = new QToolButton(); QToolTip::add(srec, tr("Step Record")); srec->setIcon(*steprecIcon); - srec->setToggleButton(true); + srec->setCheckable(true); tools->addWidget(srec); - //midiin = new QToolButton(tools, "midiin"); midiin = new QToolButton(); QToolTip::add(midiin, tr("Midi Input")); midiin->setIcon(*midiinIcon); - midiin->setToggleButton(true); + midiin->setCheckable(true); tools->addWidget(midiin); tools2 = new EditToolBar(this, drumeditTools); addToolBar(tools2); QToolBar* panicToolbar = addToolBar(tr("panic")); - //panicAction->addTo(panicToolbar); panicToolbar->addAction(panicAction); - //QToolBar* transport = new QToolBar(this); QToolBar* transport = addToolBar(tr("transport")); - //transportAction->addTo(transport); transport->addActions(transportAction->actions()); addToolBarBreak(); diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp index dbeda748..c9c4ec3f 100644 --- a/muse2/muse/midiedit/pianoroll.cpp +++ b/muse2/muse/midiedit/pianoroll.cpp @@ -178,51 +178,40 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i connect(menuFunctions, SIGNAL(activated(int)), SLOT(cmd(int))); //---------ToolBar---------------------------------- - //tools = new QToolBar(this, "pianoroll-tools"); tools = addToolBar(tr("pianoroll-tools")); - //undoRedo->addTo(tools); tools->addActions(undoRedo->actions()); tools->addSeparator(); - //srec = new QToolButton(tools, "srec"); // 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->setIcon(*steprecIcon); - srec->setToggleButton(true); + srec->setCheckable(true); tools->addWidget(srec); - //midiin = new QToolButton(tools, "midiin"); midiin = new QToolButton(); QToolTip::add(midiin, tr("Midi Input")); midiin->setIcon(*midiinIcon); - midiin->setToggleButton(true); + midiin->setCheckable(true); tools->addWidget(midiin); - //speaker = new QToolButton(tools, "speaker"); speaker = new QToolButton(); QToolTip::add(speaker, tr("Play Events")); speaker->setIcon(*speakerIcon); - speaker->setToggleButton(true); + speaker->setCheckable(true); tools->addWidget(speaker); tools2 = new EditToolBar(this, pianorollTools); addToolBar(tools2); - //QToolBar* panicToolbar = new QToolBar(this); QToolBar* panicToolbar = addToolBar(tr("panic")); - //panicAction->addTo(panicToolbar); panicToolbar->addAction(panicAction); - //this->addToolBar(panicToolbar); //------------------------------------------------------------- // Transport Bar - //QToolBar* transport = new QToolBar(this); QToolBar* transport = addToolBar(tr("transport")); - //transportAction->addTo(transport); transport->addActions(transportAction->actions()); - //this->addToolBar(transport); addToolBarBreak(); toolbar = new Toolbar1(this, _rasterInit, _quantInit); diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp index f6c5484f..8ef2607d 100644 --- a/muse2/muse/waveedit/waveedit.cpp +++ b/muse2/muse/waveedit/waveedit.cpp @@ -106,37 +106,43 @@ WaveEdit::WaveEdit(PartList* pl) connect(menuEdit, SIGNAL(activated(int)), SLOT(cmd(int))); //---------ToolBar---------------------------------- - tools = new QToolBar(this, "waveedit-tools"); - undoRedo->addTo(tools); + tools = addToolBar(tr("waveedit-tools")); + tools->addActions(undoRedo->actions()); 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())); connect(muse, SIGNAL(configChanged()), SLOT(configChanged())); - //-------------------------------------------------- // Transport Bar - QToolBar* transport = new QToolBar(this); - transportAction->addTo(transport); + QToolBar* transport = addToolBar(tr("transport")); + transport->addActions(transportAction->actions()); //-------------------------------------------------- // ToolBar: Solo Cursor1 Cursor2 - tb1 = new QToolBar(this, "pianoroll-tools"); + addToolBarBreak(); + tb1 = addToolBar(tr("pianoroll-tools")); - tb1->setLabel(tr("weTools")); - solo = new QToolButton(tb1); + //tb1->setLabel(tr("weTools")); + solo = new QToolButton(); solo->setText(tr("Solo")); - solo->setToggleButton(true); + solo->setCheckable(true); + tb1->addWidget(solo); connect(solo, SIGNAL(toggled(bool)), SLOT(soloChanged(bool))); - - QLabel* label = new QLabel(tr("Cursor"), tb1, "Cursor"); + + QLabel* label = new QLabel(tr("Cursor")); + tb1->addWidget(label); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); label->setIndent(3); - pos1 = new PosLabel(tb1); - pos2 = new PosLabel(tb1); + pos1 = new PosLabel(0); + pos1->setFixedHeight(22); + tb1->addWidget(pos1); + pos2 = new PosLabel(0); + pos2->setFixedHeight(22); pos2->setSmpte(true); + tb1->addWidget(pos2); //--------------------------------------------------- // Rest diff --git a/muse2/muse/widgets/tb1.cpp b/muse2/muse/widgets/tb1.cpp index f6a2aff8..a779760c 100644 --- a/muse2/muse/widgets/tb1.cpp +++ b/muse2/muse/widgets/tb1.cpp @@ -71,7 +71,7 @@ Toolbar1::Toolbar1(QWidget* parent, int r, int q, bool sp) solo = new QToolButton(); solo->setText(tr("Solo")); - solo->setToggleButton(true); + solo->setCheckable(true); addWidget(solo); //--------------------------------------------------- |