Diffstat (limited to 'microkde/kresources/managerimpl.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/managerimpl.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/microkde/kresources/managerimpl.h b/microkde/kresources/managerimpl.h index 56a2db6..1f728e5 100644 --- a/microkde/kresources/managerimpl.h +++ b/microkde/kresources/managerimpl.h | |||
@@ -3,117 +3,117 @@ | |||
3 | 3 | ||
4 | Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> | 4 | Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> |
5 | Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> | 5 | Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> |
6 | Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> | 6 | Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> |
7 | 7 | ||
8 | This library is free software; you can redistribute it and/or | 8 | This library is free software; you can redistribute it and/or |
9 | modify it under the terms of the GNU Library General Public | 9 | modify it under the terms of the GNU Library General Public |
10 | License as published by the Free Software Foundation; either | 10 | License as published by the Free Software Foundation; either |
11 | version 2 of the License, or (at your option) any later version. | 11 | version 2 of the License, or (at your option) any later version. |
12 | 12 | ||
13 | This library is distributed in the hope that it will be useful, | 13 | This library is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16 | Library General Public License for more details. | 16 | Library General Public License for more details. |
17 | 17 | ||
18 | You should have received a copy of the GNU Library General Public License | 18 | You should have received a copy of the GNU Library General Public License |
19 | along with this library; see the file COPYING.LIB. If not, write to | 19 | along with this library; see the file COPYING.LIB. If not, write to |
20 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 20 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
21 | Boston, MA 02111-1307, USA. | 21 | Boston, MA 02111-1307, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef KRESOURCES_MANAGERIMPL_H | 31 | #ifndef KRESOURCES_MANAGERIMPL_H |
32 | #define KRESOURCES_MANAGERIMPL_H | 32 | #define KRESOURCES_MANAGERIMPL_H |
33 | 33 | ||
34 | #include <qstring.h> | 34 | #include <qstring.h> |
35 | #include <qptrlist.h> | 35 | #include <q3ptrlist.h> |
36 | #include <qdict.h> | 36 | #include <q3dict.h> |
37 | //US | 37 | //US |
38 | #include <qobject.h> | 38 | #include <qobject.h> |
39 | 39 | ||
40 | #include "resource.h" | 40 | #include "resource.h" |
41 | 41 | ||
42 | 42 | ||
43 | class KConfig; | 43 | class KConfig; |
44 | 44 | ||
45 | namespace KRES { | 45 | namespace KRES { |
46 | 46 | ||
47 | class Resource; | 47 | class Resource; |
48 | class Factory; | 48 | class Factory; |
49 | 49 | ||
50 | class ManagerImplListener | 50 | class ManagerImplListener |
51 | { | 51 | { |
52 | public: | 52 | public: |
53 | virtual void resourceAdded( Resource *resource ) = 0; | 53 | virtual void resourceAdded( Resource *resource ) = 0; |
54 | virtual void resourceModified( Resource *resource ) = 0; | 54 | virtual void resourceModified( Resource *resource ) = 0; |
55 | virtual void resourceDeleted( Resource *resource ) = 0; | 55 | virtual void resourceDeleted( Resource *resource ) = 0; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | 58 | ||
59 | /** | 59 | /** |
60 | @internal | 60 | @internal |
61 | 61 | ||
62 | Do not use this class directly. Use ResourceManager instead | 62 | Do not use this class directly. Use ResourceManager instead |
63 | */ | 63 | */ |
64 | class ManagerImpl : public QObject | 64 | class ManagerImpl : public QObject |
65 | { | 65 | { |
66 | Q_OBJECT | 66 | Q_OBJECT |
67 | public: | 67 | public: |
68 | ManagerImpl( const QString &family); | 68 | ManagerImpl( const QString &family); |
69 | ~ManagerImpl(); | 69 | ~ManagerImpl(); |
70 | 70 | ||
71 | void readConfig( KConfig * ); | 71 | void readConfig( KConfig * ); |
72 | void writeConfig( KConfig * ); | 72 | void writeConfig( KConfig * ); |
73 | 73 | ||
74 | void add( Resource *resource, bool useDCOP = true ); | 74 | void add( Resource *resource, bool useDCOP = true ); |
75 | void remove( Resource *resource, bool useDCOP = true ); | 75 | void remove( Resource *resource, bool useDCOP = true ); |
76 | 76 | ||
77 | Resource *standardResource(); | 77 | Resource *standardResource(); |
78 | void setStandardResource( Resource *resource ); | 78 | void setStandardResource( Resource *resource ); |
79 | 79 | ||
80 | void setActive( Resource *resource, bool active ); | 80 | void setActive( Resource *resource, bool active ); |
81 | 81 | ||
82 | Resource::List *resourceList(); | 82 | Resource::List *resourceList(); |
83 | 83 | ||
84 | QPtrList<Resource> resources(); | 84 | Q3PtrList<Resource> resources(); |
85 | 85 | ||
86 | // Get only active or passive resources | 86 | // Get only active or passive resources |
87 | QPtrList<Resource> resources( bool active ); | 87 | Q3PtrList<Resource> resources( bool active ); |
88 | 88 | ||
89 | QStringList resourceNames(); | 89 | QStringList resourceNames(); |
90 | 90 | ||
91 | void setListener( ManagerImplListener *listener ); | 91 | void setListener( ManagerImplListener *listener ); |
92 | 92 | ||
93 | public slots: | 93 | public slots: |
94 | void resourceChanged( Resource *resource ); | 94 | void resourceChanged( Resource *resource ); |
95 | 95 | ||
96 | private: | 96 | private: |
97 | // dcop calls | 97 | // dcop calls |
98 | 98 | ||
99 | private: | 99 | private: |
100 | void createStandardConfig(); | 100 | void createStandardConfig(); |
101 | 101 | ||
102 | Resource *readResourceConfig( const QString& identifier, bool checkActive ); | 102 | Resource *readResourceConfig( const QString& identifier, bool checkActive ); |
103 | void writeResourceConfig( Resource *resource, bool checkActive ); | 103 | void writeResourceConfig( Resource *resource, bool checkActive ); |
104 | 104 | ||
105 | void removeResource( Resource *resource ); | 105 | void removeResource( Resource *resource ); |
106 | Resource *getResource( Resource *resource ); | 106 | Resource *getResource( Resource *resource ); |
107 | Resource *getResource( const QString& identifier ); | 107 | Resource *getResource( const QString& identifier ); |
108 | 108 | ||
109 | QString mFamily; | 109 | QString mFamily; |
110 | KConfig *mConfig; | 110 | KConfig *mConfig; |
111 | KConfig *mStdConfig; | 111 | KConfig *mStdConfig; |
112 | Resource *mStandard; | 112 | Resource *mStandard; |
113 | Factory *mFactory; | 113 | Factory *mFactory; |
114 | Resource::List mResources; | 114 | Resource::List mResources; |
115 | ManagerImplListener *mListener; | 115 | ManagerImplListener *mListener; |
116 | }; | 116 | }; |
117 | 117 | ||
118 | } | 118 | } |
119 | 119 | ||