Mercurial > hg > svgui
comparison widgets/PropertyStack.cpp @ 1525:284a38c43721
Debug bits
author | Chris Cannam |
---|---|
date | Fri, 04 Oct 2019 13:37:39 +0100 |
parents | a34a2a25907c |
children | 01a41a37bd26 |
comparison
equal
deleted
inserted
replaced
1524:4fab699536f9 | 1525:284a38c43721 |
---|---|
83 PropertyStack::repopulate() | 83 PropertyStack::repopulate() |
84 { | 84 { |
85 blockSignals(true); | 85 blockSignals(true); |
86 | 86 |
87 #ifdef DEBUG_PROPERTY_STACK | 87 #ifdef DEBUG_PROPERTY_STACK |
88 cerr << "PropertyStack[" << this << "]::repopulate" << endl; | 88 SVDEBUG << "PropertyStack[" << this << "]::repopulate" << endl; |
89 #endif | 89 #endif |
90 | 90 |
91 #ifdef DEBUG_PROPERTY_STACK | |
92 SVDEBUG << "PropertyStack[" << this << "]::repopulate: removing tabs" << endl; | |
93 #endif | |
91 while (count() > 0) { | 94 while (count() > 0) { |
92 removeTab(0); | 95 removeTab(0); |
93 } | 96 } |
97 | |
98 #ifdef DEBUG_PROPERTY_STACK | |
99 SVDEBUG << "PropertyStack[" << this << "]::repopulate: deleting boxes" << endl; | |
100 #endif | |
94 for (size_t i = 0; i < m_boxes.size(); ++i) { | 101 for (size_t i = 0; i < m_boxes.size(); ++i) { |
102 #ifdef DEBUG_PROPERTY_STACK | |
103 SVDEBUG << "(" << i << " of " << m_boxes.size() << ": " << m_boxes[i]->getContainer()->getPropertyContainerName() << ")" << endl; | |
104 #endif | |
95 delete m_boxes[i]; | 105 delete m_boxes[i]; |
96 } | 106 } |
107 | |
108 #ifdef DEBUG_PROPERTY_STACK | |
109 SVDEBUG << "PropertyStack[" << this << "]::repopulate: done, clearing m_boxes" << endl; | |
110 #endif | |
97 m_boxes.clear(); | 111 m_boxes.clear(); |
98 | 112 |
99 for (int i = 0; i < m_client->getPropertyContainerCount(); ++i) { | 113 for (int i = 0; i < m_client->getPropertyContainerCount(); ++i) { |
100 | 114 |
101 PropertyContainer *container = m_client->getPropertyContainer(i); | 115 PropertyContainer *container = m_client->getPropertyContainer(i); |
102 QString name = container->getPropertyContainerName(); | 116 QString name = container->getPropertyContainerName(); |
103 | 117 |
104 #ifdef DEBUG_PROPERTY_STACK | 118 #ifdef DEBUG_PROPERTY_STACK |
105 cerr << "PropertyStack[" << this << "]::repopulate: client " << m_client | 119 SVDEBUG << "PropertyStack[" << this << "]::repopulate: client " << m_client |
106 << " returns container " << container << " (name " << name | 120 << " returns container " << container << " (name " << name |
107 << ") at position " << i << endl; | 121 << ") at position " << i << endl; |
108 #endif | 122 #endif |
109 | 123 |
110 PropertyBox *box = new PropertyBox(container); | 124 PropertyBox *box = new PropertyBox(container); |
111 | 125 |
112 connect(box, SIGNAL(showLayer(bool)), this, SLOT(showLayer(bool))); | 126 connect(box, SIGNAL(showLayer(bool)), this, SLOT(showLayer(bool))); |
181 | 195 |
182 return false; | 196 return false; |
183 } | 197 } |
184 | 198 |
185 void | 199 void |
186 PropertyStack::propertyContainerAdded(PropertyContainer *) | 200 PropertyStack::propertyContainerAdded(PropertyContainer * |
201 #ifdef DEBUG_PROPERTY_STACK | |
202 c | |
203 #endif | |
204 ) | |
187 { | 205 { |
188 if (sender() != m_client) return; | 206 if (sender() != m_client) return; |
207 #ifdef DEBUG_PROPERTY_STACK | |
208 SVDEBUG << "PropertyStack::propertyContainerAdded(" << (c ? c->getPropertyContainerName() : "(none)") << ")" << endl; | |
209 #endif | |
189 repopulate(); | 210 repopulate(); |
190 } | 211 } |
191 | 212 |
192 void | 213 void |
193 PropertyStack::propertyContainerRemoved(PropertyContainer *) | 214 PropertyStack::propertyContainerRemoved(PropertyContainer * |
215 #ifdef DEBUG_PROPERTY_STACK | |
216 c | |
217 #endif | |
218 ) | |
194 { | 219 { |
195 if (sender() != m_client) return; | 220 if (sender() != m_client) return; |
221 #ifdef DEBUG_PROPERTY_STACK | |
222 SVDEBUG << "PropertyStack::propertyContainerAdded(" << (c ? c->getPropertyContainerName() : "(none)") << ")" << endl; | |
223 #endif | |
196 repopulate(); | 224 repopulate(); |
197 } | 225 } |
198 | 226 |
199 void | 227 void |
200 PropertyStack::propertyContainerPropertyChanged(PropertyContainer *pc) | 228 PropertyStack::propertyContainerPropertyChanged(PropertyContainer *pc) |