• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDECore

kservicegroup.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2000 Waldo Bastian <bastian@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
00017 */
00018 
00019 #ifndef KSERVICEGROUP_H
00020 #define KSERVICEGROUP_H
00021 
00022 #include <kdecore_export.h>
00023 #include <ksycocaentry.h>
00024 #include <kservice.h>
00025 
00026 class KBuildServiceGroupFactory;
00027 
00028 class KServiceGroupPrivate;
00029 
00061 class KDECORE_EXPORT KServiceGroup : public KSycocaEntry
00062 {
00063   friend class KBuildServiceGroupFactory;
00064 public:
00065   typedef KSharedPtr<KServiceGroup> Ptr;
00066   typedef KSharedPtr<KSycocaEntry> SPtr;
00067   typedef QList<SPtr> List;
00068 public:
00073   KServiceGroup( const QString & name );
00074 
00080   KServiceGroup( const QString & _fullpath, const QString & _relpath );
00081 
00086   KServiceGroup( QDataStream& _str, int offset, bool deep );
00087 
00088   virtual ~KServiceGroup();
00089 
00094   QString relPath() const;
00095 
00100   QString caption() const;
00101 
00107   QString icon() const;
00108 
00114   QString comment() const;
00115 
00121   int childCount() const;
00122 
00128   bool noDisplay() const;
00129 
00134   bool showEmptyMenu() const;
00135   void setShowEmptyMenu( bool b);
00136 
00140   bool showInlineHeader() const;
00141   void setShowInlineHeader(bool _b);
00142 
00146   bool inlineAlias() const;
00147   void setInlineAlias(bool _b);
00151   bool allowInline() const;
00152   void setAllowInline(bool _b);
00153 
00157   int inlineValue() const;
00158   void setInlineValue(int _val);
00159 
00160 
00167   QStringList suppressGenericNames() const;
00168 
00173   void setLayoutInfo(const QStringList &layout);
00174 
00179   QStringList layoutInfo() const;
00180 
00190   List entries(bool sorted, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName=false);
00191   List entries(bool sorted, bool excludeNoDisplay);
00192 
00199   List entries(bool sorted = false);
00200 
00204     enum EntriesOption
00205     {
00206       NoOptions = 0x0,
00207       SortEntries = 0x1,    /*< sort items */
00208       ExcludeNoDisplay = 0x2, /*< exclude items marked "NoDisplay" */
00209       AllowSeparators = 0x4, /*< allow separator items to be included */
00210       SortByGenericName = 0x8 /*< sort by GenericName+Name instead of Name+GenericName */
00211     };
00212     Q_DECLARE_FLAGS(EntriesOptions, EntriesOption)
00213  
00214     
00217     QList<Ptr> groupEntries(EntriesOptions options = ExcludeNoDisplay);
00218 
00222     KService::List serviceEntries(EntriesOptions options = ExcludeNoDisplay);
00223 
00234   QString baseGroupName() const;
00235 
00240   QString directoryEntryPath() const;
00241 
00247   static Ptr baseGroup( const QString &baseGroupName );
00248 
00253   static Ptr root();
00254 
00260   static Ptr group(const QString &relPath);
00261 
00268   static Ptr childGroup(const QString &parent);
00269 
00270 protected:
00275   void addEntry( const KSycocaEntry::Ptr& entry);
00276 private:
00277     Q_DECLARE_PRIVATE(KServiceGroup)
00278 };
00279 
00280 #endif

KDECore

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal