Exemplo n.º 1
0
/**
 * @internal
 */
void Form::_acceptForm()
{
	if ( validate() )
	{
		acceptForm();
	}
}
Exemplo n.º 2
0
Form::Form(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Form), dialog(new Dialog)
{
    setFixedSize(680, 600);
    ui->setupUi(this);

    enableExams();
    populateComboBoxes();
    populateSpinBoxes();
    QIntValidator *validator = new QIntValidator;
    ui->lineExamNumber->setValidator(validator);
    ui->lineExamNumber2->setValidator(validator);
    ui->lineAppNumber->setFocus();

    QObject::connect(ui->pushButtonAddSubject, SIGNAL(clicked()), this, SLOT(viewDialog()));
    QObject::connect(ui->pushButtonAddSubject2, SIGNAL(clicked()), this, SLOT(viewDialog2()));
    QObject::connect(ui->pushButtonCancel, SIGNAL(clicked()), this, SLOT(close()));
    QObject::connect(ui->pushButtonSave, SIGNAL(clicked()), this, SLOT(acceptForm()));
    QObject::connect(ui->checkBoxTwoSittings, SIGNAL(toggled(bool)), this, SLOT(enableExams()));
    QObject::connect(ui->pushButtonRemove, SIGNAL(clicked()), this, SLOT(removeSubject()));
    QObject::connect(ui->pushButtonRemove2, SIGNAL(clicked()), this, SLOT(removeSubject2()));
}