krootpixmap.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __KRootPixmap_h_Included__
00012 #define __KRootPixmap_h_Included__
00013
00014 #include <qobject.h>
00015 #include <qcolor.h>
00016 #include <kdemacros.h>
00017
00018 #ifndef Q_WS_QWS //FIXME
00019
00020 class QRect;
00021 class QWidget;
00022 class QTimer;
00023 class KSharedPixmap;
00024 class KRootPixmapData;
00025
00046 class KRootPixmap: public QObject
00047 {
00048 Q_OBJECT
00049
00050 public:
00060 KRootPixmap( QWidget *target, const char *name=0 );
00061
00066 KRootPixmap( QWidget *target, QObject *parent, const char *name=0 );
00067
00071 virtual ~KRootPixmap();
00072
00077 bool isAvailable() const;
00078
00082 bool isActive() const { return m_bActive; }
00083
00087 int currentDesktop() const;
00088
00093 bool customPainting() const { return m_bCustomPaint; }
00094
00095 #ifndef KDE_NO_COMPAT
00096
00100 KDE_DEPRECATED bool checkAvailable(bool) { return isAvailable(); }
00101 #endif
00102
00106 const QColor &color() const { return m_FadeColor; }
00107
00111 double opacity() const { return m_Fade; }
00112
00113 public slots:
00117 virtual void start();
00118
00122 virtual void stop();
00123
00134 void setFadeEffect(double opacity, const QColor &color);
00135
00142 void repaint( bool force );
00143
00149 void repaint();
00150
00157 void setCustomPainting( bool enable ) { m_bCustomPaint = enable; }
00158
00163 void enableExports();
00164
00168 static QString pixmapName(int desk);
00169 signals:
00176 void backgroundUpdated( const QPixmap &pm );
00177
00178 protected:
00183 virtual bool eventFilter(QObject *, QEvent *);
00184
00190 virtual void updateBackground( KSharedPixmap * );
00191
00192 private slots:
00193 void slotBackgroundChanged(int);
00194 void slotDone(bool);
00195 void desktopChanged( int desk );
00196
00197 private:
00198 bool m_bActive, m_bInit, m_bCustomPaint;
00199 int m_Desk;
00200
00201 double m_Fade;
00202 QColor m_FadeColor;
00203
00204 QRect m_Rect;
00205 QWidget *m_pWidget;
00206 QTimer *m_pTimer;
00207 KSharedPixmap *m_pPixmap;
00208 KRootPixmapData *d;
00209
00210 void init();
00211 };
00212
00213 #endif // ! Q_WS_QWS
00214 #endif // __KRootPixmap_h_Included__
00215
This file is part of the documentation for kdeui Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Apr 21 18:43:17 2004 by
doxygen 1.3.6-20040222 written by
Dimitri van Heesch, © 1997-2003