日志窗口

This commit is contained in:
w-mj committed 2017-12-23 20:17:59 +08:00
1 parent 326c99756f
commit 1b69823b72
14 files changed
+259 -23

No files matched your search

+5 -3
View File
@@ -2,24 +2,26 @@
#include "ui_monitor.h"
#include <QObject>
#include <QDebug>
#include <mainwindow.h>
#include "parkingLotManager.h"
Monitor::Monitor(QWidget *parent) :
Monitor::Monitor(MainWindow *parent) :
QWidget(parent),
ui(new Ui::Monitor)
{
ui->setupUi(this);
QGraphicsScene *scene = new QGraphicsScene(this); // 创建场景
ParkingLotManager *pk = new ParkingLotManager(this, scene);
QObject::connect(ui->downStairButton, &QPushButton::clicked, pk, &ParkingLotManager::showDownStairFloor);
QObject::connect(ui->upStairButton, &QPushButton::clicked, pk, &ParkingLotManager::showUpStairFloor);
QObject::connect(pk, &ParkingLotManager::enableUpButton, ui->upStairButton, &QPushButton::setEnabled);
QObject::connect(pk, &ParkingLotManager::enableDownButton, ui->downStairButton, &QPushButton::setEnabled);
QObject::connect(pk, &ParkingLotManager::setCapacity, ui->capacity, &QLabel::setText);
QObject::connect(pk, &ParkingLotManager::setLoad, ui->load, &QLabel::setText);
QObject::connect(pk, &ParkingLotManager::setLayerName, ui->layerName, &QLabel::setText);
QObject::connect(ui->downStairButton, &QPushButton::clicked, pk, &ParkingLotManager::showDownStairFloor);
QObject::connect(ui->upStairButton, &QPushButton::clicked, pk, &ParkingLotManager::showUpStairFloor);
QObject::connect(ui->showMargin, &QCheckBox::toggled, pk, &ParkingLotManager::showMargin);
QObject::connect(ui->showGraph, &QCheckBox::toggled, pk, &ParkingLotManager::showGraph);
QObject::connect(ui->showLog, &QCheckBox::toggled, parent, &MainWindow::showLogWindow);
QObject::connect(ui->drawPath, &QPushButton::clicked, [=](){
pk->drawPath(ui->placeNum1->text().toInt(), ui->placeNum2->text().toInt());
});