52 lines
750 B
C++
52 lines
750 B
C++
#ifndef MAINCONTROLLER_H
|
|
#define MAINCONTROLLER_H
|
|
|
|
#include <QObject>
|
|
#include <QModelIndex>
|
|
#include "MainWindow.h"
|
|
|
|
class MapTreeModel;
|
|
class MapModelElement;
|
|
class MapModel;
|
|
|
|
class MainController : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MainController();
|
|
|
|
void show() {mw->show();}
|
|
|
|
signals:
|
|
|
|
public slots:
|
|
|
|
/** MapLayer selection changed */
|
|
void layerSelected(QModelIndex idx);
|
|
|
|
/** MapElement selection has changed */
|
|
void mapElementSelected(MapModelElement* el);
|
|
|
|
void onLoad();
|
|
|
|
void onSave();
|
|
|
|
void onMapModelAboutToReset();
|
|
void onMapModelReset();
|
|
|
|
private slots:
|
|
|
|
void onShow3DFloorplan();
|
|
void onShow3DGrid();
|
|
|
|
|
|
private:
|
|
|
|
MainWindow* mw;
|
|
MapTreeModel* mapTreeModel;
|
|
MapModel* mapModel;
|
|
|
|
};
|
|
|
|
#endif // MAINCONTROLLER_H
|