Back to index

fet  5.18.0
studentsset.h
Go to the documentation of this file.
00001 //
00002 //
00003 // Description: This file is part of FET
00004 //
00005 //
00006 // Author: Liviu Lalescu <Please see http://lalescu.ro/liviu/ for details about contacting Liviu Lalescu (in particular, you can find here the e-mail address)>
00007 // Copyright (C) 2003 Liviu Lalescu <http://lalescu.ro/liviu/>
00008 //
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef STUDENTSSET_H
00019 #define STUDENTSSET_H
00020 
00021 #include <QCoreApplication>
00022 
00023 #include "timetable_defs.h"
00024 
00025 #include <QList>
00026 
00027 const int STUDENTS_SET=0;
00028 const int STUDENTS_YEAR=1;
00029 const int STUDENTS_GROUP=2;
00030 const int STUDENTS_SUBGROUP=3;
00031 
00032 class StudentsYear;
00033 class StudentsGroup;
00034 class StudentsSubgroup;
00035 
00036 class Rules;
00037 
00038 typedef QList<StudentsYear*> StudentsYearsList;
00039 
00040 typedef QList<StudentsGroup*> StudentsGroupsList;
00041 
00042 typedef QList<StudentsSubgroup*> StudentsSubgroupsList;
00043 
00049 class StudentsSet
00050 {
00051        Q_DECLARE_TR_FUNCTIONS(StudentsSet)
00052 
00053 public:
00054        QString name;
00055        int numberOfStudents;
00056        int type;
00057 
00058        StudentsSet();
00059        ~StudentsSet();
00060 };
00061 
00062 class StudentsYear: public StudentsSet
00063 {
00064        Q_DECLARE_TR_FUNCTIONS(StudentsYear)
00065        
00066 public:
00067        StudentsGroupsList groupsList;
00068 
00069        int indexInAugmentedYearsList; //internal
00070 
00071        StudentsYear();
00072        ~StudentsYear();
00073 
00074        QString getXmlDescription();
00075        QString getDescription();
00076        QString getDetailedDescription();
00077        QString getDetailedDescriptionWithConstraints(Rules& r);
00078 };
00079 
00080 class StudentsGroup: public StudentsSet
00081 {
00082        Q_DECLARE_TR_FUNCTIONS(StudentsGroup)
00083 
00084 public:
00085        StudentsSubgroupsList subgroupsList;
00086 
00087        int indexInInternalGroupsList; //internal
00088        
00089        StudentsGroup();
00090        ~StudentsGroup();
00091 
00092        QString getXmlDescription();
00093        QString getDescription();
00094        QString getDetailedDescription();
00095        QString getDetailedDescriptionWithConstraints(Rules& r);
00096 };
00097 
00098 class StudentsSubgroup: public StudentsSet
00099 {
00100        Q_DECLARE_TR_FUNCTIONS(StudentsSubgroup)
00101 
00102 public:
00103        int indexInInternalSubgroupsList;
00104        
00105        QList<qint16> activitiesForSubgroup;
00106 
00107        StudentsSubgroup();
00108        ~StudentsSubgroup();
00109 
00110        QString getXmlDescription();
00111        QString getDescription();
00112        QString getDetailedDescription();
00113        QString getDetailedDescriptionWithConstraints(Rules& r);
00114 };
00115 
00116 int yearsAscending(const StudentsYear* y1, const StudentsYear* y2);
00117 
00118 int groupsAscending(const StudentsGroup* g1, const StudentsGroup* g2);
00119 
00120 int subgroupsAscending(const StudentsSubgroup* s1, const StudentsSubgroup* s2);
00121 
00122 #endif