From 078e927639369928a6fa0483c82867dae6cbf9a2 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sun, 14 Aug 2011 20:55:27 +0000 Subject: added "As subwindow" menu entries and made them work --- muse2/muse/app.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'muse2/muse/app.cpp') diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index cb1b9363..29f2dbc1 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -878,10 +878,9 @@ MusE::MusE(int argc, char** argv) : QMainWindow() arrangerView->hide(); arranger=arrangerView->getArranger(); - //QMdiSubWindow* subwin=new QMdiSubWindow(this); //FINDMICHJETZT - //subwin->setWidget(arrangerView); - //mdiArea->addSubWindow(subwin); - mdiArea->addSubWindow(arrangerView->createMdiWrapper()); + //mdiArea->addSubWindow(arrangerView->createMdiWrapper()); + arrangerView->setIsMdiWin(true); + //--------------------------------------------------- // read list of "Recent Projects" @@ -3075,11 +3074,11 @@ void MusE::setCurrentMenuSharingTopwin(TopWin* win) + for (list::iterator it = leadingMenus.begin(); it!=leadingMenus.end(); it++) + menuBar()->addMenu(*it); + if (win) { - for (list::iterator it = leadingMenus.begin(); it!=leadingMenus.end(); it++) - menuBar()->addMenu(*it); - const QList& actions=win->menuBar()->actions(); for (QList::const_iterator it=actions.begin(); it!=actions.end(); it++) { @@ -3088,9 +3087,6 @@ void MusE::setCurrentMenuSharingTopwin(TopWin* win) menuBar()->addAction(*it); } - for (list::iterator it = trailingMenus.begin(); it!=trailingMenus.end(); it++) - menuBar()->addMenu(*it); - const list& toolbars=win->toolbars(); @@ -3111,6 +3107,13 @@ void MusE::setCurrentMenuSharingTopwin(TopWin* win) foreignToolbars.push_back(NULL); } } - //TODO FINDMICHJETZT + + for (list::iterator it = trailingMenus.begin(); it!=trailingMenus.end(); it++) + menuBar()->addMenu(*it); } } + +void MusE::addMdiSubWindow(QMdiSubWindow* win) +{ + mdiArea->addSubWindow(win); +} -- cgit v1.2.3