KDECore
kservice_p.h
Go to the documentation of this file.
00001 /* This file is part of the KDE project 00002 Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 00003 Copyright 1999-2006 David Faure <faure@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef KSERVICEPRIVATE_H 00022 #define KSERVICEPRIVATE_H 00023 00024 #include <QVector> 00025 #include "kservice.h" 00026 00027 #include <ksycocaentry_p.h> 00028 00029 class KServicePrivate : public KSycocaEntryPrivate 00030 { 00031 public: 00032 K_SYCOCATYPE( KST_KService, KSycocaEntryPrivate ) 00033 00034 KServicePrivate(const QString &path) 00035 : KSycocaEntryPrivate(path), m_bValid(true) 00036 { 00037 } 00038 KServicePrivate(QDataStream& _str, int _offset) 00039 : KSycocaEntryPrivate(_str, _offset), m_bValid(true) 00040 { 00041 load(_str); 00042 } 00043 00044 void init(const KDesktopFile *config, KService* q); 00045 void parseActions(const KDesktopFile *config, KService* q); 00046 void load( QDataStream& ); 00047 virtual void save( QDataStream& ); 00048 00049 virtual QString name() const 00050 { 00051 return m_strName; 00052 } 00053 00054 virtual QString storageId() const 00055 { 00056 if (!menuId.isEmpty()) 00057 return menuId; 00058 return path; 00059 } 00060 00061 virtual bool isValid() const 00062 { 00063 return m_bValid; 00064 } 00065 00066 virtual QVariant property(const QString &name) const; 00067 00068 virtual QStringList propertyNames() const; 00069 00070 QVariant property(const QString &_name, QVariant::Type t) const; 00071 00072 QStringList serviceTypes() const; 00073 00074 QStringList categories; 00075 QString menuId; 00076 QString m_strType; 00077 QString m_strName; 00078 QString m_strExec; 00079 QString m_strIcon; 00080 QString m_strTerminalOptions; 00081 QString m_strPath; 00082 QString m_strComment; 00083 QString m_strLibrary; 00084 00085 int m_initialPreference; // deprecated 00086 // the initial preference is per-servicetype now. 00087 QVector<KService::ServiceTypeAndPreference> m_serviceTypes; 00088 00089 QString m_strDesktopEntryName; 00090 KService::DBusStartupType m_DBUSStartusType; 00091 QMap<QString,QVariant> m_mapProps; 00092 QStringList m_lstKeywords; 00093 QString m_strGenName; 00094 QList<KServiceAction> m_actions; 00095 bool m_bAllowAsDefault : 1; 00096 bool m_bTerminal : 1; 00097 bool m_bValid : 1; 00098 }; 00099 #endif
KDE 4.6 API Reference