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

KDECore

  • kdecore
  • services
kservicetype_p.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_p_h__
22 #define __kservicetype_p_h__
23 
24 #include "kservicetype.h"
25 #include <ksycocaentry_p.h>
26 #include <kurl.h>
27 
28 class KServiceTypePrivate : public KSycocaEntryPrivate
29 {
30 public:
31  K_SYCOCATYPE( KST_KServiceType, KSycocaEntryPrivate )
32 
33  KServiceTypePrivate(const QString &path)
34  : KSycocaEntryPrivate(path),
35  m_serviceOffersOffset( -1 ), m_bDerived(false), m_parentTypeLoaded(false)
36  {
37  }
38 
39  KServiceTypePrivate(QDataStream &_str, int offset)
40  : KSycocaEntryPrivate(_str, offset),
41  m_serviceOffersOffset( -1 ), m_bDerived(false), m_parentTypeLoaded(false)
42  {
43  }
44 
45  virtual ~KServiceTypePrivate() {}
46 
47  virtual void save( QDataStream& );
48 
49  virtual QString name() const
50  {
51  return m_strName;
52  }
53 
54  virtual QVariant property(const QString &name) const;
55 
56  virtual QStringList propertyNames() const;
57 
58  virtual QString comment(const KUrl & = KUrl()) const
59  {
60  return m_strComment;
61  }
62 
63  virtual int serviceOffersOffset() const { return m_serviceOffersOffset; }
64 
65  void init( KDesktopFile *config );
66  void load(QDataStream& _str);
67 
68  KServiceType::Ptr parentType;
69  QString m_strName;
70  mutable /*remove mutable when kmimetype doesn't use this anymore*/ QString m_strComment;
71  int m_serviceOffersOffset;
72  QMap<QString, QVariant::Type> m_mapPropDefs;
73  QMap<QString,QVariant> m_mapProps;
74  unsigned m_bDerived: 1;
75  unsigned m_parentTypeLoaded: 1;
76 };
77 
78 #endif // __kservicetype_p_h__
79 
QVariant
KSharedPtr< KServiceType >
KServiceTypePrivate::init
void init(KDesktopFile *config)
Definition: kservicetype.cpp:54
KServiceTypePrivate::propertyNames
virtual QStringList propertyNames() const
Definition: kservicetype.cpp:169
kurl.h
KServiceTypePrivate::m_bDerived
unsigned m_bDerived
Definition: kservicetype_p.h:74
KServiceTypePrivate::property
virtual QVariant property(const QString &name) const
Definition: kservicetype.cpp:154
KServiceTypePrivate::m_strName
QString m_strName
Definition: kservicetype_p.h:69
QString
KServiceTypePrivate::m_strComment
QString m_strComment
Definition: kservicetype_p.h:70
KServiceTypePrivate::comment
virtual QString comment(const KUrl &=KUrl()) const
Definition: kservicetype_p.h:58
KServiceTypePrivate::m_serviceOffersOffset
int m_serviceOffersOffset
Definition: kservicetype_p.h:71
KSycocaEntryPrivate::path
QString path
Definition: ksycocaentry_p.h:77
KUrl
Represents and parses a URL.
Definition: kurl.h:111
KGlobal::config
KSharedConfigPtr config()
Returns the general config object.
Definition: kglobal.cpp:139
KST_KServiceType
Definition: ksycocatype.h:31
KServiceTypePrivate::KServiceTypePrivate
KServiceTypePrivate(QDataStream &_str, int offset)
Definition: kservicetype_p.h:39
QStringList
KServiceTypePrivate::load
void load(QDataStream &_str)
Definition: kservicetype.cpp:107
K_SYCOCATYPE
#define K_SYCOCATYPE(type, baseclass)
Definition: ksycocaentry_p.h:24
KSycocaEntryPrivate::offset
int offset
Definition: ksycocaentry_p.h:75
ksycocaentry_p.h
KServiceTypePrivate::m_mapProps
QMap< QString, QVariant > m_mapProps
Definition: kservicetype_p.h:73
KServiceTypePrivate::name
virtual QString name() const
Definition: kservicetype_p.h:49
kservicetype.h
KDesktopFile
KDE Desktop File Management.
Definition: kdesktopfile.h:38
KServiceTypePrivate::parentType
KServiceType::Ptr parentType
Definition: kservicetype_p.h:68
KServiceTypePrivate::save
virtual void save(QDataStream &)
Definition: kservicetype.cpp:117
KSycocaEntryPrivate
Definition: ksycocaentry_p.h:29
KServiceTypePrivate::m_mapPropDefs
QMap< QString, QVariant::Type > m_mapPropDefs
Definition: kservicetype_p.h:72
KServiceTypePrivate::m_parentTypeLoaded
unsigned m_parentTypeLoaded
Definition: kservicetype_p.h:75
KServiceTypePrivate
Definition: kservicetype_p.h:28
QMap
KServiceTypePrivate::~KServiceTypePrivate
virtual ~KServiceTypePrivate()
Definition: kservicetype_p.h:45
KServiceTypePrivate::serviceOffersOffset
virtual int serviceOffersOffset() const
Definition: kservicetype_p.h:63
This file is part of the KDE documentation.
Documentation copyright © 1996-2017 The KDE developers.
Generated on Wed May 10 2017 10:56:47 by doxygen 1.8.11 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.30 API Reference

Skip menu "kdelibs-4.14.30 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