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

tdeutils

  • tdeutils
tdecmodulecontainer.h
1/* This file is part of the KDE libraries
2 Copyright (C) 2004 Frans Englich <frans.englich@telia.com>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef TDECMODULECONTAINER_H
21#define TDECMODULECONTAINER_H
22
23#include <tqvaluelist.h>
24#include <tqstring.h>
25#include <tqstringlist.h>
26
27#include <tdecmodule.h>
28#include <tdecmoduleloader.h>
29
30class TQTabWidget;
31class TQWidget;
32class TQVBoxLayout;
33
34class TDECModuleProxy;
35
53class TDEUTILS_EXPORT TDECModuleContainer : public TDECModule
54{
55 TQ_OBJECT
56 public:
68 TDECModuleContainer( TQWidget* parent, const char* name, const TQStringList& mods );
69
87 TDECModuleContainer( TQWidget *parent, const char* name, const TQString& mods = TQString() );
88
96 void addModule( const TQString& module );
97
101 virtual ~TDECModuleContainer();
102
107 void save();
108
113 void load();
114
119 void defaults();
120
125 virtual TQString handbookSection() const;
126
127 protected:
128
135 void finalize();
136
137 typedef TQValueList<TDECModuleProxy*> ModuleList;
138
143 ModuleList changedModules;
144
148 ModuleList allModules; // KDE 4 put in the Private class and abstract with getter
149
150 private slots:
151
155 void tabSwitched( TQWidget * module );
156
157 void moduleChanged(TDECModuleProxy *proxy);
158
162 void runAsRoot();
163
167 void rootExited();
168
169 private:
170
171 void init();
172
173 class TDECModuleContainerPrivate;
174 TDECModuleContainerPrivate *d;
175
176};
177
194#define KCMODULECONTAINER( modules, factoryName ) \
195extern "C" \
196{ \
197 TDECModule *create_## factoryName(TQWidget *parent, const char *name) \
198 { \
199 return new TDECModuleContainer( parent, name, TQString( modules ) ); \
200 } \
201 \
202 bool test_## factoryName() \
203 { \
204 TQStringList modList = TQStringList::split( ",", TQString(modules).remove( " " )); \
205 for ( TQStringList::Iterator it = modList.begin(); it != modList.end(); ++it ) \
206 { \
207 if ( TDECModuleLoader::testModule( *it ) ) \
208 { \
209 return true; \
210 } \
211 } \
212 return false; \
213 } \
214}
215
216#endif // TDECMODULECONTAINER_H
217
TDECModuleContainer
TDECModuleContainer is a convenience class encapsulating several TDECModules.
Definition: tdecmodulecontainer.h:54
TDECModuleContainer::changedModules
ModuleList changedModules
A list containing TDECModuleProxy objects which have changed and must be saved.
Definition: tdecmodulecontainer.h:143
TDECModuleContainer::allModules
ModuleList allModules
A list of all modules which are encapsulated.
Definition: tdecmodulecontainer.h:148
TDECModuleProxy
Encapsulates a TDECModule for embedding.
Definition: tdecmoduleproxy.h:69
TDECModule
TDECModule::defaults
virtual void defaults()
TDECModule::handbookSection
virtual TQString handbookSection() const
TDECModule::load
virtual void load()
TDECModule::save
virtual void save()

tdeutils

Skip menu "tdeutils"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeutils

Skip menu "tdeutils"
  • 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 tdeutils by doxygen 1.9.4
This website is maintained by Timothy Pearson.