diff options
Diffstat (limited to 'addon/doxywizard/inputbool.cpp')
-rw-r--r-- | addon/doxywizard/inputbool.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/addon/doxywizard/inputbool.cpp b/addon/doxywizard/inputbool.cpp index 43d994d..33ecf2f 100644 --- a/addon/doxywizard/inputbool.cpp +++ b/addon/doxywizard/inputbool.cpp @@ -15,23 +15,31 @@ #include "inputbool.h" #include "pagewidget.h" #include <qwindowsstyle.h> +#include <qlayout.h> InputBool::InputBool( const QString & text, PageWidget * parent, bool &flag ) - : QCheckBox( text, parent->getLayout() ), state(flag) + : /*QCheckBox( text, parent->getLayout() )*/ QWidget(parent->getLayout()), state(flag) { + QBoxLayout *layout = new QHBoxLayout(this); + cb = new QCheckBox(text,this); + layout->addWidget(cb); + layout->addStretch(10); + QWindowsStyle *winStyle = new QWindowsStyle(); - setChecked( flag ); - setStyle( winStyle ); - setMinimumSize( sizeHint() ); + cb->setChecked( flag ); + cb->setStyle( winStyle ); + cb->setMinimumSize( sizeHint() ); - connect( this, SIGNAL(toggled(bool)), SLOT(setState(bool)) ); + connect( cb, SIGNAL(toggled(bool)), SLOT(setState(bool)) ); parent->addWidget(this); + + layout->activate(); } void InputBool::init() { - setChecked(state); + cb->setChecked(state); } void InputBool::setState( bool s ) @@ -39,7 +47,7 @@ void InputBool::setState( bool s ) if (state!=s) { emit changed(); - emit toggle(text(),s); + emit toggle(cb->text(),s); } state=s; } |