3
This file is part of the KDE project, module kcmbackground.
5
Copyright (C) 1999 Geert Jansen <g.t.jansen@stud.tue.nl>
6
Copyright (C) 2003 Waldo Bastian <bastian@kde.org>
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License
10
version 2 as published by the Free Software Foundation.
12
This library is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
Library General Public License for more details.
17
You should have received a copy of the GNU Library General Public License
18
along with this library; see the file COPYING.LIB. If not, write to
19
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20
Boston, MA 02110-1301, USA.
30
#include "ui_bgadvanced_ui.h"
34
class QTreeWidgetItem;
36
class KBackgroundRenderer;
37
class KBackgroundProgram;
39
class BGAdvancedBase : public QWidget, public Ui::BGAdvancedBase {
41
BGAdvancedBase(QWidget *parent) : QWidget(parent) {
46
class BGAdvancedDialog : public KDialog {
49
BGAdvancedDialog(KBackgroundRenderer *_r, QWidget *parent);
52
void setCacheSize(int s);
68
void addProgram(const QString &name);
70
void removeProgram(const QString &name);
72
void selectProgram(const QString &name);
75
void slotProgramItemClicked(QTreeWidgetItem *item);
77
void slotProgramItemDoubleClicked(QTreeWidgetItem *item);
79
void slotProgramChanged();
80
void slotEnableProgram(bool b);
83
KBackgroundRenderer *r;
88
QHash<QString, QTreeWidgetItem *> m_programItems;
89
QString m_selectedProgram;
90
int m_oldBackgroundMode;
95
* Dialog to edit a background program.
97
class KProgramEditDialog: public KDialog {
101
explicit KProgramEditDialog(const QString &program = QString(),
102
QWidget *parent = 0L, char *name = 0L);
104
/** The program name is here in case the user changed it */
105
QString program()const;
108
virtual void accept();
112
QLineEdit *m_NameEdit, *m_CommentEdit;
113
QLineEdit *m_ExecEdit, *m_CommandEdit;
114
QLineEdit *m_PreviewEdit;
115
QSpinBox *m_RefreshEdit;
116
KBackgroundProgram *m_Prog;