4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS.
13 #ifndef GUISETBORDER_H
14 #define GUISETBORDER_H
25 class GuiSetBorder : public QWidget
29 GuiSetBorder(QWidget * parent = 0, Qt::WindowFlags fl = 0);
31 // We need tristate for multi-cell selection
39 BorderState getLeft();
40 BorderState getRight();
42 BorderState getBottom();
44 bool leftLineSet() { return getLeft() == LINE_SET; }
45 bool rightLineSet() { return getRight() == LINE_SET; }
46 bool topLineSet() { return getTop() == LINE_SET; }
47 bool bottomLineSet() { return getBottom() == LINE_SET; }
49 bool leftLineUnset() { return getLeft() == LINE_UNSET; }
50 bool rightLineUnset() { return getRight() == LINE_UNSET; }
51 bool topLineUnset() { return getTop() == LINE_UNSET; }
52 bool bottomLineUnset() { return getBottom() == LINE_UNSET; }
62 void setLeftEnabled(bool);
63 void setRightEnabled(bool);
64 void setTopEnabled(bool);
65 void setBottomEnabled(bool);
66 void setLeft(BorderState);
67 void setRight(BorderState);
68 void setTop(BorderState);
69 void setBottom(BorderState);
70 void setAll(BorderState);
73 void mousePressEvent(QMouseEvent * e);
74 void paintEvent(QPaintEvent * e);
79 void drawLine(QColor const & col, int x, int y, int x2, int y2);
81 void drawLeft(BorderState);
82 void drawRight(BorderState);
83 void drawTop(BorderState);
84 void drawBottom(BorderState);
88 Border() : set(LINE_SET), enabled(true) {}
109 #endif // GUISETBORDER_H