From e0e73b232846c8707560ebff0955a8e9cb865ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 5 Dec 2008 07:16:11 +0000 Subject: [PATCH] Added option to explicitly set if we want fullscreen mode or not git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3878 383ad7c9-94d9-4d36-a494-682f7c89f535 --- Core/Core.cc | 7 +++++++ Core/Core.hh | 9 ++++++--- gui.kdevelop | 2 +- gui.kdevses | 17 ++++++++++------- widgets/coreWidget/CoreWidget.cc | 18 ++++++++++++++++++ widgets/coreWidget/CoreWidget.hh | 3 +++ 6 files changed, 45 insertions(+), 11 deletions(-) diff --git a/Core/Core.cc b/Core/Core.cc index 52df2a97..a1959b20 100644 --- a/Core/Core.cc +++ b/Core/Core.cc @@ -667,6 +667,13 @@ void Core::fullscreen() { //----------------------------------------------------------------------------- +void Core::fullscreen( bool _state ) { + if ( OpenFlipper::Options::gui() ) + coreWidget_->setFullscreen(_state); +} + +//----------------------------------------------------------------------------- + void Core::logger() { if ( OpenFlipper::Options::gui() ) coreWidget_->toggleLogger(); diff --git a/Core/Core.hh b/Core/Core.hh index 63e04269..86b94894 100644 --- a/Core/Core.hh +++ b/Core/Core.hh @@ -282,6 +282,9 @@ public slots: /// toggle fullscreen mode void fullscreen(); + /// set fullscreen mode + void fullscreen( bool _state ); + /// Hide or show logging window void logger(); @@ -300,7 +303,7 @@ public slots: /// set the baseFilename for snapshots (a counter is automatically increased when /// snapshot() is called) void snapshotBaseFileName(const QString& _fname); - + /** Trigger a snapshot and increase the snapshot counter. Save snapshot to file determined by snapshotBaseFileName() and the current snapshot counter. The \a back buffer will be saved. @@ -360,7 +363,7 @@ private: * @param _id id of the object */ bool saveObject( int _id, QString _filename ); - + /** Show dialog for saving an object to a new location * @param _id id of the object * @param _filename current filename of the object @@ -620,7 +623,7 @@ private: private: QList< SlotInfo > coreSlots_; - + void setDescriptions(); /** @} */ diff --git a/gui.kdevelop b/gui.kdevelop index e8d4e44d..925730ae 100644 --- a/gui.kdevelop +++ b/gui.kdevelop @@ -87,7 +87,7 @@ - ACG + Plugin-TemplateModeling diff --git a/gui.kdevses b/gui.kdevses index 7c9eb897..dce74a47 100644 --- a/gui.kdevses +++ b/gui.kdevses @@ -1,16 +1,19 @@ - - - + + + - - + + - - + + + + + diff --git a/widgets/coreWidget/CoreWidget.cc b/widgets/coreWidget/CoreWidget.cc index f6d08cab..f29e0ad9 100644 --- a/widgets/coreWidget/CoreWidget.cc +++ b/widgets/coreWidget/CoreWidget.cc @@ -294,6 +294,24 @@ CoreWidget::toggleFullscreen() { //----------------------------------------------------------------------------- +/** Enable or disable Fullscreen Mode + */ +void +CoreWidget::setFullscreen(bool _state ) { + if ( _state ) + setWindowState( windowState() | Qt::WindowFullScreen); + else { + if ( windowState() & Qt::WindowFullScreen ) + setWindowState( windowState() ^ Qt::WindowFullScreen); + } + + OpenFlipper::Options::fullScreen( bool( windowState() & Qt::WindowFullScreen) ); + + show(); +} + +//----------------------------------------------------------------------------- + /** Hide or show logger */ void diff --git a/widgets/coreWidget/CoreWidget.hh b/widgets/coreWidget/CoreWidget.hh index 966f9a78..6eaf2870 100644 --- a/widgets/coreWidget/CoreWidget.hh +++ b/widgets/coreWidget/CoreWidget.hh @@ -205,6 +205,9 @@ public: /// Set application to Fullscreen and back void toggleFullscreen(); + /// Enable or disable fullscreen mode + void setFullscreen(bool _state ); + /// Hide or show logging area void toggleLogger(); -- GitLab