a lot of work on th map-creator
This commit is contained in:
@@ -23,12 +23,18 @@
|
||||
#include "tree/MapTreeModel.h"
|
||||
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow) {
|
||||
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) {
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
QString css;
|
||||
css += "QPushButton { border: 1px solid #000000; background-color: #ffffff; }";
|
||||
css += "QPushButton:!enabled { border: 1px solid #cccccc; background-color:none; }";
|
||||
css += "QPushButton:hover { border: 1px solid #000000; background-color: #dddddd; }";
|
||||
css += "QPushButton:pressed { border: 1px solid #000000; background-color: #bbbbbb; }";
|
||||
|
||||
this->setStyleSheet(css);
|
||||
|
||||
mapView2D = new MapView2D();
|
||||
mapView3D = new MapView3D();
|
||||
|
||||
@@ -47,22 +53,37 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
ui->layTree->addWidget(actionWidget);
|
||||
|
||||
|
||||
// show mode
|
||||
QActionGroup* grpMode = new QActionGroup(this);
|
||||
grpMode->addAction(ui->actShow3DFloorplan);
|
||||
grpMode->addAction(ui->actShow3DGrid);
|
||||
|
||||
connect(ui->actShow2D, SIGNAL(triggered(bool)), this, SIGNAL(onShow2D()));
|
||||
connect(ui->actShow3DGrid, SIGNAL(triggered(bool)), this, SIGNAL(onShow3DGrid()));
|
||||
connect(ui->actShow3DFloorplan, SIGNAL(triggered(bool)), this, SIGNAL(onShow3DFloorplan()));
|
||||
|
||||
|
||||
// node coloring
|
||||
QActionGroup* grpNodeCol = new QActionGroup(this);
|
||||
grpNodeCol->addAction(ui->actGridNodeColorImportance);
|
||||
grpNodeCol->addAction(ui->actGridNodeColorType);
|
||||
|
||||
connect(ui->actGridNodeColorImportance, SIGNAL(triggered(bool)), this, SIGNAL(onGridNodeColorImp()));
|
||||
connect(ui->actGridNodeColorType, SIGNAL(triggered(bool)), this, SIGNAL(onGridNodeColorType()));
|
||||
|
||||
// edges
|
||||
connect(ui->actGridShowEdges, &QAction::triggered, this, &MainWindow::onGridShowEdges);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
MainWindow::~MainWindow() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
QAction* MainWindow::getShow3DFloorplan() {
|
||||
return ui->actShow3DFloorplan;
|
||||
}
|
||||
|
||||
QAction* MainWindow::getShow3DGrid() {
|
||||
return ui->actShow3DGrid;
|
||||
}
|
||||
|
||||
QTreeView* MainWindow::getTree() {
|
||||
return ui->layerTree;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user