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

KDECore

  • kdecore
  • services
kservicetype.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3  1999 Waldo Bastian <bastian@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef __kservicetype_h__
22 #define __kservicetype_h__
23 
24 #include <ksycocaentry.h>
25 
26 #include <QtCore/QString>
27 #include <QtCore/QStringList>
28 #include <QtCore/QMap>
29 #include <QtCore/QVariant>
30 
31 #include <kconfig.h>
32 
33 class KDesktopFile;
34 class KServiceTypePrivate;
35 
43 class KDECORE_EXPORT KServiceType : public KSycocaEntry // TODO KDE5: inherit kshared, but move KSycocaEntry to Private
44 {
45 public:
46  typedef KSharedPtr<KServiceType> Ptr;
47  typedef QList<Ptr> List;
48 
53  explicit KServiceType( KDesktopFile *config );
54 
59  KServiceType( QDataStream& _str, int offset );
60 
61  virtual ~KServiceType();
62 
67  QString comment() const;
68 
75 #ifndef KDE_NO_DEPRECATED
76  KDE_DEPRECATED QString desktopEntryPath() const;
77 #endif
78 
84  bool isDerived() const;
85 
92  QString parentServiceType() const;
93 
98  bool inherits( const QString& servTypeName ) const;
99 
107  QVariant::Type propertyDef( const QString& _name ) const;
108 
122  QStringList propertyDefNames() const;
123 
125  QMap<QString,QVariant::Type> propertyDefs() const;
126 
131  Ptr parentType();
136  void setServiceOffersOffset( int offset );
140  int serviceOffersOffset() const;
141 
149  static Ptr serviceType( const QString& _name );
150 
159  static List allServiceTypes();
160 
161 protected: // used by KMimeType
162 
168  KServiceType( KServiceTypePrivate &dd);
169 
179  KServiceType( KServiceTypePrivate &dd, const QString& _name,
180  const QString& _comment );
181 
182 private:
183  Q_DECLARE_PRIVATE(KServiceType)
184 };
185 
186 //QDataStream& operator>>( QDataStream& _str, KServiceType& s );
187 //QDataStream& operator<<( QDataStream& _str, KServiceType& s );
188 
189 #endif
KSharedPtr< KServiceType >
KFileSystemType::Type
Type
Definition: kfilesystemtype_p.h:28
KServiceType::Ptr
KSharedPtr< KServiceType > Ptr
Definition: kservicetype.h:46
kconfig.h
KServiceType
A service type is, well, a type of service, where a service is an application or plugin.
Definition: kservicetype.h:43
QString
KGlobal::config
KSharedConfigPtr config()
Returns the general config object.
Definition: kglobal.cpp:139
KSycocaEntry
Base class for all Sycoca entries.
Definition: ksycocaentry.h:41
QStringList
ksycocaentry.h
KDesktopFile
KDE Desktop File Management.
Definition: kdesktopfile.h:38
KServiceType::List
QList< Ptr > List
Definition: kservicetype.h:47
KServiceTypePrivate
Definition: kservicetype_p.h:28
QMap
QList< Ptr >
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jan 18 2020 18:58:50 by doxygen 1.8.15 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