• 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 KCMODULECONTAINER_H
21 #define KCMODULECONTAINER_H
22 
23 #include <tqvaluelist.h>
24 #include <tqstring.h>
25 #include <tqstringlist.h>
26 
27 #include <tdecmodule.h>
28 #include <tdecmoduleloader.h>
29 
30 class TQTabWidget;
31 class TQWidget;
32 class TQVBoxLayout;
33 
34 class TDECModuleProxy;
35 
53 class KUTILS_EXPORT TDECModuleContainer : public TDECModule
54 {
55  Q_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 
121  protected:
122 
129  void finalize();
130 
131  typedef TQValueList<TDECModuleProxy*> ModuleList;
132 
137  ModuleList changedModules;
138 
142  ModuleList allModules; // KDE 4 put in the Private class and abstract with getter
143 
144  private slots:
145 
149  void tabSwitched( TQWidget * module );
150 
151  void moduleChanged(TDECModuleProxy *proxy);
152 
156  void runAsRoot();
157 
161  void rootExited();
162 
163  private:
164 
165  void init();
166 
167  class TDECModuleContainerPrivate;
168  TDECModuleContainerPrivate *d;
169 
170 };
171 
188 #define KCMODULECONTAINER( modules, factoryName ) \
189 extern "C" \
190 { \
191  TDECModule *create_## factoryName(TQWidget *parent, const char *name) \
192  { \
193  return new TDECModuleContainer( parent, name, TQString( modules ) ); \
194  } \
195  \
196  bool test_## factoryName() \
197  { \
198  TQStringList modList = TQStringList::split( ",", TQString(modules).remove( " " )); \
199  for ( TQStringList::Iterator it = modList.begin(); it != modList.end(); ++it ) \
200  if ( TDECModuleLoader::testModule( *it ) ) \
201  return true; \
202  return false; \
203  } \
204 }
205 
206 #endif // KCMODULECONTAINER_H
207 

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
  • knewstuff
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeutils by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.