diff options
Diffstat (limited to 'muse2/muse/marker/markerview.cpp')
-rw-r--r-- | muse2/muse/marker/markerview.cpp | 77 |
1 files changed, 69 insertions, 8 deletions
diff --git a/muse2/muse/marker/markerview.cpp b/muse2/muse/marker/markerview.cpp index d22807b6..fabb35fd 100644 --- a/muse2/muse/marker/markerview.cpp +++ b/muse2/muse/marker/markerview.cpp @@ -141,7 +141,7 @@ void MarkerItem::setTick(unsigned v) void MarkerView::closeEvent(QCloseEvent* e) { - emit deleted((unsigned long)this); + emit deleted(static_cast<TopWin*>(this)); emit closed(); e->accept(); } @@ -151,7 +151,7 @@ void MarkerView::closeEvent(QCloseEvent* e) //--------------------------------------------------------- MarkerView::MarkerView(QWidget* parent) - : TopWin(parent, "markerview", Qt::Window /*| WDestructiveClose*/) + : TopWin(TopWin::MARKER, parent, "markerview", Qt::Window /*| WDestructiveClose*/) { //setAttribute(Qt::WA_DeleteOnClose); @@ -172,15 +172,32 @@ MarkerView::MarkerView(QWidget* parent) editMenu->addAction(markerAdd); editMenu->addAction(markerDelete); - - //---------ToolBar---------------------------------- - tools = addToolBar(tr("marker-tools")); - tools->addActions(undoRedo->actions()); + + + QMenu* settingsMenu = menuBar()->addMenu(tr("Window &Config")); + settingsMenu->addAction(subwinAction); + settingsMenu->addAction(shareAction); + settingsMenu->addAction(fullscreenAction); + + + // Toolbars --------------------------------------------------------- + QToolBar* undo_tools=addToolBar(tr("Undo/Redo tools")); + undo_tools->setObjectName("Undo/Redo tools"); + undo_tools->addActions(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(panicAction); + + QToolBar* transport_toolbar = addToolBar(tr("transport")); + transport_toolbar->setObjectName("transport"); + transport_toolbar->addActions(transportAction->actions()); + //--------------------------------------------------- // master //--------------------------------------------------- @@ -269,7 +286,8 @@ MarkerView::MarkerView(QWidget* parent) // bug: 2811156 Softsynth GUI unclosable with XFCE4 (and a few others) show(); hide(); - + + initalizing=false; } //--------------------------------------------------------- @@ -296,7 +314,10 @@ void MarkerView::readStatus(Xml& xml) break; switch (token) { case Xml::TagStart: - xml.unknown("Marker"); + if (tag=="topwin") + TopWin::readStatus(xml); + else + xml.unknown("Marker"); break; case Xml::TagEnd: if (tag == "marker") @@ -314,6 +335,46 @@ void MarkerView::readStatus(Xml& xml) void MarkerView::writeStatus(int level, Xml& xml) const { xml.tag(level++, "marker"); + TopWin::writeStatus(level, xml); + xml.tag(level, "/marker"); + } + +//--------------------------------------------------------- +// readConfiguration +//--------------------------------------------------------- + +void MarkerView::readConfiguration(Xml& xml) + { + for (;;) { + Xml::Token token = xml.parse(); + const QString& tag = xml.s1(); + switch (token) { + case Xml::Error: + case Xml::End: + return; + case Xml::TagStart: + if (tag == "topwin") + TopWin::readConfiguration(MARKER, xml); + else + xml.unknown("MarkerView"); + break; + case Xml::TagEnd: + if (tag == "marker") + return; + default: + break; + } + } + } + +//--------------------------------------------------------- +// writeConfiguration +//--------------------------------------------------------- + +void MarkerView::writeConfiguration(int level, Xml& xml) + { + xml.tag(level++, "marker"); + TopWin::writeConfiguration(MARKER, level, xml); xml.tag(level, "/marker"); } |