aboutsummaryrefslogtreecommitdiff
path: root/Source/MapEditor/mainwindow.cpp
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-06-11 13:58:33 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-06-11 13:58:33 +0200
commitd1f55e8b45df2dfd84bdde3e2566ef14c9ba40f1 (patch)
tree1b6f25f6dfecbbd94b7b9db271dea7cde8ea6221 /Source/MapEditor/mainwindow.cpp
parent022c72fe369da0045f9ca7dd4b8d4d7dd169c87c (diff)
* Tried to get some work done in MapEditor with no success so far.
* Timers with no repeat flag were being set to NULL, but this is not actually desired! * Reenabled transparency for aircraft shadow. * Deprecated NotificationRequest flags, and replaced by system timer handling.
Diffstat (limited to 'Source/MapEditor/mainwindow.cpp')
-rw-r--r--Source/MapEditor/mainwindow.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/Source/MapEditor/mainwindow.cpp b/Source/MapEditor/mainwindow.cpp
index 58c37f6..2632429 100644
--- a/Source/MapEditor/mainwindow.cpp
+++ b/Source/MapEditor/mainwindow.cpp
@@ -1,4 +1,6 @@
#include "mainwindow.h"
+#include <QPainter>
+#include <QGraphicsScene>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
@@ -8,8 +10,6 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->LoadMap_Btn, SIGNAL(released()), this, SLOT(onLoadMap()));
- ui->openGLWidget->
-
appSettings();
}
@@ -34,7 +34,6 @@ void MainWindow::onLoadMap(void)
QDataStream txt(&f);
-
}
bool MainWindow::checkFile(QFile& f)
@@ -55,6 +54,21 @@ bool MainWindow::checkFile(QFile& f)
_last_dir = d.absolutePath();
+ QPixmap pix;
+
+ if(pix.load("C:\\cygwin\\home\\Xavier\\Airport\\Sprites\\Tileset1.bmp") == false)
+ {
+ qDebug() << "Error loading bitmap.";
+ }
+
+ QPainter p;
+
+ p.begin(&pix);
+
+ p.setWindow(ui->widget->geometry());
+
+ p.drawPixmap(ui->widget->x(), ui->widget->y(), pix);
+
return true;
}