Lomiri
ProcessControl.cpp
1 /*
2  * Copyright (C) 2021 UBports Foundation.
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 as published by
6  * the Free Software Foundation; version 3.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authors: Alberto Mardegan <mardy@users.sourceforge.net>
17  */
18 
19 #include "ProcessControl.h"
20 
21 #include <QDebug>
22 
23 class ProcessControlPrivate
24 {
25 public:
26  ProcessControlPrivate(ProcessControl *q);
27 
28 private:
29  friend class ProcessControl;
30  QStringList m_awakenProcesses;
31 };
32 
33 ProcessControlPrivate::ProcessControlPrivate(ProcessControl *q)
34 {
35 }
36 
37 ProcessControl::ProcessControl(QObject* parent):
38  QObject(parent),
39  d_ptr(new ProcessControlPrivate(this))
40 {
41 }
42 
43 ProcessControl::~ProcessControl() = default;
44 
45 void ProcessControl::setAwakenProcesses(const QStringList &processes)
46 {
47  Q_D(ProcessControl);
48  d->m_awakenProcesses = processes;
49  Q_EMIT awakenProcessesChanged();
50 }
51 
52 QStringList ProcessControl::awakenProcesses() const
53 {
54  Q_D(const ProcessControl);
55  return d->m_awakenProcesses;
56 }