Mercurial > hg > sonic-visualiser
comparison main/MainWindow.cpp @ 1431:f013210eeceb levelpanwidget
Moving around some UI bits
author | Chris Cannam |
---|---|
date | Thu, 15 Dec 2016 10:36:41 +0000 |
parents | 3e2dee09c10c |
children | 2451e7bb90af |
comparison
equal
deleted
inserted
replaced
1429:3e2dee09c10c | 1431:f013210eeceb |
---|---|
40 #include "layer/Colour3DPlotLayer.h" | 40 #include "layer/Colour3DPlotLayer.h" |
41 #include "layer/SliceLayer.h" | 41 #include "layer/SliceLayer.h" |
42 #include "layer/SliceableLayer.h" | 42 #include "layer/SliceableLayer.h" |
43 #include "layer/ImageLayer.h" | 43 #include "layer/ImageLayer.h" |
44 #include "layer/RegionLayer.h" | 44 #include "layer/RegionLayer.h" |
45 #include "widgets/Fader.h" | |
46 #include "view/Overview.h" | 45 #include "view/Overview.h" |
47 #include "widgets/PropertyBox.h" | 46 #include "widgets/PropertyBox.h" |
48 #include "widgets/PropertyStack.h" | 47 #include "widgets/PropertyStack.h" |
49 #include "widgets/AudioDial.h" | 48 #include "widgets/AudioDial.h" |
50 #include "widgets/LevelPanWidget.h" | 49 #include "widgets/LevelPanWidget.h" |
50 #include "widgets/LevelPanToolButton.h" | |
51 #include "widgets/IconLoader.h" | 51 #include "widgets/IconLoader.h" |
52 #include "widgets/LayerTreeDialog.h" | 52 #include "widgets/LayerTreeDialog.h" |
53 #include "widgets/ListInputDialog.h" | 53 #include "widgets/ListInputDialog.h" |
54 #include "widgets/SubdividingMenu.h" | 54 #include "widgets/SubdividingMenu.h" |
55 #include "widgets/NotifyingPushButton.h" | 55 #include "widgets/NotifyingPushButton.h" |
209 | 209 |
210 m_mainScroll->setWidget(m_paneStack); | 210 m_mainScroll->setWidget(m_paneStack); |
211 | 211 |
212 m_overview = new Overview(frame); | 212 m_overview = new Overview(frame); |
213 m_overview->setViewManager(m_viewManager); | 213 m_overview->setViewManager(m_viewManager); |
214 m_overview->setFixedHeight(m_viewManager->scalePixelSize(40)); | 214 int overviewHeight = m_viewManager->scalePixelSize(35); |
215 if (overviewHeight < 40) overviewHeight = 40; | |
216 m_overview->setFixedHeight(overviewHeight); | |
215 #ifndef _WIN32 | 217 #ifndef _WIN32 |
216 // For some reason, the contents of the overview never appear if we | 218 // For some reason, the contents of the overview never appear if we |
217 // make this setting on Windows. I have no inclination at the moment | 219 // make this setting on Windows. I have no inclination at the moment |
218 // to track down the reason why. | 220 // to track down the reason why. |
219 m_overview->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); | 221 m_overview->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); |
236 | 238 |
237 m_playSpeed = new AudioDial(frame); | 239 m_playSpeed = new AudioDial(frame); |
238 m_playSpeed->setMinimum(0); | 240 m_playSpeed->setMinimum(0); |
239 m_playSpeed->setMaximum(120); | 241 m_playSpeed->setMaximum(120); |
240 m_playSpeed->setValue(60); | 242 m_playSpeed->setValue(60); |
241 m_playSpeed->setFixedWidth(m_viewManager->scalePixelSize(32)); | 243 m_playSpeed->setFixedWidth(overviewHeight); |
242 m_playSpeed->setFixedHeight(m_viewManager->scalePixelSize(32)); | 244 m_playSpeed->setFixedHeight(overviewHeight); |
243 m_playSpeed->setNotchesVisible(true); | 245 m_playSpeed->setNotchesVisible(true); |
244 m_playSpeed->setPageStep(10); | 246 m_playSpeed->setPageStep(10); |
245 m_playSpeed->setObjectName(tr("Playback Speed")); | 247 m_playSpeed->setObjectName(tr("Playback Speed")); |
246 m_playSpeed->setRangeMapper(new PlaySpeedRangeMapper); | 248 m_playSpeed->setRangeMapper(new PlaySpeedRangeMapper); |
247 m_playSpeed->setDefaultValue(60); | 249 m_playSpeed->setDefaultValue(60); |
249 connect(m_playSpeed, SIGNAL(valueChanged(int)), | 251 connect(m_playSpeed, SIGNAL(valueChanged(int)), |
250 this, SLOT(playSpeedChanged(int))); | 252 this, SLOT(playSpeedChanged(int))); |
251 connect(m_playSpeed, SIGNAL(mouseEntered()), this, SLOT(mouseEnteredWidget())); | 253 connect(m_playSpeed, SIGNAL(mouseEntered()), this, SLOT(mouseEnteredWidget())); |
252 connect(m_playSpeed, SIGNAL(mouseLeft()), this, SLOT(mouseLeftWidget())); | 254 connect(m_playSpeed, SIGNAL(mouseLeft()), this, SLOT(mouseLeftWidget())); |
253 | 255 |
254 m_mainLevelPan = new LevelPanWidget(frame); | 256 m_mainLevelPan = new LevelPanToolButton(frame); |
255 connect(m_mainLevelPan, SIGNAL(mouseEntered()), this, SLOT(mouseEnteredWidget())); | 257 connect(m_mainLevelPan, SIGNAL(mouseEntered()), this, SLOT(mouseEnteredWidget())); |
256 connect(m_mainLevelPan, SIGNAL(mouseLeft()), this, SLOT(mouseLeftWidget())); | 258 connect(m_mainLevelPan, SIGNAL(mouseLeft()), this, SLOT(mouseLeftWidget())); |
257 | 259 m_mainLevelPan->setFixedHeight(overviewHeight); |
258 /*!!! | 260 m_mainLevelPan->setFixedWidth(overviewHeight); |
259 m_fader = new Fader(frame, false); | 261 m_mainLevelPan->setImageSize((overviewHeight * 3) / 4); |
260 connect(m_fader, SIGNAL(mouseEntered()), this, SLOT(mouseEnteredWidget())); | 262 m_mainLevelPan->setBigImageSize(overviewHeight * 3); |
261 connect(m_fader, SIGNAL(mouseLeft()), this, SLOT(mouseLeftWidget())); | |
262 */ | |
263 | 263 |
264 m_playControlsSpacer = new QFrame; | 264 m_playControlsSpacer = new QFrame; |
265 | 265 |
266 layout->setSpacing(m_viewManager->scalePixelSize(4)); | 266 layout->setSpacing(m_viewManager->scalePixelSize(4)); |
267 layout->addWidget(m_mainScroll, 0, 0, 1, 4); | 267 layout->addWidget(m_mainScroll, 0, 0, 1, 4); |
268 layout->addWidget(m_overview, 1, 0); | 268 layout->addWidget(m_overview, 1, 0); |
269 layout->addWidget(m_playControlsSpacer, 1, 1); | 269 layout->addWidget(m_playSpeed, 1, 1); |
270 layout->addWidget(m_playSpeed, 1, 2); | 270 layout->addWidget(m_playControlsSpacer, 1, 2); |
271 // layout->addWidget(m_fader, 1, 3); | |
272 layout->addWidget(m_mainLevelPan, 1, 3); | 271 layout->addWidget(m_mainLevelPan, 1, 3); |
273 | 272 |
274 m_playControlsWidth = | 273 m_playControlsWidth = |
275 m_mainLevelPan->width() + m_playSpeed->width() + layout->spacing() * 2; | 274 m_mainLevelPan->width() + m_playSpeed->width() + layout->spacing() * 2; |
276 | 275 |