• Skip to content
  • Skip to link menu
KDE 4.3 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 
00062 class KDECORE_EXPORT KServiceGroup : public KSycocaEntry
00063 {
00064   friend class KBuildServiceGroupFactory;
00065 public:
00066   typedef KSharedPtr<KServiceGroup> Ptr;
00067   typedef KSharedPtr<KSycocaEntry> SPtr;
00068   typedef QList<SPtr> List;
00069 public:
00074   KServiceGroup( const QString & name );
00075 
00081   KServiceGroup( const QString & _fullpath, const QString & _relpath );
00082 
00087   KServiceGroup( QDataStream& _str, int offset, bool deep );
00088 
00089   virtual ~KServiceGroup();
00090 
00095   QString relPath() const;
00096 
00101   QString caption() const;
00102 
00108   QString icon() const;
00109 
00115   QString comment() const;
00116 
00122   int childCount() const;
00123 
00129   bool noDisplay() const;
00130 
00135   bool showEmptyMenu() const;
00136   void setShowEmptyMenu( bool b);
00137 
00141   bool showInlineHeader() const;
00142   void setShowInlineHeader(bool _b);
00143 
00147   bool inlineAlias() const;
00148   void setInlineAlias(bool _b);
00152   bool allowInline() const;
00153   void setAllowInline(bool _b);
00154 
00158   int inlineValue() const;
00159   void setInlineValue(int _val);
00160 
00161 
00168   QStringList suppressGenericNames() const;
00169 
00174   void setLayoutInfo(const QStringList &layout);
00175 
00180   QStringList layoutInfo() const;
00181 
00191   List entries(bool sorted, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName=false);
00192   List entries(bool sorted, bool excludeNoDisplay);
00193 
00200   List entries(bool sorted = false);
00201 
00205     enum EntriesOption
00206     {
00207       NoOptions = 0x0,
00208       SortEntries = 0x1,    /*< sort items */
00209       ExcludeNoDisplay = 0x2, /*< exclude items marked "NoDisplay" */
00210       AllowSeparators = 0x4, /*< allow separator items to be included */
00211       SortByGenericName = 0x8 /*< sort by GenericName+Name instead of Name+GenericName */
00212     };
00213     Q_DECLARE_FLAGS(EntriesOptions, EntriesOption)
00214  
00215     
00218     QList<Ptr> groupEntries(EntriesOptions options = ExcludeNoDisplay);
00219 
00223     KService::List serviceEntries(EntriesOptions options = ExcludeNoDisplay);
00224 
00235   QString baseGroupName() const;
00236 
00241   QString directoryEntryPath() const;
00242 
00252   static KDE_DEPRECATED Ptr baseGroup( const QString &baseGroupName );
00253 
00258   static Ptr root();
00259 
00265   static Ptr group(const QString &relPath);
00266 
00273   static Ptr childGroup(const QString &parent);
00274 
00275 protected:
00280   void addEntry( const KSycocaEntry::Ptr& entry);
00281 private:
00282     Q_DECLARE_PRIVATE(KServiceGroup)
00283 };
00284 
00285 #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
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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