QTfrontend/ui/widget/drawmapwidget.h
changeset 6935 472ed92c4173
parent 6934 14a230552c2e
child 6952 7f70f37bbf08
equal deleted inserted replaced
6934:14a230552c2e 6935:472ed92c4173
    21 
    21 
    22 #include <QWidget>
    22 #include <QWidget>
    23 #include <QHBoxLayout>
    23 #include <QHBoxLayout>
    24 #include <QPushButton>
    24 #include <QPushButton>
    25 #include <QGraphicsView>
    25 #include <QGraphicsView>
       
    26 #include <QLabel>
    26 
    27 
    27 #include "qaspectratiolayout.h"
    28 #include "qaspectratiolayout.h"
    28 #include "drawmapscene.h"
    29 #include "drawmapscene.h"
    29 
    30 
    30 
    31 
    51 {
    52 {
    52     class Ui_DrawMapWidget
    53     class Ui_DrawMapWidget
    53     {
    54     {
    54         public:
    55         public:
    55             DrawMapView *graphicsView;
    56             DrawMapView *graphicsView;
       
    57             QLabel * lblPoints;
    56 
    58 
    57             void setupUi(QWidget *drawMapWidget)
    59             void setupUi(QWidget *drawMapWidget)
    58             {
    60             {
    59                 QAspectRatioLayout * arLayout = new QAspectRatioLayout(drawMapWidget);
    61                 QVBoxLayout * vbox = new QVBoxLayout(drawMapWidget);
       
    62                 vbox->setMargin(0);
       
    63                 lblPoints = new QLabel("0", drawMapWidget);
       
    64                 vbox->addWidget(lblPoints);
       
    65                 QAspectRatioLayout * arLayout = new QAspectRatioLayout();
    60                 arLayout->setMargin(0);
    66                 arLayout->setMargin(0);
       
    67                 vbox->addLayout(arLayout);
    61 
    68 
    62                 graphicsView = new DrawMapView(drawMapWidget);
    69                 graphicsView = new DrawMapView(drawMapWidget);
    63                 arLayout->addWidget(graphicsView);
    70                 arLayout->addWidget(graphicsView);
    64 
    71 
    65                 retranslateUi(drawMapWidget);
    72                 retranslateUi(drawMapWidget);
   101 
   108 
   102     private:
   109     private:
   103         Ui::DrawMapWidget *ui;
   110         Ui::DrawMapWidget *ui;
   104 
   111 
   105         DrawMapScene * m_scene;
   112         DrawMapScene * m_scene;
       
   113 
       
   114     private slots:
       
   115         void pathChanged();
   106 };
   116 };
   107 
   117 
   108 #endif // DRAWMAPWIDGET_H
   118 #endif // DRAWMAPWIDGET_H