#ifndef APPEVENTS_H #define APPEVENTS_H #include #include "task.h" enum { ClientInitId = 62000, ClientCloseId = 62001, AttachDatabaseId, SelectTaskId, UiInitId }; template class ClientEvent: public QEvent { private: int mType = N; public: ClientEvent() :QEvent(static_cast(N)) {} }; class SelectTaskEvent: public ClientEvent { public: SelectTaskEvent(PTask task) { mTask = task; } PTask task() { return mTask; } protected: PTask mTask; }; #endif // APPEVENTS_H