summaryrefslogtreecommitdiff
path: root/muse2/muse/cliplist/cliplist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'muse2/muse/cliplist/cliplist.cpp')
-rw-r--r--muse2/muse/cliplist/cliplist.cpp67
1 files changed, 65 insertions, 2 deletions
diff --git a/muse2/muse/cliplist/cliplist.cpp b/muse2/muse/cliplist/cliplist.cpp
index 96636463..8dbb80ef 100644
--- a/muse2/muse/cliplist/cliplist.cpp
+++ b/muse2/muse/cliplist/cliplist.cpp
@@ -7,6 +7,9 @@
//=========================================================
#include <QCloseEvent>
+#include <QMenuBar>
+#include <QMenu>
+#include <QToolBar>
#include "cliplist.h"
#include "song.h"
@@ -97,7 +100,7 @@ QString ClipItem::text(int col) const
//---------------------------------------------------------
ClipListEdit::ClipListEdit(QWidget* parent)
- : TopWin(parent, "cliplist", Qt::Window)
+ : TopWin(TopWin::CLIPLIST, parent, "cliplist", Qt::Window)
{
//setAttribute(Qt::WA_DeleteOnClose);
setWindowTitle(tr("MusE: Clip List Editor"));
@@ -107,6 +110,25 @@ 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(undoRedo->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());
+
+ QMenu* settingsMenu = menuBar()->addMenu(tr("Window &Config"));
+ settingsMenu->addAction(subwinAction);
+ settingsMenu->addAction(shareAction);
+ settingsMenu->addAction(fullscreenAction);
+
QFontMetrics fm(editor->view->font());
int fw = style()->pixelMetric(QStyle::PM_DefaultFrameWidth,0, this); // ddskrjo 0
int w = 2 + fm.width('9') * 9 + fm.width(':') * 3 + fw * 4;
@@ -123,6 +145,8 @@ ClipListEdit::ClipListEdit(QWidget* parent)
connect(editor->len, SIGNAL(valueChanged(const Pos&)), SLOT(lenChanged(const Pos&)));
updateList();
+
+ initalizing=false;
}
ClipListEdit::~ClipListEdit()
@@ -149,7 +173,7 @@ void ClipListEdit::updateList()
void ClipListEdit::closeEvent(QCloseEvent* e)
{
- emit deleted((unsigned long)this);
+ emit deleted(static_cast<TopWin*>(this));
e->accept();
}
@@ -205,6 +229,45 @@ void ClipListEdit::writeStatus(int level, Xml& xml) const
}
//---------------------------------------------------------
+// readConfiguration
+//---------------------------------------------------------
+
+void ClipListEdit::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(CLIPLIST, xml);
+ else
+ xml.unknown("ClipListEdit");
+ break;
+ case Xml::TagEnd:
+ if (tag == "cliplistedit")
+ return;
+ default:
+ break;
+ }
+ }
+ }
+
+//---------------------------------------------------------
+// writeConfiguration
+//---------------------------------------------------------
+
+void ClipListEdit::writeConfiguration(int level, Xml& xml)
+ {
+ xml.tag(level++, "cliplistedit");
+ TopWin::writeConfiguration(CLIPLIST, level, xml);
+ xml.tag(level, "/cliplistedit");
+ }
+
+//---------------------------------------------------------
// startChanged
//---------------------------------------------------------