diff options
author | Ken Moore <ken@ixsystems.com> | 2017-09-26 13:42:19 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-09-26 13:42:19 -0400 |
commit | bf7e372df336263ccdc9d0ab22554fb1ff6f629a (patch) | |
tree | d30c8ad898484380ba81dafcaaaee4c3057b5adc /src-qt5/src-glwidgets/glw-base.h | |
parent | Get the window embed routine cleaned up and demo-ready. (diff) | |
download | lumina-bf7e372df336263ccdc9d0ab22554fb1ff6f629a.tar.gz lumina-bf7e372df336263ccdc9d0ab22554fb1ff6f629a.tar.bz2 lumina-bf7e372df336263ccdc9d0ab22554fb1ff6f629a.zip |
Add a bunch of new files specifically for providing a new OpenGL-backed basis for doing visuals within Qt/Lumina.
Diffstat (limited to 'src-qt5/src-glwidgets/glw-base.h')
-rw-r--r-- | src-qt5/src-glwidgets/glw-base.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src-qt5/src-glwidgets/glw-base.h b/src-qt5/src-glwidgets/glw-base.h new file mode 100644 index 00000000..729aa68e --- /dev/null +++ b/src-qt5/src-glwidgets/glw-base.h @@ -0,0 +1,43 @@ +//=========================================== +// 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_BASE_H +#define _LUMINA_OPENGL_WIDGETS_BASE_H + +#include <QOpenGLWidget> +#include <QImage> +#include <QPaintEvent> +#include <QPainter> +#include <QResizeEvent> +#include <QStylePainter> + +class GLW_Base : public QOpenGLWidget{ + Q_OBJECT +private: + QColor bg_color; + QImage bg_img; + +public: + GLW_Base(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); + ~GLW_Base(); + + +private slots: + +public slots: + void setBackgroundColor(QColor color); + void setBackground(QRect geom, QImage img); + void repaintArea(QRect); + +signals: + void BaseResized(); + +protected: + void resizeEvent(QResizeEvent *ev); + void paintEvent(QPaintEvent *ev); +}; + +#endif |