]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/qsetborder.h
new tabular dialog + new widget. more bullet stuff (not finished yet though).
[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, const char* 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
46         void mousePressEvent( QMouseEvent *e );
47         void paintEvent( QPaintEvent *e );
48         
49 private:
50         void init();
51
52         void drawLeft(bool);
53         void drawRight(bool);
54         void drawTop(bool);
55         void drawBottom(bool);
56
57         bool left_;
58         bool right_;
59         bool top_;
60         bool bottom_;
61
62         int m;
63         int l;
64         int w;
65         int h;
66         
67         QPixmap buffer;
68 };
69 #endif // QSETBORDER_H