comparison main/MainWindow.cpp @ 445:45f2e4cda1d7 toggle

Rename "visible" to "show" to avoid confusion between current state and required activity
author Chris Cannam
date Fri, 24 Jun 2011 11:21:56 +0100
parents 4d9e4053c120
children 8df5d64bf7c5
comparison
equal deleted inserted replaced
444:4d9e4053c120 445:45f2e4cda1d7
4170 } 4170 }
4171 4171
4172 void 4172 void
4173 MainWindow::toggleViewMode() 4173 MainWindow::toggleViewMode()
4174 { 4174 {
4175 bool visible; 4175 bool show;
4176 4176
4177 if (m_viewManager->getMinimalModeEnabled()) { 4177 if (m_viewManager->getMinimalModeEnabled()) {
4178 visible = true; 4178 show = true;
4179 m_viewManager->setMinimalModeEnabled(false); 4179 m_viewManager->setMinimalModeEnabled(false);
4180 m_scroll->show(); 4180 m_scroll->show();
4181 } else { 4181 } else {
4182 visible = false; 4182 show = false;
4183 m_viewManager->setMinimalModeEnabled(true); 4183 m_viewManager->setMinimalModeEnabled(true);
4184 m_scroll->hide(); 4184 m_scroll->hide();
4185 } 4185 }
4186 4186
4187 //cerr << "Call to MainWindow::toggleViewMode"<< endl; 4187 //cerr << "Call to MainWindow::toggleViewMode"<< endl;
4188 4188
4189 m_playModeToolBar->setVisible(visible); 4189 m_playModeToolBar->setVisible(show);
4190 m_editToolBar->setVisible(visible); 4190 m_editToolBar->setVisible(show);
4191 m_toolsToolBar->setVisible(visible); 4191 m_toolsToolBar->setVisible(show);
4192 4192
4193 m_importAnnotationLayerAction->setVisible(visible); 4193 m_importAnnotationLayerAction->setVisible(show);
4194 m_exportAnnotationLayerAction->setVisible(visible); 4194 m_exportAnnotationLayerAction->setVisible(show);
4195 m_showNoOverlaysAction->setVisible(visible); 4195 m_showNoOverlaysAction->setVisible(show);
4196 m_showMinimalOverlaysAction->setVisible(visible); 4196 m_showMinimalOverlaysAction->setVisible(show);
4197 m_showStandardOverlaysAction->setVisible(visible); 4197 m_showStandardOverlaysAction->setVisible(show);
4198 m_showAllOverlaysAction->setVisible(visible); 4198 m_showAllOverlaysAction->setVisible(show);
4199 m_showAllTimeRulersAction->setVisible(visible); 4199 m_showAllTimeRulersAction->setVisible(show);
4200 m_showZoomWheelsAction->setVisible(visible); 4200 m_showZoomWheelsAction->setVisible(show);
4201 m_showPropertyBoxesAction->setVisible(visible); 4201 m_showPropertyBoxesAction->setVisible(show);
4202 m_showStatusBarAction->setVisible(visible); 4202 m_showStatusBarAction->setVisible(show);
4203 4203
4204 //layout()->activate(); 4204 //layout()->activate();
4205 //layout()->update(); 4205 //layout()->update();
4206 adjustSize(); //shrinks successfully the main window but does not remove the space allocated for the central widget containing panes 4206 adjustSize(); //shrinks successfully the main window but does not remove the space allocated for the central widget containing panes
4207 4207