Mercurial > hg > svgui
comparison widgets/PropertyBox.cpp @ 493:4afdcecbd62e
* experiment (does this improve layout on mac?)
author | Chris Cannam |
---|---|
date | Wed, 11 Feb 2009 14:44:14 +0000 |
parents | 035d62c4cddf |
children | 1fe7951a61e8 |
comparison
equal
deleted
inserted
replaced
492:f60b6204856e | 493:4afdcecbd62e |
---|---|
291 std::cerr << "PropertyBox: adding label \"" << groupName.toStdString() << "\" and frame for group for \"" << name.toStdString() << "\"" << std::endl; | 291 std::cerr << "PropertyBox: adding label \"" << groupName.toStdString() << "\" and frame for group for \"" << name.toStdString() << "\"" << 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 QHBoxLayout; | 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 |
335 this, SLOT(mouseEnteredWidget())); | 335 this, SLOT(mouseEnteredWidget())); |
336 connect(button, SIGNAL(mouseLeft()), | 336 connect(button, SIGNAL(mouseLeft()), |
337 this, SLOT(mouseLeftWidget())); | 337 this, SLOT(mouseLeftWidget())); |
338 if (inGroup) { | 338 if (inGroup) { |
339 button->setToolTip(propertyLabel); | 339 button->setToolTip(propertyLabel); |
340 m_groupLayouts[groupName]->addWidget(button); | 340 m_groupLayouts[groupName]->addWidget |
341 (button, 0, m_groupLayouts[groupName]->columnCount()); | |
341 } else { | 342 } else { |
342 m_layout->addWidget(button, row, 1, 1, 2); | 343 m_layout->addWidget(button, row, 1, 1, 2); |
343 } | 344 } |
344 m_propertyControllers[name] = button; | 345 m_propertyControllers[name] = button; |
345 } | 346 } |
388 this, SLOT(mouseLeftWidget())); | 389 this, SLOT(mouseLeftWidget())); |
389 | 390 |
390 if (inGroup) { | 391 if (inGroup) { |
391 dial->setFixedWidth(24); | 392 dial->setFixedWidth(24); |
392 dial->setFixedHeight(24); | 393 dial->setFixedHeight(24); |
393 m_groupLayouts[groupName]->addWidget(dial); | 394 m_groupLayouts[groupName]->addWidget |
395 (dial, 0, m_groupLayouts[groupName]->columnCount()); | |
394 } else { | 396 } else { |
395 dial->setFixedWidth(32); | 397 dial->setFixedWidth(32); |
396 dial->setFixedHeight(32); | 398 dial->setFixedHeight(32); |
397 m_layout->addWidget(dial, row, 1); | 399 m_layout->addWidget(dial, row, 1); |
398 QLabel *label = new QLabel(m_mainWidget); | 400 QLabel *label = new QLabel(m_mainWidget); |
480 connect(cb, SIGNAL(mouseLeft()), | 482 connect(cb, SIGNAL(mouseLeft()), |
481 this, SLOT(mouseLeftWidget())); | 483 this, SLOT(mouseLeftWidget())); |
482 | 484 |
483 if (inGroup) { | 485 if (inGroup) { |
484 cb->setToolTip(propertyLabel); | 486 cb->setToolTip(propertyLabel); |
485 m_groupLayouts[groupName]->addWidget(cb); | 487 m_groupLayouts[groupName]->addWidget |
488 (cb, 0, m_groupLayouts[groupName]->columnCount()); | |
486 } else { | 489 } else { |
487 m_layout->addWidget(cb, row, 1, 1, 2); | 490 m_layout->addWidget(cb, row, 1, 1, 2); |
488 } | 491 } |
489 m_propertyControllers[name] = cb; | 492 m_propertyControllers[name] = cb; |
490 } | 493 } |