Back to index

fet  5.18.0
modifyconstraintactivitiesmaxsimultaneousinselectedtimeslotsform.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                           modifyconstraintactivitiesmaxsimultaneousinselectedtimeslotsform.h  -  description
00003                              -------------------
00004     begin                : Sept 26, 2011
00005     copyright            : (C) 2011 by Lalescu Liviu
00006     email                : Please see http://lalescu.ro/liviu/ for details about contacting Liviu Lalescu (in particular, you can find here the e-mail address)
00007  ***************************************************************************/
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 MODIFYCONSTRAINTACTIVITIESMAXSIMULTANEOUSINSELECTEDTIMESLOTSFORM_H
00019 #define MODIFYCONSTRAINTACTIVITIESMAXSIMULTANEOUSINSELECTEDTIMESLOTSFORM_H
00020 
00021 #include "ui_modifyconstraintactivitiesmaxsimultaneousinselectedtimeslotsform_template.h"
00022 #include "timetable_defs.h"
00023 #include "timetable.h"
00024 #include "fet.h"
00025 
00026 #include <QList>
00027 
00028 class ModifyConstraintActivitiesMaxSimultaneousInSelectedTimeSlotsForm : public QDialog, Ui::ModifyConstraintActivitiesMaxSimultaneousInSelectedTimeSlotsForm_template  {
00029        Q_OBJECT
00030        
00031 public:
00032        ModifyConstraintActivitiesMaxSimultaneousInSelectedTimeSlotsForm(QWidget* parent, ConstraintActivitiesMaxSimultaneousInSelectedTimeSlots* ctr);
00033        ~ModifyConstraintActivitiesMaxSimultaneousInSelectedTimeSlotsForm();
00034 
00035        void colorItem(QTableWidgetItem* item);
00036        
00037        void updateActivitiesListWidget();
00038        
00039        bool filterOk(Activity* act);
00040 
00041 public slots:
00042        void addActivity();
00043        void addAllActivities();
00044        void removeActivity();
00045        
00046        void filterChanged();
00047        
00048        void clear();
00049 
00050        void ok();
00051        void cancel();
00052 
00053        void itemClicked(QTableWidgetItem* item);
00054        void horizontalHeaderClicked(int col);
00055        void verticalHeaderClicked(int row);
00056        
00057        void setAllUnselected();
00058        void setAllSelected();
00059        
00060 private:
00061        ConstraintActivitiesMaxSimultaneousInSelectedTimeSlots* _ctr;
00062 
00063        //the id's of the activities listed in the activities list
00064        QList<int> activitiesList;
00065        //the id-s of the activities listed in the list of selected activities
00066        QList<int> selectedActivitiesList;
00067 };
00068 
00069 #endif