tools/drawMapTest/drawmapwidget.h
author Wuzzy <Wuzzy2@mail.ru>
Tue, 06 Mar 2018 03:48:03 +0100
changeset 13082 aa9e871f9685
parent 4477 63a21fac8bf7
permissions -rw-r--r--
Complete overhaul of Basic Rope Training NEW lesson plan: - Select rope - Shoot rope, attach, detach - Extend, retract, swing to reach easy target - Multiple shots / rope re-use to go over water hazard - Drop grenade from rope - Special rules when you only got 1 rope (also when the rope is officially used up) - Rope around obstacles and mines

#ifndef DRAWMAPWIDGET_H
#define DRAWMAPWIDGET_H

#include <QWidget>
#include <QHBoxLayout>
#include <QPushButton>
#include <QGraphicsView>
#include <QApplication>

#include "qaspectratiolayout.h"
#include "drawmapscene.h"

namespace Ui {
    class Ui_DrawMapWidget
    {
    public:
        QGraphicsView *graphicsView;
        QPushButton *pbUndo;

        void setupUi(QWidget *drawMapWidget)
        {
            QAspectRatioLayout * arLayout = new QAspectRatioLayout(drawMapWidget);
            arLayout->setMargin(0);

            graphicsView = new QGraphicsView(drawMapWidget);
            arLayout->addWidget(graphicsView);

            retranslateUi(drawMapWidget);

            QMetaObject::connectSlotsByName(drawMapWidget);
        } // setupUi

        void retranslateUi(QWidget *drawMapWidget)
        {
            Q_UNUSED(drawMapWidget);
        } // retranslateUi

    };

    class DrawMapWidget: public Ui_DrawMapWidget {};
}

class DrawMapWidget : public QWidget
{
    Q_OBJECT

public:
    explicit DrawMapWidget(QWidget *parent = 0);
    ~DrawMapWidget();

    void setScene(DrawMapScene * scene);

protected:
    void changeEvent(QEvent *e);
    virtual void resizeEvent(QResizeEvent * event);

private:
    Ui::DrawMapWidget *ui;
};

#endif // DRAWMAPWIDGET_H