summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-08-22 18:17:08 +0000
committerFlorian Jung <flo@windfisch.org>2011-08-22 18:17:08 +0000
commitb420f1dd82698c9d7c46212a57a1142a4e37f228 (patch)
tree6e6c1ba331b84bbf5ac8deba4545a689201fa1a8 /muse2
parent83d25a41dfc356d2249d8cbed2f08416013eb07c (diff)
added fullscreen mode
Diffstat (limited to 'muse2')
-rw-r--r--muse2/muse/app.cpp14
-rw-r--r--muse2/muse/app.h2
-rw-r--r--muse2/muse/arranger/arrangerview.cpp1
-rw-r--r--muse2/muse/cliplist/cliplist.cpp1
-rw-r--r--muse2/muse/cobject.cpp17
-rw-r--r--muse2/muse/cobject.h4
-rw-r--r--muse2/muse/liste/listedit.cpp1
-rw-r--r--muse2/muse/marker/markerview.cpp1
-rw-r--r--muse2/muse/master/lmaster.cpp1
-rw-r--r--muse2/muse/master/masteredit.cpp1
-rw-r--r--muse2/muse/midiedit/drumedit.cpp1
-rw-r--r--muse2/muse/midiedit/pianoroll.cpp1
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp3
-rw-r--r--muse2/muse/waveedit/waveedit.cpp1
14 files changed, 48 insertions, 1 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index b30358b1..d6990c67 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -506,6 +506,9 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
viewMarkerAction->setCheckable(true);
viewArrangerAction = new QAction(tr("Arranger View"), this);
viewArrangerAction->setCheckable(true);
+ fullscreenAction=new QAction(tr("Fullscreen"), this);
+ fullscreenAction->setCheckable(true);
+ fullscreenAction->setChecked(false);
//-------- Midi Actions
menuScriptPlugins = new QMenu(tr("&Plugins"), this);
@@ -595,6 +598,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
connect(viewCliplistAction, SIGNAL(toggled(bool)), SLOT(startClipList(bool)));
connect(viewMarkerAction, SIGNAL(toggled(bool)), SLOT(toggleMarker(bool)));
connect(viewArrangerAction, SIGNAL(toggled(bool)), SLOT(toggleArranger(bool)));
+ connect(fullscreenAction, SIGNAL(toggled(bool)), SLOT(setFullscreen(bool)));
//-------- Midi connections
connect(midiEditInstAction, SIGNAL(activated()), SLOT(startEditInstrument()));
@@ -767,6 +771,8 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
menuView->addAction(viewCliplistAction);
menuView->addAction(viewMarkerAction);
menuView->addAction(viewArrangerAction);
+ menuView->addSeparator();
+ menuView->addAction(fullscreenAction);
//-------------------------------------------------------------
@@ -3246,3 +3252,11 @@ void MusE::bringToFront(QWidget* widget)
win->raise();
}
}
+
+void MusE::setFullscreen(bool val)
+{
+ if (val)
+ showFullScreen();
+ else
+ showNormal();
+}
diff --git a/muse2/muse/app.h b/muse2/muse/app.h
index 52bccf64..8ff0f72c 100644
--- a/muse2/muse/app.h
+++ b/muse2/muse/app.h
@@ -114,6 +114,7 @@ class MusE : public QMainWindow
// View Menu actions
QAction *viewTransportAction, *viewBigtimeAction, *viewMixerAAction, *viewMixerBAction, *viewCliplistAction, *viewMarkerAction, *viewArrangerAction;
+ QAction* fullscreenAction;
// Midi Menu Actions
QAction *midiEditInstAction, *midiResetInstAction, *midiInitInstActions, *midiLocalOffAction;
@@ -294,6 +295,7 @@ class MusE : public QMainWindow
void setCurrentMenuSharingTopwin(TopWin*);
void bringToFront(QWidget* win);
+ void setFullscreen(bool);
public slots:
bool saveAs();
diff --git a/muse2/muse/arranger/arrangerview.cpp b/muse2/muse/arranger/arrangerview.cpp
index cd0f53a9..cfbffc0f 100644
--- a/muse2/muse/arranger/arrangerview.cpp
+++ b/muse2/muse/arranger/arrangerview.cpp
@@ -490,6 +490,7 @@ ArrangerView::ArrangerView(QWidget* parent)
QMenu* menuSettings = menuBar()->addMenu(tr("Window &Config"));
menuSettings->addAction(subwinAction);
menuSettings->addAction(shareAction);
+ menuSettings->addAction(fullscreenAction);
//-------- Edit connections
diff --git a/muse2/muse/cliplist/cliplist.cpp b/muse2/muse/cliplist/cliplist.cpp
index 58bacdd0..8dbb80ef 100644
--- a/muse2/muse/cliplist/cliplist.cpp
+++ b/muse2/muse/cliplist/cliplist.cpp
@@ -127,6 +127,7 @@ ClipListEdit::ClipListEdit(QWidget* parent)
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
diff --git a/muse2/muse/cobject.cpp b/muse2/muse/cobject.cpp
index bebbf310..a3b62a80 100644
--- a/muse2/muse/cobject.cpp
+++ b/muse2/muse/cobject.cpp
@@ -53,6 +53,11 @@ TopWin::TopWin(ToplevelType t, QWidget* parent, const char* name, Qt::WindowFlag
shareAction->setCheckable(true);
connect(shareAction, SIGNAL(toggled(bool)), SLOT(shareToolsAndMenu(bool)));
+ fullscreenAction=new QAction(tr("Fullscreen"), this);
+ fullscreenAction->setCheckable(true);
+ fullscreenAction->setChecked(false);
+ connect(fullscreenAction, SIGNAL(toggled(bool)), SLOT(setFullscreen(bool)));
+
mdisubwin=NULL;
_sharesToolsAndMenu=_defaultSubwin[_type] ? _sharesWhenSubwin[_type] : _sharesWhenFree[_type];
if (_defaultSubwin[_type])
@@ -63,6 +68,7 @@ TopWin::TopWin(ToplevelType t, QWidget* parent, const char* name, Qt::WindowFlag
subwinAction->setChecked(isMdiWin());
shareAction->setChecked(_sharesToolsAndMenu);
+ fullscreenAction->setEnabled(!isMdiWin());
}
@@ -191,6 +197,8 @@ void TopWin::setIsMdiWin(bool val)
if (_sharesToolsAndMenu == _sharesWhenFree[_type])
shareToolsAndMenu(_sharesWhenSubwin[_type]);
+ fullscreenAction->setEnabled(false);
+ fullscreenAction->setChecked(false);
subwinAction->setChecked(true);
muse->updateWindowMenu();
}
@@ -215,6 +223,7 @@ void TopWin::setIsMdiWin(bool val)
if (_sharesToolsAndMenu == _sharesWhenSubwin[_type])
shareToolsAndMenu(_sharesWhenFree[_type]);
+ fullscreenAction->setEnabled(true);
subwinAction->setChecked(false);
muse->updateWindowMenu();
}
@@ -447,3 +456,11 @@ QString TopWin::typeName(ToplevelType t)
default: return tr("<unknown toplevel type>");
}
}
+
+void TopWin::setFullscreen(bool val)
+{
+ if (val)
+ showFullScreen();
+ else
+ showNormal();
+}
diff --git a/muse2/muse/cobject.h b/muse2/muse/cobject.h
index 604a8c28..aff4964a 100644
--- a/muse2/muse/cobject.h
+++ b/muse2/muse/cobject.h
@@ -84,6 +84,7 @@ class TopWin : public QMainWindow
protected:
QAction* subwinAction;
QAction* shareAction;
+ QAction* fullscreenAction;
ToplevelType _type;
@@ -99,6 +100,9 @@ class TopWin : public QMainWindow
bool initalizing; //if true, no state is saved
+ private slots:
+ void setFullscreen(bool);
+
public slots:
virtual void hide();
virtual void show();
diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp
index 8d4588eb..970d43c4 100644
--- a/muse2/muse/liste/listedit.cpp
+++ b/muse2/muse/liste/listedit.cpp
@@ -499,6 +499,7 @@ ListEdit::ListEdit(PartList* pl)
QMenu* settingsMenu = menuBar()->addMenu(tr("Window &Config"));
settingsMenu->addAction(subwinAction);
settingsMenu->addAction(shareAction);
+ settingsMenu->addAction(fullscreenAction);
// Toolbars ---------------------------------------------------------
diff --git a/muse2/muse/marker/markerview.cpp b/muse2/muse/marker/markerview.cpp
index 7889761c..fabb35fd 100644
--- a/muse2/muse/marker/markerview.cpp
+++ b/muse2/muse/marker/markerview.cpp
@@ -177,6 +177,7 @@ MarkerView::MarkerView(QWidget* parent)
QMenu* settingsMenu = menuBar()->addMenu(tr("Window &Config"));
settingsMenu->addAction(subwinAction);
settingsMenu->addAction(shareAction);
+ settingsMenu->addAction(fullscreenAction);
// Toolbars ---------------------------------------------------------
diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp
index 83f303ee..897ad0b4 100644
--- a/muse2/muse/master/lmaster.cpp
+++ b/muse2/muse/master/lmaster.cpp
@@ -146,6 +146,7 @@ LMaster::LMaster()
QMenu* settingsMenu = menuBar()->addMenu(tr("Window &Config"));
settingsMenu->addAction(subwinAction);
settingsMenu->addAction(shareAction);
+ settingsMenu->addAction(fullscreenAction);
connect(tempoAction, SIGNAL(triggered()), signalMapper, SLOT(map()));
diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp
index d8432ad0..eb623c14 100644
--- a/muse2/muse/master/masteredit.cpp
+++ b/muse2/muse/master/masteredit.cpp
@@ -93,6 +93,7 @@ MasterEdit::MasterEdit()
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"));
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index d9202a5b..629591e7 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -266,6 +266,7 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
QMenu* settingsMenu = menuBar()->addMenu(tr("Window &Config"));
settingsMenu->addAction(subwinAction);
settingsMenu->addAction(shareAction);
+ settingsMenu->addAction(fullscreenAction);
connect(signalMapper, SIGNAL(mapped(int)), SLOT(cmd(int)));
diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp
index ed58fec7..a494a728 100644
--- a/muse2/muse/midiedit/pianoroll.cpp
+++ b/muse2/muse/midiedit/pianoroll.cpp
@@ -233,6 +233,7 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
menuConfig->addSeparator();
menuConfig->addAction(subwinAction);
menuConfig->addAction(shareAction);
+ menuConfig->addAction(fullscreenAction);
//---------ToolBar----------------------------------
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp
index e2f87b33..a682eab0 100644
--- a/muse2/muse/midiedit/scoreedit.cpp
+++ b/muse2/muse/midiedit/scoreedit.cpp
@@ -443,6 +443,7 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos)
settings_menu->addSeparator();
settings_menu->addAction(subwinAction);
settings_menu->addAction(shareAction);
+ settings_menu->addAction(fullscreenAction);
init_shortcuts();
@@ -4450,7 +4451,7 @@ void staff_t::update_part_indices()
* changing "share" status, the changed state isn't stored
*
* CURRENT TODO
- * M o fullscreen mode for muse
+ * o shortcuts, especially for fullscreen
* m o arranger's size hint sucks oO
* maybe related: windows -> tile doesn't work, overrides scrollbarpolicy
* m o rename "borland" to "mac" style???
diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp
index 380731df..942242e7 100644
--- a/muse2/muse/waveedit/waveedit.cpp
+++ b/muse2/muse/waveedit/waveedit.cpp
@@ -154,6 +154,7 @@ WaveEdit::WaveEdit(PartList* pl)
QMenu* settingsMenu = menuBar()->addMenu(tr("Window &Config"));
settingsMenu->addAction(subwinAction);
settingsMenu->addAction(shareAction);
+ settingsMenu->addAction(fullscreenAction);
//---------ToolBar----------------------------------
tools = addToolBar(tr("Wave edit tools"));