Mercurial > hg > easaier-soundaccess
diff view/PaneStack.cpp @ 204:c5970f7af886
remove in the preferences the possibility to have one property box per panes
author | lbajardsilogic |
---|---|
date | Wed, 30 Jan 2008 09:06:08 +0000 |
parents | 33105d5afff8 |
children |
line wrap: on
line diff
--- a/view/PaneStack.cpp Tue Jan 29 17:21:42 2008 +0000 +++ b/view/PaneStack.cpp Wed Jan 30 09:06:08 2008 +0000 @@ -39,8 +39,7 @@ m_currentPane(0), m_splitter(new QSplitter), m_propertyStackStack(new QStackedWidget), - m_viewManager(viewManager), - m_layoutStyle(PropertyStackPerPaneLayout) + m_viewManager(viewManager) { QHBoxLayout *layout = new QHBoxLayout; layout->setMargin(0); @@ -119,40 +118,6 @@ m_propertyStackMinWidth = mw; } -void -PaneStack::setLayoutStyle(LayoutStyle style) -{ - if (style == m_layoutStyle) return; - m_layoutStyle = style; - - std::vector<PaneRec>::iterator i; - - switch (style) { - - case NoPropertyStacks: - case SinglePropertyStackLayout: - - for (i = m_panes.begin(); i != m_panes.end(); ++i) { - i->layout->removeWidget(i->propertyStack); - i->propertyStack->setParent(m_propertyStackStack); - m_propertyStackStack->addWidget(i->propertyStack); - } - m_propertyStackStack->setVisible(style != NoPropertyStacks); - break; - - case PropertyStackPerPaneLayout: - - for (i = m_panes.begin(); i != m_panes.end(); ++i) { - m_propertyStackStack->removeWidget(i->propertyStack); - i->propertyStack->setParent(i->frame); - i->layout->addWidget(i->propertyStack); - i->propertyStack->show(); - } - m_propertyStackStack->hide(); - break; - } -} - Pane * PaneStack::getPane(int n) { @@ -293,10 +258,8 @@ while (i != m_panes.end()) { if (i->pane == pane) { i->currentIndicator->setPixmap(selectedMap); - if (m_layoutStyle != PropertyStackPerPaneLayout) { - m_propertyStackStack->setCurrentWidget(i->propertyStack); - } - found = true; + m_propertyStackStack->setCurrentWidget(i->propertyStack); + found = true; QFrame* frame = (QFrame*) (i->pane->parentWidget()); if(frame!=0){