not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / kcontrol / kdm / background / bgadvanced.h
blob82b7cdcbd819f8d3a6242053a749b234b61a6bb5
1 /* vi: ts=8 sts=4 sw=4
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.
23 #ifndef BGADVANCED_H
24 #define BGADVANCED_H
26 #include <QHash>
28 #include <kdialog.h>
30 #include "ui_bgadvanced_ui.h"
32 class QLineEdit;
33 class QSpinBox;
34 class QTreeWidgetItem;
36 class KBackgroundRenderer;
37 class KBackgroundProgram;
39 class BGAdvancedBase : public QWidget, public Ui::BGAdvancedBase
41 public:
42 BGAdvancedBase( QWidget *parent ) : QWidget( parent ) {
43 setupUi( this );
47 class BGAdvancedDialog : public KDialog
49 Q_OBJECT
50 public:
51 BGAdvancedDialog(KBackgroundRenderer *_r, QWidget *parent);
53 #if 0
54 void setCacheSize(int s);
55 int cacheSize();
56 #endif
58 void updateUI();
60 void makeReadOnly();
62 #if 0
63 public Q_SLOTS:
64 void slotAdd();
65 void slotRemove();
66 void slotModify();
67 #endif
69 protected:
70 void addProgram(const QString &name);
71 #if 0
72 void removeProgram(const QString &name);
73 #endif
74 void selectProgram(const QString &name);
76 protected Q_SLOTS:
77 void slotProgramItemClicked(QTreeWidgetItem *item);
78 #if 0
79 void slotProgramItemDoubleClicked(QTreeWidgetItem *item);
80 #endif
81 void slotProgramChanged();
82 void slotEnableProgram(bool b);
84 private:
85 KBackgroundRenderer *r;
87 BGAdvancedBase *dlg;
89 QWidget *m_pMonitor;
90 QHash<QString, QTreeWidgetItem *> m_programItems;
91 QString m_selectedProgram;
92 int m_oldBackgroundMode;
95 #if 0
96 /**
97 * Dialog to edit a background program.
99 class KProgramEditDialog: public KDialog
101 Q_OBJECT
103 public:
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;
110 public Q_SLOTS:
111 virtual void accept();
113 private:
114 QString m_Program;
115 QLineEdit *m_NameEdit, *m_CommentEdit;
116 QLineEdit *m_ExecEdit, *m_CommandEdit;
117 QLineEdit *m_PreviewEdit;
118 QSpinBox *m_RefreshEdit;
119 KBackgroundProgram *m_Prog;
121 #endif
123 #endif