comparison main/MainWindow.cpp @ 444:4d9e4053c120 toggle

The pane stack is in a scroll view! I'd forgotten that. So, let's show and hide that instead
author Chris Cannam
date Fri, 24 Jun 2011 11:21:00 +0100
parents 6d5ee6860682
children 45f2e4cda1d7
comparison
equal deleted inserted replaced
443:b8025c99fe68 444:4d9e4053c120
208 208
209 QGridLayout *layout = new QGridLayout; 209 QGridLayout *layout = new QGridLayout;
210 210
211 m_descriptionLabel = new QLabel; //!!! hang on, this is declared in base class -- should be declared and initialised by same class 211 m_descriptionLabel = new QLabel; //!!! hang on, this is declared in base class -- should be declared and initialised by same class
212 212
213 QScrollArea *scroll = new QScrollArea(frame); 213 m_scroll = new QScrollArea(frame);
214 scroll->setWidgetResizable(true); 214 m_scroll->setWidgetResizable(true);
215 scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 215 m_scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
216 scroll->setFrameShape(QFrame::NoFrame); 216 m_scroll->setFrameShape(QFrame::NoFrame);
217 217 m_scroll->setWidget(m_paneStack);
218 scroll->setWidget(m_paneStack);
219 218
220 m_overview = new Overview(frame); 219 m_overview = new Overview(frame);
221 m_overview->setViewManager(m_viewManager); 220 m_overview->setViewManager(m_viewManager);
222 m_overview->setFixedHeight(40); 221 m_overview->setFixedHeight(40);
223 #ifndef _WIN32 222 #ifndef _WIN32
270 settings.endGroup(); 269 settings.endGroup();
271 270
272 m_playControlsSpacer = new QFrame; 271 m_playControlsSpacer = new QFrame;
273 272
274 layout->setSpacing(4); 273 layout->setSpacing(4);
275 layout->addWidget(scroll, 0, 0, 1, 5); 274 layout->addWidget(m_scroll, 0, 0, 1, 5);
276 layout->addWidget(m_overview, 1, 1); 275 layout->addWidget(m_overview, 1, 1);
277 layout->addWidget(m_playControlsSpacer, 1, 2); 276 layout->addWidget(m_playControlsSpacer, 1, 2);
278 layout->addWidget(m_playSpeed, 1, 3); 277 layout->addWidget(m_playSpeed, 1, 3);
279 layout->addWidget(m_fader, 1, 4); 278 layout->addWidget(m_fader, 1, 4);
280 279
4176 bool visible; 4175 bool visible;
4177 4176
4178 if (m_viewManager->getMinimalModeEnabled()) { 4177 if (m_viewManager->getMinimalModeEnabled()) {
4179 visible = true; 4178 visible = true;
4180 m_viewManager->setMinimalModeEnabled(false); 4179 m_viewManager->setMinimalModeEnabled(false);
4181 m_paneStack->show(); 4180 m_scroll->show();
4182 } else { 4181 } else {
4183 visible = false; 4182 visible = false;
4184 m_viewManager->setMinimalModeEnabled(true); 4183 m_viewManager->setMinimalModeEnabled(true);
4185 m_paneStack->hide(); 4184 m_scroll->hide();
4186 } 4185 }
4187 4186
4188 //cerr << "Call to MainWindow::toggleViewMode"<< endl; 4187 //cerr << "Call to MainWindow::toggleViewMode"<< endl;
4189 4188
4190 m_playModeToolBar->setVisible(visible); 4189 m_playModeToolBar->setVisible(visible);