kwin Library API Documentation

kwmthemeclient.h

00001 #ifndef __KWMTHEMECLIENT_H 00002 #define __KWMTHEMECLIENT_H 00003 00004 #include <qbutton.h> 00005 #include <qtoolbutton.h> 00006 #include <kpixmap.h> 00007 #include <kdecoration.h> 00008 #include <kdecorationfactory.h> 00009 00010 class QLabel; 00011 class QSpacerItem; 00012 class QGridLayout; 00013 00014 namespace KWMTheme { 00015 00016 class MyButton : public QToolButton 00017 { 00018 public: 00019 MyButton(QWidget *parent=0, const char *name=0) 00020 : QToolButton(parent, name){setAutoRaise(true);setCursor( arrowCursor ); } 00021 protected: 00022 void drawButtonLabel(QPainter *p); 00023 }; 00024 00025 class KWMThemeClient : public KDecoration 00026 { 00027 Q_OBJECT 00028 public: 00029 KWMThemeClient( KDecorationBridge* b, KDecorationFactory* f ); 00030 ~KWMThemeClient(){;} 00031 void init(); 00032 void resize( const QSize& s ); 00033 QSize minimumSize() const; 00034 void borders( int& left, int& right, int& top, int& bottom ) const; 00035 protected: 00036 void doShape(); 00037 void drawTitle(QPainter &p); 00038 void resizeEvent( QResizeEvent* ); 00039 void paintEvent( QPaintEvent* ); 00040 void showEvent( QShowEvent* ); 00041 void mouseDoubleClickEvent( QMouseEvent * ); 00042 bool eventFilter( QObject* o, QEvent* e ); 00043 void captionChange(); 00044 void desktopChange(); 00045 void maximizeChange(); 00046 void iconChange(); 00047 void activeChange(); 00048 void shadeChange() {}; 00049 Position mousePosition(const QPoint &) const; 00050 protected slots: 00051 //void slotReset(); 00052 void menuButtonPressed(); 00053 void slotMaximize(); 00054 private: 00055 QPixmap buffer; 00056 KPixmap *aGradient, *iGradient; 00057 MyButton *maxBtn, *stickyBtn, *mnuBtn; 00058 QSpacerItem *titlebar; 00059 QGridLayout* layout; 00060 }; 00061 00062 class KWMThemeFactory : public KDecorationFactory 00063 { 00064 public: 00065 KWMThemeFactory(); 00066 ~KWMThemeFactory(); 00067 KDecoration* createDecoration( KDecorationBridge* b ); 00068 bool reset( unsigned long mask ); 00069 }; 00070 00071 } 00072 00073 #endif 00074
KDE Logo
This file is part of the documentation for kwin Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Aug 31 00:02:13 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003