Mercurial > hg > svgui
comparison widgets/PropertyStack.cpp @ 47:2e2ad8510e52
* Fix a crash in PortAudio output for mono data
* Don't construct a chromagram in TonalChangeDetect plugin ctor
* Update layer show/hide/dormancy for multi-view-capable layers -- the
dormancy concept doesn't really work with these constraints any more
author | Chris Cannam |
---|---|
date | Fri, 03 Mar 2006 17:52:21 +0000 |
parents | c28ebb4ba4de |
children | f2fe98a7c57e |
comparison
equal
deleted
inserted
replaced
46:2152e19d7db9 | 47:2e2ad8510e52 |
---|---|
9 | 9 |
10 #include "PropertyStack.h" | 10 #include "PropertyStack.h" |
11 #include "PropertyBox.h" | 11 #include "PropertyBox.h" |
12 #include "base/PropertyContainer.h" | 12 #include "base/PropertyContainer.h" |
13 #include "base/View.h" | 13 #include "base/View.h" |
14 #include "base/Layer.h" | |
14 | 15 |
15 #include <QIcon> | 16 #include <QIcon> |
16 #include <QTabWidget> | 17 #include <QTabWidget> |
17 | 18 |
18 #include <iostream> | 19 #include <iostream> |
67 QString name = container->getPropertyContainerName(); | 68 QString name = container->getPropertyContainerName(); |
68 | 69 |
69 QString iconName = container->getPropertyContainerIconName(); | 70 QString iconName = container->getPropertyContainerIconName(); |
70 | 71 |
71 PropertyBox *box = new PropertyBox(container); | 72 PropertyBox *box = new PropertyBox(container); |
73 | |
74 connect(box, SIGNAL(showLayer(bool)), this, SLOT(showLayer(bool))); | |
72 | 75 |
73 QIcon icon(QString(":/icons/%1.png").arg(iconName)); | 76 QIcon icon(QString(":/icons/%1.png").arg(iconName)); |
74 if (icon.isNull()) { | 77 if (icon.isNull()) { |
75 addTab(box, name); | 78 addTab(box, name); |
76 } else { | 79 } else { |
136 if (sender() != m_client) return; | 139 if (sender() != m_client) return; |
137 repopulate(); | 140 repopulate(); |
138 } | 141 } |
139 | 142 |
140 void | 143 void |
144 PropertyStack::showLayer(bool show) | |
145 { | |
146 QObject *obj = sender(); | |
147 | |
148 for (unsigned int i = 0; i < m_boxes.size(); ++i) { | |
149 if (obj == m_boxes[i]) { | |
150 Layer *layer = dynamic_cast<Layer *>(m_boxes[i]->getContainer()); | |
151 if (layer) { | |
152 layer->showLayer(m_client, show); | |
153 return; | |
154 } | |
155 } | |
156 } | |
157 } | |
158 | |
159 void | |
141 PropertyStack::selectedContainerChanged(int n) | 160 PropertyStack::selectedContainerChanged(int n) |
142 { | 161 { |
143 if (n >= int(m_boxes.size())) return; | 162 if (n >= int(m_boxes.size())) return; |
144 emit propertyContainerSelected(m_boxes[n]->getContainer()); | 163 emit propertyContainerSelected(m_boxes[n]->getContainer()); |
145 } | 164 } |