25 #include "../ArmarXMainWindow.h"
29 #include <QPushButton>
30 #include <QDialogButtonBox>
31 #include <QGridLayout>
39 setWindowTitle(
"Insert new widget name");
40 layout =
new QGridLayout(
this);
46 buttonBox->setObjectName(QString::fromUtf8(
"buttonBox"));
47 buttonBox->setOrientation(Qt::Horizontal);
48 buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
52 QObject::connect(
buttonBox, SIGNAL(accepted()),
this, SLOT(accept()));
53 QObject::connect(
buttonBox, SIGNAL(rejected()),
this, SLOT(reject()));
67 if (
parent->listOpenWidgets.find(name) !=
parent->listOpenWidgets.end()
68 || name.length() == 0)
71 p.setColor(QPalette::Base, QColor::fromRgb(255, 120, 120));
73 buttonBox->button(QDialogButtonBox::Ok)->setDisabled(
true);
79 p.setColor(QPalette::Base, QColor::fromRgb(120, 255, 120));
80 p.setBrush(QPalette::Base, p.light());
82 buttonBox->button(QDialogButtonBox::Ok)->setDisabled(
false);