#include <QDialogButtonBox>
XGUI_ColorDialog::XGUI_ColorDialog(QWidget* theParent)
- : QDialog(theParent)
+ : QDialog(theParent, Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint)
{
setWindowTitle(tr("Color"));
QGridLayout* aLay = new QGridLayout(this);
#include <QDialogButtonBox>
XGUI_DeflectionDialog::XGUI_DeflectionDialog(QWidget* theParent)
- : QDialog(theParent)
+ : QDialog(theParent, Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint)
{
setWindowTitle(tr("Deflection"));
QGridLayout* aLay = new QGridLayout(this);
#include <QGridLayout>
XGUI_PropertyDialog::XGUI_PropertyDialog(QWidget* theParent)
-: QDialog(theParent), myContentWidget(0)
+: QDialog(theParent, Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint),
+ myContentWidget(0)
{
myLayout = new QGridLayout(this);
if (!abortAllOperations())
return;
- QDialog aDlg;
+ XGUI_PropertyDialog aDlg(desktop());
aDlg.setWindowTitle(tr("Number of Iso-lines"));
- QFormLayout* aLayout = new QFormLayout(&aDlg);
+
+ QWidget* aIsosWgt = new QWidget(&aDlg);
+ QFormLayout* aLayout = new QFormLayout(aIsosWgt);
+ ModuleBase_Tools::adjustMargins(aLayout);
+ aDlg.setContent(aIsosWgt);
QSpinBox* aUNb = new QSpinBox(&aDlg);
aUNb->setValue(aValues[0]);
aVNb->setValue(aValues[1]);
aLayout->addRow("V:", aVNb);
- QDialogButtonBox* aButtons =
- new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &aDlg);
- connect(aButtons, SIGNAL(accepted()), &aDlg, SLOT(accept()));
- connect(aButtons, SIGNAL(rejected()), &aDlg, SLOT(reject()));
- aLayout->addRow(aButtons);
-
if (aDlg.exec() == QDialog::Accepted) {
SessionPtr aMgr = ModelAPI_Session::get();
QString aDescription = contextMenuMgr()->action("ISOLINES_CMD")->text();