defuze.me
Client
|
00001 #ifndef EVENTWIDGET_HPP 00002 #define EVENTWIDGET_HPP 00003 00004 #include <QLabel> 00005 #include <QSqlQuery> 00006 #include <QStandardItemModel> 00007 #include <QTreeView> 00008 00009 #include "guicore.hpp" 00010 #include "ui_eventwidget.h" 00011 #include "scheduler.hpp" 00012 #include "eventmodel.hpp" 00013 #include "eventplaylist.hpp" 00014 00015 namespace Scheduler 00016 { 00017 00018 class EventColor; 00019 class EventModel; 00020 class EventPlaylist; 00021 class SchedulerPlugin; 00022 00023 class EventWidget : public Gui::ModuleWidget, private Ui::EventWidget 00024 { 00025 Q_OBJECT 00026 public: 00027 explicit EventWidget(SchedulerPlugin *scheduler, QWidget *parent = 0); 00028 00029 void clear(); 00030 void setUpdate(EventModel *updateEvent); 00031 00032 QList<EventColor*> *colors; 00033 SchedulerPlugin *scheduler; 00034 Playlists::PlaylistsPlugin *playlistsPlugin; 00035 QList<Playlists::Playlist*> *playlists; 00036 EventPlaylist *playlistsWidget; 00037 00038 private: 00039 bool check(); 00040 void initialize(); 00041 void updateEvent(); 00042 00043 protected: 00044 EventModel *event; 00045 00046 signals: 00047 void newEvent(Scheduler::EventModel*); 00048 void updateEvent(Scheduler::EventModel*); 00049 void removeEvent(Scheduler::EventModel*); 00050 00051 public slots: 00052 void on_submitEventButton_clicked(); 00053 void on_deleteEventButton_clicked(); 00054 }; 00055 } 00056 00057 #endif // EVENTWIDGET_HPP