]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/qsetborder.h
WEdwin can you fix whitespace before you commit :/
[lyx.git] / src / frontends / qt2 / qsetborder.h
1 // -*- C++ -*-
2 /**
3  * \file QSetBorder.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Edwin Leuven
8  *
9  * Full author contact details are available in file CREDITS
10  */
11 #ifndef QSETBORDER_H
12 #define QSETBORDER_H
13
14 #include <qwidget.h>
15 #include <qpixmap.h>
16
17 class QMouseEvent;
18 class QResizeEvent;
19 class QPaintEvent;
20
21 class QSetBorder : public QWidget
22 {
23         Q_OBJECT
24 public:
25         QSetBorder(QWidget * parent = 0, char const * name = 0, WFlags fl = 0);
26
27         bool getLeft();
28         bool getRight();
29         bool getTop();
30         bool getBottom();
31
32 signals:
33         void rightSet(bool);
34         void leftSet(bool);
35         void topSet(bool);
36         void bottomSet(bool);
37
38 public slots:
39         void setLeft(bool);
40         void setRight(bool);
41         void setTop(bool);
42         void setBottom(bool);
43
44 protected:
45         void mousePressEvent(QMouseEvent * e);
46         void paintEvent(QPaintEvent * e);
47         
48 private:
49         void init();
50
51         void drawLeft(bool);
52         void drawRight(bool);
53         void drawTop(bool);
54         void drawBottom(bool);
55
56         bool left_;
57         bool right_;
58         bool top_;
59         bool bottom_;
60
61         int m;
62         int l;
63         int w;
64         int h;
65         
66         QPixmap buffer;
67 };
68  
69 #endif // QSETBORDER_H