aboutsummaryrefslogtreecommitdiff
path: root/app/draw.cpp
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-01-24 18:13:44 +0100
committerJulian T <julian@jtle.dk>2021-01-24 18:22:11 +0100
commit41ea2d8f94043d49fc26aaaa8030a73dcfdc2da9 (patch)
treefcc07052425c65b38c1724f4fc30299a1cb48716 /app/draw.cpp
parenta38e6014ea5441e9d29fcb3b5607cd94e4061cff (diff)
Create rust project
Diffstat (limited to 'app/draw.cpp')
-rw-r--r--app/draw.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/app/draw.cpp b/app/draw.cpp
deleted file mode 100644
index 88733ef..0000000
--- a/app/draw.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "draw.hpp"
-#include <qnamespace.h>
-#include <qpainter.h>
-#include <qglobal.h>
-#include <qimage.h>
-#include <qrgb.h>
-#include <qtimer.h>
-#include <qwindowdefs.h>
-#include <iostream>
-
-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, conf.m_width, conf.m_height, QImage::Format_ARGB32);
-
-}
-
-void DrawWidget::paintEvent(QPaintEvent*) {
- QPainter painter(this);
-
- auto scaled = m_img.scaled(width(), height(), Qt::KeepAspectRatio);
- painter.drawImage(0, 0, scaled);
-}
-
-void DrawWidget::redraw() {
- repaint();
-}
-
-DrawWidget::~DrawWidget() {
- delete[] m_drawbuffer;
-}