void GameFlow::slot_showLevelInfoDialog() { if (theDialogPtr) slot_clearDialog(); theDialogPtr = theRequestDialogItfPtr->showLevelInfo(); theDialogPtr->setProperty("levelName", theMainWindowPtr->theLevelPtr->theLevelName); theDialogPtr->setProperty("description", theMainWindowPtr->theLevelPtr->theLevelDescription); theDialogPtr->setProperty("author", theMainWindowPtr->theLevelPtr->theLevelAuthor); connect(theDialogPtr, SIGNAL(resetButton_clicked()), theMainWindowPtr, SLOT(reloadLevel())); connect(theDialogPtr, SIGNAL(okButton_clicked()), this, SLOT(slot_clearDialog())); }
CCopasiSelectionDialog::CCopasiSelectionDialog(QWidget * parent , const char * name , bool modal): QDialog(parent, name, modal), mpOKButton(NULL), mpCancelButton(NULL), mpModeCheckBox(NULL), mpButtonBox(NULL), mpMainWidget(NULL), mpMainLayout(NULL), mpTmpVector(new std::vector< const CCopasiObject * >()), mpOutputVector(NULL), mExpertMode(false), mExpertModeEnabled(true) { setWindowFlags(this->windowFlags() | Qt::WDestructiveClose); mpMainLayout = new Q3VBoxLayout(this); mpSelectionWidget = new CCopasiSelectionWidget(this); mpMainLayout->addWidget(mpSelectionWidget); mpButtonBox = new Q3HBoxLayout(mpMainLayout); mpOKButton = new QPushButton(this, "OK"); mpOKButton->setText("OK"); mpOKButton->setDefault(true); mpOKButton->setAutoDefault(true); mpButtonBox->addWidget(mpOKButton); mpCancelButton = new QPushButton(this, "Cancel"); mpCancelButton->setText("Cancel"); mpButtonBox->addWidget(mpCancelButton); mpModeCheckBox = new QCheckBox("expert mode", this, "expertMode"); mpModeCheckBox->setChecked(false); mpButtonBox->addWidget(mpModeCheckBox); // this->mpButtonBox->addSpacing(20); // this->mpButtonBox->addStretch(); connect(this->mpOKButton, SIGNAL(clicked()), this, SLOT(okButton_clicked())); connect(this->mpCancelButton, SIGNAL(clicked()), this, SLOT(cancelButton_clicked())); connect(this->mpModeCheckBox, SIGNAL(toggled(bool)), this, SLOT(modeButton_toggled(bool))); this->mpSelectionWidget->setOutputVector(NULL); this->setTabOrder(this->mpOKButton, this->mpCancelButton); this->setTabOrder(this->mpCancelButton, this->mpModeCheckBox); this->setTabOrder(this->mpModeCheckBox, this->mpMainWidget); }
CCopasiSelectionDialog::CCopasiSelectionDialog(QWidget * parent , const char * name , bool modal): QDialog(parent), mpModeCheckBox(NULL), mpButtonBox(NULL), mpMainWidget(NULL), mpMainLayout(NULL), mpTmpVector(new std::vector< const CCopasiObject * >()), mpOutputVector(NULL), mExpertMode(false), mExpertModeEnabled(true) { setObjectName(QString::fromUtf8(name)); setModal(modal); setAttribute(Qt::WA_DeleteOnClose); mpMainLayout = new QVBoxLayout(this); mpSelectionWidget = new CCopasiSelectionWidget(this); mpMainLayout->addWidget(mpSelectionWidget); mpButtonBox = new QHBoxLayout(); mpMainLayout->addLayout(mpButtonBox); QDialogButtonBox *box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this); mpButtonBox->addWidget(box); mpModeCheckBox = new QCheckBox("expert mode", this); mpModeCheckBox->setObjectName("expertMode"); mpModeCheckBox->setChecked(false); mpButtonBox->addWidget(mpModeCheckBox); // this->mpButtonBox->addSpacing(20); // this->mpButtonBox->addStretch(); connect(box, SIGNAL(accepted()), this, SLOT(okButton_clicked())); connect(box, SIGNAL(rejected()), this, SLOT(cancelButton_clicked())); connect(this->mpModeCheckBox, SIGNAL(toggled(bool)), this, SLOT(modeButton_toggled(bool))); this->mpSelectionWidget->setOutputVector(NULL); this->setTabOrder(this->mpModeCheckBox, this->mpMainWidget); }
InsertMoleculeDialog::InsertMoleculeDialog(QWidget* parent) : QDialog(parent) { m_dialog.setupUi(this); connect(this, SIGNAL(accepted()), this, SLOT(okButton_clicked())); }