diff options
author | Florian Jung <flo@windfisch.org> | 2011-08-16 16:27:54 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-08-16 16:27:54 +0000 |
commit | 6b5e69ff5def2c8469657e33413bec84d815df9d (patch) | |
tree | 71bf8eb1a0ae14c20529dc35b91b14e0b43a560a /muse2/muse/master/masteredit.cpp | |
parent | 23f3026199641b6e2a2af69e10353cbe304e5649 (diff) |
this is only a backup commit
toolbar states are now saved also for shared toolbars
toolbar and window state saving is now handled in TopWin
TODO: finish list, cliplist, masterlist, marker, arranger
Diffstat (limited to 'muse2/muse/master/masteredit.cpp')
-rw-r--r-- | muse2/muse/master/masteredit.cpp | 52 |
1 files changed, 6 insertions, 46 deletions
diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp index 30e95dbd..f484e935 100644 --- a/muse2/muse/master/masteredit.cpp +++ b/muse2/muse/master/masteredit.cpp @@ -35,9 +35,6 @@ #include <QMenu> int MasterEdit::_rasterInit = 0; -int MasterEdit::_widthInit = 600; -int MasterEdit::_heightInit = 400; -QByteArray MasterEdit::_toolbarInit; //--------------------------------------------------------- // closeEvent @@ -86,8 +83,8 @@ MasterEdit::MasterEdit() { setWindowTitle(tr("MusE: Mastertrack")); _raster = 0; // measure + resize(_widthInit[_type], _heightInit[_type]); setMinimumSize(400, 300); - resize(_widthInit, _heightInit); //---------Pulldown Menu---------------------------- // QPopupMenu* file = new QPopupMenu(this); @@ -247,8 +244,8 @@ MasterEdit::MasterEdit() connect(canvas, SIGNAL(followEvent(int)), hscroll, SLOT(setOffset(int))); connect(canvas, SIGNAL(timeChanged(unsigned)), SLOT(setTime(unsigned))); - if (!_toolbarInit.isEmpty()) - restoreState(_toolbarInit); + initTopwinState(); + initalizing=false; } //--------------------------------------------------------- @@ -337,12 +334,8 @@ void MasterEdit::readConfiguration(Xml& xml) case Xml::TagStart: if (tag == "raster") _rasterInit = xml.parseInt(); - else if (tag == "width") - _widthInit = xml.parseInt(); - else if (tag == "height") - _heightInit = xml.parseInt(); - else if (tag == "toolbars") - _toolbarInit = QByteArray::fromHex(xml.parse1().toAscii()); + else if (tag == "topwin") + TopWin::readConfiguration(MASTER, xml); else xml.unknown("MasterEdit"); break; @@ -363,9 +356,7 @@ void MasterEdit::writeConfiguration(int level, Xml& xml) { xml.tag(level++, "masteredit"); xml.intTag(level, "raster", _rasterInit); - xml.intTag(level, "width", _widthInit); - xml.intTag(level, "height", _heightInit); - xml.strTag(level, "toolbars", _toolbarInit.toHex().data()); + TopWin::writeConfiguration(MASTER, level, xml); xml.tag(level, "/masteredit"); } @@ -434,34 +425,3 @@ void MasterEdit::setTempo(int val) } -//--------------------------------------------------------- -// resizeEvent -//--------------------------------------------------------- - -void MasterEdit::resizeEvent(QResizeEvent* ev) - { - QWidget::resizeEvent(ev); - storeInitialState(); - } - -//--------------------------------------------------------- -// focusOutEvent -//--------------------------------------------------------- - -void MasterEdit::focusOutEvent(QFocusEvent* ev) - { - QWidget::focusOutEvent(ev); - storeInitialState(); - } - - -//--------------------------------------------------------- -// storeInitialState -//--------------------------------------------------------- - -void MasterEdit::storeInitialState() - { - _widthInit = width(); - _heightInit = height(); - _toolbarInit=saveState(); - } |