aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/src-glwidgets/glw-widget.h
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-09-26 14:04:24 -0400
committerKen Moore <ken@ixsystems.com>2017-09-26 14:04:24 -0400
commita8ab0934e4782a14206cba544c846a34947cce36 (patch)
treef032428eca9b7938b43b6f06f67da554d0faf2b0 /src-qt5/src-glwidgets/glw-widget.h
parentFix up the close event handling in lumina-textedit. Now it will actually clos... (diff)
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-a8ab0934e4782a14206cba544c846a34947cce36.tar.gz
lumina-a8ab0934e4782a14206cba544c846a34947cce36.tar.bz2
lumina-a8ab0934e4782a14206cba544c846a34947cce36.zip
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/src-glwidgets/glw-widget.h')
-rw-r--r--src-qt5/src-glwidgets/glw-widget.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/src-qt5/src-glwidgets/glw-widget.h b/src-qt5/src-glwidgets/glw-widget.h
new file mode 100644
index 00000000..1d6caa77
--- /dev/null
+++ b/src-qt5/src-glwidgets/glw-widget.h
@@ -0,0 +1,50 @@
+//===========================================
+// Lumina-desktop source code
+// Copyright (c) 2017, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+#ifndef _LUMINA_OPENGL_WIDGETS_WIDGET_H
+#define _LUMINA_OPENGL_WIDGETS_WIDGET_H
+
+#include <QWidget>
+#include <QPaintEvent>
+#include <QStylePainter>
+#include <QResizeEvent>
+#include <QStylePainter>
+
+#include "glw-base.h"
+
+class GLW_Widget : public QWidget{
+ Q_OBJECT
+private:
+ GLW_Base *glw_base;
+
+public:
+ GLW_Widget(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
+ ~GLW_Widget();
+
+ QRect widgetRect(); //converts to the coordinate scheme of the base widget
+ bool mouseOverWidget();
+
+ void setGLBase(GLW_Base *base);
+
+ virtual void paintYourself(QStylePainter *painter, QPaintEvent *ev);
+ void paintChildren(QStylePainter *painter, QPaintEvent *ev);
+
+private slots:
+
+public slots:
+
+protected:
+ void enterEvent(QEvent*){ this->update(); }
+ void leaveEvent(QEvent*){ this->update(); }
+ void resizeEvent(QResizeEvent *ev);
+ void paintEvent(QPaintEvent *ev);
+
+signals:
+ void repaintArea(QRect);
+};
+
+Q_DECLARE_INTERFACE(GLW_Widget, "GLW_Widget");
+#endif
bgstack15