Mercurial > hg > easaier-soundaccess
comparison view/PaneStack.cpp @ 102:033a39bff919
border for the current pane
author | benoitrigolleau |
---|---|
date | Thu, 12 Jul 2007 07:32:36 +0000 |
parents | bc5b79e7b1d8 |
children | 33105d5afff8 |
comparison
equal
deleted
inserted
replaced
101:bc5b79e7b1d8 | 102:033a39bff919 |
---|---|
26 #include <QPainter> | 26 #include <QPainter> |
27 #include <QPalette> | 27 #include <QPalette> |
28 #include <QLabel> | 28 #include <QLabel> |
29 #include <QSplitter> | 29 #include <QSplitter> |
30 #include <QStackedWidget> | 30 #include <QStackedWidget> |
31 #include <QStyle> | |
31 | 32 |
32 #include <iostream> | 33 #include <iostream> |
33 | 34 |
34 //#define DEBUG_PANE_STACK 1 | 35 //#define DEBUG_PANE_STACK 1 |
35 | 36 |
81 rec.currentIndicator = currentIndicator; | 82 rec.currentIndicator = currentIndicator; |
82 rec.frame = frame; | 83 rec.frame = frame; |
83 rec.layout = layout; | 84 rec.layout = layout; |
84 m_panes.push_back(rec); | 85 m_panes.push_back(rec); |
85 | 86 |
86 frame->setLayout(layout); | 87 //for the panel's border |
88 frame->setFrameStyle(QFrame::Box | QFrame::Raised); | |
89 frame->setLineWidth(0); | |
90 | |
91 | |
92 frame->setLayout(layout); | |
87 m_splitter->addWidget(frame); | 93 m_splitter->addWidget(frame); |
88 | 94 |
89 resizePane(); | 95 resizePane(); |
90 | 96 |
91 connect(pane, SIGNAL(propertyContainerAdded(PropertyContainer *)), | 97 connect(pane, SIGNAL(propertyContainerAdded(PropertyContainer *)), |
290 i->currentIndicator->setPixmap(selectedMap); | 296 i->currentIndicator->setPixmap(selectedMap); |
291 if (m_layoutStyle != PropertyStackPerPaneLayout) { | 297 if (m_layoutStyle != PropertyStackPerPaneLayout) { |
292 m_propertyStackStack->setCurrentWidget(i->propertyStack); | 298 m_propertyStackStack->setCurrentWidget(i->propertyStack); |
293 } | 299 } |
294 found = true; | 300 found = true; |
301 | |
302 QFrame* frame = (QFrame*) (i->pane->parentWidget()); | |
303 if(frame!=0){ | |
304 frame->setLineWidth(2); | |
305 } | |
306 | |
295 } else { | 307 } else { |
296 i->currentIndicator->setPixmap(unselectedMap); | 308 i->currentIndicator->setPixmap(unselectedMap); |
309 QFrame* frame = (QFrame*) (i->pane->parentWidget()); | |
310 if(frame!=0){ | |
311 frame->setLineWidth(0); | |
312 } | |
297 } | 313 } |
298 ++i; | 314 ++i; |
299 } | 315 } |
300 | 316 |
301 if (found || pane == 0) { | 317 if (found || pane == 0) { |
302 m_currentPane = pane; | 318 m_currentPane = pane; |
303 emit currentPaneChanged(m_currentPane); | 319 emit currentPaneChanged(m_currentPane); |
304 } else { | 320 } else { |
305 std::cerr << "WARNING: PaneStack::setCurrentPane(" << pane << "): pane is not a visible pane in this stack" << std::endl; | 321 std::cerr << "WARNING: PaneStack::setCurrentPane(" << pane << "): pane is not a visible pane in this stack" << std::endl; |
306 } | 322 } |
307 } | 323 } |
308 | 324 |