Akonadi

akonadicontrol/agenttype.h
1 /*
2  Copyright (c) 2007 - 2008 Volker Krause <[email protected]>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef AGENTTYPE_H
21 #define AGENTTYPE_H
22 
23 #include <QString>
24 #include <QStringList>
25 #include <QVariantMap>
26 #include <QHash>
27 
28 class AgentManager;
29 class QSettings;
30 
31 class AgentType
32 {
33 public:
34  enum LaunchMethod {
35  Process,
36  Server,
37  Launcher
38  };
39 
40 public:
41  AgentType();
42  Q_REQUIRED_RESULT bool load(const QString &fileName, AgentManager *manager);
43  void save(QSettings *config) const;
44 
45  QString identifier;
46  QString name;
47  QString comment;
48  QString icon;
51  QString exec;
52  QVariantMap custom;
53  uint instanceCounter;
54  LaunchMethod launchMethod;
55 
56  static const QLatin1String CapabilityUnique;
57  static const QLatin1String CapabilityResource;
58  static const QLatin1String CapabilityAutostart;
59  static const QLatin1String CapabilityPreprocessor;
60  static const QLatin1String CapabilitySearch;
61 
62 private:
63  QString readString(const QSettings &file, const QString &key);
64 };
65 
66 #endif
QString name(const QVariant &location)
KDEGAMES_EXPORT QAction * load(const QObject *recvr, const char *slot, QObject *parent)
The agent manager has knowledge about all available agents (it scans for .desktop files in the agent ...
QStringList mimeTypes(Types)
KDEGAMES_EXPORT QAction * save(const QObject *recvr, const char *slot, QObject *parent)
KDEGAMES_EXPORT Capabilities capabilities()
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jun 5 2020 23:08:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.