Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Examples  

actionhandler.h

Go to the documentation of this file.
00001 
00002 //
00003 // YASA application action handler declarations
00004 // This file contains all information about the actions occured by user interactions
00005 //
00006 // Project: Yasa 2
00007 // Author : Jan Blumenthal
00008 // Start  : 2002/02/28
00009 // $Header: /sources/yasa/yasagui/actionhandler.h,v 1.4 2003/01/24 15:47:40 bj Exp $
00010 //
00012 //
00013 // This program is free software; you can redistribute it and/or modify
00014 // it under the terms of the GNU General Public License as published by
00015 // the Free Software Foundation; either version 2 of the License, or
00016 // (at your option) any later version.
00017 //
00018 // This program is distributed in the hope that it will be useful,
00019 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021 // GNU General Public License for more details.
00022 //
00023 // You should have received a copy of the GNU General Public License
00024 // along with this program (See the included file COPYING);
00025 // if not, write to the Free Software Foundation, Inc.,
00026 // 675 Mass Ave, Cambridge, MA 02139, USA.
00027 //
00029 #ifndef YASAGUI_ACTIONHANDLER_INCLUDE
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,  //WORKSPACE_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

Generated on Thu Feb 13 23:43:52 2003 for Yasa by doxygen1.3-rc3