• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • kdecore
  • services
kservicegroup.h
Go to the documentation of this file.
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 <kdecore_export.h>
23#include <ksycocaentry.h>
24#include <kservice.h>
25
26class KBuildServiceGroupFactory;
27
28class KServiceGroupPrivate;
29
62class KDECORE_EXPORT KServiceGroup : public KSycocaEntry
63{
64 friend class KBuildServiceGroupFactory;
65public:
66 typedef KSharedPtr<KServiceGroup> Ptr;
67 typedef KSharedPtr<KSycocaEntry> SPtr;
68 typedef QList<SPtr> List;
69public:
74 KServiceGroup( const QString & name );
75
81 KServiceGroup( const QString & _fullpath, const QString & _relpath );
82
87 KServiceGroup( QDataStream& _str, int offset, bool deep );
88
89 virtual ~KServiceGroup();
90
95 QString relPath() const;
96
101 QString caption() const;
102
108 QString icon() const;
109
115 QString comment() const;
116
122 int childCount() const;
123
129 bool noDisplay() const;
130
135 bool showEmptyMenu() const;
136 void setShowEmptyMenu( bool b);
137
141 bool showInlineHeader() const;
142 void setShowInlineHeader(bool _b);
143
147 bool inlineAlias() const;
148 void setInlineAlias(bool _b);
152 bool allowInline() const;
153 void setAllowInline(bool _b);
154
158 int inlineValue() const;
159 void setInlineValue(int _val);
160
161
168 QStringList suppressGenericNames() const;
169
174 void setLayoutInfo(const QStringList &layout);
175
180 QStringList layoutInfo() const;
181
191 List entries(bool sorted, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName=false);
192 List entries(bool sorted, bool excludeNoDisplay);
193
200 List entries(bool sorted = false);
201
205 enum EntriesOption
206 {
207 NoOptions = 0x0,
208 SortEntries = 0x1, /*< sort items */
209 ExcludeNoDisplay = 0x2, /*< exclude items marked "NoDisplay" */
210 AllowSeparators = 0x4, /*< allow separator items to be included */
211 SortByGenericName = 0x8 /*< sort by GenericName+Name instead of Name+GenericName */
212 };
213 Q_DECLARE_FLAGS(EntriesOptions, EntriesOption)
214
215
218 QList<Ptr> groupEntries(EntriesOptions options = ExcludeNoDisplay);
219
223 KService::List serviceEntries(EntriesOptions options = ExcludeNoDisplay);
224
235 QString baseGroupName() const;
236
241 QString directoryEntryPath() const;
242
252#ifndef KDE_NO_DEPRECATED
253 static KDE_DEPRECATED Ptr baseGroup( const QString &baseGroupName );
254#endif
255
260 static Ptr root();
261
267 static Ptr group(const QString &relPath);
268
275 static Ptr childGroup(const QString &parent);
276
277protected:
282 void addEntry( const KSycocaEntry::Ptr& entry);
283private:
284 Q_DECLARE_PRIVATE(KServiceGroup)
285};
286
287#endif
KServiceGroupPrivate
Definition: kservicegroup_p.h:28
KServiceGroup
KServiceGroup represents a group of service, for example screensavers.
Definition: kservicegroup.h:63
KServiceGroup::EntriesOption
EntriesOption
options for groupEntries and serviceEntries
Definition: kservicegroup.h:206
KServiceGroup::Ptr
KSharedPtr< KServiceGroup > Ptr
Definition: kservicegroup.h:66
KServiceGroup::SPtr
KSharedPtr< KSycocaEntry > SPtr
Definition: kservicegroup.h:67
KServiceGroup::List
QList< SPtr > List
Definition: kservicegroup.h:68
KSharedPtr
Can be used to control the lifetime of an object that has derived QSharedData.
Definition: ksharedptr.h:64
KSycocaEntry
Base class for all Sycoca entries.
Definition: ksycocaentry.h:42
QList
Definition: kaboutdata.h:33
QStringList
QString
kdecore_export.h
kservice.h
ksycocaentry.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal