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

tderesources

  • tderesources
managerimpl.h
1/*
2 This file is part of libtderesources.
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 TDERESOURCES_MANAGERIMPL_H
24#define TDERESOURCES_MANAGERIMPL_H
25
26#include <tqstring.h>
27#include <tqptrlist.h>
28#include <tqdict.h>
29
30#include "manageriface.h"
31#include <tderesources/resource.h>
32
33class TDEConfig;
34
35namespace KRES {
36
37class Resource;
38class Factory;
39class ManagerNotifier;
40
46class TDERESOURCES_EXPORT ManagerImpl : virtual public ManagerIface
47{
48 public:
49 ManagerImpl( ManagerNotifier *, const TQString &family );
50 ~ManagerImpl();
51
52 void readConfig( TDEConfig * );
53 void writeConfig( TDEConfig * );
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 TDEConfig *mConfig;
94 TDEConfig *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

tderesources

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

tderesources

Skip menu "tderesources"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tderesources by doxygen 1.9.4
This website is maintained by Timothy Pearson.