AddConstraintTeachersMinDaysPerWeekForm::AddConstraintTeachersMinDaysPerWeekForm(QWidget* parent): QDialog(parent) { setupUi(this); addConstraintPushButton->setDefault(true); connect(addConstraintPushButton, SIGNAL(clicked()), this, SLOT(addCurrentConstraint())); connect(closePushButton, SIGNAL(clicked()), this, SLOT(close())); centerWidgetOnScreen(this); restoreFETDialogGeometry(this); updateMinDaysSpinBox(); }
ModifyConstraintTeachersMinDaysPerWeekForm::ModifyConstraintTeachersMinDaysPerWeekForm(QWidget* parent, ConstraintTeachersMinDaysPerWeek* ctr): QDialog(parent) { setupUi(this); okPushButton->setDefault(true); connect(okPushButton, SIGNAL(clicked()), this, SLOT(ok())); connect(cancelPushButton, SIGNAL(clicked()), this, SLOT(cancel())); centerWidgetOnScreen(this); restoreFETDialogGeometry(this); this->_ctr=ctr; weightLineEdit->setText(CustomFETString::number(ctr->weightPercentage)); updateMinDaysSpinBox(); minDaysSpinBox->setValue(ctr->minDaysPerWeek); }