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

KDECore

  • kdecore
  • services
kservice_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  Copyright 1999-2006 David Faure <faure@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 KSERVICEPRIVATE_H
22 #define KSERVICEPRIVATE_H
23 
24 #include <QVector>
25 #include "kservice.h"
26 
27 #include <ksycocaentry_p.h>
28 
29 class KServicePrivate : public KSycocaEntryPrivate
30 {
31 public:
32  K_SYCOCATYPE( KST_KService, KSycocaEntryPrivate )
33 
34  KServicePrivate(const QString &path)
35  : KSycocaEntryPrivate(path), m_bValid(true)
36  {
37  }
38  KServicePrivate(QDataStream& _str, int _offset)
39  : KSycocaEntryPrivate(_str, _offset), m_bValid(true)
40  {
41  load(_str);
42  }
43 
44  void init(const KDesktopFile *config, KService* q);
45  void parseActions(const KDesktopFile *config, KService* q);
46  void load( QDataStream& );
47  virtual void save( QDataStream& );
48 
49  virtual QString name() const
50  {
51  return m_strName;
52  }
53 
54  virtual QString storageId() const
55  {
56  if (!menuId.isEmpty())
57  return menuId;
58  return path;
59  }
60 
61  virtual bool isValid() const
62  {
63  return m_bValid;
64  }
65 
66  virtual QVariant property(const QString &name) const;
67 
68  virtual QStringList propertyNames() const;
69 
70  QVariant property(const QString &_name, QVariant::Type t) const;
71 
72  QStringList serviceTypes() const;
73 
74  QStringList categories;
75  QString menuId;
76  QString m_strType;
77  QString m_strName;
78  QString m_strExec;
79  QString m_strIcon;
80  QString m_strTerminalOptions;
81  QString m_strPath;
82  QString m_strComment;
83  QString m_strLibrary;
84 
85  int m_initialPreference; // deprecated
86  // the initial preference is per-servicetype now.
87  QVector<KService::ServiceTypeAndPreference> m_serviceTypes;
88 
89  QString m_strDesktopEntryName;
90  KService::DBusStartupType m_DBUSStartusType;
91  QMap<QString,QVariant> m_mapProps;
92  QStringList m_lstKeywords;
93  QString m_strGenName;
94  QList<KServiceAction> m_actions;
95  bool m_bAllowAsDefault : 1;
96  bool m_bTerminal : 1;
97  bool m_bValid : 1;
98 };
99 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Apr 16 2013 20:55:42 by doxygen 1.8.3.1 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.10.2 API Reference

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