• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kresources
 

kresources

  • kresources
managerimpl.h
1 /*
2  This file is part of libkresources.
3 
4  Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
5  Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
6  Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
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
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
23 #ifndef KRESOURCES_MANAGERIMPL_H
24 #define KRESOURCES_MANAGERIMPL_H
25 
26 #include <tqstring.h>
27 #include <tqptrlist.h>
28 #include <tqdict.h>
29 
30 #include "manageriface.h"
31 #include <kresources/resource.h>
32 
33 class KConfig;
34 
35 namespace KRES {
36 
37 class Resource;
38 class Factory;
39 class ManagerNotifier;
40 
46 class KRESOURCES_EXPORT ManagerImpl : virtual public ManagerIface
47 {
48  public:
49  ManagerImpl( ManagerNotifier *, const TQString &family );
50  ~ManagerImpl();
51 
52  void readConfig( KConfig * );
53  void writeConfig( KConfig * );
54 
55  void add( Resource *resource );
56  void remove( Resource *resource );
57  void change( Resource *resource );
58 
59  Resource *standardResource();
60  void setStandardResource( Resource *resource );
61 
62  void setActive( Resource *resource, bool active );
63 
64  Resource::List *resourceList();
65 
66  TQPtrList<Resource> resources();
67 
68  // Get only active or passive resources
69  TQPtrList<Resource> resources( bool active );
70 
71  TQStringList resourceNames();
72 
73  static TQString defaultConfigFile( const TQString &family );
74 
75  private:
76  // dcop calls
77  void dcopKResourceAdded( TQString managerId, TQString resourceId );
78  void dcopKResourceModified( TQString managerId, TQString resourceId );
79  void dcopKResourceDeleted( TQString managerId, TQString resourceId );
80 
81  private:
82  void createStandardConfig();
83 
84  Resource *readResourceConfig( const TQString& identifier, bool checkActive );
85  void writeResourceConfig( Resource *resource, bool checkActive );
86 
87  void removeResource( Resource *resource );
88  Resource *getResource( Resource *resource );
89  Resource *getResource( const TQString& identifier );
90 
91  ManagerNotifier *mNotifier;
92  TQString mFamily;
93  KConfig *mConfig;
94  KConfig *mStdConfig;
95  Resource *mStandard;
96  Factory *mFactory;
97  Resource::List mResources;
98  TQString mId;
99  bool mConfigRead;
100 
101  class ManagerImplPrivate;
102  ManagerImplPrivate *d;
103 };
104 
105 }
106 
107 #endif

kresources

Skip menu "kresources"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kresources

Skip menu "kresources"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kresources by doxygen 1.9.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |