Back to index

fet  5.18.0
activityplanningform.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                                 FET
00003                           -------------------
00004    copyright            : (C) by Lalescu Liviu
00005     email                : Please see http://lalescu.ro/liviu/ for details about contacting Liviu Lalescu (in particular, you can find here the e-mail address)
00006  ***************************************************************************
00007                       activityplanning.h  -  description
00008                              -------------------
00009     begin                : 2009
00010     copyright            : (C) 2009 by Volker Dirr
00011                          : http://www.timetabling.de/
00012  ***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 
00021 #ifndef ACTIVITYPLANNINGFORM_H
00022 #define ACTIVITYPLANNINGFORM_H
00023 
00024 #include <QResizeEvent>
00025 
00026 #include <QObject>
00027 
00028 #include "sparsetableview.h"
00029 
00030 #include <QList>
00031 
00032 #include <QDialog>
00033 
00034 class QTableWidget;
00035 class QRadioButton;
00036 class QCheckBox;
00037 class QPushButton;
00038 class QTableWidgetItem;
00039 class QComboBox;
00040 class QGroupBox;
00041 class QToolButton;
00042 class QSizePolicy;
00043 class QSplitter;
00044 
00045 class StartActivityPlanning{
00046 public:
00047        StartActivityPlanning();
00048        ~StartActivityPlanning();
00049 
00050        static void startActivityPlanning(QWidget* parent);
00051 };
00052 
00053 class ActivityPlanningForm: public QDialog{
00054        Q_OBJECT
00055        
00056 public:
00057        ActivityPlanningForm(QWidget *parent);
00058        ~ActivityPlanningForm();
00059 
00060 private:
00061        bool buttonsVisible;
00062 
00063        QSplitter* leftSplitter;
00064        SparseTableView* activitiesTableView;
00065        SparseTableView* teachersTableView;
00066        QRadioButton* RBActivity;
00067        QRadioButton* RBSubactivity;
00068        QRadioButton* RBAdd;
00069        QRadioButton* RBModify;
00070        QRadioButton* RBDelete;
00071        QComboBox* CBActive;
00072        QCheckBox* showDuplicates;
00073        QCheckBox* showYears;
00074        QCheckBox* showGroups;
00075        QCheckBox* showSubgroups;
00076        QCheckBox* showTeachers;
00077        QCheckBox* showActivityTags;
00078        QCheckBox* hideEmptyLines;
00079        QCheckBox* hideUsedTeachers;
00080        QCheckBox* swapAxis;
00081        QPushButton* pbPseudoActivities;
00082        QPushButton* pbDeleteAll;
00083        //QPushButton* pbHelp;
00084        
00085        QToolButton* showHideButton;
00086        QSizePolicy origShowHideSizePolicy;
00087        
00088        QPushButton* pbClose;
00089        QCheckBox* changedActivities;
00090        
00091        QGroupBox* actionsBox;
00092        QGroupBox* optionsBox;
00093        
00094        void computeActivitiesForDeletion(const QString& teacherName, const QString& studentsSetName, const QString& subjectName,
00095               const QList<int>& tmpID, const QList<int>& tmpGroupID,
00096               int& nTotalActsDeleted,
00097               QList<int>& _idsToBeRemoved, QList<int>& _agidsToBeRemoved,
00098               QList<bool>& _affectOtherTeachersToBeRemoved, bool& _affectOtherTeachersOverall,
00099               QList<bool>& _affectOtherStudentsSetsToBeRemoved, bool& _affectOtherStudentsSetsOverall,
00100               QList<bool>& _affectOtherSubjectsToBeRemoved, bool& _affectOtherSubjectsOverall);
00101        
00102 private slots:
00103        //void activitiesCellSelected(int, int);
00104        void activitiesCellSelected(const QModelIndex& index);
00105        //void teachersCellSelected(QTableWidgetItem*);
00106        void teachersCellSelected(const QModelIndex& index);
00107        //mouseTracking (start 1/4)
00108        //void ActivtiesCellEntered(int, int);
00109        //void TeachersCellEntered(int, int);
00110        //mouseTracking (end 1/4)
00111        void activitiesTableHorizontalHeaderClicked(int);
00112        void activitiesTableVerticalHeaderClicked(int);
00113        void teachersTableHorizontalHeaderClicked(int);
00114        void updateTables(int);
00115        void updateTables_Students_Subjects();
00116        void updateTables_Teachers();
00117        void updateTablesVisual(int);
00118        //void help();
00119        void pseudoActivities();
00120        void deleteAll();
00121        
00122        void showHide();
00123        
00124 /*protected:
00125        void resizeEvent(QResizeEvent* event);*/
00126 };
00127 
00128 
00129 //communication box by Liviu Lalescu
00130 class PlanningCommunicationSpinBox: public QObject{
00131        Q_OBJECT
00132 
00133 private:
00134        int value;
00135        int maxValue;
00136        int minValue;
00137        
00138 public:
00139        PlanningCommunicationSpinBox();
00140        ~PlanningCommunicationSpinBox();
00141        
00142 signals:
00143        int valueChanged(int newValue);
00144        
00145 public slots:
00146        void increaseValue();
00147 };
00148 
00149 
00150 class PlanningChanged{
00151 public:
00152        static void increasePlanningCommunicationSpinBox();
00153 };
00154 
00155 #endif