blob: b1d62396549d9168fc9908a4cf5c3d5bbcda7804 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
#ifndef __KWMTHEMECLIENT_H
#define __KWMTHEMECLIENT_H
#include <qbutton.h>
#include <qtoolbutton.h>
#include <kpixmap.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
class QLabel;
class QSpacerItem;
class QGridLayout;
namespace KWMTheme {
class MyButton : public QToolButton
{
public:
MyButton(QWidget *parent=0, const char *name=0)
: QToolButton(parent, name){setAutoRaise(true);setCursor( arrowCursor ); }
protected:
void drawButtonLabel(QPainter *p);
};
class KWMThemeClient : public KDecoration
{
Q_OBJECT
public:
KWMThemeClient( KDecorationBridge* b, KDecorationFactory* f );
~KWMThemeClient(){;}
void init();
void resize( const QSize& s );
QSize minimumSize() const;
void borders( int& left, int& right, int& top, int& bottom ) const;
protected:
void doShape();
void drawTitle(QPainter &p);
void resizeEvent( QResizeEvent* );
void paintEvent( QPaintEvent* );
void showEvent( QShowEvent* );
void mouseDoubleClickEvent( QMouseEvent * );
bool eventFilter( QObject* o, QEvent* e );
void captionChange();
void desktopChange();
void maximizeChange();
void iconChange();
void activeChange();
void shadeChange() {};
Position mousePosition(const QPoint &) const;
protected slots:
//void slotReset();
void menuButtonPressed();
void slotMaximize();
private:
QPixmap buffer;
KPixmap *aGradient, *iGradient;
MyButton *maxBtn, *stickyBtn, *mnuBtn;
QSpacerItem *titlebar;
QGridLayout* layout;
};
class KWMThemeFactory : public KDecorationFactory
{
public:
KWMThemeFactory();
~KWMThemeFactory();
KDecoration* createDecoration( KDecorationBridge* b );
bool reset( unsigned long mask );
};
}
#endif
|