Commit 9ef8fe59 authored by Jan Möbius's avatar Jan Möbius

Window Menu added to control Toolboxes and View Modes

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10415 383ad7c9-94d9-4d36-a494-682f7c89f535
parent bd2bdec9
......@@ -89,6 +89,9 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
logWidget_(0),
recentFilesMenu_(0),
helpMenu_(0),
windowMenu_(0),
AC_ShowViewModeControls_(0),
AC_ShowToolbox_(0),
cursorPainter_(0),
sceneGraphDialog_(0),
fileMenu_(0),
......@@ -663,6 +666,11 @@ CoreWidget::showViewModeControls(bool _show) {
// Update setting in Conf storage
OpenFlipperSettings().setValue("Core/Gui/TaskSwitcher/Hide",!_show);
// Update The Checkbox in the Menu
AC_ShowViewModeControls_->blockSignals(true);
AC_ShowViewModeControls_->setChecked( _show );
AC_ShowViewModeControls_->blockSignals(false);
if ( _show ) {
viewModeControlBox_->show();
} else {
......
......@@ -363,13 +363,15 @@ public:
/// Hide or show toolbox area
void toggleToolbox();
/// Show or hide toolbox
void showToolbox( bool _state );
/// Use native or gl painted cursor
void setForceNativeCursor ( bool _state );
QSize defaultIconSize();
public slots:
/// Show or hide toolbox
void showToolbox( bool _state );
private:
OpenFlipper::Options::LoggerState loggerState_;
......@@ -490,7 +492,16 @@ public:
/// Help Menu
QMenu* helpMenu_;
/// Window Menu
QMenu* windowMenu_;
/// Action for View Mode Widget Conrol in Menu
QAction* AC_ShowViewModeControls_;
/// Action for View Mode Widget Conrol in Menu
QAction* AC_ShowToolbox_;
/// gl widget used as drawing area to paint the graphics scene
QGLWidget* glWidget_;
......
......@@ -436,6 +436,35 @@ void CoreWidget::setupMenuBar()
AC_Plugins->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"network-connect.png"));
connect(AC_Plugins, SIGNAL(triggered()), this, SIGNAL(showPlugins()));
toolsMenu_->addAction(AC_Plugins);
// ======================================================================
// Window Menu
// ======================================================================
windowMenu_ = new QMenu(tr("Windows"));
menuBar()->addMenu(windowMenu_);
menus_[tr("Windows")] = windowMenu_;
// Show or Hide the View Mode Controls
AC_ShowViewModeControls_ = new QAction(tr("Show View Mode Controls"), this);
AC_ShowViewModeControls_->setStatusTip(tr("Show or Hide View Mode Control Widget"));
// AC_HelpBrowser->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"help-browser.png"));
AC_ShowViewModeControls_->setWhatsThis(tr("Show or Hide View Mode Control Widget"));
AC_ShowViewModeControls_->setCheckable(true);
AC_ShowViewModeControls_->setChecked( ! OpenFlipperSettings().value("Core/Gui/TaskSwitcher/Hide",false).toBool() );
connect(AC_ShowViewModeControls_, SIGNAL(toggled( bool )), this, SLOT(showViewModeControls(bool)));
windowMenu_->addAction(AC_ShowViewModeControls_);
// Show or Hide the View Mode Controls
AC_ShowToolbox_ = new QAction(tr("Show Toolboxes"), this);
AC_ShowToolbox_->setStatusTip(tr("Show or Hide the Toolbox Widget"));
// AC_HelpBrowser->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"help-browser.png"));
AC_ShowToolbox_->setWhatsThis(tr("Show or Hide the Toolbox Widget"));
AC_ShowToolbox_->setCheckable(true);
AC_ShowToolbox_->setChecked( ! OpenFlipperSettings().value("Core/Gui/ToolBoxes/hidden",false).toBool() );
connect(AC_ShowToolbox_, SIGNAL( toggled( bool )), this, SLOT(showToolbox(bool)));
windowMenu_->addAction(AC_ShowToolbox_);
// ======================================================================
// help Menu
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment