| 1 | /* |
|---|
| 2 | * Hydrogen |
|---|
| 3 | * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net] |
|---|
| 4 | * |
|---|
| 5 | * http://www.hydrogen-music.org |
|---|
| 6 | * |
|---|
| 7 | * This program is free software; you can redistribute it and/or modify |
|---|
| 8 | * it under the terms of the GNU General Public License as published by |
|---|
| 9 | * the Free Software Foundation; either version 2 of the License, or |
|---|
| 10 | * (at your option) any later version. |
|---|
| 11 | * |
|---|
| 12 | * This program is distributed in the hope that it will be useful, |
|---|
| 13 | * but WITHOUT ANY WARRANTY, without even the implied warranty of |
|---|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | * GNU General Public License for more details. |
|---|
| 16 | * |
|---|
| 17 | * You should have received a copy of the GNU General Public License |
|---|
| 18 | * along with this program; if not, write to the Free Software |
|---|
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 20 | * |
|---|
| 21 | */ |
|---|
| 22 | #ifndef ACTION_H |
|---|
| 23 | #define ACTION_H |
|---|
| 24 | #include <hydrogen/Object.h> |
|---|
| 25 | #include <map> |
|---|
| 26 | #include <string> |
|---|
| 27 | |
|---|
| 28 | using namespace std; |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | class Action : public Object { |
|---|
| 32 | public: |
|---|
| 33 | Action( QString ); |
|---|
| 34 | |
|---|
| 35 | QString getType(); |
|---|
| 36 | |
|---|
| 37 | void setParameter1( QString ); |
|---|
| 38 | void setParameter2( QString ); |
|---|
| 39 | |
|---|
| 40 | QString getParameter1(); |
|---|
| 41 | QString getParameter2(); |
|---|
| 42 | |
|---|
| 43 | private: |
|---|
| 44 | QString type; |
|---|
| 45 | QString parameter1; |
|---|
| 46 | QString parameter2; |
|---|
| 47 | }; |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | class ActionManager : public Object |
|---|
| 54 | { |
|---|
| 55 | private: |
|---|
| 56 | static ActionManager *instance; |
|---|
| 57 | QStringList actionList; |
|---|
| 58 | QStringList eventList; |
|---|
| 59 | |
|---|
| 60 | public: |
|---|
| 61 | static ActionManager* getInstance(); |
|---|
| 62 | |
|---|
| 63 | bool handleAction( Action * ); |
|---|
| 64 | |
|---|
| 65 | QStringList getActionList(); |
|---|
| 66 | QStringList getEventList(); |
|---|
| 67 | |
|---|
| 68 | ActionManager(); |
|---|
| 69 | ~ActionManager(); |
|---|
| 70 | }; |
|---|
| 71 | #endif |
|---|