1 | /*
|
---|
2 | * actionlist.h - the customizeable action list
|
---|
3 | * Copyright (C) 2004 Michail Pishchagin
|
---|
4 | *
|
---|
5 | * This program is free software; you can redistribute it and/or
|
---|
6 | * modify it under the terms of the GNU General Public License
|
---|
7 | * as published by the Free Software Foundation; either version 2
|
---|
8 | * of the License, or (at your option) any later version.
|
---|
9 | *
|
---|
10 | * This program is distributed in the hope that it will be useful,
|
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
13 | * GNU General Public License for more details.
|
---|
14 | *
|
---|
15 | * You should have received a copy of the GNU General Public License
|
---|
16 | * along with this library; if not, write to the Free Software
|
---|
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
18 | *
|
---|
19 | */
|
---|
20 |
|
---|
21 | #ifndef ACTIONLIST_H
|
---|
22 | #define ACTIONLIST_H
|
---|
23 |
|
---|
24 | #include <qstringlist.h>
|
---|
25 | #include <qptrlist.h>
|
---|
26 |
|
---|
27 | class IconAction;
|
---|
28 |
|
---|
29 | class ActionList
|
---|
30 | {
|
---|
31 | public:
|
---|
32 | ActionList(QString name, int id, bool autoDelete = true);
|
---|
33 | ActionList(const ActionList &);
|
---|
34 | ~ActionList();
|
---|
35 |
|
---|
36 | QString name() const;
|
---|
37 | int id() const;
|
---|
38 |
|
---|
39 | IconAction *action( QString name ) const;
|
---|
40 | QStringList actions() const;
|
---|
41 |
|
---|
42 | void addAction( QString name, IconAction *action );
|
---|
43 |
|
---|
44 | void clear();
|
---|
45 |
|
---|
46 | public:
|
---|
47 | class Private;
|
---|
48 | private:
|
---|
49 | Private *d;
|
---|
50 | };
|
---|
51 |
|
---|
52 | class MetaActionList
|
---|
53 | {
|
---|
54 | public:
|
---|
55 | MetaActionList();
|
---|
56 | ~MetaActionList();
|
---|
57 |
|
---|
58 | ActionList *actionList( QString name ) const;
|
---|
59 | QPtrList<ActionList> actionLists( int id ) const;
|
---|
60 | QStringList actionLists() const;
|
---|
61 |
|
---|
62 | ActionList suitableActions( int id ) const;
|
---|
63 |
|
---|
64 | void addList( ActionList * );
|
---|
65 |
|
---|
66 | void clear();
|
---|
67 |
|
---|
68 | private:
|
---|
69 | class Private;
|
---|
70 | Private *d;
|
---|
71 | };
|
---|
72 |
|
---|
73 | #endif
|
---|