Commit 44a18d11 authored by Declara Denis's avatar Declara Denis Committed by Christian Schulte zu Berge

Remove redundant label for Button Properties

Label is now hidden by default for Button Properties which saves space
for long button descriptions
parent b3ac64ee
......@@ -67,6 +67,11 @@ namespace campvis {
_property->s_changed.disconnect(this);
}
void AbstractPropertyWidget::setLabelVisibile(bool isVisible) {
if (_titleLabel)
_titleLabel->setVisible(isVisible);
}
void AbstractPropertyWidget::addWidget(QWidget* widget, int stretch) {
_layout->addWidget(widget, stretch);
}
......
......@@ -59,6 +59,13 @@ namespace campvis {
*/
virtual ~AbstractPropertyWidget();
/**
* Shows or hides the label that appears on the left hand side of the widget.
*
* \param isVisible Wether the label should be shown or not
*/
void setLabelVisibile(bool isVisible);
protected:
/**
* Adds a widget to the local Qt layout.
......
......@@ -31,6 +31,8 @@ namespace campvis {
: AbstractPropertyWidget(property, false, dataContainer, parent)
, _button(0)
{
setLabelVisibile(false);
_button = new QPushButton(QString::fromStdString(property->getTitle()), this);
connect(_button, SIGNAL(clicked(bool)), this, SLOT(onButtonClicked(bool)));
addWidget(_button);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment