Lomiri
Loading...
Searching...
No Matches
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
23class ProcessControlPrivate
24{
25public:
26 ProcessControlPrivate(ProcessControl *q);
27
28private:
29 friend class ProcessControl;
30 QStringList m_awakenProcesses;
31};
32
33ProcessControlPrivate::ProcessControlPrivate(ProcessControl *q)
34{
35}
36
37ProcessControl::ProcessControl(QObject* parent):
38 QObject(parent),
39 d_ptr(new ProcessControlPrivate(this))
40{
41}
42
43ProcessControl::~ProcessControl() = default;
44
45void ProcessControl::setAwakenProcesses(const QStringList &processes)
46{
47 Q_D(ProcessControl);
48 d->m_awakenProcesses = processes;
49 Q_EMIT awakenProcessesChanged();
50}
51
52QStringList ProcessControl::awakenProcesses() const
53{
54 Q_D(const ProcessControl);
55 return d->m_awakenProcesses;
56}