Changeset View
Changeset View
Standalone View
Standalone View
src/app/brightnessmanager.cpp
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | Copyright (C) 2018 Nicolas Fella <nicolas.fella@gmx.de> | ||||
3 | | ||||
4 | This program 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 program 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 General Public License | ||||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
16 | */ | ||||
17 | | ||||
18 | #include "brightnessmanager.h" | ||||
19 | | ||||
20 | #include <QDebug> | ||||
21 | | ||||
22 | #ifdef Q_OS_LINUX | ||||
23 | #include "solidbrightnessbackend.h" | ||||
24 | #endif | ||||
25 | | ||||
26 | BrightnessManager::BrightnessManager(QObject *parent) | ||||
27 | : QObject(parent) | ||||
28 | { | ||||
29 | #ifdef Q_OS_LINUX | ||||
30 | m_backend = new SolidBrightnessBackend(this); | ||||
31 | #endif | ||||
32 | } | ||||
33 | | ||||
34 | BrightnessManager::~BrightnessManager() = default; | ||||
35 | | ||||
36 | void BrightnessManager::maxBrightness() | ||||
37 | { | ||||
38 | if (m_backend) { | ||||
39 | m_backend->maxBrightness(); | ||||
40 | } | ||||
41 | } |