• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

  • tdeio
  • tdeio
kservicegroup.h
1/* This file is part of the KDE project
2 Copyright (C) 2000 Waldo Bastian <bastian@kde.org>
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 version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18
19#ifndef __kservicegroup_h__
20#define __kservicegroup_h__
21
22#include <tqptrlist.h>
23#include <tqstring.h>
24#include <tqshared.h>
25#include <tqdatastream.h>
26#include <tqvariant.h>
27
28#include <tdedesktopfile.h>
29#include <ksortablevaluelist.h>
30
31#include "tdesycocaentry.h"
32#include "tdesycocatype.h"
33#include "kservice.h"
34
35class KBuildServiceGroupFactory;
36
68class TDEIO_EXPORT KServiceGroup : public KSycocaEntry
69{
70 friend class KBuildServiceGroupFactory;
71 K_SYCOCATYPE( KST_KServiceGroup, KSycocaEntry )
72
73public:
74 typedef TDESharedPtr<KServiceGroup> Ptr;
75 typedef TDESharedPtr<KSycocaEntry> SPtr;
76 typedef TQValueList<SPtr> List;
77public:
83 KServiceGroup( const TQString & name );
84
90 KServiceGroup( const TQString & _fullpath, const TQString & _relpath );
91
96 KServiceGroup( TQDataStream& _str, int offset, bool deep );
97
98 virtual ~KServiceGroup();
99
104 bool isValid() const { return true; }
105
110 virtual TQString name() const { return entryPath(); }
111
116 virtual TQString relPath() const { return entryPath(); }
117
122 TQString caption() const { return m_strCaption; }
123
129 TQString icon() const { return m_strIcon; }
130
136 TQString comment() const { return m_strComment; }
137
143 int childCount();
144
151 bool noDisplay() const;
152
158 bool showEmptyMenu() const;
159 void setShowEmptyMenu( bool b);
160
165 bool showInlineHeader() const;
166 void setShowInlineHeader(bool _b);
167
172 bool inlineAlias() const;
173 void setInlineAlias(bool _b);
178 bool allowInline() const;
179 void setAllowInline(bool _b);
180
185 int inlineValue() const;
186 void setInlineValue(int _val);
187
188
196 TQStringList suppressGenericNames() const;
197
202 void setLayoutInfo(const TQStringList &layout);
203
207 bool SuSEshortMenu() const;
208 bool SuSEgeneralDescription() const;
209
214 TQStringList layoutInfo() const;
215
220 virtual void load( TQDataStream& );
225 virtual void save( TQDataStream& );
226
237 List entries(bool sorted, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName=false);
238 virtual List entries(bool sorted, bool excludeNoDisplay);
239
246 virtual List entries(bool sorted = false);
247
248 /*
249 * Original API and feature kindly provided by SuSE
250 */
251 virtual List SuSEentries(bool sort, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName, bool excludeSuSEunimportant = false);
252 virtual List SuSEsortEntries( KSortableValueList<SPtr,TQCString> slist, KSortableValueList<SPtr,TQCString> glist, bool excludeNoDisplay, bool allowSeparators );
253
264 TQString baseGroupName() const { return m_strBaseGroupName; }
265
271 TQString directoryEntryPath() const;
272
278 static Ptr baseGroup( const TQString &baseGroupName );
279
284 static Ptr root();
285
291 static Ptr group(const TQString &relPath);
292
300 static Ptr childGroup(const TQString &parent);
301
306 void parseAttribute( const TQString &item , bool &showEmptyMenu, bool &showInline, bool &showInlineHeader, bool & showInlineAlias ,int &inlineValue );
307
308protected:
313 void addEntry( KSycocaEntry *entry);
314
315 TQString m_strCaption;
316 TQString m_strIcon;
317 TQString m_strComment;
318
319 List m_serviceList;
320 bool m_bDeep;
321 TQString m_strBaseGroupName;
322 int m_childCount;
323protected:
324 virtual void virtual_hook( int id, void* data );
325private:
326 class Private;
327 Private* d;
328};
329
330class TDEIO_EXPORT KServiceSeparator : public KSycocaEntry
331{
332 K_SYCOCATYPE( KST_KServiceSeparator, KSycocaEntry )
333
334public:
335 typedef TDESharedPtr<KServiceSeparator> Ptr;
336public:
341 KServiceSeparator();
342
343 bool isValid() const { return true; }
344
345 // Dummy
346 virtual TQString name() const { return "separator"; }
347 // Dummy
348 virtual void load( TQDataStream& ) { };
349 // Dummy
350 virtual void save( TQDataStream& ) { };
351};
352
353#endif
KServiceGroup
KServiceGroup represents a group of service, for example screensavers.
Definition kservicegroup.h:69
KServiceGroup::comment
TQString comment() const
Returns the comment about this service group.
Definition kservicegroup.h:136
KServiceGroup::baseGroupName
TQString baseGroupName() const
Returns a non-empty string if the group is a special base group.
Definition kservicegroup.h:264
KServiceGroup::caption
TQString caption() const
Returns the caption of this group.
Definition kservicegroup.h:122
KServiceGroup::name
virtual TQString name() const
Name used for indexing.
Definition kservicegroup.h:110
KServiceGroup::icon
TQString icon() const
Returns the name of the icon associated with the group.
Definition kservicegroup.h:129
KServiceGroup::relPath
virtual TQString relPath() const
Returns the relative path of the service group.
Definition kservicegroup.h:116
KServiceGroup::isValid
bool isValid() const
Checks whether the entry is valid, returns always true.
Definition kservicegroup.h:104

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

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