# HG changeset patch # User lbajardsilogic # Date 1201688441 0 # Node ID 00cf9a7faa4d0fe4633c05a76fca12d9868e2018 # Parent c5970f7af886e3632f92ec8f8c6b934db904aadf add menu and shortcut to show/hide both ExpandWidget (layers and filters, search/info tab) diff -r c5970f7af886 -r 00cf9a7faa4d sv/main/MainWindow.cpp --- a/sv/main/MainWindow.cpp Wed Jan 30 09:06:08 2008 +0000 +++ b/sv/main/MainWindow.cpp Wed Jan 30 10:20:41 2008 +0000 @@ -965,13 +965,23 @@ action->setChecked(m_viewManager->getZoomWheelsEnabled()); menu->addAction(action); - /*action = new QAction(tr("Show Property Bo&xes"), this); - action->setShortcut(tr("X")); - action->setStatusTip(tr("Show the layer property boxes at the side of the main window")); - connect(action, SIGNAL(triggered()), this, SLOT(togglePropertyBoxes())); - action->setCheckable(true); - action->setChecked(true); - menu->addAction(action);*/ + action = new QAction(tr("Show Layers and &Filters"), this); + action->setShortcut(tr("F")); + action->setStatusTip(tr("Show the layers and the real-time filters activated at the side of the main window")); + connect(action, SIGNAL(triggered()), m_rightExpandWidget, SLOT(changePaneState())); + connect(m_rightExpandWidget, SIGNAL(paneStateChanged(bool)), action, SLOT(setChecked(bool))); + action->setCheckable(true); + action->setChecked(m_rightExpandWidget->isVisible()); + menu->addAction(action); + + action = new QAction(tr("Show Search/Tracks &Info Panes"), this); + action->setShortcut(tr("I")); + action->setStatusTip(tr("Show the search funtionalities and tracks information at the bottom of the main window")); + connect(action, SIGNAL(triggered()), m_leftExpandWidget, SLOT(changePaneState())); + connect(m_leftExpandWidget, SIGNAL(paneStateChanged(bool)), action, SLOT(setChecked(bool))); + action->setCheckable(true); + action->setChecked(m_leftExpandWidget->isVisible()); + menu->addAction(action); action = new QAction(tr("Show Status &Bar"), this); action->setStatusTip(tr("Show context help information in the status bar at the bottom of the window")); diff -r c5970f7af886 -r 00cf9a7faa4d widgets/ExpandWidget.cpp --- a/widgets/ExpandWidget.cpp Wed Jan 30 09:06:08 2008 +0000 +++ b/widgets/ExpandWidget.cpp Wed Jan 30 10:20:41 2008 +0000 @@ -28,7 +28,7 @@ setWidgetLocation(ExpandWidget::Location_Left); - connect(m_button,SIGNAL(clicked()),this,SLOT(changePaneSate())); + connect(m_button,SIGNAL(clicked()),this,SLOT(changePaneState())); } void ExpandWidget::refreshButtonIcone(){ @@ -179,12 +179,13 @@ } -void ExpandWidget::changePaneSate(){ +void ExpandWidget::changePaneState(){ if(&m_paneClosed!=0 ){ m_otherPane->setVisible(m_paneClosed); } m_paneClosed = !m_paneClosed; refreshButtonIcone(); + emit paneStateChanged(!m_paneClosed); } void ExpandWidget::setPercentage(int a, int b) diff -r c5970f7af886 -r 00cf9a7faa4d widgets/ExpandWidget.h --- a/widgets/ExpandWidget.h Wed Jan 30 09:06:08 2008 +0000 +++ b/widgets/ExpandWidget.h Wed Jan 30 10:20:41 2008 +0000 @@ -44,10 +44,13 @@ void setPercentage(int a, int b); - //signals: - + inline bool isVisible(){return !m_paneClosed;} + + signals: + void paneStateChanged(bool );//emit true if the pane is visible false if not + private slots: - void changePaneSate(); + void changePaneState(); private: void refreshButtonIcone();