Back to index

fet  5.18.0
Public Member Functions | Static Public Member Functions | Static Private Member Functions
TimetableExport Class Reference

#include <timetableexport.h>

List of all members.

Public Member Functions

 TimetableExport ()
 ~TimetableExport ()

Static Public Member Functions

static void getStudentsTimetable (Solution &c)
static void getTeachersTimetable (Solution &c)
static void getRoomsTimetable (Solution &c)
static void getNumberOfPlacedActivities (int &number1, int &number2)
static void writeSimulationResults (QWidget *parent)
static void writeHighestStageResults (QWidget *parent)
static void writeSimulationResults (QWidget *parent, int n)
static void writeSimulationResultsCommandLine (QWidget *parent, const QString &outputDirectory)
static void writeRandomSeed (QWidget *parent, bool before)
static void writeRandomSeed (QWidget *parent, int n, bool before)
static void writeRandomSeedCommandLine (QWidget *parent, const QString &outputDirectory, bool before)
static void writeRandomSeedFile (QWidget *parent, const QString &filename, bool before)
static void writeTimetableDataFile (QWidget *parent, const QString &filename)
static QString singleSubgroupsTimetableDaysHorizontalHtml (int htmlLevel, int subgroup, const QString &saveTime, bool printActivityTags)
static QString singleSubgroupsTimetableDaysVerticalHtml (int htmlLevel, int subgroup, const QString &saveTime, bool printActivityTags)
static QString singleSubgroupsTimetableTimeHorizontalHtml (int htmlLevel, int maxSubgroups, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleSubgroupsTimetableTimeVerticalHtml (int htmlLevel, int maxSubgroups, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleSubgroupsTimetableTimeHorizontalDailyHtml (int htmlLevel, int day, int maxSubgroups, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleSubgroupsTimetableTimeVerticalDailyHtml (int htmlLevel, int day, int maxSubgroups, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleGroupsTimetableDaysHorizontalHtml (int htmlLevel, int group, const QString &saveTime, bool printActivityTags, bool detailed)
static QString singleGroupsTimetableDaysVerticalHtml (int htmlLevel, int group, const QString &saveTime, bool printActivityTags, bool detailed)
static QString singleGroupsTimetableTimeHorizontalHtml (int htmlLevel, int maxGroups, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags, bool detailed)
static QString singleGroupsTimetableTimeVerticalHtml (int htmlLevel, int maxGroups, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags, bool detailed)
static QString singleGroupsTimetableTimeHorizontalDailyHtml (int htmlLevel, int day, int maxGroups, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags, bool detailed)
static QString singleGroupsTimetableTimeVerticalDailyHtml (int htmlLevel, int day, int maxGroups, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags, bool detailed)
static QString singleYearsTimetableDaysHorizontalHtml (int htmlLevel, int year, const QString &saveTime, bool printActivityTags, bool detailed)
static QString singleYearsTimetableDaysVerticalHtml (int htmlLevel, int year, const QString &saveTime, bool printActivityTags, bool detailed)
static QString singleYearsTimetableTimeHorizontalHtml (int htmlLevel, int maxYears, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags, bool detailed)
static QString singleYearsTimetableTimeVerticalHtml (int htmlLevel, int maxYears, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags, bool detailed)
static QString singleYearsTimetableTimeHorizontalDailyHtml (int htmlLevel, int day, int maxYears, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags, bool detailed)
static QString singleYearsTimetableTimeVerticalDailyHtml (int htmlLevel, int day, int maxYears, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags, bool detailed)
static QString singleAllActivitiesTimetableDaysHorizontalHtml (int htmlLevel, const QString &saveTime, bool printActivityTags)
static QString singleAllActivitiesTimetableDaysVerticalHtml (int htmlLevel, const QString &saveTime, bool printActivityTags)
static QString singleAllActivitiesTimetableTimeHorizontalHtml (int htmlLevel, const QString &saveTime, bool printActivityTags)
static QString singleAllActivitiesTimetableTimeVerticalHtml (int htmlLevel, const QString &saveTime, bool printActivityTags)
static QString singleAllActivitiesTimetableTimeHorizontalDailyHtml (int htmlLevel, int day, const QString &saveTime, bool printActivityTags)
static QString singleAllActivitiesTimetableTimeVerticalDailyHtml (int htmlLevel, int day, const QString &saveTime, bool printActivityTags)
static QString singleTeachersTimetableDaysHorizontalHtml (int htmlLevel, int teacher, const QString &saveTime, bool printActivityTags)
static QString singleTeachersTimetableDaysVerticalHtml (int htmlLevel, int teacher, const QString &saveTime, bool printActivityTags)
static QString singleTeachersTimetableTimeHorizontalHtml (int htmlLevel, int maxTeachers, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleTeachersTimetableTimeVerticalHtml (int htmlLevel, int maxTeachers, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleTeachersTimetableTimeHorizontalDailyHtml (int htmlLevel, int day, int maxTeachers, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleTeachersTimetableTimeVerticalDailyHtml (int htmlLevel, int day, int maxTeachers, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleRoomsTimetableDaysHorizontalHtml (int htmlLevel, int room, const QString &saveTime, bool printActivityTags)
static QString singleRoomsTimetableDaysVerticalHtml (int htmlLevel, int room, const QString &saveTime, bool printActivityTags)
static QString singleRoomsTimetableTimeHorizontalHtml (int htmlLevel, int maxRooms, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleRoomsTimetableTimeVerticalHtml (int htmlLevel, int maxRooms, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleRoomsTimetableTimeHorizontalDailyHtml (int htmlLevel, int day, int maxRooms, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleRoomsTimetableTimeVerticalDailyHtml (int htmlLevel, int day, int maxRooms, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleSubjectsTimetableDaysHorizontalHtml (int htmlLevel, int subject, const QString &saveTime, bool printActivityTags)
static QString singleSubjectsTimetableDaysVerticalHtml (int htmlLevel, int subject, const QString &saveTime, bool printActivityTags)
static QString singleSubjectsTimetableTimeHorizontalHtml (int htmlLevel, int maxSubjects, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleSubjectsTimetableTimeVerticalHtml (int htmlLevel, int maxSubjects, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleSubjectsTimetableTimeHorizontalDailyHtml (int htmlLevel, int day, int maxSubjects, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleSubjectsTimetableTimeVerticalDailyHtml (int htmlLevel, int day, int maxSubjects, QSet< int > &excludedNames, const QString &saveTime, bool printActivityTags)
static QString singleTeachersFreePeriodsTimetableDaysHorizontalHtml (int htmlLevel, const QString &saveTime, bool detailed)
static QString singleTeachersFreePeriodsTimetableDaysVerticalHtml (int htmlLevel, const QString &saveTime, bool detailed)

Static Private Member Functions

static void computeHashForIDsTimetable ()
static void computeActivitiesAtTime ()
static void computeActivitiesWithSameStartingTime ()
static bool addActivitiesWithSameStartingTime (QList< int > &allActivities, int hour)
static void writeSubgroupsTimetableXml (QWidget *parent, const QString &xmlfilename)
static void writeTeachersTimetableXml (QWidget *parent, const QString &xmlfilename)
static void writeActivitiesTimetableXml (QWidget *parent, const QString &xmlfilename)
static void writeConflictsTxt (QWidget *parent, const QString &filename, const QString &saveTime, int placedActivities)
static void writeIndexHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeStylesheetCss (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeSubgroupsTimetableDaysHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeSubgroupsTimetableDaysVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeSubgroupsTimetableTimeHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeSubgroupsTimetableTimeVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeSubgroupsTimetableTimeHorizontalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeSubgroupsTimetableTimeVerticalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeGroupsTimetableDaysHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeGroupsTimetableDaysVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeGroupsTimetableTimeHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeGroupsTimetableTimeVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeGroupsTimetableTimeHorizontalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeGroupsTimetableTimeVerticalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeYearsTimetableDaysHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeYearsTimetableDaysVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeYearsTimetableTimeHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeYearsTimetableTimeVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeYearsTimetableTimeHorizontalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeYearsTimetableTimeVerticalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeAllActivitiesTimetableDaysHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeAllActivitiesTimetableDaysVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeAllActivitiesTimetableTimeHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeAllActivitiesTimetableTimeVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeAllActivitiesTimetableTimeHorizontalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeAllActivitiesTimetableTimeVerticalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeTeachersTimetableDaysHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeTeachersTimetableDaysVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeTeachersTimetableTimeHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeTeachersTimetableTimeVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeTeachersTimetableTimeHorizontalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeTeachersTimetableTimeVerticalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeRoomsTimetableDaysHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeRoomsTimetableDaysVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeRoomsTimetableTimeHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeRoomsTimetableTimeVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeRoomsTimetableTimeHorizontalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeRoomsTimetableTimeVerticalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeSubjectsTimetableDaysHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeSubjectsTimetableDaysVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeSubjectsTimetableTimeHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeSubjectsTimetableTimeVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeSubjectsTimetableTimeHorizontalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeSubjectsTimetableTimeVerticalDailyHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeTeachersFreePeriodsTimetableDaysHorizontalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static void writeTeachersFreePeriodsTimetableDaysVerticalHtml (QWidget *parent, const QString &htmlfilename, const QString &saveTime, int placedActivities)
static QString writeActivityStudents (int htmlLevel, int ai, int day, int hour, bool notAvailable, bool colspan, bool rowspan, bool printActivityTags)
static QString writeActivitiesStudents (int htmlLevel, const QList< int > &allActivities, bool printActivityTags)
static QString writeActivityTeacher (int htmlLevel, int teacher, int day, int hour, bool colspan, bool rowspan, bool printActivityTags)
static QString writeActivitiesTeachers (int htmlLevel, const QList< int > &allActivities, bool printActivityTags)
static QString writeActivityRoom (int htmlLevel, int room, int day, int hour, bool colspan, bool rowspan, bool printActivityTags)
static QString writeActivitiesRooms (int htmlLevel, const QList< int > &allActivities, bool printActivityTags)
static QString writeActivitiesSubjects (int htmlLevel, const QList< int > &allActivities, bool printActivityTags)
static QString writeHead (bool java, int placedActivities, bool printInstitution)
static QString writeTOCDays (bool detailed)
static QString writeStartTagTDofActivities (int htmlLevel, const Activity *act, bool detailed, bool colspan, bool rowspan)
static QString writeSubjectAndActivityTags (int htmlLevel, const Activity *act, const QString &startTag, const QString &startTagAttribute, bool activityTagsOnly, bool printActivityTags)
static QString writeStudents (int htmlLevel, const Activity *act, const QString &startTag, const QString &startTagAttribute)
static QString writeTeachers (int htmlLevel, const Activity *act, const QString &startTag, const QString &startTagAttribute)
static QString writeRoom (int htmlLevel, int ai, const QString &startTag, const QString &startTagAttribute)
static QString writeNotAvailableSlot (int htmlLevel, const QString &weight)
static QString writeBreakSlot (int htmlLevel, const QString &weight)
static QString writeEmpty (int htmlLevel)

Detailed Description

Definition at line 32 of file timetableexport.h.


Constructor & Destructor Documentation

Definition at line 195 of file timetableexport.cpp.

{
}

Definition at line 199 of file timetableexport.cpp.

{
}

Member Function Documentation

bool TimetableExport::addActivitiesWithSameStartingTime ( QList< int > &  allActivities,
int  hour 
) [static, private]

Definition at line 3799 of file timetableexport.cpp.

                                                                                          {
// by Volker Dirr
       if(PRINT_ACTIVITIES_WITH_SAME_STARTING_TIME){
              bool activitiesWithSameStartingtime=false;
              QList<int> allActivitiesNew;
              foreach(int tmpAct, allActivities){
                     allActivitiesNew<<tmpAct;
                     if(activitiesWithSameStartingTime.contains(tmpAct)){
                            QList<int> sameTimeList=activitiesWithSameStartingTime.value(tmpAct);
                            foreach(int sameTimeAct, sameTimeList){
                                   if(!allActivitiesNew.contains(sameTimeAct) && !allActivities.contains(sameTimeAct)){
                                          if(best_solution.times[sameTimeAct]!=UNALLOCATED_TIME){
                                                 Activity* act=&gt.rules.internalActivitiesList[sameTimeAct];
                                                 assert(best_solution.times[tmpAct]==best_solution.times[sameTimeAct]);//{
                                                        if((best_solution.times[sameTimeAct]/gt.rules.nDaysPerWeek+(act->duration-1))>=hour){
                                                               allActivitiesNew<<sameTimeAct;
                                                        }
                                                        activitiesWithSameStartingtime=true; //don't add this line in previous if command because of activities with different duration!
                                                 //}
                                          }
                                   }
                            }
                     }
              }
              //allActivities.clear();
              allActivities=allActivitiesNew;
              //allActivitiesNew.clear();
              return activitiesWithSameStartingtime;
       }
       else
              return false;
}
void TimetableExport::computeActivitiesAtTime ( ) [static, private]

Definition at line 3741 of file timetableexport.cpp.

                                             {          // by Liviu Lalescu
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++)
                     activitiesAtTime[day][hour].clear();
       for(int i=0; i<gt.rules.nInternalActivities; i++) {            //maybe TODO: maybe it is better to do this sorted by students or teachers?
              Activity* act=&gt.rules.internalActivitiesList[i];
              if(best_solution.times[i]!=UNALLOCATED_TIME) {
                     int hour=best_solution.times[i]/gt.rules.nDaysPerWeek;
                     int day=best_solution.times[i]%gt.rules.nDaysPerWeek;
                     for(int dd=0; dd < act->duration && hour+dd < gt.rules.nHoursPerDay; dd++)
                            activitiesAtTime[day][hour+dd].append(i);
              }
       }
}

Definition at line 3757 of file timetableexport.cpp.

                                                           {
// by Volker Dirr
       activitiesWithSameStartingTime.clear();

       if(PRINT_ACTIVITIES_WITH_SAME_STARTING_TIME){
              for(int i=0; i<gt.rules.nInternalTimeConstraints; i++){
                     TimeConstraint* tc=gt.rules.internalTimeConstraintsList[i];
                     if(tc->type==CONSTRAINT_ACTIVITIES_SAME_STARTING_TIME){ //not needed anymore:  && tc->weightPercentage==100
                            ConstraintActivitiesSameStartingTime* c=(ConstraintActivitiesSameStartingTime*) tc;
                            for(int a=0; a<c->_n_activities; a++){
                                   //speed improvement
                                   QList<int> & tmpList=activitiesWithSameStartingTime[c->_activities[a]];
                                   for(int b=0; b<c->_n_activities; b++){
                                          if(a!=b){
                                                 if(best_solution.times[c->_activities[a]]==best_solution.times[c->_activities[b]]){        //because constraint is maybe not with 100% weight and failed
                                                        if(!tmpList.contains(c->_activities[b])){
                                                               tmpList<<c->_activities[b];
                                                        }
                                                 }
                                          }
                                   }
                                   /*
                                   QList<int> tmpList;
                                   if(activitiesWithSameStartingTime.contains(c->_activities[a]))
                                          tmpList=activitiesWithSameStartingTime.value(c->_activities[a]);
                                   for(int b=0; b<c->_n_activities; b++){
                                          if(a!=b){
                                                 if(best_solution.times[c->_activities[a]]==best_solution.times[c->_activities[b]]){        //because constraint is maybe not with 100% weight and failed
                                                        if(!tmpList.contains(c->_activities[b])){
                                                               tmpList<<c->_activities[b];
                                                        }
                                                 }
                                          }
                                   }
                                   activitiesWithSameStartingTime.insert(c->_activities[a], tmpList);
                                   */
                            }
                     }
              }
       }
}
void TimetableExport::computeHashForIDsTimetable ( ) [static, private]

Definition at line 3676 of file timetableexport.cpp.

                                                {
// by Volker Dirr

//TODO if an use a relational data base this is unneded, because we can use the primary key id of the database 
//This is very similar to statistics compute hash. so always check it if you change something here!

/*     QSet<QString> usedStudents;
       for(int i=0; i<gt.rules.nInternalActivities; i++){
              foreach(QString st, gt.rules.internalActivitiesList[i].studentsNames){
                     if(!usedStudents.contains(st))
                            usedStudents<<st;
              }
       }*/
       hashStudentIDsTimetable.clear();
       int cnt=1;
       for(int i=0; i<gt.rules.augmentedYearsList.size(); i++){
              StudentsYear* sty=gt.rules.augmentedYearsList[i];
              //if(usedStudents.contains(sty->name)){
              if(!hashStudentIDsTimetable.contains(sty->name)){
                     hashStudentIDsTimetable.insert(sty->name, CustomFETString::number(cnt));
                     cnt++;
              }
              //}
              for(int j=0; j<sty->groupsList.size(); j++){
                     StudentsGroup* stg=sty->groupsList[j];
              //     if(usedStudents.contains(stg->name)){
                     if(!hashStudentIDsTimetable.contains(stg->name)){
                            hashStudentIDsTimetable.insert(stg->name, CustomFETString::number(cnt));
                            cnt++;
                     }
              //     }
                     for(int k=0; k<stg->subgroupsList.size(); k++){
                            StudentsSubgroup* sts=stg->subgroupsList[k];
              //            if(usedStudents.contains(sts->name)){
                            if(!hashStudentIDsTimetable.contains(sts->name)){
                                   hashStudentIDsTimetable.insert(sts->name, CustomFETString::number(cnt));
                                   cnt++;
                            }
              //            }
                     }
              }
       }

       hashSubjectIDsTimetable.clear();
       for(int i=0; i<gt.rules.nInternalSubjects; i++){
              hashSubjectIDsTimetable.insert(gt.rules.internalSubjectsList[i]->name, CustomFETString::number(i+1));
       }
       hashActivityTagIDsTimetable.clear();
       for(int i=0; i<gt.rules.nInternalActivityTags; i++){
              hashActivityTagIDsTimetable.insert(gt.rules.internalActivityTagsList[i]->name, CustomFETString::number(i+1));
       }
       hashTeacherIDsTimetable.clear();
       for(int i=0; i<gt.rules.nInternalTeachers; i++){
              hashTeacherIDsTimetable.insert(gt.rules.internalTeachersList[i]->name, CustomFETString::number(i+1));
       }
       hashRoomIDsTimetable.clear();
       for(int room=0; room<gt.rules.nInternalRooms; room++){
              hashRoomIDsTimetable.insert(gt.rules.internalRoomsList[room]->name, CustomFETString::number(room+1));
       }
       hashDayIDsTimetable.clear();
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              hashDayIDsTimetable.insert(gt.rules.daysOfTheWeek[day], CustomFETString::number(day+1));
       }
}

Here is the call graph for this function:

void TimetableExport::getNumberOfPlacedActivities ( int &  number1,
int &  number2 
) [static]

Definition at line 227 of file timetableexport.cpp.

{
       number1=0;
       for(int i=0; i<gt.rules.nInternalActivities; i++)
              if(best_solution.times[i]!=UNALLOCATED_TIME)
                     number1++;

       number2=0;
       for(int i=0; i<gt.rules.nInternalActivities; i++)
              if(best_solution.rooms[i]!=UNALLOCATED_SPACE)
                     number2++;
}

Here is the caller graph for this function:

Definition at line 219 of file timetableexport.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 203 of file timetableexport.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 211 of file timetableexport.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleAllActivitiesTimetableDaysHorizontalHtml ( int  htmlLevel,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 5689 of file timetableexport.cpp.

                                                                                                                                     {
       QString tmpString;
       tmpString+="    <table border=\"1\">\n";  
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+tr("All Activities")+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                     if(activitiesAtTime[day][hour].isEmpty()){
                            if(breakDayHour[day][hour] && PRINT_BREAK_TIME_SLOTS){
                                   tmpString+=writeBreakSlot(htmlLevel, "");
                            } else {
                                   tmpString+=writeEmpty(htmlLevel);
                            }
                     } else {
                            tmpString+=writeActivitiesStudents(htmlLevel, activitiesAtTime[day][hour], printActivityTags);
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="      <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleAllActivitiesTimetableDaysVerticalHtml ( int  htmlLevel,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 5737 of file timetableexport.cpp.

                                                                                                                                   {
       QString tmpString;
       tmpString+="    <table border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+tr("All Activities")+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     if(activitiesAtTime[day][hour].isEmpty()){
                            if(breakDayHour[day][hour] && PRINT_BREAK_TIME_SLOTS){
                                   tmpString+=writeBreakSlot(htmlLevel, "");
                            } else {
                                   tmpString+=writeEmpty(htmlLevel);
                            }
                     } else {
                            tmpString+=writeActivitiesStudents(htmlLevel, activitiesAtTime[day][hour], printActivityTags);
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="      <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleAllActivitiesTimetableTimeHorizontalDailyHtml ( int  htmlLevel,
int  day,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 5935 of file timetableexport.cpp.

                                                                                                                                                   {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day])+"\" border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";
       tmpString+="<th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="</tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
              
       tmpString+="        <tr>\n";
       if(htmlLevel>=2)
              tmpString+="          <th class=\"yAxis\">";
       else
              tmpString+="          <th>";
       tmpString+=tr("All Activities")+"</th>\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(activitiesAtTime[day][hour].isEmpty()){
                     if(breakDayHour[day][hour] && PRINT_BREAK_TIME_SLOTS){
                            tmpString+=writeBreakSlot(htmlLevel, "");
                     } else {
                            tmpString+=writeEmpty(htmlLevel);
                     }
              } else {
                     tmpString+=writeActivitiesStudents(htmlLevel, activitiesAtTime[day][hour], printActivityTags);
              }
       }
       tmpString+="        </tr>\n";
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleAllActivitiesTimetableTimeHorizontalHtml ( int  htmlLevel,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 5833 of file timetableexport.cpp.

                                                                                                                                     {

       QString tmpString;
       tmpString+="    <table border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              tmpString+="<th colspan=\""+QString::number(gt.rules.nHoursPerDay) +"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="</tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay*gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
              
       tmpString+="        <tr>\n";
       if(htmlLevel>=2)
              tmpString+="          <th class=\"yAxis\">";
       else
              tmpString+="          <th>";
       tmpString+=tr("All Activities")+"</th>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     if(activitiesAtTime[day][hour].isEmpty()){
                            if(breakDayHour[day][hour] && PRINT_BREAK_TIME_SLOTS){
                                   tmpString+=writeBreakSlot(htmlLevel, "");
                            } else {
                                   tmpString+=writeEmpty(htmlLevel);
                            }
                     } else {
                            tmpString+=writeActivitiesStudents(htmlLevel, activitiesAtTime[day][hour], printActivityTags);
                     }
              }
       }
       tmpString+="        </tr>\n";
       //workaround begin.
       tmpString+="      <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay*gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleAllActivitiesTimetableTimeVerticalDailyHtml ( int  htmlLevel,
int  day,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 5887 of file timetableexport.cpp.

                                                                                                                                                 {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day])+"\" border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       if(htmlLevel>=2)
              tmpString+="          <th class=\"xAxis\">";
       else
              tmpString+="          <th>";
       tmpString+=tr("All Activities");
       tmpString+="</th></tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td>"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";

       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              tmpString+="        <tr>\n";
              if(hour==0)
                     tmpString+="        <th rowspan=\""+QString::number(gt.rules.nHoursPerDay)+ "\">"+protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
              else tmpString+="          <!-- span -->\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              if(activitiesAtTime[day][hour].isEmpty()){
                     if(breakDayHour[day][hour] && PRINT_BREAK_TIME_SLOTS){
                            tmpString+=writeBreakSlot(htmlLevel, "");
                     } else {
                            tmpString+=writeEmpty(htmlLevel);
                     }
              } else {
                     tmpString+=writeActivitiesStudents(htmlLevel, activitiesAtTime[day][hour], printActivityTags);
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td colspan=\"2\"></td><td>"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleAllActivitiesTimetableTimeVerticalHtml ( int  htmlLevel,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 5786 of file timetableexport.cpp.

                                                                                                                                   {
QString tmpString;
       tmpString+="    <table border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       if(htmlLevel>=2)
              tmpString+="          <th class=\"xAxis\">";
       else
              tmpString+="          <th>";
       tmpString+=tr("All Activities");
       tmpString+="</th></tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td>"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     tmpString+="        <tr>\n";
                     if(hour==0)
                            tmpString+="        <th rowspan=\""+QString::number(gt.rules.nHoursPerDay)+ "\">"+protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
                     else tmpString+="          <!-- span -->\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
                     if(activitiesAtTime[day][hour].isEmpty()){
                            if(breakDayHour[day][hour] && PRINT_BREAK_TIME_SLOTS){
                                   tmpString+=writeBreakSlot(htmlLevel, "");
                            } else {
                                   tmpString+=writeEmpty(htmlLevel);
                            }
                     } else {
                            tmpString+=writeActivitiesStudents(htmlLevel, activitiesAtTime[day][hour], printActivityTags);
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="      <tr class=\"foot\"><td colspan=\"2\"></td><td>"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleGroupsTimetableDaysHorizontalHtml ( int  htmlLevel,
int  group,
const QString &  saveTime,
bool  printActivityTags,
bool  detailed 
) [static]

Definition at line 4777 of file timetableexport.cpp.

                                                                                                                                                        {
       assert(group>=0);
       assert(group<gt.rules.internalGroupsList.size());
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashStudentIDsTimetable.value(gt.rules.internalGroupsList[group]->name);
       if(detailed) tmpString+="_DETAILED";
       tmpString+="\" border=\"1\"";
       if(group%2) tmpString+=" class=\"even_table\"";
       else tmpString+=" class=\"odd_table\"";
       tmpString+=">\n";
                     
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+protect2(gt.rules.internalGroupsList[group]->name)+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                     QList<int> allActivities;
                     allActivities.clear();
                     bool isNotAvailable=true;
                     for(int sg=0; sg<gt.rules.internalGroupsList[group]->subgroupsList.size(); sg++){
                            StudentsSubgroup* sts=gt.rules.internalGroupsList[group]->subgroupsList[sg];
                            int subgroup=sts->indexInInternalSubgroupsList;
                            if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour])))
                                   allActivities<<students_timetable_weekly[subgroup][day][hour];
                            if(!subgroupNotAvailableDayHour[subgroup][day][hour])
                                   isNotAvailable=false;
                            }
                     assert(!allActivities.isEmpty());
                     bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                     if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                            tmpString+=writeActivityStudents(htmlLevel, allActivities[0], day, hour, isNotAvailable, false, true, printActivityTags);
                     } else{
                            if(!detailed) tmpString+="          <td>"+protect2(STRING_SEVERAL_ACTIVITIES_IN_LESS_DETAILED_TABLES)+"</td>\n";
                            else{
                                   tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                            }
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleGroupsTimetableDaysVerticalHtml ( int  htmlLevel,
int  group,
const QString &  saveTime,
bool  printActivityTags,
bool  detailed 
) [static]

Definition at line 4845 of file timetableexport.cpp.

                                                                                                                                                      {
       assert(group>=0);
       assert(group<gt.rules.internalGroupsList.size());
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashStudentIDsTimetable.value(gt.rules.internalGroupsList.at(group)->name);
       if(detailed) tmpString+="_DETAILED";
       tmpString+="\" border=\"1\"";
       if(group%2) tmpString+=" class=\"even_table\"";
       else tmpString+=" class=\"odd_table\"";
       tmpString+=">\n";
                     
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.internalGroupsList.at(group)->name)+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     QList<int> allActivities;
                     allActivities.clear();
                     bool isNotAvailable=true;
                     for(int sg=0; sg<gt.rules.internalGroupsList.at(group)->subgroupsList.size(); sg++){
                            StudentsSubgroup* sts=gt.rules.internalGroupsList.at(group)->subgroupsList[sg];
                            int subgroup=sts->indexInInternalSubgroupsList;
                            if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour])))
                                   allActivities<<students_timetable_weekly[subgroup][day][hour];
                            if(!subgroupNotAvailableDayHour[subgroup][day][hour])
                                   isNotAvailable=false;
                     }
                     assert(!allActivities.isEmpty());
                     bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                     if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                            tmpString+=writeActivityStudents(htmlLevel, allActivities[0], day, hour, isNotAvailable, true, false, printActivityTags);
                     } else{
                            if(!detailed) tmpString+="          <td>"+protect2(STRING_SEVERAL_ACTIVITIES_IN_LESS_DETAILED_TABLES)+"</td>\n";
                            else{
                                   tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                            }
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleGroupsTimetableTimeHorizontalDailyHtml ( int  htmlLevel,
int  day,
int  maxGroups,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags,
bool  detailed 
) [static]

Definition at line 5144 of file timetableexport.cpp.

                                                                                                                                                                                                    {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day]);
       if(detailed) tmpString+="_DETAILED";
       tmpString+="\" border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";
       tmpString+="<th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="</tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       
       int currentCount=0;
       for(int group=0; group<gt.rules.internalGroupsList.size() && currentCount<maxGroups; group++){
              if(!excludedNames.contains(group)){
                     currentCount++;
                     excludedNames<<group;

                     tmpString+="        <tr>\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.internalGroupsList.at(group)->name)+"</th>\n";
                     for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                            QList<int> allActivities;
                            allActivities.clear();
                            bool isNotAvailable=true;
                            for(int sg=0; sg<gt.rules.internalGroupsList.at(group)->subgroupsList.size(); sg++){
                                   StudentsSubgroup* sts=gt.rules.internalGroupsList.at(group)->subgroupsList[sg];
                                   int subgroup=sts->indexInInternalSubgroupsList;
                                   if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour])))
                                          allActivities<<students_timetable_weekly[subgroup][day][hour];
                                   if(!subgroupNotAvailableDayHour[subgroup][day][hour])
                                          isNotAvailable=false;
                            }
                            assert(!allActivities.isEmpty());
                            bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                            if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                   tmpString+=writeActivityStudents(htmlLevel, allActivities[0], day, hour, isNotAvailable, true, false, printActivityTags);
                            } else{
                                   if(!detailed) tmpString+="          <td>"+protect2(STRING_SEVERAL_ACTIVITIES_IN_LESS_DETAILED_TABLES)+"</td>\n";
                                   else{
                                          tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                                   }
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleGroupsTimetableTimeHorizontalHtml ( int  htmlLevel,
int  maxGroups,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags,
bool  detailed 
) [static]

Definition at line 4991 of file timetableexport.cpp.

                                                                                                                                                                                      {
       QString tmpString;
       tmpString+="    <table id=\"table";
       if(!detailed)
              tmpString+="_LESS";
       tmpString+="_DETAILED";
       tmpString+="\" border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              tmpString+="<th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="</tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nDaysPerWeek*gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       
       int currentCount=0;
       for(int group=0; group<gt.rules.internalGroupsList.size() && currentCount<maxGroups; group++){
              if(!excludedNames.contains(group)){
                     currentCount++;
                     excludedNames<<group;

                     tmpString+="        <tr>\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.internalGroupsList.at(group)->name)+"</th>\n";
                     for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                            for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                                   QList<int> allActivities;
                                   allActivities.clear();
                                   bool isNotAvailable=true;
                                   for(int sg=0; sg<gt.rules.internalGroupsList.at(group)->subgroupsList.size(); sg++){
                                          StudentsSubgroup* sts=gt.rules.internalGroupsList.at(group)->subgroupsList[sg];
                                          int subgroup=sts->indexInInternalSubgroupsList;
                                          if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour])))
                                                 allActivities<<students_timetable_weekly[subgroup][day][hour];
                                          if(!subgroupNotAvailableDayHour[subgroup][day][hour])
                                                 isNotAvailable=false;
                                   }
                                   assert(!allActivities.isEmpty());
                                   bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                                   if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                          tmpString+=writeActivityStudents(htmlLevel, allActivities[0], day, hour, isNotAvailable, true, false, printActivityTags);
                                   } else{
                                          if(!detailed) tmpString+="          <td>"+protect2(STRING_SEVERAL_ACTIVITIES_IN_LESS_DETAILED_TABLES)+"</td>\n";
                                          else{
                                                 tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                                          }
                                   }
                            }
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nDaysPerWeek*gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleGroupsTimetableTimeVerticalDailyHtml ( int  htmlLevel,
int  day,
int  maxGroups,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags,
bool  detailed 
) [static]

Definition at line 5068 of file timetableexport.cpp.

                                                                                                                                                                                                  {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day]);
       if(detailed) tmpString+="_DETAILED";
       tmpString+="\" border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       int currentCount=0;
       for(int group=0; group<gt.rules.internalGroupsList.size() && currentCount<maxGroups; group++){
              if(!excludedNames.contains(group)){
                     currentCount++;
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalGroupsList.at(group)->name+"</th>";
              }
       }
       
       tmpString+="</tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              currentCount=0;
              tmpString+="        <tr>\n";
              if(hour==0)
                     tmpString+="        <th rowspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">" + protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
              else tmpString+="          <!-- span -->\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              for(int group=0; group<gt.rules.internalGroupsList.size() && currentCount<maxGroups; group++){
                     if(!excludedNames.contains(group)){
                            currentCount++;
                            if(hour+1==gt.rules.nHoursPerDay)
                                   excludedNames<<group;
                            QList<int> allActivities;
                            allActivities.clear();
                            bool isNotAvailable=true;
                            for(int sg=0; sg<gt.rules.internalGroupsList.at(group)->subgroupsList.size(); sg++){
                                   StudentsSubgroup* sts=gt.rules.internalGroupsList.at(group)->subgroupsList[sg];
                                   int subgroup=sts->indexInInternalSubgroupsList;
                                   if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour])))
                                          allActivities<<students_timetable_weekly[subgroup][day][hour];
                                   if(!subgroupNotAvailableDayHour[subgroup][day][hour])
                                          isNotAvailable=false;
                            }
                            assert(!allActivities.isEmpty());
                            bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                            if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                   tmpString+=writeActivityStudents(htmlLevel, allActivities[0], day, hour, isNotAvailable, false, true, printActivityTags);
                            } else{
                                   if(!detailed) tmpString+="          <td>"+protect2(STRING_SEVERAL_ACTIVITIES_IN_LESS_DETAILED_TABLES)+"</td>\n";
                                   else{
                                          tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                                   }
                            }
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleGroupsTimetableTimeVerticalHtml ( int  htmlLevel,
int  maxGroups,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags,
bool  detailed 
) [static]

