equal
deleted
inserted
replaced
23 #include <QHBoxLayout> |
23 #include <QHBoxLayout> |
24 #include <QPushButton> |
24 #include <QPushButton> |
25 #include <QGraphicsView> |
25 #include <QGraphicsView> |
26 #include <QLabel> |
26 #include <QLabel> |
27 |
27 |
28 #include "qaspectratiolayout.h" |
|
29 #include "drawmapscene.h" |
28 #include "drawmapscene.h" |
30 |
29 |
31 |
30 |
32 class DrawMapView : public QGraphicsView |
31 class DrawMapView : public QGraphicsView |
33 { |
32 { |
59 void setupUi(QWidget *drawMapWidget) |
58 void setupUi(QWidget *drawMapWidget) |
60 { |
59 { |
61 QVBoxLayout * vbox = new QVBoxLayout(drawMapWidget); |
60 QVBoxLayout * vbox = new QVBoxLayout(drawMapWidget); |
62 vbox->setMargin(0); |
61 vbox->setMargin(0); |
63 lblPoints = new QLabel("0", drawMapWidget); |
62 lblPoints = new QLabel("0", drawMapWidget); |
64 vbox->addWidget(lblPoints); |
63 QLayout * arLayout = new QVBoxLayout(); |
65 QAspectRatioLayout * arLayout = new QAspectRatioLayout(); |
64 arLayout->setAlignment(Qt::AlignCenter); |
66 arLayout->setMargin(0); |
|
67 vbox->addLayout(arLayout); |
65 vbox->addLayout(arLayout); |
68 |
66 |
69 graphicsView = new DrawMapView(drawMapWidget); |
67 graphicsView = new DrawMapView(drawMapWidget); |
|
68 graphicsView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); |
|
69 graphicsView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); |
70 arLayout->addWidget(graphicsView); |
70 arLayout->addWidget(graphicsView); |
71 |
71 |
72 retranslateUi(drawMapWidget); |
72 retranslateUi(drawMapWidget); |
73 |
73 |
74 QMetaObject::connectSlotsByName(drawMapWidget); |
74 QMetaObject::connectSlotsByName(drawMapWidget); |