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

kutils

  • kutils
kcmoduleinfo.h
1 /*
2  Copyright (c) 1999 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
3  Copyright (c) 2000 Matthias Elter <elter@kde.org>
4  Copyright (c) 2003 Daniel Molkentin <molkentin@kde.org>
5  Copyright (c) 2003 Matthias Kretz <kretz@kde.org>
6 
7  This file is part of the KDE project
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Library General Public
11  License version 2, as published by the Free Software Foundation.
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 
24 #ifndef KCMODULEINFO_H
25 #define KCMODULEINFO_H
26 
27 #include <kservice.h>
28 
29 class TQPixmap;
30 class TQString;
31 class TQStringList;
32 
49 class KUTILS_EXPORT KCModuleInfo
50 {
51 
52 public:
53 
61  KCModuleInfo(const TQString& desktopFile);
62 
70  KCModuleInfo( KService::Ptr moduleInfo );
71 
72 
78  KCModuleInfo( const KCModuleInfo &rhs );
79 
85  KCModuleInfo();
86 
90  KCModuleInfo &operator=( const KCModuleInfo &rhs );
91 
98  bool operator==( const KCModuleInfo &rhs ) const;
99 
103  bool operator!=( const KCModuleInfo &rhs ) const;
104 
108  ~KCModuleInfo();
109 
113  TQString fileName() const { return _fileName; }
114 
118  const TQStringList &keywords() const { return _keywords; }
119 
126  TQString factoryName() const;
127 
131  TQString moduleName() const { return _name; }
132  // changed from name() to avoid ambiguity with TQObject::name() on multiple inheritance
133 
137  KService::Ptr service() const { return _service; }
138 
142  TQString comment() const { return _comment; }
143 
147  TQString icon() const { return _icon; }
148 
152  TQString docPath() const;
153 
157  TQString library() const { return _lib; }
158 
162  TQString handle() const;
163 
168  int weight() const;
169 
173  bool needsRootPrivileges() const;
174 
179  bool isHiddenByDefault() const KDE_DEPRECATED;
180 
181 
187  bool needsTest() const;
188 
189 
190 protected:
191 
196  void setKeywords(const TQStringList &keyword) { _keywords = keyword; }
197 
202  void setName(const TQString &name) { _name = name; }
203 
208  void setComment(const TQString &comment) { _comment = comment; }
209 
214  void setIcon(const TQString &icon) { _icon = icon; }
215 
220  void setLibrary(const TQString &lib) { _lib = lib; }
221 
226  void setHandle(const TQString &handle) { _handle = handle; }
227 
234  void setWeight(int weight) { _weight = weight; }
235 
236 
242  void setNeedsTest( bool val );
243 
249  void setNeedsRootPrivileges(bool needsRootPrivileges)
250  { _needsRootPrivileges = needsRootPrivileges; }
251 
255  void setIsHiddenByDefault(bool isHiddenByDefault)
256  { _isHiddenByDefault = isHiddenByDefault; }
257 
262  void setDocPath(const TQString &p) { _doc = p; }
263 
268  void loadAll();
269 
270 private:
271 
275  void init(KService::Ptr s);
276 
277 private:
278 
279  // KDE4 These needs to be moved to KCModuleInfoPrivate
280  TQStringList _keywords;
281  TQString _name, _icon, _lib, _handle, _fileName, _doc, _comment;
282  bool _needsRootPrivileges : 1;
283  bool _isHiddenByDefault : 1;
284  bool _allLoaded : 1;
285  int _weight;
286 
287  KService::Ptr _service;
288 
289  class KCModuleInfoPrivate;
290  KCModuleInfoPrivate *d;
291 
292 };
293 
294 #endif // KCMODULEINFO_H
295 
296 // vim: ts=2 sw=2 et
KCModuleInfo::setDocPath
void setDocPath(const TQString &p)
Sets the object&#39;s documentation path.
Definition: kcmoduleinfo.h:262
KCModuleInfo::setHandle
void setHandle(const TQString &handle)
Sets the factory name.
Definition: kcmoduleinfo.h:226
KCModuleInfo::setLibrary
void setLibrary(const TQString &lib)
Set the object&#39;s library.
Definition: kcmoduleinfo.h:220
KCModuleInfo::icon
TQString icon() const
Definition: kcmoduleinfo.h:147
KCModuleInfo::setName
void setName(const TQString &name)
Sets the object&#39;s name.
Definition: kcmoduleinfo.h:202
KCModuleInfo::setIsHiddenByDefault
void setIsHiddenByDefault(bool isHiddenByDefault)
Definition: kcmoduleinfo.h:255
KCModuleInfo::setWeight
void setWeight(int weight)
Sets the object&#39;s weight property which determines in what order modules will be displayed.
Definition: kcmoduleinfo.h:234
KCModuleInfo::keywords
const TQStringList & keywords() const
Definition: kcmoduleinfo.h:118
KCModuleInfo::setNeedsRootPrivileges
void setNeedsRootPrivileges(bool needsRootPrivileges)
Toggles whether the represented module needs root privileges.
Definition: kcmoduleinfo.h:249
KCModuleInfo
A class that provides information about a KCModule.
Definition: kcmoduleinfo.h:49
KCModuleInfo::setIcon
void setIcon(const TQString &icon)
Sets the object&#39;s icon.
Definition: kcmoduleinfo.h:214
KCModuleInfo::moduleName
TQString moduleName() const
Definition: kcmoduleinfo.h:131
KCModuleInfo::fileName
TQString fileName() const
Definition: kcmoduleinfo.h:113
KCModuleInfo::library
TQString library() const
Definition: kcmoduleinfo.h:157
KCModuleInfo::service
KService::Ptr service() const
Definition: kcmoduleinfo.h:137
KCModuleInfo::comment
TQString comment() const
Definition: kcmoduleinfo.h:142
KCModuleInfo::setComment
void setComment(const TQString &comment)
Sets the object&#39;s name.
Definition: kcmoduleinfo.h:208
KCModuleInfo::setKeywords
void setKeywords(const TQStringList &keyword)
Sets the object&#39;s keywords.
Definition: kcmoduleinfo.h:196

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.11
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |