25 #include <QDialogButtonBox>
26 #include <QGridLayout>
29 #include <QPushButton>
31 #include "../ArmarXMainWindow.h"
36 QDialog(parent), parent(parent)
38 setWindowTitle(
"Insert new widget name");
39 layout =
new QGridLayout(
this);
45 buttonBox->setObjectName(QString::fromUtf8(
"buttonBox"));
46 buttonBox->setOrientation(Qt::Horizontal);
47 buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
51 QObject::connect(
buttonBox, SIGNAL(accepted()),
this, SLOT(accept()));
52 QObject::connect(
buttonBox, SIGNAL(rejected()),
this, SLOT(reject()));
67 if (
parent->listOpenWidgets.find(name) !=
parent->listOpenWidgets.end()
69 || name.length() == 0)
72 p.setColor(QPalette::Base, QColor::fromRgb(255, 120, 120));
74 buttonBox->button(QDialogButtonBox::Ok)->setDisabled(
true);
80 p.setColor(QPalette::Base, QColor::fromRgb(120, 255, 120));
81 p.setBrush(QPalette::Base, p.light());
83 buttonBox->button(QDialogButtonBox::Ok)->setDisabled(
false);