aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/src-glwidgets/glw-base.h
blob: 729aa68e9e5d7239880894a54411fbb9028cdbc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
bgstack15