Back to index

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

#include <modifystudentsgroupform.h>

List of all members.

Public Slots

void ok ()
void cancel ()

Public Member Functions

 ModifyStudentsGroupForm (QWidget *parent, const QString &yearName, const QString &initialGroupName, int initialNumberOfStudents)
 ~ModifyStudentsGroupForm ()

Public Attributes

QString _yearName
QString _initialGroupName
int _initialNumberOfStudents

Detailed Description

Definition at line 27 of file modifystudentsgroupform.h.


Constructor & Destructor Documentation

ModifyStudentsGroupForm::ModifyStudentsGroupForm ( QWidget *  parent,
const QString &  yearName,
const QString &  initialGroupName,
int  initialNumberOfStudents 
)

Definition at line 22 of file modifystudentsgroupform.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->_yearName=yearName;
       this->_initialGroupName=initialGroupName;
       this->_initialNumberOfStudents=initialNumberOfStudents;
       numberSpinBox->setValue(initialNumberOfStudents);
       yearNameLineEdit->setText(yearName);
       nameLineEdit->setText(initialGroupName);
       nameLineEdit->selectAll();
       nameLineEdit->setFocus();
}

Here is the call graph for this function:

Definition at line 48 of file modifystudentsgroupform.cpp.

Here is the call graph for this function:


Member Function Documentation

Definition at line 53 of file modifystudentsgroupform.cpp.

{
       this->close();
}

Here is the caller graph for this function:

void ModifyStudentsGroupForm::ok ( ) [slot]

Definition at line 58 of file modifystudentsgroupform.cpp.

{
       if(nameLineEdit->text().isEmpty()){
              QMessageBox::information(this, tr("FET information"), tr("Incorrect name"));
              return;
       }
       QString yearName=yearNameLineEdit->text();
       QString groupName=nameLineEdit->text();
       
       if(this->_initialGroupName!=groupName && gt.rules.searchStudentsSet(groupName)!=NULL){
              QMessageBox::information(this, tr("FET information"), 
               tr("Name exists. If you would like to make more years to contain a group (overlapping years),"
               " please remove current group (FET will unfortunately remove all related activities and constraints)"
               " and add a new group with desired name in current year."
               " I know this is a not an elegant procedure, I'll try to fix that in the future."));
              return;
       }
       
       bool t=gt.rules.modifyGroup(this->_yearName, this->_initialGroupName, groupName, 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 modifystudentsgroupform.h.

Definition at line 32 of file modifystudentsgroupform.h.

Definition at line 30 of file modifystudentsgroupform.h.


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