krootpixmap.h
/* vi: ts=8 sts=4 sw=4
*
* $Id: krootpixmap.h 345292 2004-09-09 20:07:27Z staniek $
* This file is part of the KDE project, module kdesktop.
* Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
*
* You can Freely distribute this program under the GNU Library General
* Public License. See the file "COPYING.LIB" for the exact licensing terms.
*/
#ifndef __KRootPixmap_h_Included__
#define __KRootPixmap_h_Included__
#include <qobject.h>
#include <qcolor.h>
#include <kdelibs_export.h>
#ifndef Q_WS_QWS //FIXME
class QRect;
class QWidget;
class QTimer;
class KSharedPixmap;
class KRootPixmapData;
class KDEUI_EXPORT KRootPixmap: public QObject
{
Q_OBJECT
public:
KRootPixmap( QWidget *target, const char *name=0 );
KRootPixmap( QWidget *target, QObject *parent, const char *name=0 );
virtual ~KRootPixmap();
bool isAvailable() const;
bool isActive() const { return m_bActive; }
int currentDesktop() const;
bool customPainting() const { return m_bCustomPaint; }
#ifndef KDE_NO_COMPAT
KDE_DEPRECATED bool checkAvailable(bool) { return isAvailable(); }
#endif
const QColor &color() const { return m_FadeColor; }
double opacity() const { return m_Fade; }
public slots:
virtual void start();
virtual void stop();
void setFadeEffect(double opacity, const QColor &color);
void repaint( bool force );
void repaint();
void setCustomPainting( bool enable ) { m_bCustomPaint = enable; }
void enableExports();
static QString pixmapName(int desk);
signals:
void backgroundUpdated( const QPixmap &pm );
protected:
virtual bool eventFilter(QObject *, QEvent *);
virtual void updateBackground( KSharedPixmap * );
private slots:
void slotBackgroundChanged(int);
void slotDone(bool);
void desktopChanged(int desktop);
void desktopChanged( WId window, unsigned int properties );
private:
bool m_bActive, m_bInit, m_bCustomPaint;
int m_Desk;
double m_Fade;
QColor m_FadeColor;
QRect m_Rect;
QWidget *m_pWidget;
QTimer *m_pTimer;
KSharedPixmap *m_pPixmap;
KRootPixmapData *d;
void init();
};
#endif // ! Q_WS_QWS
#endif // __KRootPixmap_h_Included__
KRootPixmap
Creates pseudo-transparent widgets.
Definition: krootpixmap.h:46
KRootPixmap::customPainting
bool customPainting() const
Returns true if custom painting is enabled, false otherwise.
Definition: krootpixmap.h:93
KRootPixmap::setCustomPainting
void setCustomPainting(bool enable)
Enables custom handling of the background painting.
Definition: krootpixmap.h:157
KRootPixmap::isActive
bool isActive() const
Returns true if the KRootPixmap is active.
Definition: krootpixmap.h:82
KRootPixmap::color
const QColor & color() const
Definition: krootpixmap.h:106
KRootPixmap::checkAvailable
KDE_DEPRECATED bool checkAvailable(bool)
Deprecated, use isAvailable() instead.
Definition: krootpixmap.h:100
KRootPixmap::opacity
double opacity() const
Definition: krootpixmap.h:111

KDE Home | KDE Accessibility Home | Description of Access Keys