comparison widgets/PropertyBox.cpp @ 584:1fe7951a61e8 debug-output

Remove most toStdString calls (no longer needed, with debug header)
author Chris Cannam
date Thu, 12 May 2011 17:31:43 +0100
parents 4afdcecbd62e
children f4960f8ce798
comparison
equal deleted inserted replaced
583:4c484636d5ec 584:1fe7951a61e8
58 m_showButton(0), 58 m_showButton(0),
59 m_playButton(0) 59 m_playButton(0)
60 { 60 {
61 #ifdef DEBUG_PROPERTY_BOX 61 #ifdef DEBUG_PROPERTY_BOX
62 std::cerr << "PropertyBox[" << this << "(\"" << 62 std::cerr << "PropertyBox[" << this << "(\"" <<
63 container->getPropertyContainerName().toStdString() << "\" at " << container << ")]::PropertyBox" << std::endl; 63 container->getPropertyContainerName() << "\" at " << container << ")]::PropertyBox" << std::endl;
64 #endif 64 #endif
65 65
66 m_mainBox = new QVBoxLayout; 66 m_mainBox = new QVBoxLayout;
67 setLayout(m_mainBox); 67 setLayout(m_mainBox);
68 68
146 m_viewPlayFrame->setLayout(layout); 146 m_viewPlayFrame->setLayout(layout);
147 147
148 layout->setMargin(layout->margin() / 2); 148 layout->setMargin(layout->margin() / 2);
149 149
150 #ifdef DEBUG_PROPERTY_BOX 150 #ifdef DEBUG_PROPERTY_BOX
151 std::cerr << "PropertyBox::populateViewPlayFrame: container " << m_container << " (name " << m_container->getPropertyContainerName().toStdString() << ") params " << params << std::endl; 151 std::cerr << "PropertyBox::populateViewPlayFrame: container " << m_container << " (name " << m_container->getPropertyContainerName() << ") params " << params << std::endl;
152 #endif 152 #endif
153 153
154 if (layer) { 154 if (layer) {
155 QLabel *showLabel = new QLabel(tr("Show")); 155 QLabel *showLabel = new QLabel(tr("Show"));
156 layout->addWidget(showLabel); 156 layout->addWidget(showLabel);
275 275
276 #ifdef DEBUG_PROPERTY_BOX 276 #ifdef DEBUG_PROPERTY_BOX
277 std::cerr << "PropertyBox[" << this 277 std::cerr << "PropertyBox[" << this
278 << "(\"" << m_container->getPropertyContainerName().toStdString() 278 << "(\"" << m_container->getPropertyContainerName().toStdString()
279 << "\")]"; 279 << "\")]";
280 std::cerr << "::updatePropertyEditor(\"" << name.toStdString() << "\"):"; 280 std::cerr << "::updatePropertyEditor(\"" << name << "\"):";
281 std::cerr << " value " << value << ", have " << have << ", group \"" 281 std::cerr << " value " << value << ", have " << have << ", group \""
282 << groupName.toStdString() << "\"" << std::endl; 282 << groupName << "\"" << std::endl;
283 #endif 283 #endif
284 284
285 bool inGroup = (groupName != QString()); 285 bool inGroup = (groupName != QString());
286 286
287 if (!have) { 287 if (!have) {
288 if (inGroup) { 288 if (inGroup) {
289 if (m_groupLayouts.find(groupName) == m_groupLayouts.end()) { 289 if (m_groupLayouts.find(groupName) == m_groupLayouts.end()) {
290 #ifdef DEBUG_PROPERTY_BOX 290 #ifdef DEBUG_PROPERTY_BOX
291 std::cerr << "PropertyBox: adding label \"" << groupName.toStdString() << "\" and frame for group for \"" << name.toStdString() << "\"" << std::endl; 291 std::cerr << "PropertyBox: adding label \"" << groupName << "\" and frame for group for \"" << name << "\"" << std::endl;
292 #endif 292 #endif
293 m_layout->addWidget(new QLabel(groupName, m_mainWidget), row, 0); 293 m_layout->addWidget(new QLabel(groupName, m_mainWidget), row, 0);
294 QFrame *frame = new QFrame(m_mainWidget); 294 QFrame *frame = new QFrame(m_mainWidget);
295 m_layout->addWidget(frame, row, 1, 1, 2); 295 m_layout->addWidget(frame, row, 1, 1, 2);
296 m_groupLayouts[groupName] = new QGridLayout; 296 m_groupLayouts[groupName] = new QGridLayout;
297 m_groupLayouts[groupName]->setMargin(0); 297 m_groupLayouts[groupName]->setMargin(0);
298 frame->setLayout(m_groupLayouts[groupName]); 298 frame->setLayout(m_groupLayouts[groupName]);
299 } 299 }
300 } else { 300 } else {
301 #ifdef DEBUG_PROPERTY_BOX 301 #ifdef DEBUG_PROPERTY_BOX
302 std::cerr << "PropertyBox: adding label \"" << propertyLabel.toStdString() << "\"" << std::endl; 302 std::cerr << "PropertyBox: adding label \"" << propertyLabel << "\"" << std::endl;
303 #endif 303 #endif
304 m_layout->addWidget(new QLabel(propertyLabel, m_mainWidget), row, 0); 304 m_layout->addWidget(new QLabel(propertyLabel, m_mainWidget), row, 0);
305 } 305 }
306 } 306 }
307 307
564 std::cerr << "PropertyBox[" << this << "]: unitDatabaseChanged" << std::endl; 564 std::cerr << "PropertyBox[" << this << "]: unitDatabaseChanged" << std::endl;
565 blockSignals(true); 565 blockSignals(true);
566 566
567 // std::cerr << "my container is " << m_container << std::endl; 567 // std::cerr << "my container is " << m_container << std::endl;
568 // std::cerr << "my container's name is... " << std::endl; 568 // std::cerr << "my container's name is... " << std::endl;
569 // std::cerr << m_container->objectName().toStdString() << std::endl; 569 // std::cerr << m_container->objectName() << std::endl;
570 570
571 PropertyContainer::PropertyList properties = m_container->getProperties(); 571 PropertyContainer::PropertyList properties = m_container->getProperties();
572 for (size_t i = 0; i < properties.size(); ++i) { 572 for (size_t i = 0; i < properties.size(); ++i) {
573 if (m_container->getPropertyType(properties[i]) == 573 if (m_container->getPropertyType(properties[i]) ==
574 PropertyContainer::UnitsProperty) { 574 PropertyContainer::UnitsProperty) {