Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / kcontrol / kdm / background / bgdialog.h
blob2f70cd0529f0d0f5b0db3977cd89af5bd468d33a
1 /*
2 This file is part of the KDE libraries
3 Copyright (c) 2003 Waldo Bastian <bastian@kde.org>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 version 2 as published by the Free Software Foundation.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef _BGDIALOG_H_
21 #define _BGDIALOG_H_
23 #include <Qt3Support/Q3PtrVector>
24 #include <QMap>
26 #include "ui_bgdialog_ui.h"
27 #include "bgrender.h"
28 #include "bgsettings.h"
29 #include "bgdefaults.h"
31 class BGMonitorArrangement;
32 class KStandardDirs;
33 class BGMultiWallpaperList;
35 class BGDialog_UI : public QWidget, public Ui::BGDialog_UI
37 public:
38 BGDialog_UI( QWidget *parent ) : QWidget( parent ) {
39 setupUi( this );
43 class BGDialog : public BGDialog_UI
45 Q_OBJECT
46 public:
47 BGDialog(QWidget* parent, const KSharedConfigPtr & _config, bool _kdmMode);
48 ~BGDialog();
50 void load();
51 void save();
52 void defaults();
54 void makeReadOnly();
56 QString quickHelp() const;
58 Q_SIGNALS:
59 void changed(bool);
61 protected:
62 void initUI();
63 void updateUI();
64 KBackgroundRenderer * eRenderer();
66 void setWallpaper(const QString &);
68 void loadWallpaperFilesList();
70 protected Q_SLOTS:
71 void slotIdentifyScreens();
72 void slotSelectScreen(int screen);
73 void slotSelectDesk(int desk);
74 void slotWallpaperTypeChanged(int i);
75 void slotWallpaper(int i);
76 void slotWallpaperPos(int);
77 void slotWallpaperSelection();
78 void slotSetupMulti();
79 void slotPrimaryColor(const QColor &color);
80 void slotSecondaryColor(const QColor &color);
81 void slotPattern(int pattern);
82 void slotImageDropped(const QString &uri);
83 void slotPreviewDone(int desk, int screen);
84 void slotAdvanced();
85 void slotGetNewStuff();
86 void slotBlendMode(int mode);
87 void slotBlendBalance(int value);
88 void slotBlendReverse(bool b);
89 void desktopResized();
90 void setBlendingEnabled(bool);
92 protected:
93 void getEScreen();
94 KGlobalBackgroundSettings *m_pGlobals;
95 KStandardDirs *m_pDirs;
96 bool m_kdmMode;
98 unsigned m_numDesks;
99 unsigned m_numScreens;
100 int m_desk;
101 int m_screen;
102 int m_eDesk;
103 int m_eScreen;
104 QVector< Q3PtrVector<KBackgroundRenderer> > m_renderer; // m_renderer[desk][screen]
105 QMap<QString,int> m_wallpaper;
106 QStringList m_patterns;
107 int m_slideShowRandom; // Remembers last Slide Show setting
108 int m_wallpaperPos; // Remembers last wallpaper pos
110 BGMonitorArrangement * m_pMonitorArrangement;
112 bool m_previewUpdates;
113 bool m_copyAllDesktops;
114 bool m_copyAllScreens;
117 #endif