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
42 BGAdvancedBase( QWidget
*parent
) : QWidget( parent
) {
47 class BGAdvancedDialog
: public KDialog
51 BGAdvancedDialog(KBackgroundRenderer
*_r
, QWidget
*parent
);
54 void setCacheSize(int s
);
70 void addProgram(const QString
&name
);
72 void removeProgram(const QString
&name
);
74 void selectProgram(const QString
&name
);
77 void slotProgramItemClicked(QTreeWidgetItem
*item
);
79 void slotProgramItemDoubleClicked(QTreeWidgetItem
*item
);
81 void slotProgramChanged();
82 void slotEnableProgram(bool b
);
85 KBackgroundRenderer
*r
;
90 QHash
<QString
, QTreeWidgetItem
*> m_programItems
;
91 QString m_selectedProgram
;
92 int m_oldBackgroundMode
;
97 * Dialog to edit a background program.
99 class KProgramEditDialog
: public KDialog
104 explicit KProgramEditDialog(const QString
&program
=QString(),
105 QWidget
*parent
=0L, char *name
=0L);
107 /** The program name is here in case the user changed it */
108 QString
program()const;
111 virtual void accept();
115 QLineEdit
*m_NameEdit
, *m_CommentEdit
;
116 QLineEdit
*m_ExecEdit
, *m_CommandEdit
;
117 QLineEdit
*m_PreviewEdit
;
118 QSpinBox
*m_RefreshEdit
;
119 KBackgroundProgram
*m_Prog
;