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

kutils

  • kutils
kcmodulecontainer.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 <kcmodule.h>
28 #include <kcmoduleloader.h>
29 
30 class TQTabWidget;
31 class TQWidget;
32 class TQVBoxLayout;
33 
34 class KCModuleProxy;
35 
53 class KUTILS_EXPORT KCModuleContainer : public KCModule
54 {
55  Q_OBJECT
56  public:
68  KCModuleContainer( TQWidget* parent, const char* name, const TQStringList& mods );
69 
87  KCModuleContainer( TQWidget *parent, const char* name, const TQString& mods = TQString() );
88 
96  void addModule( const TQString& module );
97 
101  virtual ~KCModuleContainer();
102 
107  void save();
108 
113  void load();
114 
119  void defaults();
120 
121  protected:
122 
129  void finalize();
130 
131  typedef TQValueList<KCModuleProxy*> 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(KCModuleProxy *proxy);
152 
156  void runAsRoot();
157 
161  void rootExited();
162 
163  private:
164 
165  void init();
166 
167  class KCModuleContainerPrivate;
168  KCModuleContainerPrivate *d;
169 
170 };
171 
188 #define KCMODULECONTAINER( modules, factoryName ) \
189 extern "C" \
190 { \
191  KCModule *create_## factoryName(TQWidget *parent, const char *name) \
192  { \
193  return new KCModuleContainer( 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 ( KCModuleLoader::testModule( *it ) ) \
201  return true; \
202  return false; \
203  } \
204 }
205 
206 #endif // KCMODULECONTAINER_H
207 

kutils

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

kutils

Skip menu "kutils"
  • 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 kutils by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |