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.
26 #include <Qt3Support/Q3Dict>
27 #include <Qt3Support/Q3CheckListItem>
31 #include "ui_bgadvanced_ui.h"
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
, bool _kdmMode
);
53 void setCacheSize(int s
);
56 void setTextColor(const QColor
&color
);
57 QColor
textBackgroundColor();
58 void setTextBackgroundColor(const QColor
&color
);
60 void setShadowEnabled(bool enabled
);
61 void setTextLines(int lines
);
62 int textLines() const;
63 void setTextWidth(int width
);
64 int textWidth() const;
76 void addProgram(const QString
&name
);
77 void removeProgram(const QString
&name
);
78 void selectProgram(const QString
&name
);
81 void slotProgramItemClicked(Q3ListViewItem
*item
);
82 void slotProgramItemDoubleClicked(Q3ListViewItem
*item
);
83 void slotProgramChanged();
84 void slotEnableProgram(bool b
);
87 KBackgroundRenderer
*r
;
92 Q3Dict
<Q3ListViewItem
> m_programItems
;
93 QString m_selectedProgram
;
94 int m_oldBackgroundMode
;
99 * Dialog to edit a background program.
101 class KProgramEditDialog
: public KDialog
106 explicit KProgramEditDialog(bool kdmMode
, const QString
&program
=QString(),
107 QWidget
*parent
=0L, char *name
=0L);
109 /** The program name is here in case the user changed it */
110 QString
program()const;
113 virtual void accept();
117 QLineEdit
*m_NameEdit
, *m_CommentEdit
;
118 QLineEdit
*m_ExecEdit
, *m_CommandEdit
;
119 QLineEdit
*m_PreviewEdit
;
120 QSpinBox
*m_RefreshEdit
;
121 KBackgroundProgram
*m_Prog
;