00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __TIMESLOT_PAGE_WDGT_H
00022 #define __TIMESLOT_PAGE_WDGT_H
00023
00024 #include <QtGui>
00025
00026 #include "ui_TimeSlotPage_wdgt.h"
00027 #include "RoomPage_wdgt.h"
00028
00029 #include "TimeSlotModel.h"
00030 #include "DailyTimeSlotItem.h"
00031 #include "TimeSlot.h"
00032
00033 class TimeSlotPageWidget : public RootPageWidget
00034 {
00035 Q_OBJECT
00036 public:
00037 TimeSlotPageWidget(ControlPanel * window
00038 ,QWidget * widgetParent
00039 ,QBoxLayout * layoutParent
00040 ,dbListManager * dataLists);
00041 protected:
00042 QSet<TimeSlot::days> selectedDays;
00043 QVBoxLayout * vboxLayout;
00044 Ui::TimeSlotPage_wdgt wdgt;
00045 Institute * instObj;
00046 int duration, repeat;
00047 QTime startTime;
00048 DailyTimeSlotItem * selectedTimeSlot;
00049 Qt::KeyboardModifiers KeyModifier;
00050 private:
00051 bool eventFilter(QObject * target, QEvent * event);
00052 void createActions();
00053 void toggleCheckBox(QCheckBox * chk);
00054 void toggleWeekDay(bool);
00055 void toggleWeekend(bool);
00056 bool validateData(QString *msg);
00057 bool validateDay(QString *msg);
00058 void addSlots();
00059 int addTimeSlot(Institute * inst, TimeSlot::days theDay, int duration, QTime startTime, int offset=0);
00060 private slots:
00061 void cbxInstSelected(QString name);
00062 void addSlotsClicked();
00063 void TimeSlotClicked(const QModelIndex & index);
00064 };
00065
00066 #endif