Plasma

application.h
1 /*
2  * Copyright (C) 2013 Ivan Cukic <ivan.cukic(at)kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2,
6  * or (at your option) any later version, as published by the Free
7  * Software Foundation
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details
13  *
14  * You should have received a copy of the GNU General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef APPLICATION_H
21 #define APPLICATION_H
22 
23 #include <QObject>
24 #include <QString>
25 
26 #include "utils/d_ptr.h"
27 
39 class Application: public QObject
40 {
41  Q_OBJECT
42 
46  Q_PROPERTY(QString application READ application WRITE setApplication NOTIFY applicationChanged)
47 
48 
52  Q_PROPERTY(bool running READ running WRITE setRunning NOTIFY runningChanged)
53 
54 public:
55  explicit Application(QObject *parent = nullptr);
56  ~Application();
57 
58  QString application() const;
59  bool running() const;
60 
61 public:
62  void setApplication(const QString &application);
63  void setRunning(bool run);
64 
65 public Q_SLOTS:
66  void start();
67  void terminate();
68 
69 Q_SIGNALS:
70  void applicationChanged(const QString &application);
71  void runningChanged(bool running);
72 
73 private:
74  D_PTR;
75 };
76 
77 #endif /* APPLICATION_H */
78 
Q_SIGNALSQ_SIGNALS
Q_OBJECTQ_OBJECT
Class which handles an application execution.
Definition: application.h:39
Q_PROPERTY(...)
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 4 2020 22:41:22 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.