00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00029
00030 #define YASAGUI_ACTIONHANDLER_INCLUDE
00031
00032 #include <qvector.h>
00033 #include <qaction.h>
00034 #include "yasagui/yasagui.h"
00035 #include "workspacemanager.h"
00036
00037
00039 class YActions;
00040 class QListViewItem;
00041
00042
00046 class YActionHandler : public QObject
00047 { Q_OBJECT
00048 QArray<YActions*> actions;
00049 QWidget *parentwidget;
00050 YObject *object;
00051 YActions* _GetActions(unsigned int a) { return actions.at(a); }
00052 YWorkSpaceManager &workspacemanager;
00053 public:
00054 enum ACTION_TYPES
00055 { PROJECTSET_ACTIONS=0 , PROJECT_ACTIONS,
00056 TASKSET_ACTIONS , TASK_ACTIONS,
00057 MUTEXSET_ACTIONS , MUTEX_ACTIONS,
00058 ENVIRONMENTSET_ACTIONS , ENVIRONMENT_ACTIONS,
00059 SCHEDULERSET_ACTIONS , SCHEDULER_ACTIONS,
00060 HEADERSET_ACTIONS , FILEPATH_ACTIONS,
00061 SOURCESET_ACTIONS , RESULTS_ACTIONS,
00062 TIMING_RESULT_ACTIONS , STATISTIC_RESULT_ACTIONS,
00063 MAX_ACTIONS };
00064 YActionHandler(YWorkSpaceManager &wsm) :
00065 actions(MAX_ACTIONS),
00066 parentwidget(0),
00067 object(0),
00068 workspacemanager(wsm)
00069 {
00070 }
00071 ~YActionHandler();
00072 int InitInstance(QWidget *widget);
00073 void UpdateActions();
00074 static void SetCurrentObject(YObject* object);
00075 static YActions* GetActions(unsigned int a);
00077 YObject* GetCurrentObject() { return object; }
00078 QWidget* GetParentWidget() { return parentwidget; }
00079 YWorkSpaceManager& GetWorkSpaceManager() { return workspacemanager;}
00080 public slots:
00081 void ObjectInvalid() { object=0; }
00082
00083 };
00084
00085
00086
00087
00089 #endif // ifndef YASAGUI_ACTIONHANDLER_INCLUDE