]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/qsetborder.h
Some string(widget->text()) fixes. Weirdness
[lyx.git] / src / frontends / qt2 / qsetborder.h
index 41c1150e70079a725b0c00c3cedc407a35e31e02..259c0e26703201a64bfff86e49d060a69a947517 100644 (file)
@@ -5,6 +5,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author Edwin Leuven
+ * \author John Levon
  *
  * Full author contact details are available in file CREDITS
  */
@@ -13,6 +14,7 @@
 
 #include <qwidget.h>
 #include <qpixmap.h>
+#include <qcolor.h>
 
 class QMouseEvent;
 class QResizeEvent;
@@ -34,12 +36,18 @@ signals:
        void leftSet(bool);
        void topSet(bool);
        void bottomSet(bool);
+       void clicked();
 
 public slots:
+       void setLeftEnabled(bool);
+       void setRightEnabled(bool);
+       void setTopEnabled(bool);
+       void setBottomEnabled(bool);
        void setLeft(bool);
        void setRight(bool);
        void setTop(bool);
        void setBottom(bool);
+       void setAll(bool);
 
 protected:
        void mousePressEvent(QMouseEvent * e);
@@ -48,21 +56,29 @@ protected:
 private:
        void init();
 
+       void drawLine(QColor const & col, int x, int y, int x2, int y2);
        void drawLeft(bool);
        void drawRight(bool);
        void drawTop(bool);
        void drawBottom(bool);
 
-       bool left_;
-       bool right_;
-       bool top_;
-       bool bottom_;
+       struct Border {
+               Border() : set(true), enabled(true) {}
+               bool set;
+               bool enabled;
+       };
+
+       Border left_;
+       Border right_;
+       Border top_;
+       Border bottom_;
 
        int m;
        int l;
        int w;
        int h;
-       
+
        QPixmap buffer;
 };