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
|
//
// C++ Interface: malloryclient
//
// Description:
//
//
// Author: Remi Villatel <maxilys@tele2>, (C) 2005
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef MALLORYCLIENT_H
#define MALLORYCLIENT_H
#include <kdecoration.h>
#include <kdecorationfactory.h>
#include <tqlayout.h>
#include "mallorybutton.h"
#include "enums.h"
class MalloryButton;
class MalloryClient : public KDecoration
{
Q_OBJECT
public:
MalloryClient(KDecorationBridge* bridge, KDecorationFactory* factory);
~MalloryClient();
virtual void init();
virtual bool eventFilter(TQObject* o, TQEvent* e);
virtual TQSize minimumSize() const;
virtual void borders(int& left, int& right, int& top, int& bottom) const;
protected:
virtual void desktopChange();
virtual void activeChange();
virtual void captionChange();
virtual void maximizeChange();
virtual void iconChange();
virtual void shadeChange() {};
virtual void paintEvent(TQPaintEvent *e);
virtual void showEvent(TQShowEvent*);
virtual void resize(const TQSize&);
virtual void reset(unsigned long changed);
private:
void addButtons(TQBoxLayout *layout, const TQString &buttons);
void resizeEvent(TQResizeEvent *e);
void mouseDoubleClickEvent(TQMouseEvent *e);
Position mousePosition(const TQPoint &point) const;
MalloryButton *m_button[ButtonTypeCount];
TQSpacerItem *m_titleBar, *m_leftSpacer, *m_rightSpacer, *m_topSpacer, *m_bottomSpacer, *m_leftButtonSpacer, *m_leftButtonSpacer2, *m_rightButtonSpacer, *m_rightButtonSpacer2;
private slots:
void maxButtonPressed();
void menuButtonPressed();
};
#endif
|