1 | /* |
2 | * Copyright (C) 2010 Andreas Scherf <ascherfy@gmail.com> |
3 | * |
4 | * This file is part of the KDE project "KBounce" |
5 | * |
6 | * KBounce is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU Library General Public |
8 | * License as published by the Free Software Foundation; either |
9 | * version 2 of the License, or (at your option) any later version. |
10 | * |
11 | * KBounce is distributed in the hope that it will be useful, |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | * Library General Public License for more details. |
15 | * |
16 | * You should have received a copy of the GNU Library General Public |
17 | * License along with KBounce; if not, write to the Free |
18 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 | * Boston, MA 02110-1301, USA. |
20 | */ |
21 | |
22 | #ifndef BACKGROUNDSELECTOR_H |
23 | #define BACKGROUNDSELECTOR_H |
24 | |
25 | #include <QWidget> |
26 | #include <KConfigSkeleton> |
27 | namespace Ui { |
28 | class KBounceBackgroundSelector; |
29 | } |
30 | |
31 | class BackgroundSelector : public QWidget { |
32 | Q_OBJECT |
33 | public: |
34 | explicit BackgroundSelector(QWidget *parent ,KConfigSkeleton * config ); |
35 | ~BackgroundSelector(); |
36 | |
37 | void setupData(); |
38 | private slots: |
39 | void imagePathChanged(const QString& path); |
40 | void useRandomBackgroundPicturesChanged(bool state); |
41 | void previewBackgroundPicture(); |
42 | protected: |
43 | void changeEvent(QEvent *e); |
44 | void enableSettings(bool enable=true); |
45 | private: |
46 | Ui::KBounceBackgroundSelector *ui; |
47 | KConfigSkeleton * m_config; |
48 | }; |
49 | |
50 | #endif // BACKGROUNDSELECTOR_H |
51 | |