|
|
@@ -30,8 +30,8 @@ MainWindow::MainWindow(const int &frequency, QWidget *parent)
|
|
|
connect(&httpServer, &HttpServer::monitorConfigureUpdate, this, &MainWindow::onConfigureUpdate);
|
|
|
connect(&httpServer, &HttpServer::reloadCanvas, this, &MainWindow::onReloadCanvas);
|
|
|
|
|
|
- // DataFifo &dataFifo = AppContext::instance().dataFifo();
|
|
|
- // connect(&dataFifo, &DataFifo::updateScreen, this, &MainWindow::onUpdateScreen);
|
|
|
+ DataFifo &dataFifo = AppContext::instance().dataFifo();
|
|
|
+ connect(&dataFifo, &DataFifo::updateScreen, this, &MainWindow::onUpdateScreen);
|
|
|
|
|
|
connect(&m_timer, &QTimer::timeout, this, [this](){
|
|
|
DataFifo &dataFifo = AppContext::instance().dataFifo();
|
|
|
@@ -64,8 +64,8 @@ MainWindow::MainWindow(const int &frequency, QWidget *parent)
|
|
|
|
|
|
m_timer.start(1000);
|
|
|
|
|
|
- connect(&m_updateScreenTimer, &QTimer::timeout, this, &MainWindow::onUpdateScreen);
|
|
|
- m_updateScreenTimer.start(1000 / m_frequency);
|
|
|
+ // connect(&m_updateScreenTimer, &QTimer::timeout, this, &MainWindow::onUpdateScreen);
|
|
|
+ // m_updateScreenTimer.start(1000 / m_frequency);
|
|
|
}
|
|
|
|
|
|
MainWindow::~MainWindow()
|
|
|
@@ -163,15 +163,15 @@ void MainWindow::setCurrentCanvas(bool isNewComfigure)
|
|
|
m_pStackedWidget->setCurrentIndex(index);
|
|
|
}
|
|
|
|
|
|
-void MainWindow::onUpdateScreen()
|
|
|
+void MainWindow::onUpdateScreen(const QJsonObject &obj)
|
|
|
{
|
|
|
// QElapsedTimer timer;
|
|
|
// timer.start(); // 开始计时
|
|
|
LOG_INFO("update screen");
|
|
|
|
|
|
ProjectManager &projectMgr = AppContext::instance().projectManager();
|
|
|
- DataDict &dataDict = AppContext::instance().dataDict();
|
|
|
- const QJsonObject obj = dataDict.data();
|
|
|
+ // DataDict &dataDict = AppContext::instance().dataDict();
|
|
|
+ // const QJsonObject obj = dataDict.data();
|
|
|
|
|
|
int canvasCount = projectMgr.canvasCount();
|
|
|
QString timestamp = obj["timestamp"].toString();
|