16 #include <QGridLayout>
17 #include <QDialogButtonBox>
27 if ( !title.isEmpty() )
29 setWindowTitle( title );
32 QGridLayout* dlgLayout =
new QGridLayout(
this );
35 mGroupBox =
new QGroupBox(
this );
36 mGroupBox->setCheckable(
true );
37 mGroupBox->setTitle(
tr(
"Scale visibility " ) );
39 QGridLayout* gbLayout =
new QGridLayout(
this );
47 gbLayout->addWidget( mScaleWidget, 0, 0 );
48 mGroupBox->setLayout( gbLayout );
50 QDialogButtonBox* buttonBox =
new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Ok, Qt::Horizontal,
this );
51 connect( buttonBox, SIGNAL( accepted() ),
this, SLOT( accept() ) );
52 connect( buttonBox, SIGNAL( rejected() ),
this, SLOT( reject() ) );
54 dlgLayout->addWidget( mGroupBox, 0, 0 );
55 dlgLayout->addWidget( buttonBox, 1, 0 );
60 mGroupBox->setChecked( hasScaleVisibility );
65 return mGroupBox->isChecked();