summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2012-01-18 17:40:50 +0000
committerFlorian Jung <flo@windfisch.org>2012-01-18 17:40:50 +0000
commit4cb5a2b9feebffecd42789d529b3ca790e8206ac (patch)
tree4da9ccd543216bc9d8c34127587644c073e5905b /muse2/muse
parentba4e43028bf066d1bec367321d8e31aacc5ca530 (diff)
moved redundant toolbar generation into TopWin::TopWin
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/app.cpp6
-rw-r--r--muse2/muse/arranger/arrangerview.cpp13
-rw-r--r--muse2/muse/cliplist/cliplist.cpp15
-rw-r--r--muse2/muse/cobject.cpp33
-rw-r--r--muse2/muse/liste/listedit.cpp12
-rw-r--r--muse2/muse/marker/markerview.cpp12
-rw-r--r--muse2/muse/master/lmaster.cpp12
-rw-r--r--muse2/muse/master/masteredit.cpp13
-rw-r--r--muse2/muse/midiedit/drumedit.cpp11
-rw-r--r--muse2/muse/midiedit/pianoroll.cpp12
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp17
-rw-r--r--muse2/muse/waveedit/waveedit.cpp10
12 files changed, 37 insertions, 129 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index 26f2d158..04d84ffb 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -716,9 +716,9 @@ MusE::MusE(int /*argc*/, char** /*argv*/) : QMainWindow()
panicToolbar->addAction(MusEGlobal::panicAction);
requiredToolbars.push_back(tools);
- requiredToolbars.push_back(songpos_tb);
- requiredToolbars.push_back(sig_tb);
- requiredToolbars.push_back(tempo_tb);
+ optionalToolbars.push_back(songpos_tb);
+ optionalToolbars.push_back(sig_tb);
+ optionalToolbars.push_back(tempo_tb);
optionalToolbars.push_back(undoToolbar);
optionalToolbars.push_back(transportToolbar);
optionalToolbars.push_back(panicToolbar);
diff --git a/muse2/muse/arranger/arrangerview.cpp b/muse2/muse/arranger/arrangerview.cpp
index 2eab50a5..36658903 100644
--- a/muse2/muse/arranger/arrangerview.cpp
+++ b/muse2/muse/arranger/arrangerview.cpp
@@ -97,19 +97,6 @@ ArrangerView::ArrangerView(QWidget* parent)
editSignalMapper->setMapping(sc, CMD_DELETE);
// Toolbars ---------------------------------------------------------
- QToolBar* undo_tools=addToolBar(tr("Undo/Redo tools"));
- undo_tools->setObjectName("Undo/Redo tools");
- undo_tools->addActions(MusEGlobal::undoRedo->actions());
-
-
- QToolBar* panic_toolbar = addToolBar(tr("panic"));
- panic_toolbar->setObjectName("panic");
- panic_toolbar->addAction(MusEGlobal::panicAction);
-
- QToolBar* transport_toolbar = addToolBar(tr("transport"));
- transport_toolbar->setObjectName("transport");
- transport_toolbar->addActions(MusEGlobal::transportAction->actions());
-
editTools = new EditToolBar(this, arrangerTools);
addToolBar(editTools);
editTools->setObjectName("arrangerTools");
diff --git a/muse2/muse/cliplist/cliplist.cpp b/muse2/muse/cliplist/cliplist.cpp
index 60041dae..02a30dec 100644
--- a/muse2/muse/cliplist/cliplist.cpp
+++ b/muse2/muse/cliplist/cliplist.cpp
@@ -134,20 +134,7 @@ ClipListEdit::ClipListEdit(QWidget* parent)
//editor->view->setColumnAlignment(COL_REFS, Qt::AlignRight);
- // Toolbars ---------------------------------------------------------
- QToolBar* undo_tools=addToolBar(tr("Undo/Redo tools"));
- undo_tools->setObjectName("Undo/Redo tools");
- undo_tools->addActions(MusEGlobal::undoRedo->actions());
-
-
- QToolBar* panic_toolbar = addToolBar(tr("panic"));
- panic_toolbar->setObjectName("panic");
- panic_toolbar->addAction(MusEGlobal::panicAction);
-
- QToolBar* transport_toolbar = addToolBar(tr("transport"));
- transport_toolbar->setObjectName("transport");
- transport_toolbar->addActions(MusEGlobal::transportAction->actions());
-
+
QMenu* settingsMenu = menuBar()->addMenu(tr("Window &Config"));
settingsMenu->addAction(subwinAction);
settingsMenu->addAction(shareAction);
diff --git a/muse2/muse/cobject.cpp b/muse2/muse/cobject.cpp
index ded80e1c..f13cd257 100644
--- a/muse2/muse/cobject.cpp
+++ b/muse2/muse/cobject.cpp
@@ -27,6 +27,8 @@
#include "globals.h"
#include "app.h"
#include "shortcuts.h"
+#include "songpos_toolbar.h"
+#include "sig_tempo_toolbar.h"
#include <QMdiSubWindow>
#include <QToolBar>
@@ -94,6 +96,37 @@ TopWin::TopWin(ToplevelType t, QWidget* parent, const char* name, Qt::WindowFlag
mdisubwin->resize(_widthInit[_type], _heightInit[_type]);
else
resize(_widthInit[_type], _heightInit[_type]);
+
+
+ QToolBar* undo_tools=addToolBar(tr("Undo/Redo tools"));
+ undo_tools->setObjectName("Undo/Redo tools");
+ undo_tools->addActions(MusEGlobal::undoRedo->actions());
+
+ QToolBar* panic_toolbar = addToolBar(tr("Panic"));
+ panic_toolbar->setObjectName("panic");
+ panic_toolbar->addAction(MusEGlobal::panicAction);
+
+ QToolBar* transport_toolbar = addToolBar(tr("Transport"));
+ transport_toolbar->setObjectName("transport");
+ transport_toolbar->addActions(MusEGlobal::transportAction->actions());
+
+ QToolBar* songpos_tb;
+ songpos_tb = addToolBar(tr("Song Position"));
+ songpos_tb->setObjectName("Song Position");
+ songpos_tb->addWidget(new MusEGui::SongPosToolbarWidget(songpos_tb));
+ songpos_tb->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ songpos_tb->setContextMenuPolicy(Qt::PreventContextMenu);
+
+ QToolBar* tempo_tb;
+ tempo_tb = addToolBar(tr("Tempo"));
+ tempo_tb->setObjectName("Tempo");
+ tempo_tb->addWidget(new MusEGui::TempoToolbarWidget(tempo_tb));
+
+ QToolBar* sig_tb;
+ sig_tb = addToolBar(tr("Signature"));
+ sig_tb->setObjectName("Signature");
+ sig_tb->addWidget(new MusEGui::SigToolbarWidget(tempo_tb));
+
}
diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp
index 6795cedb..5e72a0c7 100644
--- a/muse2/muse/liste/listedit.cpp
+++ b/muse2/muse/liste/listedit.cpp
@@ -528,21 +528,9 @@ ListEdit::ListEdit(MusECore::PartList* pl)
// Toolbars ---------------------------------------------------------
- QToolBar* undo_tools=addToolBar(tr("Undo/Redo tools"));
- undo_tools->setObjectName("Undo/Redo tools");
- undo_tools->addActions(MusEGlobal::undoRedo->actions());
-
QToolBar* insertTools = addToolBar(tr("Insert tools"));
insertTools->setObjectName("list insert tools");
insertTools->addActions(insertItems->actions());
-
- QToolBar* panic_toolbar = addToolBar(tr("panic"));
- panic_toolbar->setObjectName("panic");
- panic_toolbar->addAction(MusEGlobal::panicAction);
-
- QToolBar* transport_toolbar = addToolBar(tr("transport"));
- transport_toolbar->setObjectName("transport");
- transport_toolbar->addActions(MusEGlobal::transportAction->actions());
//
//---------------------------------------------------
diff --git a/muse2/muse/marker/markerview.cpp b/muse2/muse/marker/markerview.cpp
index 39ce4fc0..a957e3bf 100644
--- a/muse2/muse/marker/markerview.cpp
+++ b/muse2/muse/marker/markerview.cpp
@@ -198,23 +198,11 @@ MarkerView::MarkerView(QWidget* parent)
// Toolbars ---------------------------------------------------------
- QToolBar* undo_tools=addToolBar(tr("Undo/Redo tools"));
- undo_tools->setObjectName("Undo/Redo tools");
- undo_tools->addActions(MusEGlobal::undoRedo->actions());
-
QToolBar* edit = addToolBar(tr("edit tools"));
edit->setObjectName("marker edit tools");
edit->addAction(markerAdd);
edit->addAction(markerDelete);
- QToolBar* panic_toolbar = addToolBar(tr("panic"));
- panic_toolbar->setObjectName("panic");
- panic_toolbar->addAction(MusEGlobal::panicAction);
-
- QToolBar* transport_toolbar = addToolBar(tr("transport"));
- transport_toolbar->setObjectName("transport");
- transport_toolbar->addActions(MusEGlobal::transportAction->actions());
-
//---------------------------------------------------
// master
//---------------------------------------------------
diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp
index f461e1d3..91ffdf7e 100644
--- a/muse2/muse/master/lmaster.cpp
+++ b/muse2/muse/master/lmaster.cpp
@@ -203,10 +203,6 @@ LMaster::LMaster()
connect(signalMapper, SIGNAL(mapped(int)), SLOT(cmd(int)));
// Toolbars ---------------------------------------------------------
- QToolBar* undo_tools=addToolBar(tr("Undo/Redo tools"));
- undo_tools->setObjectName("Undo/Redo tools");
- undo_tools->addActions(MusEGlobal::undoRedo->actions());
-
QToolBar* edit = addToolBar(tr("Edit tools"));
edit->setObjectName("Master List Edit Tools");
QToolButton* tempoButton = new QToolButton();
@@ -222,14 +218,6 @@ LMaster::LMaster()
edit->addWidget(timeSigButton);
edit->addWidget(keyButton);
- QToolBar* panic_toolbar = addToolBar(tr("panic"));
- panic_toolbar->setObjectName("panic");
- panic_toolbar->addAction(MusEGlobal::panicAction);
-
- QToolBar* transport_toolbar = addToolBar(tr("transport"));
- transport_toolbar->setObjectName("transport");
- transport_toolbar->addActions(MusEGlobal::transportAction->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()));
diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp
index f6169766..571d3c83 100644
--- a/muse2/muse/master/masteredit.cpp
+++ b/muse2/muse/master/masteredit.cpp
@@ -117,19 +117,6 @@ MasterEdit::MasterEdit()
settingsMenu->addAction(fullscreenAction);
// Toolbars ---------------------------------------------------------
- QToolBar* undo_tools=addToolBar(tr("Undo/Redo tools"));
- undo_tools->setObjectName("Undo/Redo tools");
- undo_tools->addActions(MusEGlobal::undoRedo->actions());
-
-
- QToolBar* panic_toolbar = addToolBar(tr("panic"));
- panic_toolbar->setObjectName("panic");
- panic_toolbar->addAction(MusEGlobal::panicAction);
-
- QToolBar* transport_toolbar = addToolBar(tr("transport"));
- transport_toolbar->setObjectName("transport");
- transport_toolbar->addActions(MusEGlobal::transportAction->actions());
-
MusEGui::EditToolBar* tools2 = new MusEGui::EditToolBar(this, MusEGui::PointerTool | MusEGui::PencilTool | MusEGui::RubberTool);
addToolBar(tools2);
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index 1f159d1a..b4518fa9 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -404,9 +404,6 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un
tools = addToolBar(tr("Drum tools"));
tools->setObjectName("Drum tools");
- tools->addActions(MusEGlobal::undoRedo->actions());
- tools->addSeparator();
-
srec = new QToolButton();
srec->setToolTip(tr("Step Record"));
srec->setIcon(*steprecIcon);
@@ -442,14 +439,6 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un
connect(stepLenWidget, SIGNAL(currentIndexChanged(QString)), SLOT(setStep(QString)));
cursorToolbar->addWidget(stepLenWidget);
- QToolBar* panicToolbar = addToolBar(tr("panic"));
- panicToolbar->setObjectName("panic");
- panicToolbar->addAction(MusEGlobal::panicAction);
-
- QToolBar* transport = addToolBar(tr("transport"));
- transport->setObjectName("transport");
- transport->addActions(MusEGlobal::transportAction->actions());
-
addToolBarBreak();
// don't show pitch value in toolbar
toolbar = new MusEGui::Toolbar1(this, _rasterInit, false);
diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp
index 8c2a7a87..33245c4c 100644
--- a/muse2/muse/midiedit/pianoroll.cpp
+++ b/muse2/muse/midiedit/pianoroll.cpp
@@ -264,8 +264,6 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name,
//---------ToolBar----------------------------------
tools = addToolBar(tr("Pianoroll tools"));
tools->setObjectName("Pianoroll tools");
- tools->addActions(MusEGlobal::undoRedo->actions());
- tools->addSeparator();
srec = new QToolButton();
srec->setToolTip(tr("Step Record"));
@@ -288,16 +286,6 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name,
tools2 = new MusEGui::EditToolBar(this, pianorollTools);
addToolBar(tools2);
- QToolBar* panicToolbar = addToolBar(tr("panic"));
- panicToolbar->setObjectName("panic");
- panicToolbar->addAction(MusEGlobal::panicAction);
-
- //-------------------------------------------------------------
- // Transport Bar
- QToolBar* transport = addToolBar(tr("transport"));
- transport->setObjectName("transport");
- transport->addActions(MusEGlobal::transportAction->actions());
-
addToolBarBreak();
toolbar = new MusEGui::Toolbar1(this, _rasterInit);
addToolBar(toolbar);
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp
index 46ce8e60..ebc8796c 100644
--- a/muse2/muse/midiedit/scoreedit.cpp
+++ b/muse2/muse/midiedit/scoreedit.cpp
@@ -237,11 +237,6 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos)
// Toolbars ---------------------------------------------------------
- QToolBar* undo_tools=addToolBar(tr("Undo/Redo tools"));
- undo_tools->setObjectName("Undo/Redo tools");
- undo_tools->addActions(MusEGlobal::undoRedo->actions());
- addToolBar(undo_tools);
-
QToolBar* steprec_tools=addToolBar(tr("Step recording tools"));
steprec_tools->setObjectName("Step recording tools");
srec = new QToolButton();
@@ -258,14 +253,6 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos)
score_canvas->set_tool(MusEGui::PointerTool);
connect(edit_tools, SIGNAL(toolChanged(int)), score_canvas, SLOT(set_tool(int)));
- QToolBar* panic_toolbar = addToolBar(tr("panic"));
- panic_toolbar->setObjectName("panic");
- panic_toolbar->addAction(MusEGlobal::panicAction);
-
- QToolBar* transport_toolbar = addToolBar(tr("transport"));
- transport_toolbar->setObjectName("transport");
- transport_toolbar->addActions(MusEGlobal::transportAction->actions());
-
addToolBarBreak();
QToolBar* note_settings_toolbar = addToolBar(tr("Note settings"));
@@ -4668,8 +4655,6 @@ void ScoreCanvas::add_new_parts(const std::map< MusECore::Part*, std::set<MusECo
* o test drum controllers
* o test old- and new drumtrack recording, steprecording
*
- * > o add a songposition scrollbar-toolbar (in different sizes)
- * this might be equivalent to "redo transport menu" (below).
* > o add toolbar(s) for tempo- etc spinboxes from the transport window
* o add controller editor "like search-and-replace":
* acts on all specified type's events, and edits the value:
@@ -4711,8 +4696,6 @@ void ScoreCanvas::add_new_parts(const std::map< MusECore::Part*, std::set<MusECo
* "range" setting, or they've been modified), default to "in range" or "selected in range"
*
* o rename stuff with F2 key
- * o redo transport menu: offer "one beat" and "one bar" steps
- * maybe also offer scrollbar
*
* o shrink a part from its beginning as well! watch out for clones!
*
diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp
index 1c1115b1..06b5ab1d 100644
--- a/muse2/muse/waveedit/waveedit.cpp
+++ b/muse2/muse/waveedit/waveedit.cpp
@@ -175,19 +175,9 @@ WaveEdit::WaveEdit(MusECore::PartList* pl)
settingsMenu->addAction(shareAction);
settingsMenu->addAction(fullscreenAction);
- //---------ToolBar----------------------------------
- tools = addToolBar(tr("Wave edit tools"));
- tools->setObjectName("Wave edit tools");
-
- tools->addActions(MusEGlobal::undoRedo->actions());
connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(configChanged()));
- //--------------------------------------------------
- // Transport Bar
- QToolBar* transport = addToolBar(tr("transport"));
- transport->setObjectName("transport");
- transport->addActions(MusEGlobal::transportAction->actions());
//--------------------------------------------------
// ToolBar: Solo Cursor1 Cursor2