Definition at line 4913 of file timetableexport.cpp.

                                                                                                                                                                                    {
       QString tmpString;
       tmpString+="    <table id=\"table";
       if(!detailed)
              tmpString+="_LESS";
       tmpString+="_DETAILED";
       tmpString+="\" border=\"1\">\n";
              tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
              tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       int currentCount=0;
       for(int group=0; group<gt.rules.internalGroupsList.size() && currentCount<maxGroups; group++){
              if(!excludedNames.contains(group)){
                     currentCount++;
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.internalGroupsList.at(group)->name)+"</th>";
              }
       }
       
       tmpString+="</tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     currentCount=0;
                     tmpString+="        <tr>\n";
                     if(hour==0)
                            tmpString+="        <th rowspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
                     else tmpString+="          <!-- span -->\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
                     for(int group=0; group<gt.rules.internalGroupsList.size() && currentCount<maxGroups; group++){
                            if(!excludedNames.contains(group)){
                                   currentCount++;
                                   if(day+1==gt.rules.nDaysPerWeek && hour+1==gt.rules.nHoursPerDay)
                                          excludedNames<<group;
                                   QList<int> allActivities;
                                   allActivities.clear();
                                   bool isNotAvailable=true;
                                   for(int sg=0; sg<gt.rules.internalGroupsList.at(group)->subgroupsList.size(); sg++){
                                          StudentsSubgroup* sts=gt.rules.internalGroupsList.at(group)->subgroupsList[sg];
                                          int subgroup=sts->indexInInternalSubgroupsList;
                                          if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour])))
                                                 allActivities<<students_timetable_weekly[subgroup][day][hour];
                                          if(!subgroupNotAvailableDayHour[subgroup][day][hour])
                                                 isNotAvailable=false;
                                   }
                                   assert(!allActivities.isEmpty());
                                   bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                                   if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                          tmpString+=writeActivityStudents(htmlLevel, allActivities[0], day, hour, isNotAvailable, false, true, printActivityTags);
                                   } else{
                                          if(!detailed) tmpString+="          <td>"+protect2(STRING_SEVERAL_ACTIVITIES_IN_LESS_DETAILED_TABLES)+"</td>\n";
                                          else{
                                                 tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                                          }
                                   }
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleRoomsTimetableDaysHorizontalHtml ( int  htmlLevel,
int  room,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6343 of file timetableexport.cpp.

                                                                                                                                       {
       assert(room>=0);
       assert(room<gt.rules.nInternalRooms);
       QString tmpString;
       QString room_name = gt.rules.internalRoomsList[room]->name;
       tmpString+="    <table id=\"table_"+hashRoomIDsTimetable.value(room_name)+"\" border=\"1\"";
       if(room%2==0)  tmpString+=" class=\"odd_table\"";
       else tmpString+=" class=\"even_table\"";
       tmpString+=">\n";

       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+protect2(room_name)+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                     QList<int> allActivities;
                     allActivities.clear();
                     allActivities<<rooms_timetable_weekly[room][day][hour];
                     bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                     if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                            tmpString+=writeActivityRoom(htmlLevel, room, day, hour, false, true, printActivityTags);
                     } else {
                            tmpString+=writeActivitiesRooms(htmlLevel, allActivities, printActivityTags);
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleRoomsTimetableDaysVerticalHtml ( int  htmlLevel,
int  room,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6399 of file timetableexport.cpp.

                                                                                                                                     {
       assert(room>=0);
       assert(room<gt.rules.nInternalRooms);
       QString tmpString;
       QString room_name = gt.rules.internalRoomsList[room]->name;
       tmpString+="    <table id=\"table_"+hashRoomIDsTimetable.value(room_name)+"\" border=\"1\"";
       if(room%2==0)  tmpString+=" class=\"odd_table\"";
       else tmpString+=" class=\"even_table\"";
       tmpString+=">\n";
       
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n";
       tmpString+="        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(room_name)+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     QList<int> allActivities;
                     allActivities.clear();
                     allActivities<<rooms_timetable_weekly[room][day][hour];
                     bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                     if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                            tmpString+=writeActivityRoom(htmlLevel, room, day, hour, true, false, printActivityTags);
                     } else {
                            tmpString+=writeActivitiesRooms(htmlLevel, allActivities, printActivityTags);
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleRoomsTimetableTimeHorizontalDailyHtml ( int  htmlLevel,
int  day,
int  maxRooms,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6642 of file timetableexport.cpp.

                                                                                                                                                                                   {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day])+"\" border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";
       tmpString+="<th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="</tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       int currentCount=0;
       for(int room=0; room<gt.rules.nInternalRooms && currentCount<maxRooms; room++){
              if(!excludedNames.contains(room)){
                     currentCount++;
                     excludedNames<<room;
                     tmpString+="        <tr>\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalRoomsList[room]->name+"</th>\n";
                     for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                            QList<int> allActivities;
                            allActivities.clear();
                            allActivities<<rooms_timetable_weekly[room][day][hour];
                            bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                            if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                   tmpString+=writeActivityRoom(htmlLevel, room, day, hour, true, false, printActivityTags);
                            } else {
                                   tmpString+=writeActivitiesRooms(htmlLevel, allActivities, printActivityTags);
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleRoomsTimetableTimeHorizontalHtml ( int  htmlLevel,
int  maxRooms,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6518 of file timetableexport.cpp.

                                                                                                                                                                     {
       QString tmpString;
       tmpString+="    <table border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              tmpString+="<th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="</tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour]) + "</th>\n";
              }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay*gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       int currentCount=0;
       for(int room=0; room<gt.rules.nInternalRooms && currentCount<maxRooms; room++){
              if(!excludedNames.contains(room)){
                     currentCount++;
                     excludedNames<<room;

                     tmpString+="        <tr>\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalRoomsList[room]->name+"</th>\n";
                     for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                            for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                                   QList<int> allActivities;
                                   allActivities.clear();
                                   allActivities<<rooms_timetable_weekly[room][day][hour];
                                   bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                                   if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                          tmpString+=writeActivityRoom(htmlLevel, room, day, hour, true, false, printActivityTags);
                                   } else {
                                          tmpString+=writeActivitiesRooms(htmlLevel, allActivities, printActivityTags);
                                   }
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="      <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay*gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n    </table>\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleRoomsTimetableTimeVerticalDailyHtml ( int  htmlLevel,
int  day,
int  maxRooms,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6579 of file timetableexport.cpp.

                                                                                                                                                                                 {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day])+"\" border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       int currentCount=0;
       for(int room=0; room<gt.rules.nInternalRooms && currentCount<maxRooms; room++){
              if(!excludedNames.contains(room)){
                     currentCount++;
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalRoomsList[room]->name+"</th>";
              }
       }
       tmpString+="</tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";

       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              tmpString+="        <tr>\n";
              if(hour==0)
                     tmpString+="        <th rowspan=\""+QString::number(gt.rules.nHoursPerDay)+ "\">"+protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
              else tmpString+="          <!-- span -->\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              currentCount=0;
              for(int room=0; room<gt.rules.nInternalRooms && currentCount<maxRooms; room++){
                     if(!excludedNames.contains(room)){
                            currentCount++;
                            if(hour+1==gt.rules.nHoursPerDay)
                                   excludedNames<<room;
                            QList<int> allActivities;
                            allActivities.clear();
                            allActivities<<rooms_timetable_weekly[room][day][hour];
                            bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                            if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                   tmpString+=writeActivityRoom(htmlLevel, room, day, hour, false, true, printActivityTags);
                            } else {
                                   tmpString+=writeActivitiesRooms(htmlLevel, allActivities, printActivityTags);
                            }
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleRoomsTimetableTimeVerticalHtml ( int  htmlLevel,
int  maxRooms,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6457 of file timetableexport.cpp.

                                                                                                                                                                   {
       QString tmpString;
       tmpString+="    <table border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       int currentCount=0;
       for(int room=0; room<gt.rules.nInternalRooms && currentCount<maxRooms; room++){
              if(!excludedNames.contains(room)){
                     currentCount++;
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalRoomsList[room]->name+"</th>";     
              }
       }
       tmpString+="</tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     tmpString+="        <tr>\n";
                     if(hour==0)
                            tmpString+="        <th rowspan=\""+QString::number(gt.rules.nHoursPerDay)+ "\">"+protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
                     else tmpString+="          <!-- span -->\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
                     currentCount=0;
                     for(int room=0; room<gt.rules.nInternalRooms && currentCount<maxRooms; room++){
                            if(!excludedNames.contains(room)){
                                   currentCount++;
                                   if(day+1==gt.rules.nDaysPerWeek && hour+1==gt.rules.nHoursPerDay)
                                          excludedNames<<room;
                                   QList<int> allActivities;
                                   allActivities.clear();
                                   allActivities<<rooms_timetable_weekly[room][day][hour];
                                   bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                                   if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                          tmpString+=writeActivityRoom(htmlLevel, room, day, hour, false, true, printActivityTags);
                                   } else {
                                          tmpString+=writeActivitiesRooms(htmlLevel, allActivities, printActivityTags);
                                   }
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="      <tr class=\"foot\"><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n    </table>\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleSubgroupsTimetableDaysHorizontalHtml ( int  htmlLevel,
int  subgroup,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 4422 of file timetableexport.cpp.

                                                                                                                                               {
       assert(subgroup>=0);
       assert(subgroup<gt.rules.nInternalSubgroups);
       QString tmpString;
       QString subgroup_name = gt.rules.internalSubgroupsList[subgroup]->name;
       tmpString+="    <table id=\"table_"+hashStudentIDsTimetable.value(subgroup_name)+"\" border=\"1\"";
       if(subgroup%2==0) tmpString+=" class=\"odd_table\"";
       else tmpString+=" class=\"even_table\"";
       tmpString+=">\n";
              
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+protect2(subgroup_name)+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
       tmpString+="        <tr>\n";
       if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                     QList<int> allActivities;
                     allActivities.clear();
                     allActivities<<students_timetable_weekly[subgroup][day][hour];
                     bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                     if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                            tmpString+=writeActivityStudents(htmlLevel, students_timetable_weekly[subgroup][day][hour], day, hour, subgroupNotAvailableDayHour[subgroup][day][hour], false, true, printActivityTags);
                     } else{
                            tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleSubgroupsTimetableDaysVerticalHtml ( int  htmlLevel,
int  subgroup,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 4477 of file timetableexport.cpp.

                                                                                                                                             {
       assert(subgroup>=0);
       assert(subgroup<gt.rules.nInternalSubgroups);
       QString tmpString;
       QString subgroup_name = gt.rules.internalSubgroupsList[subgroup]->name;
       tmpString+="    <table id=\"table_"+hashStudentIDsTimetable.value(subgroup_name)+"\" border=\"1\"";
       if(subgroup%2==0) tmpString+=" class=\"odd_table\"";
       else tmpString+=" class=\"even_table\"";
       tmpString+=">\n";
       
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
              tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(subgroup_name)+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
                     for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     QList<int> allActivities;
                     allActivities.clear();
                     allActivities<<students_timetable_weekly[subgroup][day][hour];
                     bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                     if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                            tmpString+=writeActivityStudents(htmlLevel, students_timetable_weekly[subgroup][day][hour], day, hour, subgroupNotAvailableDayHour[subgroup][day][hour], true, false, printActivityTags);
                     } else{
                            tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleSubgroupsTimetableTimeHorizontalDailyHtml ( int  htmlLevel,
int  day,
int  maxSubgroups,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 4718 of file timetableexport.cpp.

                                                                                                                                                                                           {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day])+"\" border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       
       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";
       tmpString+="<th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="        </tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       int currentCount=0;
       for(int subgroup=0; subgroup<gt.rules.nInternalSubgroups && currentCount<maxSubgroups; subgroup++){
              if(!excludedNames.contains(subgroup)){
                     currentCount++;
                     excludedNames<<subgroup;

                     tmpString+="        <tr>\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalSubgroupsList[subgroup]->name+"</th>\n";
                     for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                            QList<int> allActivities;
                            allActivities.clear();
                            allActivities<<students_timetable_weekly[subgroup][day][hour];
                            bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                            if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                   tmpString+=writeActivityStudents(htmlLevel, students_timetable_weekly[subgroup][day][hour], day, hour, subgroupNotAvailableDayHour[subgroup][day][hour], true, false, printActivityTags);
                            } else{
                                   tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleSubgroupsTimetableTimeHorizontalHtml ( int  htmlLevel,
int  maxSubgroups,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 4595 of file timetableexport.cpp.

                                                                                                                                                                             {
       QString tmpString;
       tmpString+="    <table border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              tmpString+="<th colspan=\"" +QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="        </tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay*gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       
       int currentCount=0;
       for(int subgroup=0; subgroup<gt.rules.nInternalSubgroups && currentCount<maxSubgroups; subgroup++){
              if(!excludedNames.contains(subgroup)){
                     currentCount++;
                     excludedNames<<subgroup;
                     tmpString+="        <tr>\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalSubgroupsList[subgroup]->name+"</th>\n";
                     for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                            for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                                   QList<int> allActivities;
                                   allActivities.clear();
                                   allActivities<<students_timetable_weekly[subgroup][day][hour];
                                   bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                                   if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                          tmpString+=writeActivityStudents(htmlLevel, students_timetable_weekly[subgroup][day][hour], day, hour, subgroupNotAvailableDayHour[subgroup][day][hour], true, false, printActivityTags);
                                   } else{
                                          tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                                   }
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="      <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay*gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n    </table>\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleSubgroupsTimetableTimeVerticalDailyHtml ( int  htmlLevel,
int  day,
int  maxSubgroups,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 4655 of file timetableexport.cpp.

                                                                                                                                                                                         {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day])+"\" border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       
       tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       int currentCount=0;
       for(int subgroup=0; subgroup<gt.rules.nInternalSubgroups && currentCount<maxSubgroups; subgroup++){
              if(!excludedNames.contains(subgroup)){
                     currentCount++;
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalSubgroupsList[subgroup]->name+"</th>";
              }
       }
       tmpString+="</tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              tmpString+="        <tr>\n";
              if(hour==0)
                     tmpString+="        <th rowspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
              else tmpString+="          <!-- span -->\n";
                     if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              currentCount=0;
              for(int subgroup=0; subgroup<gt.rules.nInternalSubgroups && currentCount<maxSubgroups; subgroup++){
                     if(!excludedNames.contains(subgroup)){
                            currentCount++;
                            if(hour+1==gt.rules.nHoursPerDay)
                                   excludedNames<<subgroup;
                            QList<int> allActivities;
                            allActivities.clear();
                            allActivities<<students_timetable_weekly[subgroup][day][hour];
                            bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                            if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                   tmpString+=writeActivityStudents(htmlLevel, students_timetable_weekly[subgroup][day][hour], day, hour, subgroupNotAvailableDayHour[subgroup][day][hour], false, true, printActivityTags);
                            } else{
                                   tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                            }
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleSubgroupsTimetableTimeVerticalHtml ( int  htmlLevel,
int  maxSubgroups,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 4532 of file timetableexport.cpp.

                                                                                                                                                                           {
       QString tmpString;
       tmpString+="    <table border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       
       int currentCount=0;
       for(int subgroup=0; subgroup<gt.rules.nInternalSubgroups && currentCount<maxSubgroups; subgroup++){
              if(!excludedNames.contains(subgroup)){
                     currentCount++;
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalSubgroupsList[subgroup]->name+"</th>";
              }
       }
       tmpString+="</tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     tmpString+="        <tr>\n";
                     if(hour==0)
                            tmpString+="        <th rowspan=\"" +QString::number(gt.rules.nHoursPerDay)+"\">"+protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
                     else tmpString+="          <!-- span -->\n";

                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
                     currentCount=0;
                     for(int subgroup=0; subgroup<gt.rules.nInternalSubgroups && currentCount<maxSubgroups; subgroup++){
                            if(!excludedNames.contains(subgroup)){
                                   currentCount++;
                                   if(day+1==gt.rules.nDaysPerWeek && hour+1==gt.rules.nHoursPerDay)
                                          excludedNames<<subgroup;
                                   QList<int> allActivities;
                                   allActivities.clear();
                                   allActivities<<students_timetable_weekly[subgroup][day][hour];
                                   bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                                   if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                          tmpString+=writeActivityStudents(htmlLevel, students_timetable_weekly[subgroup][day][hour], day, hour, subgroupNotAvailableDayHour[subgroup][day][hour], false, true, printActivityTags);
                                   } else{
                                          tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                                   }
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="      <tr class=\"foot\"><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n    </table>\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleSubjectsTimetableDaysHorizontalHtml ( int  htmlLevel,
int  subject,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6700 of file timetableexport.cpp.

                                                                                                                                             {
       assert(subject>=0);
       assert(subject<gt.rules.nInternalSubjects);
       QString tmpString;
       for(int d=0; d<gt.rules.nDaysPerWeek; d++)
              for(int h=0; h<gt.rules.nHoursPerDay; h++)
                     activitiesForCurrentSubject[d][h].clear();
       foreach(int ai, gt.rules.activitiesForSubject[subject])
              if(best_solution.times[ai]!=UNALLOCATED_TIME){
                     int d=best_solution.times[ai]%gt.rules.nDaysPerWeek;
                     int h=best_solution.times[ai]/gt.rules.nDaysPerWeek;
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     for(int dd=0; dd < act->duration && h+dd < gt.rules.nHoursPerDay; dd++)
                            activitiesForCurrentSubject[d][h+dd].append(ai);
              }
       tmpString+="    <table id=\"table_"+hashSubjectIDsTimetable.value(gt.rules.internalSubjectsList[subject]->name);
       tmpString+="\" border=\"1\"";
       if(subject%2==0)  tmpString+=" class=\"odd_table\"";
       else tmpString+=" class=\"even_table\"";
       tmpString+=">\n";

       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+protect2(gt.rules.internalSubjectsList[subject]->name)+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                     QList<int> allActivities;
                     
                     allActivities=activitiesForCurrentSubject[day][hour];
                     
                     /*
                     allActivities.clear();
                     //Now get the activitiy ids. I don't run through the InternalActivitiesList, even that is faster. I run through subgroupsList, because by that the activites are sorted by that in the html-table.
                     for(int subgroup=0; subgroup<gt.rules.nInternalSubgroups; subgroup++){
                            if(students_timetable_weekly[subgroup][day][hour]!=UNALLOCATED_ACTIVITY){
                                   Activity* act=&gt.rules.internalActivitiesList[students_timetable_weekly[subgroup][day][hour]];
                                   if(act->subjectName==gt.rules.internalSubjectsList[subject]->name)
                                          if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour]))){
                                                 allActivities+students_timetable_weekly[subgroup][day][hour];
                                          }
                            }
                     }
                     //Now run through the teachers timetable, because activities without a students set are still missing.
                     for(int teacher=0; teacher<gt.rules.nInternalTeachers; teacher++){
                            if(teachers_timetable_weekly[teacher][day][hour]!=UNALLOCATED_ACTIVITY){
                                   Activity* act=&gt.rules.internalActivitiesList[teachers_timetable_weekly[teacher][day][hour]];
                                   if(act->subjectName==gt.rules.internalSubjectsList[subject]->name)
                                          if(!(allActivities.contains(teachers_timetable_weekly[teacher][day][hour]))){
                                                 assert(act->studentsNames.isEmpty());
                                                 allActivities+teachers_timetable_weekly[teacher][day][hour];
                                          }
                            }
                     }*/
                     addActivitiesWithSameStartingTime(allActivities, hour);
                     tmpString+=writeActivitiesSubjects(htmlLevel, allActivities, printActivityTags);
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleSubjectsTimetableDaysVerticalHtml ( int  htmlLevel,
int  subject,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6789 of file timetableexport.cpp.

                                                                                                                                           {
       assert(subject>=0);
       assert(subject<gt.rules.nInternalSubjects);
       QString tmpString;
       for(int d=0; d<gt.rules.nDaysPerWeek; d++)
              for(int h=0; h<gt.rules.nHoursPerDay; h++)
                     activitiesForCurrentSubject[d][h].clear();
       foreach(int ai, gt.rules.activitiesForSubject[subject])
              if(best_solution.times[ai]!=UNALLOCATED_TIME){
                     int d=best_solution.times[ai]%gt.rules.nDaysPerWeek;
                     int h=best_solution.times[ai]/gt.rules.nDaysPerWeek;
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     for(int dd=0; dd < act->duration && h+dd < gt.rules.nHoursPerDay; dd++)
                            activitiesForCurrentSubject[d][h+dd].append(ai);
              }
       tmpString+="    <table id=\"table_"+hashSubjectIDsTimetable.value(gt.rules.internalSubjectsList[subject]->name);
       tmpString+="\" border=\"1\"";
       if(subject%2==0) tmpString+=" class=\"odd_table\"";
       else tmpString+=" class=\"even_table\"";
       tmpString+=">\n";

       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.internalSubjectsList[subject]->name)+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     QList<int> allActivities;

                     allActivities=activitiesForCurrentSubject[day][hour];

                     /*
                     allActivities.clear();
                     //Now get the activitiy ids. I don't run through the InternalActivitiesList, even that is faster. I run through subgroupsList, because by that the activites are sorted by that in the html-table.
                     for(int subgroup=0; subgroup<gt.rules.nInternalSubgroups; subgroup++){
                            if(students_timetable_weekly[subgroup][day][hour]!=UNALLOCATED_ACTIVITY){
                                   Activity* act=&gt.rules.internalActivitiesList[students_timetable_weekly[subgroup][day][hour]];
                                   if(act->subjectName==gt.rules.internalSubjectsList[subject]->name)
                                          if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour]))){
                                                 allActivities+students_timetable_weekly[subgroup][day][hour];
                                          }
                            }
                     }
                     //Now run through the teachers timetable, because activities without a students set are still missing.
                     for(int teacher=0; teacher<gt.rules.nInternalTeachers; teacher++){
                            if(teachers_timetable_weekly[teacher][day][hour]!=UNALLOCATED_ACTIVITY){
                                   Activity* act=&gt.rules.internalActivitiesList[teachers_timetable_weekly[teacher][day][hour]];
                                   if(act->subjectName==gt.rules.internalSubjectsList[subject]->name)
                                          if(!(allActivities.contains(teachers_timetable_weekly[teacher][day][hour]))){
                                                 assert(act->studentsNames.isEmpty());
                                                 allActivities+teachers_timetable_weekly[teacher][day][hour];
                                          }
                            }
                     }
                     */
                     addActivitiesWithSameStartingTime(allActivities, hour);
                     tmpString+=writeActivitiesSubjects(htmlLevel, allActivities, printActivityTags);
              }
       tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleSubjectsTimetableTimeHorizontalDailyHtml ( int  htmlLevel,
int  day,
int  maxSubjects,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 7149 of file timetableexport.cpp.

                                                                                                                                                                                         {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day])+"\" border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";

       tmpString+="<th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="</tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       int currentCount=0;
       for(int subject=0; subject<gt.rules.nInternalSubjects && currentCount<maxSubjects; subject++){
              currentCount++;
              if(!excludedNames.contains(subject)){
                     excludedNames<<subject;
                     tmpString+="        <tr>\n";
                     if(htmlLevel>=2)
                            tmpString+="        <th class=\"yAxis\">"+protect2(gt.rules.internalSubjectsList[subject]->name)+"</th>\n";
                     else
                            tmpString+="        <th>"+protect2(gt.rules.internalSubjectsList[subject]->name)+"</th>\n";

                     for(int d=0; d<gt.rules.nDaysPerWeek; d++)
                            for(int h=0; h<gt.rules.nHoursPerDay; h++)
                                   activitiesForCurrentSubject[d][h].clear();
                     foreach(int ai, gt.rules.activitiesForSubject[subject])
                            if(best_solution.times[ai]!=UNALLOCATED_TIME){
                                   int d=best_solution.times[ai]%gt.rules.nDaysPerWeek;
                                   int h=best_solution.times[ai]/gt.rules.nDaysPerWeek;
                                   Activity* act=&gt.rules.internalActivitiesList[ai];
                                   for(int dd=0; dd < act->duration && h+dd < gt.rules.nHoursPerDay; dd++)
                                          activitiesForCurrentSubject[d][h+dd].append(ai);
                            }

                     for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                            QList<int> allActivities;

                            allActivities=activitiesForCurrentSubject[day][hour];


                            /*allActivities.clear();
                            //Now get the activitiy ids. I don't run through the InternalActivitiesList, even that is faster. I run through subgroupsList, because by that the activites are sorted by that in the html-table.
                            for(int subgroup=0; subgroup<gt.rules.nInternalSubgroups; subgroup++){
                                   if(students_timetable_weekly[subgroup][day][hour]!=UNALLOCATED_ACTIVITY){
                                          Activity* act=&gt.rules.internalActivitiesList[students_timetable_weekly[subgroup][day][hour]];
                                          if(act->subjectName==gt.rules.internalSubjectsList[subject]->name)
                                                 if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour]))){
                                                        allActivities+students_timetable_weekly[subgroup][day][hour];
                                                 }
                                   }
                            }
                            //Now run through the teachers timetable, because activities without a students set are still missing.
                            for(int teacher=0; teacher<gt.rules.nInternalTeachers; teacher++){
                                   if(teachers_timetable_weekly[teacher][day][hour]!=UNALLOCATED_ACTIVITY){
                                          Activity* act=&gt.rules.internalActivitiesList[teachers_timetable_weekly[teacher][day][hour]];
                                          if(act->subjectName==gt.rules.internalSubjectsList[subject]->name)
                                                 if(!(allActivities.contains(teachers_timetable_weekly[teacher][day][hour]))){
                                                        assert(act->studentsNames.isEmpty());
                                                        allActivities+teachers_timetable_weekly[teacher][day][hour];
                                                 }
                                   }
                            }*/
                            addActivitiesWithSameStartingTime(allActivities, hour);
                            tmpString+=writeActivitiesSubjects(htmlLevel, allActivities, printActivityTags);
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleSubjectsTimetableTimeHorizontalHtml ( int  htmlLevel,
int  maxSubjects,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6968 of file timetableexport.cpp.

                                                                                                                                                                           {
       QString tmpString;
       tmpString+="    <table id=\"table\" border=\"1\">\n";

       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";

       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              tmpString+="<th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="</tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay*gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       int currentCount=0;
       for(int subject=0; subject<gt.rules.nInternalSubjects && currentCount<maxSubjects; subject++){
              if(!excludedNames.contains(subject)){     
                     currentCount++;
                     excludedNames<<subject;     
                     tmpString+="        <tr>\n";
                     if(htmlLevel>=2)
                            tmpString+="        <th class=\"yAxis\">"+protect2(gt.rules.internalSubjectsList[subject]->name)+"</th>\n";
                     else
                            tmpString+="        <th>"+protect2(gt.rules.internalSubjectsList[subject]->name)+"</th>\n";

                     for(int d=0; d<gt.rules.nDaysPerWeek; d++)
                            for(int h=0; h<gt.rules.nHoursPerDay; h++)
                                   activitiesForCurrentSubject[d][h].clear();
                     foreach(int ai, gt.rules.activitiesForSubject[subject])
                            if(best_solution.times[ai]!=UNALLOCATED_TIME){
                                   int d=best_solution.times[ai]%gt.rules.nDaysPerWeek;
                                   int h=best_solution.times[ai]/gt.rules.nDaysPerWeek;
                                   Activity* act=&gt.rules.internalActivitiesList[ai];
                                   for(int dd=0; dd < act->duration && h+dd < gt.rules.nHoursPerDay; dd++)
                                          activitiesForCurrentSubject[d][h+dd].append(ai);
                            }

                     for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                            for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                                   QList<int> allActivities;

                                   allActivities=activitiesForCurrentSubject[day][hour];


                                   /*allActivities.clear();
                                   //Now get the activitiy ids. I don't run through the InternalActivitiesList, even that is faster. I run through subgroupsList, because by that the activites are sorted by that in the html-table.
                                   for(int subgroup=0; subgroup<gt.rules.nInternalSubgroups; subgroup++){
                                          if(students_timetable_weekly[subgroup][day][hour]!=UNALLOCATED_ACTIVITY){
                                                 Activity* act=&gt.rules.internalActivitiesList[students_timetable_weekly[subgroup][day][hour]];
                                                 if(act->subjectName==gt.rules.internalSubjectsList[subject]->name)
                                                        if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour]))){
                                                               allActivities+students_timetable_weekly[subgroup][day][hour];
                                                        }
                                          }
                                   }
                                   //Now run through the teachers timetable, because activities without a students set are still missing.
                                   for(int teacher=0; teacher<gt.rules.nInternalTeachers; teacher++){
                                          if(teachers_timetable_weekly[teacher][day][hour]!=UNALLOCATED_ACTIVITY){
                                                 Activity* act=&gt.rules.internalActivitiesList[teachers_timetable_weekly[teacher][day][hour]];
                                                 if(act->subjectName==gt.rules.internalSubjectsList[subject]->name)
                                                        if(!(allActivities.contains(teachers_timetable_weekly[teacher][day][hour]))){
                                                               assert(act->studentsNames.isEmpty());
                                                               allActivities+teachers_timetable_weekly[teacher][day][hour];
                                                        }
                                          }
                                   }*/
                                   addActivitiesWithSameStartingTime(allActivities, hour);
                                   tmpString+=writeActivitiesSubjects(htmlLevel, allActivities, printActivityTags);
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay*gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n    </table>\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleSubjectsTimetableTimeVerticalDailyHtml ( int  htmlLevel,
int  day,
int  maxSubjects,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 7063 of file timetableexport.cpp.

                                                                                                                                                                                       {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day])+"\" border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       int currentCount=0;
       for(int subject=0; subject<gt.rules.nInternalSubjects && currentCount<maxSubjects; subject++){
              if(!excludedNames.contains(subject)){     
                     currentCount++;

                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalSubjectsList[subject]->name+"</th>";
              }
       }
       tmpString+="</tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              tmpString+="        <tr>\n";
              if(hour==0)
                     tmpString+="        <th rowspan=\""+QString::number(gt.rules.nHoursPerDay)+ "\">"+protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
              else tmpString+="          <!-- span -->\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";

              currentCount=0;
              for(int subject=0; subject<gt.rules.nInternalSubjects && currentCount<maxSubjects; subject++){
                     currentCount++;
                     if(!excludedNames.contains(subject)){     
                            if(hour+1==gt.rules.nHoursPerDay)
                                   excludedNames<<subject;     
                            QList<int> allActivities;
                            allActivities.clear();
                            
                            foreach(int ai, gt.rules.activitiesForSubject[subject])
                                   if(activitiesAtTime[day][hour].contains(ai)){
                                          assert(!allActivities.contains(ai));
                                          allActivities.append(ai);
                                   }
                            
                            /*//Now get the activitiy ids. I don't run through the InternalActivitiesList, even that is faster. I run through subgroupsList, because by that the activites are sorted by that in the html-table.
                            for(int subgroup=0; subgroup<gt.rules.nInternalSubgroups; subgroup++){
                                   if(students_timetable_weekly[subgroup][day][hour]!=UNALLOCATED_ACTIVITY){
                                          Activity* act=&gt.rules.internalActivitiesList[students_timetable_weekly[subgroup][day][hour]];
                                          if(act->subjectName==gt.rules.internalSubjectsList[subject]->name)
                                                 if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour]))){
                                                        allActivities+students_timetable_weekly[subgroup][day][hour];
                                                 }
                                   }
                            }
                            //Now run through the teachers timetable, because activities without a students set are still missing.
                            for(int teacher=0; teacher<gt.rules.nInternalTeachers; teacher++){
                                   if(teachers_timetable_weekly[teacher][day][hour]!=UNALLOCATED_ACTIVITY){
                                          Activity* act=&gt.rules.internalActivitiesList[teachers_timetable_weekly[teacher][day][hour]];
                                          if(act->subjectName==gt.rules.internalSubjectsList[subject]->name)
                                                 if(!(allActivities.contains(teachers_timetable_weekly[teacher][day][hour]))){
                                                        assert(act->studentsNames.isEmpty());
                                                        allActivities+teachers_timetable_weekly[teacher][day][hour];
                                                 }
                                   }
                            }*/
                            addActivitiesWithSameStartingTime(allActivities, hour);
                            tmpString+=writeActivitiesSubjects(htmlLevel, allActivities, printActivityTags);
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleSubjectsTimetableTimeVerticalHtml ( int  htmlLevel,
int  maxSubjects,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6880 of file timetableexport.cpp.

                                                                                                                                                                         {
       QString tmpString;
       tmpString+="    <table id=\"table\" border=\"1\">\n";

       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       int currentCount=0;
       for(int subject=0; subject<gt.rules.nInternalSubjects && currentCount<maxSubjects; subject++){
              if(!excludedNames.contains(subject)){     
                     currentCount++;
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalSubjectsList[subject]->name+"</th>";
              }
       }
              
       tmpString+="</tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";

       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     tmpString+="        <tr>\n";
                     if(hour==0)
                            tmpString+="        <th rowspan=\""+QString::number(gt.rules.nHoursPerDay)+ "\">"+protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
                     else tmpString+="          <!-- span -->\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";

                     currentCount=0;
                     for(int subject=0; subject<gt.rules.nInternalSubjects && currentCount<maxSubjects; subject++){
                            currentCount++;
                            if(!excludedNames.contains(subject)){     
                                   if(day+1==gt.rules.nDaysPerWeek && hour+1==gt.rules.nHoursPerDay)
                                          excludedNames<<subject;     
                                   QList<int> allActivities;
                                   allActivities.clear();
                                   
                                   foreach(int ai, gt.rules.activitiesForSubject[subject])
                                          if(activitiesAtTime[day][hour].contains(ai)){
                                                 assert(!allActivities.contains(ai));
                                                 allActivities.append(ai);
                                          }
                                   
                                   /* //Now get the activitiy ids. I don't run through the InternalActivitiesList, even that is faster. I run through subgroupsList, because by that the activites are sorted by that in the html-table.
                                   for(int subgroup=0; subgroup<gt.rules.nInternalSubgroups; subgroup++){
                                          if(students_timetable_weekly[subgroup][day][hour]!=UNALLOCATED_ACTIVITY){
                                                 Activity* act=&gt.rules.internalActivitiesList[students_timetable_weekly[subgroup][day][hour]];
                                                 if(act->subjectName==gt.rules.internalSubjectsList[subject]->name)
                                                        if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour]))){
                                                               allActivities+students_timetable_weekly[subgroup][day][hour];
                                                        }
                                          }
                                   }
                                   //Now run through the teachers timetable, because activities without a students set are still missing.
                                   for(int teacher=0; teacher<gt.rules.nInternalTeachers; teacher++){
                                          if(teachers_timetable_weekly[teacher][day][hour]!=UNALLOCATED_ACTIVITY){
                                                 Activity* act=&gt.rules.internalActivitiesList[teachers_timetable_weekly[teacher][day][hour]];
                                                 if(act->subjectName==gt.rules.internalSubjectsList[subject]->name)
                                                        if(!(allActivities.contains(teachers_timetable_weekly[teacher][day][hour]))){
                                                               assert(act->studentsNames.isEmpty());
                                                               allActivities+teachers_timetable_weekly[teacher][day][hour];
                                                        }
                                          }
                                   }*/
                                   addActivitiesWithSameStartingTime(allActivities, hour);
                                   tmpString+=writeActivitiesSubjects(htmlLevel, allActivities, printActivityTags);
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n    </table>\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleTeachersFreePeriodsTimetableDaysHorizontalHtml ( int  htmlLevel,
const QString &  saveTime,
bool  detailed 
) [static]

Definition at line 7241 of file timetableexport.cpp.

                                                                                                                                  {
       QString tmpString;
       if(detailed)
              tmpString+="    <table id=\"table_DETAILED\" border=\"1\">\n";
       else
              tmpString+="    <table id=\"table_LESS_DETAILED\" border=\"1\">\n";
       
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       if(detailed)
              tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Teachers' Free Periods")+" ("+tr("Detailed")+")</th></tr>\n";
       else   tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Teachers' Free Periods")+" ("+tr("Less detailed")+")</th></tr>\n";

       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                     bool empty_slot;
                     empty_slot=true;
                     for(int tfp=0; tfp<TEACHERS_FREE_PERIODS_N_CATEGORIES; tfp++){
                            if(teachers_free_periods_timetable_weekly[tfp][day][hour].size()>0){
                                   empty_slot=false;
                            }
                            if(!detailed&&tfp>=TEACHER_MUST_COME_EARLIER) break;
                     }
                     if(!empty_slot) tmpString+="          <td>";
                     for(int tfp=0; tfp<TEACHERS_FREE_PERIODS_N_CATEGORIES; tfp++){
                            if(teachers_free_periods_timetable_weekly[tfp][day][hour].size()>0){
                                   if(htmlLevel>=2)
                                          tmpString+="<div class=\"DESCRIPTION\">";
                                   switch(tfp){
                                          case TEACHER_HAS_SINGLE_GAP        : tmpString+=TimetableExport::tr("Single gap"); break;
                                          case TEACHER_HAS_BORDER_GAP        : tmpString+=TimetableExport::tr("Border gap"); break;
                                          case TEACHER_HAS_BIG_GAP           : tmpString+=TimetableExport::tr("Big gap"); break;
                                          case TEACHER_MUST_COME_EARLIER            : tmpString+=TimetableExport::tr("Must come earlier"); break;
                                          case TEACHER_MUST_STAY_LONGER             : tmpString+=TimetableExport::tr("Must stay longer"); break;
                                          case TEACHER_MUST_COME_MUCH_EARLIER       : tmpString+=TimetableExport::tr("Must come much earlier"); break;
                                          case TEACHER_MUST_STAY_MUCH_LONGER : tmpString+=TimetableExport::tr("Must stay much longer"); break;
                                          case TEACHER_HAS_A_FREE_DAY        : tmpString+=TimetableExport::tr("Free day"); break;
                                          case TEACHER_IS_NOT_AVAILABLE             : tmpString+=TimetableExport::tr("Not available"); break;
                                          default: assert(0==1); break;
                                   }
                                   if(htmlLevel>=2)
                                          tmpString+=":</div>";
                                   else tmpString+=":<br />";
                                   if(htmlLevel>=3)
                                          switch(tfp){
                                                 case TEACHER_HAS_SINGLE_GAP        : tmpString+="<div class=\"TEACHER_HAS_SINGLE_GAP\">"; break;
                                                 case TEACHER_HAS_BORDER_GAP        : tmpString+="<div class=\"TEACHER_HAS_BORDER_GAP\">"; break;
                                                 case TEACHER_HAS_BIG_GAP           : tmpString+="<div class=\"TEACHER_HAS_BIG_GAP\">"; break;
                                                 case TEACHER_MUST_COME_EARLIER            : tmpString+="<div class=\"TEACHER_MUST_COME_EARLIER\">"; break;
                                                 case TEACHER_MUST_STAY_LONGER             : tmpString+="<div class=\"TEACHER_MUST_STAY_LONGER\">"; break;
                                                 case TEACHER_MUST_COME_MUCH_EARLIER       : tmpString+="<div class=\"TEACHER_MUST_COME_MUCH_EARLIER\">"; break;
                                                 case TEACHER_MUST_STAY_MUCH_LONGER : tmpString+="<div class=\"TEACHER_MUST_STAY_MUCH_LONGER\">"; break;
                                                 case TEACHER_HAS_A_FREE_DAY        : tmpString+="<div class=\"TEACHER_HAS_A_FREE_DAY\">"; break;
                                                 case TEACHER_IS_NOT_AVAILABLE             : tmpString+="<div class=\"TEACHER_IS_NOT_AVAILABLE\">"; break;
                                                 default: assert(0==1); break;
                                          }
                                   for(int t=0; t<teachers_free_periods_timetable_weekly[tfp][day][hour].size(); t++){
                                          QString teacher_name = gt.rules.internalTeachersList[teachers_free_periods_timetable_weekly[tfp][day][hour].at(t)]->name;
                                                 switch(htmlLevel){
                                                        case 4 : tmpString+="<span class=\"t_"+hashTeacherIDsTimetable.value(teacher_name)+"\">"+protect2(teacher_name)+"</span>"; break;
                                                        case 5 : ;
                                                        case 6 : tmpString+="<span class=\"t_"+hashTeacherIDsTimetable.value(teacher_name)+"\" onmouseover=\"highlight('t_"+hashTeacherIDsTimetable.value(teacher_name)+"')\">"+protect2(teacher_name)+"</span>"; break;
                                                        default: tmpString+=protect2(teacher_name); break;
                                                 }
                                          tmpString+="<br />";
                                   }
                                   if(htmlLevel>=3)
                                          tmpString+="</div>";
                            }
                            if(!detailed&&tfp>=TEACHER_MUST_COME_EARLIER) break;
                     }
                     if(!empty_slot){
                            tmpString+="</td>\n";
                     } else {
                            tmpString+=writeEmpty(htmlLevel);
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleTeachersFreePeriodsTimetableDaysVerticalHtml ( int  htmlLevel,
const QString &  saveTime,
bool  detailed 
) [static]

Definition at line 7349 of file timetableexport.cpp.

                                                                                                                                {
       QString tmpString;
       if(detailed)
              tmpString+="    <table id=\"table_DETAILED\" border=\"1\">\n";
       else
              tmpString+="    <table id=\"table_LESS_DETAILED\" border=\"1\">\n";
       
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       if(detailed)
              tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Teachers' Free Periods")+" ("+tr("Detailed")+")</th></tr>\n";
       else   tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Teachers' Free Periods")+" ("+tr("Less detailed")+")</th></tr>\n";

       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     bool empty_slot;
                     empty_slot=true;
                     for(int tfp=0; tfp<TEACHERS_FREE_PERIODS_N_CATEGORIES; tfp++){
                            if(teachers_free_periods_timetable_weekly[tfp][day][hour].size()>0){
                                   empty_slot=false;
                            }
                            if(!detailed&&tfp>=TEACHER_MUST_COME_EARLIER) break;
                     }
                     if(!empty_slot) tmpString+="          <td>";
                     for(int tfp=0; tfp<TEACHERS_FREE_PERIODS_N_CATEGORIES; tfp++){
                            if(teachers_free_periods_timetable_weekly[tfp][day][hour].size()>0){
                                   if(htmlLevel>=2)
                                          tmpString+="<div class=\"DESCRIPTION\">";
                                   switch(tfp){
                                          case TEACHER_HAS_SINGLE_GAP        : tmpString+=TimetableExport::tr("Single gap"); break;
                                          case TEACHER_HAS_BORDER_GAP        : tmpString+=TimetableExport::tr("Border gap"); break;
                                          case TEACHER_HAS_BIG_GAP           : tmpString+=TimetableExport::tr("Big gap"); break;
                                          case TEACHER_MUST_COME_EARLIER            : tmpString+=TimetableExport::tr("Must come earlier"); break;
                                          case TEACHER_MUST_STAY_LONGER             : tmpString+=TimetableExport::tr("Must stay longer"); break;
                                          case TEACHER_MUST_COME_MUCH_EARLIER       : tmpString+=TimetableExport::tr("Must come much earlier"); break;
                                          case TEACHER_MUST_STAY_MUCH_LONGER : tmpString+=TimetableExport::tr("Must stay much longer"); break;
                                          case TEACHER_HAS_A_FREE_DAY        : tmpString+=TimetableExport::tr("Free day"); break;
                                          case TEACHER_IS_NOT_AVAILABLE             : tmpString+=TimetableExport::tr("Not available"); break;
                                          default: assert(0==1); break;
                                   }
                                   if(htmlLevel>=2)
                                          tmpString+=":</div>";
                                   else tmpString+=":<br />";
                                   if(htmlLevel>=3)
                                          switch(tfp){
                                                 case TEACHER_HAS_SINGLE_GAP        : tmpString+="<div class=\"TEACHER_HAS_SINGLE_GAP\">"; break;
                                                 case TEACHER_HAS_BORDER_GAP        : tmpString+="<div class=\"TEACHER_HAS_BORDER_GAP\">"; break;
                                                 case TEACHER_HAS_BIG_GAP           : tmpString+="<div class=\"TEACHER_HAS_BIG_GAP\">"; break;
                                                 case TEACHER_MUST_COME_EARLIER            : tmpString+="<div class=\"TEACHER_MUST_COME_EARLIER\">"; break;
                                                 case TEACHER_MUST_STAY_LONGER             : tmpString+="<div class=\"TEACHER_MUST_STAY_LONGER\">"; break;
                                                 case TEACHER_MUST_COME_MUCH_EARLIER       : tmpString+="<div class=\"TEACHER_MUST_COME_MUCH_EARLIER\">"; break;
                                                 case TEACHER_MUST_STAY_MUCH_LONGER : tmpString+="<div class=\"TEACHER_MUST_STAY_MUCH_LONGER\">"; break;
                                                 case TEACHER_HAS_A_FREE_DAY        : tmpString+="<div class=\"TEACHER_HAS_A_FREE_DAY\">"; break;
                                                 case TEACHER_IS_NOT_AVAILABLE             : tmpString+="<div class=\"TEACHER_IS_NOT_AVAILABLE\">"; break;
                                                 default: assert(0==1); break;
                                          }
                                   for(int t=0; t<teachers_free_periods_timetable_weekly[tfp][day][hour].size(); t++){
                                          QString teacher_name = gt.rules.internalTeachersList[teachers_free_periods_timetable_weekly[tfp][day][hour].at(t)]->name;
                                                 switch(htmlLevel){
                                                        case 4 : tmpString+="<span class=\"t_"+hashTeacherIDsTimetable.value(teacher_name)+"\">"+protect2(teacher_name)+"</span>"; break;
                                                        case 5 : ;
                                                        case 6 : tmpString+="<span class=\"t_"+hashTeacherIDsTimetable.value(teacher_name)+"\" onmouseover=\"highlight('t_"+hashTeacherIDsTimetable.value(teacher_name)+"')\">"+protect2(teacher_name)+"</span>"; break;
                                                        default: tmpString+=protect2(teacher_name); break;
                                                 }
                                          tmpString+="<br />";
                                   }
                                   if(htmlLevel>=3)
                                          tmpString+="</div>";
                            }
                            if(!detailed&&tfp>=TEACHER_MUST_COME_EARLIER) break;
                     }
                     if(!empty_slot){
                            tmpString+="</td>\n";
                     } else
                            tmpString+=writeEmpty(htmlLevel);
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleTeachersTimetableDaysHorizontalHtml ( int  htmlLevel,
int  teacher,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 5986 of file timetableexport.cpp.

                                                                                                                                             {
       assert(teacher>=0);
       assert(teacher<gt.rules.nInternalTeachers);
       QString tmpString;
       QString teacher_name = gt.rules.internalTeachersList[teacher]->name;
       tmpString+="    <table id=\"table_"+hashTeacherIDsTimetable.value(teacher_name)+"\" border=\"1\"";
       if(teacher%2==0)  tmpString+=" class=\"odd_table\"";
       else tmpString+=" class=\"even_table\"";
       tmpString+=">\n";
       
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+protect2(teacher_name)+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                     QList<int> allActivities;
                     allActivities.clear();
                     allActivities<<teachers_timetable_weekly[teacher][day][hour];
                     bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                     if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                            tmpString+=writeActivityTeacher(htmlLevel, teacher, day, hour, false, true, printActivityTags);
                     } else{
                            tmpString+=writeActivitiesTeachers(htmlLevel, allActivities, printActivityTags);
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleTeachersTimetableDaysVerticalHtml ( int  htmlLevel,
int  teacher,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6043 of file timetableexport.cpp.

                                                                                                                                           {
       assert(teacher>=0);
       assert(teacher<gt.rules.nInternalTeachers);
       QString tmpString;
       QString teacher_name = gt.rules.internalTeachersList[teacher]->name;
       tmpString+="    <table id=\"table_"+hashTeacherIDsTimetable.value(teacher_name)+"\" border=\"1\"";
       if(teacher%2==0) tmpString+=" class=\"odd_table\"";
       else tmpString+=" class=\"even_table\"";
       tmpString+=">\n";
       
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n";
       tmpString+="        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(teacher_name)+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     QList<int> allActivities;
                     allActivities.clear();
                     allActivities<<teachers_timetable_weekly[teacher][day][hour];
                     bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                     if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                            tmpString+=writeActivityTeacher(htmlLevel, teacher, day, hour, true, false, printActivityTags);
                     } else{
                            tmpString+=writeActivitiesTeachers(htmlLevel, allActivities, printActivityTags);
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleTeachersTimetableTimeHorizontalDailyHtml ( int  htmlLevel,
int  day,
int  maxTeachers,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6284 of file timetableexport.cpp.

                                                                                                                                                                                         {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day])+"\" border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";
       tmpString+="<th colspan=\"" +QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="</tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       int currentCount=0;
       for(int teacher=0; teacher<gt.rules.nInternalTeachers && currentCount<maxTeachers; teacher++){
              if(!excludedNames.contains(teacher)){
                     currentCount++;
                     excludedNames<<teacher;
                     tmpString+="        <tr>\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalTeachersList[teacher]->name+"</th>\n";
              
                     for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                            QList<int> allActivities;
                            allActivities.clear();
                            allActivities<<teachers_timetable_weekly[teacher][day][hour];
                            bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                            if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                   tmpString+=writeActivityTeacher(htmlLevel, teacher, day, hour, true, false, printActivityTags);
                            } else {
                                   tmpString+=writeActivitiesTeachers(htmlLevel, allActivities, printActivityTags);
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleTeachersTimetableTimeHorizontalHtml ( int  htmlLevel,
int  maxTeachers,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6162 of file timetableexport.cpp.

                                                                                                                                                                           {
       QString tmpString;
       tmpString+="    <table border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              tmpString+="<th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="</tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay*gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       int currentCount=0;
       for(int teacher=0; teacher<gt.rules.nInternalTeachers && currentCount<maxTeachers; teacher++){
              if(!excludedNames.contains(teacher)){
                     currentCount++;
                     excludedNames<<teacher;
                     tmpString+="        <tr>\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalTeachersList[teacher]->name+"</th>\n";
                     for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                            for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                                   QList<int> allActivities;
                                   allActivities.clear();
                                   allActivities<<teachers_timetable_weekly[teacher][day][hour];
                                   bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                                   if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                          tmpString+=writeActivityTeacher(htmlLevel, teacher, day, hour, true, false, printActivityTags);
                                   } else {
                                          tmpString+=writeActivitiesTeachers(htmlLevel, allActivities, printActivityTags);
                                   }
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="      <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay*gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n    </table>\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleTeachersTimetableTimeVerticalDailyHtml ( int  htmlLevel,
int  day,
int  maxTeachers,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6221 of file timetableexport.cpp.

                                                                                                                                                                                       {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day])+"\" border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       int currentCount=0;
       for(int teacher=0; teacher<gt.rules.nInternalTeachers && currentCount<maxTeachers; teacher++){
              if(!excludedNames.contains(teacher)){
                     currentCount++;
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalTeachersList[teacher]->name+"</th>";
              }
       }
       tmpString+="</tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";

       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              tmpString+="        <tr>\n";
              if(hour==0)
                     tmpString+="        <th rowspan=\""+QString::number(gt.rules.nHoursPerDay)+ "\">"+protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
              else tmpString+="          <!-- span -->\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              currentCount=0;
              for(int teacher=0; teacher<gt.rules.nInternalTeachers && currentCount<maxTeachers; teacher++){
                     if(!excludedNames.contains(teacher)){
                            currentCount++;
                            if(hour+1==gt.rules.nHoursPerDay)
                                   excludedNames<<teacher;
                            QList<int> allActivities;
                            allActivities.clear();
                            allActivities<<teachers_timetable_weekly[teacher][day][hour];
                            bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                            if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                   tmpString+=writeActivityTeacher(htmlLevel, teacher, day, hour, false, true, printActivityTags);
                            } else {
                                   tmpString+=writeActivitiesTeachers(htmlLevel, allActivities, printActivityTags);
                            }
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleTeachersTimetableTimeVerticalHtml ( int  htmlLevel,
int  maxTeachers,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags 
) [static]

Definition at line 6101 of file timetableexport.cpp.

                                                                                                                                                                         {
QString tmpString;
       tmpString+="    <table border=\"1\">\n";
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       int currentCount=0;
       for(int teacher=0; teacher<gt.rules.nInternalTeachers && currentCount<maxTeachers; teacher++){
              if(!excludedNames.contains(teacher)){
                     currentCount++;
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=gt.rules.internalTeachersList[teacher]->name+"</th>";
              }
       }
       tmpString+="</tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     tmpString+="        <tr>\n";
                     if(hour==0)
                            tmpString+="        <th rowspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
                     else tmpString+="          <!-- span -->\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
                     currentCount=0;
                     for(int teacher=0; teacher<gt.rules.nInternalTeachers && currentCount<maxTeachers; teacher++){
                            if(!excludedNames.contains(teacher)){
                                   currentCount++;
                                   if(day+1==gt.rules.nDaysPerWeek && hour+1==gt.rules.nHoursPerDay)
                                          excludedNames<<teacher;
                                   QList<int> allActivities;
                                   allActivities.clear();
                                   allActivities<<teachers_timetable_weekly[teacher][day][hour];
                                   bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                                   if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                          tmpString+=writeActivityTeacher(htmlLevel, teacher, day, hour, false, true, printActivityTags);
                                   } else {
                                          tmpString+=writeActivitiesTeachers(htmlLevel, allActivities, printActivityTags);
                                   }
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="      <tr class=\"foot\"><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n    </table>\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleYearsTimetableDaysHorizontalHtml ( int  htmlLevel,
int  year,
const QString &  saveTime,
bool  printActivityTags,
bool  detailed 
) [static]

Definition at line 5217 of file timetableexport.cpp.

                                                                                                                                                      {
       assert(year>=0);
       assert(year<gt.rules.augmentedYearsList.size());
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashStudentIDsTimetable.value(gt.rules.augmentedYearsList.at(year)->name);
       if(detailed) tmpString+="_DETAILED";
       tmpString+="\" border=\"1\"";
       if(year%2)  tmpString+=" class=\"even_table\"";
       else tmpString+=" class=\"odd_table\"";
       tmpString+=">\n";
                            
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";
       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+protect2(gt.rules.augmentedYearsList.at(year)->name)+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                     QList<int> allActivities;
                     allActivities.clear();
                     bool isNotAvailable=true;
                     for(int g=0; g<gt.rules.augmentedYearsList.at(year)->groupsList.size(); g++){
                            StudentsGroup* stg=gt.rules.augmentedYearsList.at(year)->groupsList[g];
                            for(int sg=0; sg<stg->subgroupsList.size(); sg++){
                                   StudentsSubgroup* sts=stg->subgroupsList[sg];
                                   int subgroup=sts->indexInInternalSubgroupsList;
                                   if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour])))
                                          allActivities<<students_timetable_weekly[subgroup][day][hour];
                                   if(!subgroupNotAvailableDayHour[subgroup][day][hour])
                                          isNotAvailable=false;
                            }
                     }
                     assert(!allActivities.isEmpty());
                     bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                     if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                            tmpString+=writeActivityStudents(htmlLevel, allActivities[0], day, hour, isNotAvailable, false, true, printActivityTags);
                     } else{
                            if(!detailed) tmpString+="          <td>"+protect2(STRING_SEVERAL_ACTIVITIES_IN_LESS_DETAILED_TABLES)+"</td>\n";
                            else{
                                   tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                            }
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleYearsTimetableDaysVerticalHtml ( int  htmlLevel,
int  year,
const QString &  saveTime,
bool  printActivityTags,
bool  detailed 
) [static]

Definition at line 5288 of file timetableexport.cpp.

                                                                                                                                                    {
       assert(year>=0);
       assert(year<gt.rules.augmentedYearsList.size());
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashStudentIDsTimetable.value(gt.rules.augmentedYearsList.at(year)->name);
       if(detailed) tmpString+="_DETAILED";
       tmpString+="\" border=\"1\"";
       if(year%2)  tmpString+=" class=\"even_table\"";
       else tmpString+=" class=\"odd_table\"";
       tmpString+=">\n";
                     
       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td><th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.augmentedYearsList.at(year)->name)+"</th></tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              tmpString+="        <tr>\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.daysOfTheWeek[day])+"</th>\n";

              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     QList<int> allActivities;
                     allActivities.clear();
                     bool isNotAvailable=true;
                     for(int g=0; g<gt.rules.augmentedYearsList.at(year)->groupsList.size(); g++){
                            StudentsGroup* stg=gt.rules.augmentedYearsList.at(year)->groupsList[g];
                            for(int sg=0; sg<stg->subgroupsList.size(); sg++){
                                   StudentsSubgroup* sts=stg->subgroupsList[sg];
                                   int subgroup=sts->indexInInternalSubgroupsList;
                                   if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour])))
                                          allActivities<<students_timetable_weekly[subgroup][day][hour];
                                   if(!subgroupNotAvailableDayHour[subgroup][day][hour])
                                          isNotAvailable=false;
                            }
                     }
                     assert(!allActivities.isEmpty());
                     bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                     if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                            tmpString+=writeActivityStudents(htmlLevel, allActivities[0], day, hour, isNotAvailable, true, false, printActivityTags);
                     } else{
                            if(!detailed) tmpString+="          <td>"+protect2(STRING_SEVERAL_ACTIVITIES_IN_LESS_DETAILED_TABLES)+"</td>\n";
                            else{
                                   tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                            }
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleYearsTimetableTimeHorizontalDailyHtml ( int  htmlLevel,
int  day,
int  maxYears,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags,
bool  detailed 
) [static]

Definition at line 5611 of file timetableexport.cpp.

                                                                                                                                                                                                  {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day]);
       if(detailed) tmpString+="_DETAILED";
       tmpString+="\" border=\"1\">\n";

       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";

       tmpString+="<th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="</tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"xAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
       }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       int currentCount=0;
       for(int year=0; year<gt.rules.augmentedYearsList.size() && currentCount<maxYears; year++){
              if(!excludedNames.contains(year)){
                     currentCount++;
                     excludedNames<<year;
                     tmpString+="        <tr>\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     StudentsYear* sty=gt.rules.augmentedYearsList[year];
                     tmpString+=protect2(sty->name)+"</th>\n";
                     for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                            QList<int> allActivities;
                            allActivities.clear();
                            bool isNotAvailable=true;
                            for(int g=0; g<sty->groupsList.size(); g++){
                                   StudentsGroup* stg=sty->groupsList[g];
                                   for(int sg=0; sg<stg->subgroupsList.size(); sg++){
                                          StudentsSubgroup* sts=stg->subgroupsList[sg];
                                          int subgroup=sts->indexInInternalSubgroupsList;
                                          if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour])))
                                                 allActivities<<students_timetable_weekly[subgroup][day][hour];
                                          if(!subgroupNotAvailableDayHour[subgroup][day][hour])
                                                 isNotAvailable=false;
                                   }
                            }
                            assert(!allActivities.isEmpty());
                            bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                            if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                   tmpString+=writeActivityStudents(htmlLevel, allActivities[0], day, hour, isNotAvailable, true, false, printActivityTags);
                            } else{
                                   if(!detailed) tmpString+="          <td>"+protect2(STRING_SEVERAL_ACTIVITIES_IN_LESS_DETAILED_TABLES)+"</td>\n";
                                   else{
                                          tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                                   }
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleYearsTimetableTimeHorizontalHtml ( int  htmlLevel,
int  maxYears,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags,
bool  detailed 
) [static]

Definition at line 5445 of file timetableexport.cpp.

                                                                                                                                                                                    {
       QString tmpString;
       tmpString+="    <table id=\"table";
       if(!detailed)
              tmpString+="_LESS";
       tmpString+="_DETAILED";
       tmpString+="\" border=\"1\">\n";

       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td rowspan=\"2\"></td>";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              tmpString+="<th colspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2(gt.rules.daysOfTheWeek[day])+"</th>";
       tmpString+="</tr>\n";
       tmpString+="        <tr>\n          <!-- span -->\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++)
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              }
       tmpString+="        </tr>\n";
       tmpString+="      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td></td><td colspan=\""+gt.rules.nHoursPerDay*gt.rules.nDaysPerWeek+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       
       int currentCount=0;
       for(int year=0; year<gt.rules.augmentedYearsList.size() && currentCount<maxYears; year++){
              StudentsYear* sty=gt.rules.augmentedYearsList[year];
              if(!excludedNames.contains(year)){
                     currentCount++;
                     excludedNames<<year;
                     tmpString+="        <tr>\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(sty->name)+"</th>\n";
                     for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                            for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                                   QList<int> allActivities;
                                   allActivities.clear();
                                   bool isNotAvailable=true;
                                   for(int g=0; g<sty->groupsList.size(); g++){
                                          StudentsGroup* stg=sty->groupsList[g];
                                          for(int sg=0; sg<stg->subgroupsList.size(); sg++){
                                                 StudentsSubgroup* sts=stg->subgroupsList[sg];
                                                 int subgroup=sts->indexInInternalSubgroupsList;
                                                 if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour])))
                                                        allActivities<<students_timetable_weekly[subgroup][day][hour];
                                                 if(!subgroupNotAvailableDayHour[subgroup][day][hour])
                                                        isNotAvailable=false;
                                          }
                                   }
                                   assert(!allActivities.isEmpty());
                                   bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                                   if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                          tmpString+=writeActivityStudents(htmlLevel, allActivities[0], day, hour, isNotAvailable, true, false, printActivityTags);
                                   } else{
                                          if(!detailed) tmpString+="          <td>"+protect2(STRING_SEVERAL_ACTIVITIES_IN_LESS_DETAILED_TABLES)+"</td>\n";
                                          else{
                                                 tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                                          }
                                   }
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td></td><td colspan=\""+QString::number(gt.rules.nHoursPerDay*gt.rules.nDaysPerWeek)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleYearsTimetableTimeVerticalDailyHtml ( int  htmlLevel,
int  day,
int  maxYears,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags,
bool  detailed 
) [static]

Definition at line 5527 of file timetableexport.cpp.

                                                                                                                                                                                                {
       assert(day>=0);
       assert(day<gt.rules.nDaysPerWeek);
       QString tmpString;
       tmpString+="    <table id=\"table_"+hashDayIDsTimetable.value(gt.rules.daysOfTheWeek[day]);
       if(detailed) tmpString+="_DETAILED";
       tmpString+="\" border=\"1\">\n";

       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       int currentCount=0;
       for(int year=0; year<gt.rules.augmentedYearsList.size() && currentCount<maxYears; year++){
              if(!excludedNames.contains(year)){
                     currentCount++;

                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.augmentedYearsList.at(year)->name)+"</th>";
              }
       }
       
       tmpString+="</tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";

       for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
              tmpString+="        <tr>\n";
              if(hour==0)
                     tmpString+="        <th rowspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
              else tmpString+="          <!-- span -->\n";
              if(htmlLevel>=2)
                     tmpString+="          <th class=\"yAxis\">";
              else
                     tmpString+="          <th>";
              tmpString+=protect2(gt.rules.hoursOfTheDay[hour])+"</th>\n";
              currentCount=0;
              for(int year=0; year<gt.rules.augmentedYearsList.size() && currentCount<maxYears; year++){
                     StudentsYear* sty=gt.rules.augmentedYearsList[year];
                     if(!excludedNames.contains(year)){
                            currentCount++;
                            if(hour+1==gt.rules.nHoursPerDay)
                                   excludedNames<<year;
                            QList<int> allActivities;
                            allActivities.clear();
                            bool isNotAvailable=true;
                            for(int g=0; g<sty->groupsList.size(); g++){
                                   StudentsGroup* stg=sty->groupsList[g];
                                   for(int sg=0; sg<stg->subgroupsList.size(); sg++){
                                          StudentsSubgroup* sts=stg->subgroupsList[sg];
                                          int subgroup=sts->indexInInternalSubgroupsList;
                                          if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour])))
                                                 allActivities<<students_timetable_weekly[subgroup][day][hour];
                                          if(!subgroupNotAvailableDayHour[subgroup][day][hour])
                                                 isNotAvailable=false;
                                   }
                            }
                            assert(!allActivities.isEmpty());
                            bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                            if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                   tmpString+=writeActivityStudents(htmlLevel, allActivities[0], day, hour, isNotAvailable, false, true, printActivityTags);
                            } else{
                                   if(!detailed) tmpString+="          <td>"+protect2(STRING_SEVERAL_ACTIVITIES_IN_LESS_DETAILED_TABLES)+"</td>\n";
                                   else{
                                          tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                                   }
                            }
                     }
              }
              tmpString+="        </tr>\n";
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::singleYearsTimetableTimeVerticalHtml ( int  htmlLevel,
int  maxYears,
QSet< int > &  excludedNames,
const QString &  saveTime,
bool  printActivityTags,
bool  detailed 
) [static]

Definition at line 5361 of file timetableexport.cpp.

                                                                                                                                                                                  {
       QString tmpString;
       tmpString+="    <table id=\"table";
       if(!detailed)
              tmpString+="_LESS";
       tmpString+="_DETAILED";
       tmpString+="\" border=\"1\">\n";

       tmpString+="      <caption>"+protect2(gt.rules.institutionName)+"</caption>\n";

       tmpString+="      <thead>\n        <tr><td colspan=\"2\"></td>";
       int currentCount=0;
       for(int year=0; year<gt.rules.augmentedYearsList.size() && currentCount<maxYears; year++){
              if(!excludedNames.contains(year)){
                     currentCount++;
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"xAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.augmentedYearsList.at(year)->name)+"</th>";
              }
       }
       
       tmpString+="</tr>\n      </thead>\n";
       /*workaround
       tmpString+="      <tfoot><tr><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr></tfoot>\n";
       */
       tmpString+="      <tbody>\n";
       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              for(int hour=0; hour<gt.rules.nHoursPerDay; hour++){
                     tmpString+="        <tr>\n";
                     if(hour==0)
                            tmpString+="        <th rowspan=\""+QString::number(gt.rules.nHoursPerDay)+"\">"+protect2vert(gt.rules.daysOfTheWeek[day])+"</th>\n";
                     else tmpString+="          <!-- span -->\n";
                     if(htmlLevel>=2)
                            tmpString+="          <th class=\"yAxis\">";
                     else
                            tmpString+="          <th>";
                     tmpString+=protect2(gt.rules.hoursOfTheDay[hour]) + "</th>\n";
                     currentCount=0;
                     for(int year=0; year<gt.rules.augmentedYearsList.size() && currentCount<maxYears; year++){
                            if(!excludedNames.contains(year)){
                                   currentCount++;
                                   if(day+1==gt.rules.nDaysPerWeek && hour+1==gt.rules.nHoursPerDay)
                                          excludedNames<<year;
                                   QList<int> allActivities;
                                   allActivities.clear();
                                   bool isNotAvailable=true;
                                   StudentsYear* sty=gt.rules.augmentedYearsList[year];
                                   for(int g=0; g<sty->groupsList.size(); g++){
                                          StudentsGroup* stg=sty->groupsList[g];
                                          for(int sg=0; sg<stg->subgroupsList.size(); sg++){
                                                 StudentsSubgroup* sts=stg->subgroupsList[sg];
                                                 int subgroup=sts->indexInInternalSubgroupsList;
                                                 if(!(allActivities.contains(students_timetable_weekly[subgroup][day][hour])))
                                                        allActivities<<students_timetable_weekly[subgroup][day][hour];
                                                 if(!subgroupNotAvailableDayHour[subgroup][day][hour])
                                                        isNotAvailable=false;
                                          }
                                   }
                                   assert(!allActivities.isEmpty());
                                   bool activitiesWithSameStartingtime=addActivitiesWithSameStartingTime(allActivities, hour);
                                   if(allActivities.size()==1 && !activitiesWithSameStartingtime){  // because i am using colspan or rowspan!!!
                                          tmpString+=writeActivityStudents(htmlLevel, allActivities[0], day, hour, isNotAvailable, false, true, printActivityTags);
                                   } else{
                                          if(!detailed) tmpString+="          <td>"+protect2(STRING_SEVERAL_ACTIVITIES_IN_LESS_DETAILED_TABLES)+"</td>\n";
                                          else{
                                                 tmpString+=writeActivitiesStudents(htmlLevel, allActivities, printActivityTags);
                                          }
                                   }
                            }
                     }
                     tmpString+="        </tr>\n";
              }
       }
       //workaround begin.
       tmpString+="        <tr class=\"foot\"><td colspan=\"2\"></td><td colspan=\""+QString::number(currentCount)+"\">"+TimetableExport::tr("Timetable generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)+"</td></tr>\n";
       //workaround end.
       tmpString+="      </tbody>\n";
       tmpString+="    </table>\n\n";
       return tmpString;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::writeActivitiesRooms ( int  htmlLevel,
const QList< int > &  allActivities,
bool  printActivityTags 
) [static, private]

Definition at line 4314 of file timetableexport.cpp.

                                                                                                                   {
       QString tmp;
       if(htmlLevel>=1)
              tmp+="          <td><table class=\"detailed\">";
       else
              tmp+="          <td><table>";
       if(htmlLevel>=3)
              tmp+="<tr class=\"room line0\">";
       else   tmp+="<tr>";
       for(int a=0; a<allActivities.size(); a++){
              int ai=allActivities[a];
              if(ai!=UNALLOCATED_ACTIVITY){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeRoom(htmlLevel, ai, "", "")+"</td>";
              }
       }
       tmp+="</tr>";
       if(htmlLevel>=3)
              tmp+="<tr class=\"student line1\">";
       else   tmp+="<tr>";
       for(int a=0; a<allActivities.size(); a++){
              int ai=allActivities[a];
              if(ai!=UNALLOCATED_ACTIVITY){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeStudents(htmlLevel, act, "", "")+"</td>";
              }
       }
       tmp+="</tr>";
       if(htmlLevel>=3)
              tmp+="<tr class=\"teacher line2\">";
       else   tmp+="<tr>";
       for(int a=0; a<allActivities.size(); a++){
              int ai=allActivities[a];
              if(ai!=UNALLOCATED_ACTIVITY){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeTeachers(htmlLevel, act, "", "")+"</td>";
              }
       }
       tmp+="</tr>";
       if(htmlLevel>=3)
              tmp+="<tr class=\"line3\">";
       else   tmp+="<tr>";
       for(int a=0; a<allActivities.size(); a++){
              int ai=allActivities[a];
              if(ai!=UNALLOCATED_ACTIVITY){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeSubjectAndActivityTags(htmlLevel, act, "", "", false, printActivityTags)+"</td>";
              }
       }
       tmp+="</tr>";

       tmp+="</table></td>\n";
       return tmp;
}
QString TimetableExport::writeActivitiesStudents ( int  htmlLevel,
const QList< int > &  allActivities,
bool  printActivityTags 
) [static, private]

Definition at line 4145 of file timetableexport.cpp.

                                                                                                                      {
       QString tmp;
       if(htmlLevel>=1)
              tmp+="          <td><table class=\"detailed\">";
       else
              tmp+="          <td><table>";
       if(htmlLevel>=3)
              tmp+="<tr class=\"student line0\">";
       else   tmp+="<tr>";
       for(int a=0; a<allActivities.size(); a++){
              int ai=allActivities[a];
              if(ai!=UNALLOCATED_ACTIVITY){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeStudents(htmlLevel, act, "", "")+"</td>";
              }
       }
       tmp+="</tr>";
       if(htmlLevel>=3)
              tmp+="<tr class=\"line1\">";
       else   tmp+="<tr>";
       for(int a=0; a<allActivities.size(); a++){
              int ai=allActivities[a];
              if(ai!=UNALLOCATED_ACTIVITY){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeSubjectAndActivityTags(htmlLevel, act, "", "", false, printActivityTags)+"</td>";
              }
       }
       tmp+="</tr>";
       if(htmlLevel>=3)
              tmp+="<tr class=\"teacher line2\">";
       else   tmp+="<tr>";
       for(int a=0; a<allActivities.size(); a++){
              int ai=allActivities[a];
              if(ai!=UNALLOCATED_ACTIVITY){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeTeachers(htmlLevel, act, "", "")+"</td>";
              }
       }
       tmp+="</tr>";
       if(htmlLevel>=3)
              tmp+="<tr class=\"room line3\">";
       else   tmp+="<tr>";
       for(int a=0; a<allActivities.size(); a++){
              int ai=allActivities[a];
              if(ai!=UNALLOCATED_ACTIVITY){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeRoom(htmlLevel, ai, "", "")+"</td>";
              }
       }
       tmp+="</tr>";
       tmp+="</table></td>\n";
       return tmp;
}
QString TimetableExport::writeActivitiesSubjects ( int  htmlLevel,
const QList< int > &  allActivities,
bool  printActivityTags 
) [static, private]

Definition at line 4370 of file timetableexport.cpp.

                                                                                                                      {
       QString tmp;
       if(allActivities.isEmpty()){
              tmp+=writeEmpty(htmlLevel);
       } else {
              if(htmlLevel>=1)
                     tmp+="          <td><table class=\"detailed\">";
              else
                                          tmp+="          <td><table>";
              if(printActivityTags){
                     if(htmlLevel>=3)
                            tmp+="<tr class=\"line0 activitytag\">";
                     else   tmp+="<tr>";
                     for(int a=0; a<allActivities.size(); a++){
                            Activity* act=&gt.rules.internalActivitiesList[allActivities[a]];
                            tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeSubjectAndActivityTags(htmlLevel, act, "", "", true, printActivityTags)+"</td>";
                     }
                     tmp+="</tr>";
              }
              if(htmlLevel>=3)
                     tmp+="<tr class=\"student line1\">";
              else   tmp+="<tr>";
              for(int a=0; a<allActivities.size(); a++){
                     Activity* act=&gt.rules.internalActivitiesList[allActivities[a]];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeStudents(htmlLevel, act, "", "")+"</td>";    
              }
              tmp+="</tr>";
              if(htmlLevel>=3)
                     tmp+="<tr class=\"teacher line2\">";
              else   tmp+="<tr>";
              for(int a=0; a<allActivities.size(); a++){
                     Activity* act=&gt.rules.internalActivitiesList[allActivities[a]];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeTeachers(htmlLevel, act, "", "")+"</td>";
              }
              tmp+="</tr>";
              if(htmlLevel>=3)
                     tmp+="<tr class=\"room line3\">";
              else   tmp+="<tr>";
              for(int a=0; a<allActivities.size(); a++){
                     int ai=allActivities[a];
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeRoom(htmlLevel, ai, "", "")+"</td>";
              }
              tmp+="</tr>";
              tmp+="</table></td>\n";
       }
       return tmp;
}
QString TimetableExport::writeActivitiesTeachers ( int  htmlLevel,
const QList< int > &  allActivities,
bool  printActivityTags 
) [static, private]

Definition at line 4229 of file timetableexport.cpp.

                                                                                                                      {
       QString tmp;
       if(htmlLevel>=1)
              tmp+="          <td><table class=\"detailed\">";
       else
              tmp+="          <td><table>";
       if(htmlLevel>=3)
              tmp+="<tr class=\"teacher line0\">";
       else   tmp+="<tr>";
       for(int a=0; a<allActivities.size(); a++){
              int ai=allActivities[a];
              if(ai!=UNALLOCATED_ACTIVITY){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeTeachers(htmlLevel, act, "", "")+"</td>";
              }
       }
       tmp+="</tr>";
       if(htmlLevel>=3)
              tmp+="<tr class=\"student line1\">";
       else   tmp+="<tr>";
       for(int a=0; a<allActivities.size(); a++){
              int ai=allActivities[a];
              if(ai!=UNALLOCATED_ACTIVITY){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeStudents(htmlLevel, act, "", "")+"</td>";
              }
       }
       tmp+="</tr>";
       if(htmlLevel>=3)
              tmp+="<tr class=\"line2\">";
       else   tmp+="<tr>";
       for(int a=0; a<allActivities.size(); a++){
              int ai=allActivities[a];
              if(ai!=UNALLOCATED_ACTIVITY){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeSubjectAndActivityTags(htmlLevel, act, "", "", false, printActivityTags)+"</td>";
              }
       }
       tmp+="</tr>";

       if(htmlLevel>=3)
              tmp+="<tr class=\"room line3\">";
       else   tmp+="<tr>";
       for(int a=0; a<allActivities.size(); a++){
              int ai=allActivities[a];
              if(ai!=UNALLOCATED_ACTIVITY){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, true, false, false)+writeRoom(htmlLevel, ai, "", "")+"</td>";
              }
       }
       tmp+="</tr>";
       tmp+="</table></td>\n";
       return tmp;
}
void TimetableExport::writeActivitiesTimetableXml ( QWidget *  parent,
const QString &  xmlfilename 
) [static, private]

Definition at line 1616 of file timetableexport.cpp.

                                                                                            {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       //Writing the timetable in xml format
       QFile file(xmlfilename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(xmlfilename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);
       tos<<"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
       tos << "<" << protect(ACTIVITIES_TIMETABLE_TAG) << ">\n";
       
       for(int i=0; i<gt.rules.nInternalActivities; i++){
              tos<<"<Activity>"<<endl;
              
              tos<<" <Id>"<<gt.rules.internalActivitiesList[i].id<<"</Id>"<<endl;
              
              QString day="";
              if(best_solution.times[i]!=UNALLOCATED_TIME){
                     int d=best_solution.times[i]%gt.rules.nDaysPerWeek;
                     day=gt.rules.daysOfTheWeek[d];
              }
              tos<<" <Day>"<<protect(day)<<"</Day>"<<endl;
              
              QString hour="";
              if(best_solution.times[i]!=UNALLOCATED_TIME){
                     int h=best_solution.times[i]/gt.rules.nDaysPerWeek;
                     hour=gt.rules.hoursOfTheDay[h];
              }
              tos<<" <Hour>"<<protect(hour)<<"</Hour>"<<endl;
              
              QString room="";
              if(best_solution.rooms[i]!=UNALLOCATED_SPACE && best_solution.rooms[i]!=UNSPECIFIED_ROOM){
                     int r=best_solution.rooms[i];
                     room=gt.rules.internalRoomsList[r]->name;
              }
              tos<<" <Room>"<<protect(room)<<"</Room>"<<endl;
              
              tos<<"</Activity>"<<endl;
       }

       tos << "</" << protect(ACTIVITIES_TIMETABLE_TAG) << ">\n";

       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(xmlfilename).arg(file.error()));
       }
       file.close();
}

Here is the call graph for this function:

Here is the caller graph for this function:

QString TimetableExport::writeActivityRoom ( int  htmlLevel,
int  room,
int  day,
int  hour,
bool  colspan,
bool  rowspan,
bool  printActivityTags 
) [static, private]

Definition at line 4285 of file timetableexport.cpp.

                                                                                                                                        {
       QString tmp;
       int ai=rooms_timetable_weekly[room][day][hour];
       int currentTime=day+gt.rules.nDaysPerWeek*hour;
       if(ai!=UNALLOCATED_ACTIVITY){
              if(best_solution.times[ai]==currentTime){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, false, colspan, rowspan);
                     tmp+=writeStudents(htmlLevel, act, "div", " class=\"student line1\"");
                     tmp+=writeTeachers(htmlLevel, act, "div", " class=\"teacher line2\"");
                     tmp+=writeSubjectAndActivityTags(htmlLevel, act, "div", " class=\"line3\"", false, printActivityTags);
                     tmp+="</td>\n";
              } else
                     tmp+="          <!-- span -->\n";
       } else {
              if(notAllowedRoomTimePercentages[room][day+hour*gt.rules.nDaysPerWeek]>=0 && PRINT_NOT_AVAILABLE_TIME_SLOTS){
                     tmp+=writeNotAvailableSlot(htmlLevel, "");
              }
              else if(breakDayHour[day][hour] && PRINT_BREAK_TIME_SLOTS){
                     tmp+=writeBreakSlot(htmlLevel, "");
              }
              else{
                     tmp+=writeEmpty(htmlLevel);
              }
       }
       return tmp;
}
QString TimetableExport::writeActivityStudents ( int  htmlLevel,
int  ai,
int  day,
int  hour,
bool  notAvailable,
bool  colspan,
bool  rowspan,
bool  printActivityTags 
) [static, private]

Definition at line 4117 of file timetableexport.cpp.

                                                                                                                                                             {
       QString tmp;
       int currentTime=day+gt.rules.nDaysPerWeek*hour;
       if(ai!=UNALLOCATED_ACTIVITY){
              if(best_solution.times[ai]==currentTime){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, false, colspan, rowspan);
                     tmp+=writeSubjectAndActivityTags(htmlLevel, act, "div", " class=\"line1\"", false, printActivityTags);
                     tmp+=writeTeachers(htmlLevel, act, "div", " class=\"teacher line2\"");
                     tmp+=writeRoom(htmlLevel, ai, "div", " class=\"room line3\"");
                     tmp+="</td>\n";
              } else
                     tmp+="          <!-- span -->\n";
       } else {
              if(notAvailable && PRINT_NOT_AVAILABLE_TIME_SLOTS){
                     tmp+=writeNotAvailableSlot(htmlLevel, "");
              }
              else if(breakDayHour[day][hour] && PRINT_BREAK_TIME_SLOTS){
                     tmp+=writeBreakSlot(htmlLevel, "");
              }
              else{
                     tmp+=writeEmpty(htmlLevel);
              }
       }
       return tmp;
}
QString TimetableExport::writeActivityTeacher ( int  htmlLevel,
int  teacher,
int  day,
int  hour,
bool  colspan,
bool  rowspan,
bool  printActivityTags 
) [static, private]

Definition at line 4200 of file timetableexport.cpp.

                                                                                                                                              {
       QString tmp;
       int ai=teachers_timetable_weekly[teacher][day][hour];
       int currentTime=day+gt.rules.nDaysPerWeek*hour;
       if(ai!=UNALLOCATED_ACTIVITY){
              if(best_solution.times[ai]==currentTime){
                     Activity* act=&gt.rules.internalActivitiesList[ai];
                     tmp+=writeStartTagTDofActivities(htmlLevel, act, false, colspan, rowspan);
                     tmp+=writeStudents(htmlLevel, act, "div", " class=\"student line1\"");
                     tmp+=writeSubjectAndActivityTags(htmlLevel, act, "div", " class=\"line2\"", false, printActivityTags);
                     tmp+=writeRoom(htmlLevel, ai, "div", " class=\"room line3\"");
                     tmp+="</td>\n";
              } else
                     tmp+="          <!-- span -->\n";
       } else {
              if(teacherNotAvailableDayHour[teacher][day][hour] && PRINT_NOT_AVAILABLE_TIME_SLOTS){
                     tmp+=writeNotAvailableSlot(htmlLevel, "");
              }
              else if(breakDayHour[day][hour] && PRINT_BREAK_TIME_SLOTS){
                     tmp+=writeBreakSlot(htmlLevel, "");
              }
              else{
                     tmp+=writeEmpty(htmlLevel);
              }
       }
       return tmp;
}
void TimetableExport::writeAllActivitiesTimetableDaysHorizontalHtml ( QWidget *  parent,
const QString &  htmlfilename,
const QString &  saveTime,
int  placedActivities 
) [static, private]

Definition at line 2721 of file timetableexport.cpp.

                                                                                                                                                              {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       //Now we print the results to an HTML file
       QFile file(htmlfilename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(htmlfilename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);

       tos<<writeHead(true, placedActivities, true);
       tos<<singleAllActivitiesTimetableDaysHorizontalHtml(TIMETABLE_HTML_LEVEL, saveTime, true);
       tos<<"  </body>\n</html>\n";

       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(htmlfilename).arg(file.error()));
       }
       file.close();
}

Here is the caller graph for this function:

void TimetableExport::writeAllActivitiesTimetableDaysVerticalHtml ( QWidget *  parent,
const QString &  htmlfilename,
const QString &  saveTime,
int  placedActivities 
) [static, private]

Definition at line 2749 of file timetableexport.cpp.

                                                                                                                                                            {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       //Now we print the results to an HTML file
       QFile file(htmlfilename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(htmlfilename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);

       tos<<writeHead(true, placedActivities, true);
       tos<<singleAllActivitiesTimetableDaysVerticalHtml(TIMETABLE_HTML_LEVEL, saveTime, true);
       tos<<"  </body>\n</html>\n";

       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(htmlfilename).arg(file.error()));
       }
       file.close();
}

Here is the caller graph for this function:

void TimetableExport::writeAllActivitiesTimetableTimeHorizontalDailyHtml ( QWidget *  parent,
const QString &  htmlfilename,
const QString &  saveTime,
int  placedActivities 
) [static, private]

Definition at line 2870 of file timetableexport.cpp.

                                                                                                                                                                   {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       //Now we print the results to an HTML file
       QFile file(htmlfilename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(htmlfilename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);

       tos<<writeHead(true, placedActivities, true);
       tos<<writeTOCDays(false);

       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              tos<<singleAllActivitiesTimetableTimeHorizontalDailyHtml(TIMETABLE_HTML_LEVEL, day, saveTime, true);

              tos<<"    <p class=\"back\"><a href=\""<<"#top\">"<<TimetableExport::tr("back to the top")<<"</a></p>\n\n";
       }

       tos<<"  </body>\n</html>\n";

       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(htmlfilename).arg(file.error()));
       }
       file.close();
}

Here is the caller graph for this function:

void TimetableExport::writeAllActivitiesTimetableTimeHorizontalHtml ( QWidget *  parent,
const QString &  htmlfilename,
const QString &  saveTime,
int  placedActivities 
) [static, private]

Definition at line 2807 of file timetableexport.cpp.

                                                                                                                                                              {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       //Now we print the results to an HTML file
       QFile file(htmlfilename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(htmlfilename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);

       tos<<writeHead(true, placedActivities, false);

       tos<<singleAllActivitiesTimetableTimeHorizontalHtml(TIMETABLE_HTML_LEVEL, saveTime, true);

       tos<<"  </body>\n</html>\n";

       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(htmlfilename).arg(file.error()));
       }
       file.close();
}

Here is the caller graph for this function:

void TimetableExport::writeAllActivitiesTimetableTimeVerticalDailyHtml ( QWidget *  parent,
const QString &  htmlfilename,
const QString &  saveTime,
int  placedActivities 
) [static, private]

Definition at line 2837 of file timetableexport.cpp.

                                                                                                                                                                 {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       //Now we print the results to an HTML file
       QFile file(htmlfilename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(htmlfilename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);

       tos<<writeHead(true, placedActivities, true);
       tos<<writeTOCDays(false);

       for(int day=0; day<gt.rules.nDaysPerWeek; day++){
              tos<<singleAllActivitiesTimetableTimeVerticalDailyHtml(TIMETABLE_HTML_LEVEL, day, saveTime, true);
              tos<<"    <p class=\"back\"><a href=\""<<"#top\">"<<TimetableExport::tr("back to the top")<<"</a></p>\n\n";
       }
       tos<<"  </body>\n</html>\n";

       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(htmlfilename).arg(file.error()));
       }
       file.close();
}

Here is the caller graph for this function:

void TimetableExport::writeAllActivitiesTimetableTimeVerticalHtml ( QWidget *  parent,
const QString &  htmlfilename,
const QString &  saveTime,
int  placedActivities 
) [static, private]

Definition at line 2777 of file timetableexport.cpp.

                                                                                                                                                            {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       //Now we print the results to an HTML file
       QFile file(htmlfilename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(htmlfilename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);

       tos<<writeHead(true, placedActivities, false);

tos<<singleAllActivitiesTimetableTimeVerticalHtml(TIMETABLE_HTML_LEVEL, saveTime, true);

       tos<<"  </body>\n</html>\n";

       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(htmlfilename).arg(file.error()));
       }
       file.close();
}

Here is the caller graph for this function:

QString TimetableExport::writeBreakSlot ( int  htmlLevel,
const QString &  weight 
) [static, private]

Definition at line 4090 of file timetableexport.cpp.

                                                                           {
       QString tmp;
       //weight=" "+weight;
       switch(htmlLevel){
              case 3 : ;
              case 4 : tmp="          <td class=\"break\"><span class=\"break\">"+protect2(STRING_BREAK_SLOT)+weight+"</span></td>\n"; break;
              case 5 : ;
              case 6 : tmp="          <td class=\"break\"><span class=\"break\" onmouseover=\"highlight('break')\">"+protect2(STRING_BREAK_SLOT)+weight+"</span></td>\n"; break;
              default: tmp="          <td>"+protect2(STRING_BREAK_SLOT)+weight+"</td>\n";
       }
       return tmp;
}

Here is the call graph for this function:

void TimetableExport::writeConflictsTxt ( QWidget *  parent,
const QString &  filename,
const QString &  saveTime,
int  placedActivities 
) [static, private]

Definition at line 1446 of file timetableexport.cpp.

                                                                                                                              {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       QFile file(filename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(filename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);
       
       if(placedActivities==gt.rules.nInternalActivities){
              QString tt=INPUT_FILENAME_XML.right(INPUT_FILENAME_XML.length()-INPUT_FILENAME_XML.lastIndexOf(FILE_SEP)-1);
              if(INPUT_FILENAME_XML=="")
                     tt=tr("unnamed");
              tos<<TimetableExport::tr("Soft conflicts of %1", "%1 is the file name").arg(tt);
              tos<<"\n";
              tos<<TimetableExport::tr("Generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)<<"\n\n";

              tos<<TimetableExport::tr("Total soft conflicts:")<<QString(" ")<<best_solution.conflictsTotal<<endl<<endl;
              tos<<TimetableExport::tr("Soft conflicts list (in decreasing order):")<<endl<<endl;
              foreach(QString t, best_solution.conflictsDescriptionList)
                     tos<<t<<endl;
              tos<<endl<<TimetableExport::tr("End of file.")<<"\n";
       }
       else{
              QString tt=INPUT_FILENAME_XML.right(INPUT_FILENAME_XML.length()-INPUT_FILENAME_XML.lastIndexOf(FILE_SEP)-1);
              if(INPUT_FILENAME_XML=="")
                     tt=tr("unnamed");
              tos<<TimetableExport::tr("Conflicts of %1").arg(tt);
              tos<<"\n";
              tos<<TimetableExport::tr("Warning! Only %1 out of %2 activities placed!").arg(placedActivities).arg(gt.rules.nInternalActivities)<<"\n";
              tos<<TimetableExport::tr("Generated with FET %1 on %2", "%1 is FET version, %2 is the date and time of generation").arg(FET_VERSION).arg(saveTime)<<"\n\n";

              tos<<TimetableExport::tr("Total conflicts:")<<QString(" ")<<best_solution.conflictsTotal<<endl<<endl;
              tos<<TimetableExport::tr("Conflicts list (in decreasing order):")<<endl<<endl;
              foreach(QString t, best_solution.conflictsDescriptionList)
                     tos<<t<<endl;
              tos<<endl<<TimetableExport::tr("End of file.")<<"\n";
       }
       
       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(filename).arg(file.error()));
       }
       file.close();
}

Here is the caller graph for this function:

QString TimetableExport::writeEmpty ( int  htmlLevel) [static, private]

Definition at line 4104 of file timetableexport.cpp.

                                                {
       QString tmp;
       switch(htmlLevel){
              case 3 : ;
              case 4 : tmp="          <td class=\"empty\"><span class=\"empty\">"+protect2(STRING_EMPTY_SLOT)+"</span></td>\n"; break;
              case 5 : ;
              case 6 : tmp="          <td class=\"empty\"><span class=\"empty\" onmouseover=\"highlight('empty')\">"+protect2(STRING_EMPTY_SLOT)+"</span></td>\n"; break;
              default: tmp="          <td>"+protect2(STRING_EMPTY_SLOT)+"</td>\n";
       }
       return tmp;
}

Here is the call graph for this function:

void TimetableExport::writeGroupsTimetableDaysHorizontalHtml ( QWidget *  parent,
const QString &  htmlfilename,
const QString &  saveTime,
int  placedActivities 
) [static, private]

Definition at line 2208 of file timetableexport.cpp.

                                                                                                                                                       {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       //Now we print the results to an HTML file
       QFile file(htmlfilename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(htmlfilename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);

       tos<<writeHead(true, placedActivities, true);
              
       tos<<"    <p><strong>"<<TimetableExport::tr("Table of contents")<<"</strong></p>\n";
       tos<<"    <ul>\n";
       for(int i=0; i<gt.rules.augmentedYearsList.size(); i++){
              StudentsYear* sty=gt.rules.augmentedYearsList[i];
              tos<<"      <li>\n        "<<TimetableExport::tr("Year")<<" "<<protect2(sty->name)<<"\n        <ul>\n";
              for(int j=0; j<sty->groupsList.size(); j++){
                     StudentsGroup* stg=sty->groupsList[j];
                     tos<<"          <li>\n            "<<TimetableExport::tr("Group");
                     tos<<" <a href=\""<<"#table_"<<hashStudentIDsTimetable.value(stg->name)<<"_DETAILED\">"<<protect2(stg->name)<<" ("<<tr("Detailed")<<")</a> /";
                     tos<<" <a href=\""<<"#table_"<<hashStudentIDsTimetable.value(stg->name)<<"\">"<<protect2(stg->name)<<" ("<<tr("Less detailed")<<")</a>\n";
                     tos<<"          </li>\n";
              }
              tos<<"        </ul>\n      </li>\n";
       }
       tos<<"    </ul>\n    <p>&nbsp;</p>\n\n";

       bool PRINT_DETAILED=true;
       do{
              for(int group=0; group<gt.rules.internalGroupsList.size(); group++){
                     tos << singleGroupsTimetableDaysHorizontalHtml(TIMETABLE_HTML_LEVEL, group, saveTime, true, PRINT_DETAILED);
                     tos<<"    <p class=\"back\"><a href=\""<<"#top\">"<<TimetableExport::tr("back to the top")<<"</a></p>\n\n";
              }
              if(PRINT_DETAILED) PRINT_DETAILED=false;
              else PRINT_DETAILED=true;
       } while(!PRINT_DETAILED);
       tos<<"  </body>\n</html>\n";

       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(htmlfilename).arg(file.error()));
       }
       file.close();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void TimetableExport::writeGroupsTimetableDaysVerticalHtml ( QWidget *  parent,
const QString &  htmlfilename,
const QString &  saveTime,
int  placedActivities 
) [static, private]

Definition at line 2261 of file timetableexport.cpp.

                                                                                                                                                     {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       //Now we print the results to an HTML file
       QFile file(htmlfilename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(htmlfilename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);

       tos<<writeHead(true, placedActivities, true);
              
       tos<<"    <p><strong>"<<TimetableExport::tr("Table of contents")<<"</strong></p>\n";
       tos<<"    <ul>\n";
       for(int i=0; i<gt.rules.augmentedYearsList.size(); i++){
              StudentsYear* sty=gt.rules.augmentedYearsList[i];
              tos<<"      <li>\n        "<<TimetableExport::tr("Year")<<" "<<protect2(sty->name)<<"\n        <ul>\n";
              for(int j=0; j<sty->groupsList.size(); j++){
                     StudentsGroup* stg=sty->groupsList[j];
                     tos<<"          <li>\n            "<<TimetableExport::tr("Group");
                     tos<<" <a href=\""<<"#table_"<<hashStudentIDsTimetable.value(stg->name)<<"_DETAILED\">"<<protect2(stg->name)<<" ("<<tr("Detailed")<<")</a> /";
                     tos<<" <a href=\""<<"#table_"<<hashStudentIDsTimetable.value(stg->name)<<"\">"<<protect2(stg->name)<<" ("<<tr("Less detailed")<<")</a>\n";
                     tos<<"          </li>\n";
              }
              tos<<"        </ul>\n      </li>\n";
       }
       tos<<"    </ul>\n    <p>&nbsp;</p>\n";

       bool PRINT_DETAILED=true;
       do{
              for(int group=0; group<gt.rules.internalGroupsList.size(); group++){
                     tos<<singleGroupsTimetableDaysVerticalHtml(TIMETABLE_HTML_LEVEL, group, saveTime, true, PRINT_DETAILED);
                     tos<<"    <p class=\"back\"><a href=\""<<"#top\">"<<TimetableExport::tr("back to the top")<<"</a></p>\n\n";
              }
              if(PRINT_DETAILED) PRINT_DETAILED=false;
              else PRINT_DETAILED=true;
       } while(!PRINT_DETAILED);
       tos<<"  </body>\n</html>\n";

       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(htmlfilename).arg(file.error()));
       }
       file.close();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void TimetableExport::writeGroupsTimetableTimeHorizontalDailyHtml ( QWidget *  parent,
const QString &  htmlfilename,
const QString &  saveTime,
int  placedActivities 
) [static, private]

Definition at line 2427 of file timetableexport.cpp.

                                                                                                                                                            {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       //Now we print the results to an HTML file
       QFile file(htmlfilename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(htmlfilename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);

       tos<<writeHead(true, placedActivities, true);
       tos<<writeTOCDays(true);
       
       bool PRINT_DETAILED=true;
       do{
              for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                     QSet<int> tmp;
                     tos<<singleGroupsTimetableTimeHorizontalDailyHtml(TIMETABLE_HTML_LEVEL, day, gt.rules.internalGroupsList.size(), tmp, saveTime, true, PRINT_DETAILED);

                     tos<<"    <p class=\"back\"><a href=\""<<"#top\">"<<TimetableExport::tr("back to the top")<<"</a></p>\n\n";
              }
              if(PRINT_DETAILED) PRINT_DETAILED=false;
              else PRINT_DETAILED=true;
       } while(!PRINT_DETAILED);
       tos << "  </body>\n</html>\n";

       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(htmlfilename).arg(file.error()));
       }
       file.close();
}

Here is the caller graph for this function:

void TimetableExport::writeGroupsTimetableTimeHorizontalHtml ( QWidget *  parent,
const QString &  htmlfilename,
const QString &  saveTime,
int  placedActivities 
) [static, private]

Definition at line 2351 of file timetableexport.cpp.

                                                                                                                                                       {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       //Now we print the results to an HTML file
       QFile file(htmlfilename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(htmlfilename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);

       tos<<writeHead(true, placedActivities, false);
       
       bool PRINT_DETAILED=true;
       do{
              QSet<int> tmp;
              tos<<singleGroupsTimetableTimeHorizontalHtml(TIMETABLE_HTML_LEVEL, gt.rules.internalGroupsList.size(), tmp, saveTime, true, PRINT_DETAILED);
              tos<<"    <p class=\"back\"><a href=\""<<"#top\">"<<TimetableExport::tr("back to the top")<<"</a></p>\n\n";
              if(PRINT_DETAILED) PRINT_DETAILED=false;
              else PRINT_DETAILED=true;
       } while(!PRINT_DETAILED);
       tos << "  </body>\n</html>\n";

       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(htmlfilename).arg(file.error()));
       }
       file.close();
}

Here is the caller graph for this function:

void TimetableExport::writeGroupsTimetableTimeVerticalDailyHtml ( QWidget *  parent,
const QString &  htmlfilename,
const QString &  saveTime,
int  placedActivities 
) [static, private]

Definition at line 2387 of file timetableexport.cpp.

                                                                                                                                                          {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       //Now we print the results to an HTML file
       QFile file(htmlfilename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(htmlfilename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);

       tos<<writeHead(true, placedActivities, true);
       tos<<writeTOCDays(true);

       bool PRINT_DETAILED=true;
       do{
              for(int day=0; day<gt.rules.nDaysPerWeek; day++){
                     QSet<int> tmp;
                     tos<<singleGroupsTimetableTimeVerticalDailyHtml(TIMETABLE_HTML_LEVEL, day, gt.rules.internalGroupsList.size(), tmp, saveTime, true, PRINT_DETAILED);

                     tos<<"    <p class=\"back\"><a href=\""<<"#top\">"<<TimetableExport::tr("back to the top")<<"</a></p>\n\n";
              }
              if(PRINT_DETAILED) PRINT_DETAILED=false;
              else PRINT_DETAILED=true;
       } while(!PRINT_DETAILED);
       tos << "  </body>\n</html>\n";

       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(htmlfilename).arg(file.error()));
       }
       file.close();
}

Here is the caller graph for this function:

void TimetableExport::writeGroupsTimetableTimeVerticalHtml ( QWidget *  parent,
const QString &  htmlfilename,
const QString &  saveTime,
int  placedActivities 
) [static, private]

Definition at line 2314 of file timetableexport.cpp.

                                                                                                                                                     {
       assert(gt.rules.initialized && gt.rules.internalStructureComputed);
       assert(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready);

       //Now we print the results to an HTML file
       QFile file(htmlfilename);
       if(!file.open(QIODevice::WriteOnly)){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Cannot open file %1 for writing. Please check your disk's free space. Saving of %1 aborted.").arg(htmlfilename));
              return;
              assert(0);
       }
       QTextStream tos(&file);
       tos.setCodec("UTF-8");
       tos.setGenerateByteOrderMark(true);

       tos<<writeHead(true, placedActivities, false);
       
       bool PRINT_DETAILED=true;
       do{
              QSet<int> tmp;
              tos<<singleGroupsTimetableTimeVerticalHtml(TIMETABLE_HTML_LEVEL, gt.rules.internalGroupsList.size(), tmp, saveTime, true, PRINT_DETAILED);

              tos<<"    <p class=\"back\"><a href=\""<<"#top\">"<<TimetableExport::tr("back to the top")<<"</a></p>\n\n";
              if(PRINT_DETAILED) PRINT_DETAILED=false;
              else PRINT_DETAILED=true;
       } while(!PRINT_DETAILED);
       tos << "  </body>\n</html>\n";

       if(file.error()>0){
              QMessageBox::critical(parent, tr("FET critical"),
               TimetableExport::tr("Writing %1 gave error code %2, which means saving is compromised. Please check your disk's free space.").arg(htmlfilename).arg(file.error()));
       }
       file.close();
}

Here is the caller graph for this function:

QString TimetableExport::writeHead ( bool  java,
int  placedActivities,
bool  printInstitution 
) [static, private]

Definition at line 3833 of file timetableexport.cpp.

                                                                                        {
       QString tmp;
       tmp+="<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n";
       tmp+="  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\n";

       if(!LANGUAGE_STYLE_RIGHT_TO_LEFT)
              tmp+="<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\""+LANGUAGE_FOR_HTML+"\" xml:lang=\""+LANGUAGE_FOR_HTML+"\">\n";
       else
              tmp+="<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\""+LANGUAGE_FOR_HTML+"\" xml:lang=\""+LANGUAGE_FOR_HTML+"\" dir=\"rtl\">\n";
       tmp+="  <head>\n";
       tmp+="    <title>"+protect2(gt.rules.institutionName)+"</title>\n";