Back to index

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

#include <modifyconstraintactivitiesendstudentsdayform.h>

Collaboration diagram for ModifyConstraintActivitiesEndStudentsDayForm:
Collaboration graph
[legend]

List of all members.

Public Slots

void ok ()
void cancel ()

Public Member Functions

 ModifyConstraintActivitiesEndStudentsDayForm (QWidget *parent, ConstraintActivitiesEndStudentsDay *ctr)
 ~ModifyConstraintActivitiesEndStudentsDayForm ()
void updateTeachersComboBox ()
void updateStudentsComboBox ()
void updateSubjectsComboBox ()
void updateActivityTagsComboBox ()

Public Attributes

ConstraintActivitiesEndStudentsDay_ctr

Detailed Description

Definition at line 26 of file modifyconstraintactivitiesendstudentsdayform.h.


Constructor & Destructor Documentation

Definition at line 25 of file modifyconstraintactivitiesendstudentsdayform.cpp.

                                                                                                                                                  : QDialog(parent)
{
       setupUi(this);

       okPushButton->setDefault(true);

       connect(cancelPushButton, SIGNAL(clicked()), this, SLOT(cancel()));
       connect(okPushButton, SIGNAL(clicked()), this, SLOT(ok()));

       centerWidgetOnScreen(this);
       restoreFETDialogGeometry(this);

       QSize tmp1=teachersComboBox->minimumSizeHint();
       Q_UNUSED(tmp1);
       QSize tmp2=studentsComboBox->minimumSizeHint();
       Q_UNUSED(tmp2);
       QSize tmp3=subjectsComboBox->minimumSizeHint();
       Q_UNUSED(tmp3);
       QSize tmp4=activityTagsComboBox->minimumSizeHint();
       Q_UNUSED(tmp4);
       
       this->_ctr=ctr;

       updateTeachersComboBox();
       updateStudentsComboBox();
       updateSubjectsComboBox();
       updateActivityTagsComboBox();

       weightLineEdit->setText(CustomFETString::number(ctr->weightPercentage));
}

Here is the call graph for this function:

Definition at line 56 of file modifyconstraintactivitiesendstudentsdayform.cpp.

Here is the call graph for this function:


Member Function Documentation

Definition at line 191 of file modifyconstraintactivitiesendstudentsdayform.cpp.

{
       this->close();
}

Here is the caller graph for this function:

Definition at line 147 of file modifyconstraintactivitiesendstudentsdayform.cpp.

{
       double weight;
       QString tmp=weightLineEdit->text();
       weight_sscanf(tmp, "%lf", &weight);
       if(weight<0.0 || weight>100.0){
              QMessageBox::warning(this, tr("FET information"),
                     tr("Invalid weight (percentage)"));
              return;
       }
       if(weight!=100.0){
              QMessageBox::warning(this, tr("FET information"),
                     tr("Invalid weight (percentage) - it must be 100%"));
              return;
       }

       QString teacher=teachersComboBox->currentText();
       if(teacher!="")
              assert(gt.rules.searchTeacher(teacher)>=0);

       QString students=studentsComboBox->currentText();
       if(students!="")
              assert(gt.rules.searchStudentsSet(students)!=NULL);

       QString subject=subjectsComboBox->currentText();
       if(subject!="")
              assert(gt.rules.searchSubject(subject)>=0);
              
       QString activityTag=activityTagsComboBox->currentText();
       if(activityTag!="")
              assert(gt.rules.searchActivityTag(activityTag)>=0);
              
       this->_ctr->weightPercentage=weight;
       this->_ctr->teacherName=teacher;
       this->_ctr->studentsName=students;
       this->_ctr->subjectName=subject;
       this->_ctr->activityTagName=activityTag;

       gt.rules.internalStructureComputed=false;
       setRulesModifiedAndOtherThings(&gt.rules);
       
       this->close();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 129 of file modifyconstraintactivitiesendstudentsdayform.cpp.

                                                                             {
       int i=0, j=-1;
       activityTagsComboBox->clear();
       activityTagsComboBox->addItem("");
       if(this->_ctr->activityTagName=="")
              j=i;
       i++;
       for(int k=0; k<gt.rules.activityTagsList.size(); k++){
              ActivityTag* s=gt.rules.activityTagsList[k];
              activityTagsComboBox->addItem(s->name);
              if(s->name==this->_ctr->activityTagName)
                     j=i;
              i++;
       }
       assert(j>=0);
       activityTagsComboBox->setCurrentIndex(j);
}

Here is the caller graph for this function:

Definition at line 79 of file modifyconstraintactivitiesendstudentsdayform.cpp.

                                                                         {
       int i=0, j=-1;
       studentsComboBox->clear();
       studentsComboBox->addItem("");
       if(this->_ctr->studentsName=="")
              j=i;
       i++;
       for(int m=0; m<gt.rules.yearsList.size(); m++){
              StudentsYear* sty=gt.rules.yearsList[m];
              studentsComboBox->addItem(sty->name);
              if(sty->name==this->_ctr->studentsName)
                     j=i;
              i++;
              for(int n=0; n<sty->groupsList.size(); n++){
                     StudentsGroup* stg=sty->groupsList[n];
                     studentsComboBox->addItem(stg->name);
                     if(stg->name==this->_ctr->studentsName)
                            j=i;
                     i++;
                     for(int p=0; p<stg->subgroupsList.size(); p++){
                            StudentsSubgroup* sts=stg->subgroupsList[p];
                            studentsComboBox->addItem(sts->name);
                            if(sts->name==this->_ctr->studentsName)
                                   j=i;
                            i++;
                     }
              }
       }
       assert(j>=0);
       studentsComboBox->setCurrentIndex(j);
}

Here is the caller graph for this function:

Definition at line 111 of file modifyconstraintactivitiesendstudentsdayform.cpp.

                                                                         {
       int i=0, j=-1;
       subjectsComboBox->clear();
       subjectsComboBox->addItem("");
       if(this->_ctr->subjectName=="")
              j=i;
       i++;
       for(int k=0; k<gt.rules.subjectsList.size(); k++){
              Subject* s=gt.rules.subjectsList[k];
              subjectsComboBox->addItem(s->name);
              if(s->name==this->_ctr->subjectName)
                     j=i;
              i++;
       }
       assert(j>=0);
       subjectsComboBox->setCurrentIndex(j);
}

Here is the caller graph for this function:

Definition at line 61 of file modifyconstraintactivitiesendstudentsdayform.cpp.

                                                                         {
       int i=0, j=-1;
       teachersComboBox->clear();
       teachersComboBox->addItem("");
       if(this->_ctr->teacherName=="")
              j=i;
       i++;
       for(int k=0; k<gt.rules.teachersList.size(); k++){
              Teacher* t=gt.rules.teachersList[k];
              teachersComboBox->addItem(t->name);
              if(t->name==this->_ctr->teacherName)
                     j=i;
              i++;
       }
       assert(j>=0);
       teachersComboBox->setCurrentIndex(j);
}

Here is the caller graph for this function:


Member Data Documentation


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