Settings: unify duplicated code
[lxde/liblxqt.git] / lxqtscreensaver.h
1 /* BEGIN_COMMON_COPYRIGHT_HEADER
2 * (c)LGPL2+
3 *
4 * LXQt - a lightweight, Qt based, desktop toolset
5 * http://razor-qt.org
6 *
7 * Copyright: 2010-2011 Razor team
8 * Authors:
9 * Petr Vanek <petr@scribus.info>
10 *
11 * Copyright (c) 2016 Luís Pereira <luis.artur.pereira@gmail.com>
12 *
13 * This program or library is free software; you can redistribute it
14 * and/or modify it under the terms of the GNU Lesser General Public
15 * License as published by the Free Software Foundation; either
16 * version 2.1 of the License, or (at your option) any later version.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
22
23 * You should have received a copy of the GNU Lesser General
24 * Public License along with this library; if not, write to the
25 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
26 * Boston, MA 02110-1301 USA
27 *
28 * END_COMMON_COPYRIGHT_HEADER */
29
30 #ifndef SCREENSAVER_H
31 #define SCREENSAVER_H
32
33 #include "lxqtglobals.h"
34 #include <QObject>
35 #include <QAction>
36
37 namespace LXQt
38 {
39
40 class ScreenSaverPrivate;
41
42 class LXQT_API ScreenSaver : public QObject
43 {
44 Q_OBJECT
45 Q_DECLARE_PRIVATE(ScreenSaver)
46 Q_DISABLE_COPY(ScreenSaver)
47
48 public:
49 ScreenSaver(QObject * parent=0);
50 ~ScreenSaver();
51
52 QList<QAction*> availableActions();
53
54 signals:
55 void activated();
56 void done();
57 public slots:
58 void lockScreen();
59
60 private:
61 ScreenSaverPrivate* const d_ptr;
62
63 Q_PRIVATE_SLOT(d_func(), void _l_xdgProcess_finished(int, QProcess::ExitStatus))
64 };
65
66 } // namespace LXQt
67 #endif
68