aboutsummaryrefslogtreecommitdiff
path: root/app/draw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'app/draw.cpp')
-rw-r--r--app/draw.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/draw.cpp b/app/draw.cpp
index b3187be..6cbc338 100644
--- a/app/draw.cpp
+++ b/app/draw.cpp
@@ -7,12 +7,11 @@
#include <qwindowdefs.h>
#include <iostream>
-DrawWidget::DrawWidget(unsigned width, unsigned height) : QWidget() {
- m_width = width;
- m_height = height;
- m_drawbuffer = new QRgb[width * height];
+DrawWidget::DrawWidget(const Config &conf) :
+ QWidget(), m_conf(conf) {
+ m_drawbuffer = new QRgb[conf.m_width * conf.m_height];
- m_img = QImage((uchar*)m_drawbuffer, width, height, QImage::Format_ARGB32);
+ m_img = QImage((uchar*)m_drawbuffer, conf.m_width, conf.m_height, QImage::Format_ARGB32);
}
void DrawWidget::paintEvent(QPaintEvent*) {