Back to index

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

#include <modifystudentssubgroupform.h>

List of all members.

Public Slots

void ok ()
void cancel ()

Public Member Functions

 ModifyStudentsSubgroupForm (QWidget *parent, const QString &yearName, const QString &groupName, const QString &initialSubgroupName, int initialNumberOfStudents)
 ~ModifyStudentsSubgroupForm ()

Public Attributes

QString _yearName
QString _groupName
QString _initialSubgroupName
int _initialNumberOfStudents

Detailed Description

Definition at line 27 of file modifystudentssubgroupform.h.


Constructor & Destructor Documentation

ModifyStudentsSubgroupForm::ModifyStudentsSubgroupForm ( QWidget *  parent,
const QString &  yearName,
const QString &  groupName,
const QString &  initialSubgroupName,
int  initialNumberOfStudents 
)

Definition at line 22 of file modifystudentssubgroupform.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->_groupName=groupName;
       this->_initialSubgroupName=initialSubgroupName;
       
       numberSpinBox->setValue(initialNumberOfStudents);
       
       yearNameLineEdit->setText(yearName);
       groupNameLineEdit->setText(groupName);
       nameLineEdit->setText(initialSubgroupName);
       nameLineEdit->selectAll();
       nameLineEdit->setFocus();
}

Here is the call graph for this function:

Definition at line 51 of file modifystudentssubgroupform.cpp.

Here is the call graph for this function:


Member Function Documentation

Definition at line 56 of file modifystudentssubgroupform.cpp.

{
       this->close();
}

Here is the caller graph for this function:

Definition at line 61 of file modifystudentssubgroupform.cpp.

{
       if(nameLineEdit->text().isEmpty()){
              QMessageBox::information(this, tr("FET information"), tr("Incorrect name"));
              return;
       }
       QString subgroupName=nameLineEdit->text();
       QString yearName=yearNameLineEdit->text();
       QString groupName=groupNameLineEdit->text();
       
       if(this->_initialSubgroupName!=subgroupName && gt.rules.searchStudentsSet(subgroupName)!=NULL){
              QMessageBox::information(this, tr("FET information"), 
               tr("Name exists. If you would like to make more groups to contain a subgroup (overlapping groups),"
               " please remove current subgroup (FET will unfortunately remove all related activities and constraints)"
               " and add a new subgroup with desired name in current group."
               " I know this is a not an elegant procedure, I'll try to fix that in the future."));
              
              return;
       }

       bool t=gt.rules.modifySubgroup(this->_yearName, this->_groupName, this->_initialSubgroupName, subgroupName, 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 modifystudentssubgroupform.h.

Definition at line 33 of file modifystudentssubgroupform.h.

Definition at line 32 of file modifystudentssubgroupform.h.

Definition at line 30 of file modifystudentssubgroupform.h.


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