Back to index

fet  5.18.0
Public Slots | Public Member Functions | Public Attributes
ModifyStudentsYearForm Class Reference

#include <modifystudentsyearform.h>

List of all members.

Public Slots

void ok ()
void cancel ()

Public Member Functions

 ModifyStudentsYearForm (QWidget *parent, const QString &initialYearName, int initialNumberOfStudents)
 ~ModifyStudentsYearForm ()

Public Attributes

QString _initialYearName
int _initialNumberOfStudents

Detailed Description

Definition at line 27 of file modifystudentsyearform.h.


Constructor & Destructor Documentation

ModifyStudentsYearForm::ModifyStudentsYearForm ( QWidget *  parent,
const QString &  initialYearName,
int  initialNumberOfStudents 
)

Definition at line 22 of file modifystudentsyearform.cpp.

                                                                                                                          : 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);
       
       numberSpinBox->setMaximum(MAX_ROOM_CAPACITY);
       numberSpinBox->setMinimum(0);
       numberSpinBox->setValue(0);

       this->_initialYearName=initialYearName;
       this->_initialNumberOfStudents=initialNumberOfStudents;
       numberSpinBox->setValue(initialNumberOfStudents);
       nameLineEdit->setText(initialYearName);
       nameLineEdit->selectAll();
       nameLineEdit->setFocus();
}

Here is the call graph for this function:

Definition at line 46 of file modifystudentsyearform.cpp.

Here is the call graph for this function:


Member Function Documentation

Definition at line 51 of file modifystudentsyearform.cpp.

{
       this->close();
}

Here is the caller graph for this function:

void ModifyStudentsYearForm::ok ( ) [slot]

Definition at line 56 of file modifystudentsyearform.cpp.

{
       if(nameLineEdit->text().isEmpty()){
              QMessageBox::information(this, tr("FET information"), tr("Incorrect name"));
              return;
       }
       if(this->_initialYearName!=nameLineEdit->text() && gt.rules.searchStudentsSet(nameLineEdit->text())!=NULL){
              QMessageBox::information(this, tr("FET information"), tr("Name existing - please choose another"));
              return;
       }
       bool t=gt.rules.modifyYear(this->_initialYearName, nameLineEdit->text(), numberSpinBox->value());
       assert(t);

       this->close();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 31 of file modifystudentsyearform.h.

Definition at line 30 of file modifystudentsyearform.h.


The documentation for this class was generated from the following files: