Back to index

fet  5.18.0
Functions | Variables
spaceconstraint.cpp File Reference
#include "timetable_defs.h"
#include "spaceconstraint.h"
#include "rules.h"
#include "activity.h"
#include "teacher.h"
#include "subject.h"
#include "activitytag.h"
#include "studentsset.h"
#include "room.h"
#include "solution.h"
#include "matrix.h"
#include "generate_pre.h"
#include <QString>
#include <QMessageBox>

Go to the source code of this file.

Functions

static QString trueFalse (bool x)
static QString yesNoTranslated (bool x)
QString getActivityDetailedDescription (Rules &r, int id)

Variables

static Matrix3D< qint8 > roomsMatrix
static int rooms_conflicts = -1

Function Documentation

QString getActivityDetailedDescription ( Rules r,
int  id 
)

Definition at line 85 of file timeconstraint.cpp.

                                                        {
       QString s;

       int ai;
       for(ai=0; ai<r.activitiesList.size(); ai++)
              if(r.activitiesList[ai]->id==id)
                     break;
       
       if(ai==r.activitiesList.size()){
              s+=QCoreApplication::translate("Activity", "Invalid (inexistent) id for activity");
              return s;
       }
       assert(ai<r.activitiesList.size());
       
       Activity* act=r.activitiesList.at(ai);
       
       if(act->activityTagsNames.count()>0){
              s+=QCoreApplication::translate("Activity", "T:%1, S:%2, AT:%3, St:%4", "This is an important translation for an activity's detailed description, please take care (it appears in many places in constraints)."
               "The abbreviations are: Teachers, Subject, Activity tags, Students. This variant includes activity tags").arg(act->teachersNames.join(",")).arg(act->subjectName).arg(act->activityTagsNames.join(",")).arg(act->studentsNames.join(","));
       }
       else{
              s+=QCoreApplication::translate("Activity", "T:%1, S:%2, St:%3", "This is an important translation for an activity's detailed description, please take care (it appears in many places in constraints)."
               "The abbreviations are: Teachers, Subject, Students. There are no activity tags here").arg(act->teachersNames.join(",")).arg(act->subjectName).arg(act->studentsNames.join(","));
       }
       return s;
}
static QString trueFalse ( bool  x) [static]

Definition at line 44 of file spaceconstraint.cpp.

{
       if(!x)
              return QString("false");
       else
              return QString("true");
}

Here is the caller graph for this function:

static QString yesNoTranslated ( bool  x) [static]

Definition at line 52 of file spaceconstraint.cpp.

{
       if(!x)
              return QCoreApplication::translate("SpaceConstraint", "no", "no - meaning negation");
       else
              return QCoreApplication::translate("SpaceConstraint", "yes", "yes - meaning affirmative");
}

Here is the caller graph for this function:


Variable Documentation

int rooms_conflicts = -1 [static]

Definition at line 63 of file spaceconstraint.cpp.

Matrix3D<qint8> roomsMatrix [static]

Definition at line 61 of file spaceconstraint.cpp.