diff options
Diffstat (limited to 'muse2/muse/liste/listedit.cpp')
-rw-r--r-- | muse2/muse/liste/listedit.cpp | 72 |
1 files changed, 65 insertions, 7 deletions
diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp index 61bd8ee4..bc90433d 100644 --- a/muse2/muse/liste/listedit.cpp +++ b/muse2/muse/liste/listedit.cpp @@ -165,7 +165,7 @@ static QString midiMetaComment(const Event& ev) void ListEdit::closeEvent(QCloseEvent* e) { - emit deleted((unsigned long)this); + emit deleted(static_cast<TopWin*>(this)); e->accept(); } @@ -445,7 +445,7 @@ QString EventListItem::text(int col) const //--------------------------------------------------------- ListEdit::ListEdit(PartList* pl) - : MidiEditor(0, pl) + : MidiEditor(TopWin::LISTE, 0, pl) { insertItems = new QActionGroup(this); insertItems->setExclusive(false); @@ -496,14 +496,29 @@ ListEdit::ListEdit(PartList* pl) connect(editSignalMapper, SIGNAL(mapped(int)), SLOT(cmd(int))); - //---------ToolBar---------------------------------- - - listTools = addToolBar(tr("List tools")); - listTools->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* 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(panicAction); + + QToolBar* transport_toolbar = addToolBar(tr("transport")); + transport_toolbar->setObjectName("transport"); + transport_toolbar->addActions(transportAction->actions()); + // //--------------------------------------------------- // liste @@ -574,6 +589,10 @@ ListEdit::ListEdit(PartList* pl) } initShortcuts(); + + setWindowTitle("MusE: List Editor"); + + initalizing=false; } //--------------------------------------------------------- @@ -813,6 +832,45 @@ void ListEdit::writeStatus(int level, Xml& xml) const } //--------------------------------------------------------- +// readConfiguration +//--------------------------------------------------------- + +void ListEdit::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(LISTE, xml); + else + xml.unknown("ListEdit"); + break; + case Xml::TagEnd: + if (tag == "listedit") + return; + default: + break; + } + } + } + +//--------------------------------------------------------- +// writeConfiguration +//--------------------------------------------------------- + +void ListEdit::writeConfiguration(int level, Xml& xml) + { + xml.tag(level++, "listedit"); + TopWin::writeConfiguration(LISTE, level, xml); + xml.tag(level, "/listedit"); + } + +//--------------------------------------------------------- // selectionChanged //--------------------------------------------------------- |