diff --git a/HanddleAI/HandleAiUi-new/back/backEndController.cpp b/HanddleAI/HandleAiUi-new/back/backEndController.cpp index e69de29b..c236877a 100644 --- a/HanddleAI/HandleAiUi-new/back/backEndController.cpp +++ b/HanddleAI/HandleAiUi-new/back/backEndController.cpp @@ -0,0 +1,8 @@ +#include +#include + +backEndController::backEndController() +{ + _triggerController = new triggerController(); + _triggerController->init(this); +} \ No newline at end of file diff --git a/HanddleAI/HandleAiUi-new/back/backEndController.h b/HanddleAI/HandleAiUi-new/back/backEndController.h index 9830f6d7..4591af94 100644 --- a/HanddleAI/HandleAiUi-new/back/backEndController.h +++ b/HanddleAI/HandleAiUi-new/back/backEndController.h @@ -1,12 +1,17 @@ -#include -class backEndController +#ifndef BACKENDCONTROLLER_H +#define BACKENDCONTROLLER_H +#include +#include +class triggerController; +class cameraController; +class backEndController :public QObject { + Q_OBJECT public: - triggerController _triggerController;//触发器 - - backEndController() - { - _triggerController.init(); - } + bool init = false; + triggerController* _triggerController;//触发器 + backEndController(); +signals: + void sendErrorToMainwindow(backEndError); }; -#pragma once \ No newline at end of file +#endif \ No newline at end of file diff --git a/HanddleAI/HandleAiUi-new/back/backStruct.h b/HanddleAI/HandleAiUi-new/back/backStruct.h new file mode 100644 index 00000000..9494a7d6 --- /dev/null +++ b/HanddleAI/HandleAiUi-new/back/backStruct.h @@ -0,0 +1,32 @@ +#include + +typedef Base* (*CreateFunction)(); +typedef void (*ReleaseFunction)(Base* animal); + +struct correctionStruct +{ + std::vector in_X_X0Y; + std::vector in_Y_X0Y; + std::vector in_Z_X0Y; + std::vector in_Z_X0Y_Value; + std::vector in_X_X0Z; + std::vector in_Y_X0Z;; + std::vector in_Z_X0Z; + std::vector in_Y_X0Z_Value; + std::vector in_X_Y0Z; + std::vector in_Y_Y0Z; + std::vector in_Z_Y0Z; + std::vector in_X_Y0Z_Value; +}; + +typedef struct { + QString m_stationKy; + QString key; // 相机名称 + QString moduleName; // 模块名称 + QString task_thread_index = "-1";// 存储当前算法属于那个任务线程 + QByteArray m_initByte; // 传递初始化参数 + Base* module_ptr = nullptr; // 存储模块指针 + ReleaseFunction destory_ptr; // 释放 + int showIndex; +}cameraModule; +#pragma once \ No newline at end of file diff --git a/HanddleAI/HandleAiUi-new/back/cameraController.cpp b/HanddleAI/HandleAiUi-new/back/cameraController.cpp new file mode 100644 index 00000000..e69de29b diff --git a/HanddleAI/HandleAiUi-new/back/cameraController.h b/HanddleAI/HandleAiUi-new/back/cameraController.h new file mode 100644 index 00000000..4119e773 --- /dev/null +++ b/HanddleAI/HandleAiUi-new/back/cameraController.h @@ -0,0 +1,12 @@ +#ifndef CAMERACONTROLLER_H +#define CAMERACONTROLLER_H +#include +#include +class backEndController; +class cameraController +{ +public: + +}; + +#endif \ No newline at end of file diff --git a/HanddleAI/HandleAiUi-new/back/laserPositioning.h b/HanddleAI/HandleAiUi-new/back/laserPositioning.h deleted file mode 100644 index f41900ee..00000000 --- a/HanddleAI/HandleAiUi-new/back/laserPositioning.h +++ /dev/null @@ -1,31 +0,0 @@ -#include -using namespace std; -struct onePointPos//单次坐标 -{ - //小数点默认两位 - onePointPos(int countIn, - int xPos1, int xPos2, int xPos3, - int yPos1, int yPos2, int yPos3, - int zPos1, int zPos2, int zPos3) - { - count = countIn; - - xPos = xPos2*100 + xPos3; - xPos = (xPos1 == 1) ? xPos : -xPos; - - yPos = yPos2 * 100 + yPos3; - yPos = (yPos1 == 1) ? yPos : -yPos; - - zPos = zPos2 * 100 + zPos3; - zPos = (zPos1 == 1) ? zPos : -zPos; - } - int count; - int xPos; - int yPos; - int zPos; -}; - -class laserPositioning -{ - -}; \ No newline at end of file diff --git a/HanddleAI/HandleAiUi-new/back/myiothread.cpp b/HanddleAI/HandleAiUi-new/back/myiothread.cpp index 7a512227..231e0116 100644 --- a/HanddleAI/HandleAiUi-new/back/myiothread.cpp +++ b/HanddleAI/HandleAiUi-new/back/myiothread.cpp @@ -381,7 +381,6 @@ int MyIoThread::getValue(int dmPos, QByteArray byte) /// 鐩墠鍙礋璐f娴媐ins淇″彿,鎷嶇収鍜屼紶閫掓暟鎹埌绛夊緟闃熷垪 /// /// 浠巖eciveCommond浼犲叆锛屼粠fins(JSON->finstcp_readAllCmd)璇诲彇鐨勬暟鎹� -#include correctionStruct* correctionData=nullptr; void MyIoThread::decodeCameraCMD(QByteArray byte) diff --git a/HanddleAI/HandleAiUi-new/back/triggerController.cpp b/HanddleAI/HandleAiUi-new/back/triggerController.cpp new file mode 100644 index 00000000..444d23f8 --- /dev/null +++ b/HanddleAI/HandleAiUi-new/back/triggerController.cpp @@ -0,0 +1,155 @@ +#include +#include +#include +void triggerController::decodeCameraCMD(QByteArray byte) +{ +#if 0 + if (byte.isEmpty()) + return; + double cameraData = 0; + if (checkTrigger(1, 1, byte) == true) + { + correctionData = new correctionStruct(); + correctionData->in_X_X0Y = { -258.71,-447.8,-447.2 }; + correctionData->in_Y_X0Y = { -1099.67,-1133.42,-938.83 }; + correctionData->in_Z_X0Y = { 711.77,711.62,711.730000 }; + correctionData->in_Z_X0Y_Value = { 63.9795,64.5333,65.859300 }; + + correctionData->in_X_X0Z = { -402.3,-455.91,-236.75 }; + correctionData->in_Y_X0Z = { -539.46,-536.21,-536.2 }; + correctionData->in_Z_X0Z = { -418.88,425.12,425.13 }; + correctionData->in_Y_X0Z_Value = { 118.15,-228.19,-256.5 }; + + correctionData->in_X_Y0Z = { 395.250000,395.23,328.34 }; + correctionData->in_Y_Y0Z = { -1147.29,-1147.28,-940.82 }; + correctionData->in_Z_Y0Z = { 118.15,-228.19,-256.5 }; + correctionData->in_X_Y0Z_Value = { -36.652200,-36.7302,41.0436 }; + detData* data = dController.insertDetData("Camera1", "correctionDataThread", "TEST", 0); + data->correctionData = correctionData; + workThread->addTask(data);//添加任务 + correctionData = nullptr; + } + + //总流程开始,机器人发送1至寄存器259 + + //上位机确认OK之后,清零寄存器259,并发送1至寄存器260 + //如产品型号为Product_1且为正面,则上位机发送1至寄存器256,发送0至寄存器257 + //之后机器人确认之后需发送测量点位总数具体值至寄存器258 + if (checkTrigger(259, 1, byte) == true) + { + bridge.back.sendFinsMsg("write_short_259_0");//触发信号清零 + bridge.back.sendFinsMsg("write_short_260_1");//开始检测信号 + } + + //机器人激光当前点位 264 1...9 + //机器人到达激光点位1时,寄存器261至1,264至1,并将机器人在激光点位1坐标XYZ按照定义规则,保存进寄存器265~270 + + //上位机确认机器人到达点位1(264)时,确认OK后,寄存器262至1,261至0,取点完成后,发送寄存器263至1 + if (checkTrigger(261, 1, byte) == true)//读取请求地址 + { + int armPos = getValue(264, byte); + + int xValue1 = getValue(265, byte); + int xValue2 = getValue(266, byte); + int xValue3 = getValue(267, byte); + + int yValue1 = getValue(268, byte); + int yValue2 = getValue(269, byte); + int yValue3 = getValue(270, byte); + + int zValue1 = getValue(271, byte); + int zValue2 = getValue(272, byte); + int zValue3 = getValue(273, byte); + + double xValue = (xValue1 == 1 ? 1 : -1) * ((double)xValue2 + ((double)xValue3) / (std::pow(10, to_string(xValue3).length()))); + double yValue = (yValue1 == 1 ? 1 : -1) * ((double)yValue2 + ((double)yValue3) / (std::pow(10, to_string(yValue3).length()))); + double zValue = (zValue1 == 1 ? 1 : -1) * ((double)zValue2 + ((double)zValue3) / (std::pow(10, to_string(zValue3).length()))); + double rangeData = threadlist[0]->getValueFromCamera(); + + if (armPos == 1)//第一次 + correctionData = new correctionStruct(); + if (correctionData != nullptr) + { + if (armPos <= 3) + { + correctionData->in_X_X0Y.push_back(xValue); + correctionData->in_Y_X0Y.push_back(yValue); + correctionData->in_Z_X0Y.push_back(zValue); + correctionData->in_Z_X0Y_Value.push_back(rangeData); + } + else if (armPos <= 6) + { + correctionData->in_X_X0Z.push_back(xValue); + correctionData->in_Y_X0Z.push_back(yValue); + correctionData->in_Z_X0Z.push_back(zValue); + correctionData->in_Y_X0Z_Value.push_back(rangeData); + } + else if (armPos <= 9) + { + correctionData->in_X_Y0Z.push_back(xValue); + correctionData->in_Y_Y0Z.push_back(yValue); + correctionData->in_Z_Y0Z.push_back(zValue); + correctionData->in_X_Y0Z_Value.push_back(rangeData); + } + } + bridge.back.sendFinsMsg("write_short_261_0");//清零 + bridge.back.sendFinsMsg("write_short_262_1"); + bridge.back.sendFinsMsg("write_short_263_1"); + + //上位机校正完成,将寄存器274置为1,并将结果按照定义XYZ规则放入310~336中 + if (armPos == 9) + { + detData* data = dController.insertDetData("Camera1", "correctionDataThread", "TEST", 0); + data->correctionData = correctionData; + workThread->addTask(data);//添加任务 + correctionData = nullptr; + } + } + + //机器人到达激光点位9时,寄存器261至1,264至9,并将机器人在激光点位9坐标XYZ按照定义规则,保存进寄存器265~270 + + if (checkTrigger(300, 1, byte) == true) + { + bridge.back.sendFinsMsg("write_short_300_0");//触发信号清零 + bridge.back.sendFinsMsg("write_short_301_1");//开始检测信号 + int Pos = getValue(303, byte); + } + + +#endif +} + +void triggerController::init(backEndController* input) +{ + _backEndController = input; + QLibrary* m_lib = new QLibrary(triggerFileName); + bool flag = m_lib->load(); + if (!m_lib->isLoaded()) + { + emit _backEndController->sendErrorToMainwindow(dllNotFound); + return; + } + + if (flag) + { + CreateFunction createFun = (CreateFunction)m_lib->resolve("create"); + ReleaseFunction releaseFun = (ReleaseFunction)m_lib->resolve("destory"); + if (createFun && releaseFun) + { + trigger = createFun(); + destory_finstcp = releaseFun; + QByteArray initByte = QByteArray::fromStdString("sleeptime_20_readnum_300_writetype_ushort"); + std::vector dddd; + trigger->reciveData(dddd, QByteArray::fromStdString("init_127.0.0.1_502_1")); + trigger->initParas(initByte); + } + else + { + emit _backEndController->sendErrorToMainwindow(triggerInitFailure); + delete m_lib; + m_lib = nullptr; + return; + } + } + this->start(); +} \ No newline at end of file diff --git a/HanddleAI/HandleAiUi-new/back/triggerController.h b/HanddleAI/HandleAiUi-new/back/triggerController.h index 0230d986..2ac609b9 100644 --- a/HanddleAI/HandleAiUi-new/back/triggerController.h +++ b/HanddleAI/HandleAiUi-new/back/triggerController.h @@ -1,9 +1,12 @@ +#ifndef TRIGGERCONTROLLER_H +#define TRIGGERCONTROLLER_H +#include #include #include #include - -typedef Base* (*CreateFunction)(); -typedef void (*ReleaseFunction)(Base* animal); +#include +#include +class backEndController; //防止重复触发 class triggerLockerT { @@ -55,45 +58,14 @@ private: class triggerController : public QThread { public: + backEndController* _backEndController; QString triggerFileName = QString("Hd_SocketModule_ModbusTcp"); ~triggerController() { runFlag = false; QThread::msleep(100); } - void init() - { - QLibrary* m_lib = new QLibrary(triggerFileName); - bool flag = m_lib->load(); - if (!m_lib->isLoaded()) - { - - //qDebug() << "[Error] " << " Loaded error:" << m_lib->errorString(); - return ; - } - - if (flag) - { - CreateFunction createFun = (CreateFunction)m_lib->resolve("create"); - ReleaseFunction releaseFun = (ReleaseFunction)m_lib->resolve("destory"); - if (createFun && releaseFun) - { - trigger = createFun(); - destory_finstcp = releaseFun; - QByteArray initByte = QByteArray::fromStdString("sleeptime_20_readnum_300_writetype_ushort"); - std::vector dddd; - trigger->reciveData(dddd, QByteArray::fromStdString("init_127.0.0.1_502_1")); - trigger->initParas(initByte); - } - else - { - delete m_lib; - m_lib = nullptr; - return; - } - } - this->start(); - } + void init(backEndController* input); void run() { while (runFlag) @@ -108,7 +80,7 @@ public: //auto start = std::chrono::high_resolution_clock::now(); //QByteArray byte = m_readAllCmd.toUtf8(); // 设置 从起始位开始读取的指令 QByteArray byte = QByteArray::fromStdString("read_byte_1_500"); - if (sendFinsMsg(byte)) + if (!sendFinsMsg(byte)) qCritical() << "[TCP] " << " finstcp_ptr reciveData error!"; QByteArray readByte; if (!reciveFinsMsg(readByte)) @@ -117,12 +89,10 @@ public: //auto end = std::chrono::high_resolution_clock::now(); //auto duration = std::chrono::duration_cast(end - start); //std::cout << "cost: " << duration.count() << " mm" << std::endl; - //decodeCameraCMD(readByte); + decodeCameraCMD(readByte); //workThread->snDatas.checkSnFromWaittingVec(readByte); } - - //发送数据到 bool sendFinsMsg(QString cmdx) { @@ -188,7 +158,8 @@ private: } return true; } - + //解析并触发 + void decodeCameraCMD(QByteArray byte); //触发器的配置 int startPos = 1;//数据读取的起始位 int interval = 10;//间隔 @@ -198,6 +169,4 @@ private: bool runFlag = true; std::vector vec_mat;//没啥用,一直保持为空就好 }; - - -#pragma once \ No newline at end of file +#endif \ No newline at end of file diff --git a/HanddleAI/HandleAiUi-new/front/loadingWidget.h b/HanddleAI/HandleAiUi-new/front/loadingWidget.h new file mode 100644 index 00000000..1dba1048 --- /dev/null +++ b/HanddleAI/HandleAiUi-new/front/loadingWidget.h @@ -0,0 +1,61 @@ +#include +#include +#include +#include +static QPixmap cvMatToQPixmap(const cv::Mat& mat) { + QImage qImg; + if (mat.channels() == 3) { + //cv::cvtColor(mat, mat, cv::COLOR_BGR2RGB); + qImg = QImage(mat.data, mat.cols, mat.rows, mat.step, QImage::Format_RGB888); + } + else { + qImg = QImage((const unsigned char*)(mat.data), mat.cols, mat.rows, mat.step, QImage::Format_Grayscale8); + } + return QPixmap::fromImage(qImg); +} +class loadingWidget : public QWidget { +public: + QLabel* sign; + loadingWidget(QWidget* parent = nullptr) : QWidget(parent) { + sign = new QLabel(this); + } + + void setStatus(QWidget* widget) { + screenshot_ = QPixmap::grabWindow(widget->winId()); + update(); // 更新widget以显示新的截图 + } + +protected: + void paintEvent(QPaintEvent* event) override { + if (screenshot_.isNull()) + return; + QImage image = screenshot_.toImage(); + image = image.convertToFormat(QImage::Format_RGB888); + cv::Mat originalMat = cv::Mat( + image.height(), + image.width(), + CV_8UC3, + image.bits(), + image.bytesPerLine()); + cv::Mat blurredMat; + cv::blur(originalMat, blurredMat, cv::Size(15, 15)); // 调整模糊半径以获得不同程度的模糊效果 + QPixmap blurredPixmap = cvMatToQPixmap(blurredMat); + QPainter painter(this); + painter.drawPixmap(0, 0, blurredPixmap); + + // 在模糊图片上绘制文字 + QPalette palette; + palette.setColor(QPalette::WindowText, Qt::white); + QFont font("微软雅黑", 100, QFont::Bold); + QFont font2("微软雅黑", 90, QFont::Bold); + painter.setFont(font); + painter.setPen(Qt::black); + painter.drawText(this->rect(), Qt::AlignCenter, "WAIT"); + painter.setFont(font2); + painter.setPen(Qt::white); + painter.drawText(this->rect(), Qt::AlignCenter, "WAIT"); + } + +private: + QPixmap screenshot_; +}; \ No newline at end of file diff --git a/HanddleAI/HandleAiUi-new/front/pages/logPageWidget.h b/HanddleAI/HandleAiUi-new/front/pages/logPageWidget.h index 43642335..537e45ef 100644 --- a/HanddleAI/HandleAiUi-new/front/pages/logPageWidget.h +++ b/HanddleAI/HandleAiUi-new/front/pages/logPageWidget.h @@ -46,10 +46,10 @@ static void MessageHandler(QtMsgType type, const QMessageLogContext& context, co globalQtlogFile.setDevice(&logFile); globalQtlogFile << logStr << endl; } - if (globalQtTextEdit != nullptr) { - globalQtTextEdit->moveCursor(QTextCursor::End); - globalQtTextEdit->insertPlainText(logStr + "\n"); - } + //if (globalQtTextEdit != nullptr) { + // globalQtTextEdit->moveCursor(QTextCursor::End); + // globalQtTextEdit->insertPlainText(logStr + "\n"); + //} } class stdConsoleRedirector : public std::basic_streambuf { @@ -191,7 +191,7 @@ public: QLabel* toolName2 = new QLabel(u8" 正则匹配"); toolName2->setFont(font2); - toolName2->setPalette(palette); + toolName2->setPalette(palette); toolHLayout->addWidget(toolName2); QLineEdit* lineedit = new QLineEdit(); @@ -207,6 +207,7 @@ public: { globalQtTextEdit = textWidget; + //globalQtTextEdit->setUpdatesEnabled(false); qInstallMessageHandler(MessageHandler); qInfo() << "This is a Qt Info message."; qWarning() << "This is a Qt Warning message."; diff --git a/HanddleAI/HandleAiUi-new/front/ui_mainwindow.h b/HanddleAI/HandleAiUi-new/front/ui_mainwindow.h new file mode 100644 index 00000000..b97b9938 --- /dev/null +++ b/HanddleAI/HandleAiUi-new/front/ui_mainwindow.h @@ -0,0 +1,57 @@ +/******************************************************************************** +** Form generated from reading UI file 'mainwindow.ui' +** +** Created by: Qt User Interface Compiler version 5.14.2 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_MAINWINDOW_H +#define UI_MAINWINDOW_H + +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_MainWindow +{ +public: + QWidget *centralwidget; + QGridLayout *gridLayout; + + void setupUi(QMainWindow *MainWindow) + { + if (MainWindow->objectName().isEmpty()) + MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->resize(800, 600); + centralwidget = new QWidget(MainWindow); + centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + gridLayout = new QGridLayout(centralwidget); + gridLayout->setSpacing(0); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setContentsMargins(5, 5, 5, 5); + MainWindow->setCentralWidget(centralwidget); + + retranslateUi(MainWindow); + + QMetaObject::connectSlotsByName(MainWindow); + } // setupUi + + void retranslateUi(QMainWindow *MainWindow) + { + MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "MainWindow", nullptr)); + } // retranslateUi + +}; + +namespace Ui { + class MainWindow: public Ui_MainWindow {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_MAINWINDOW_H diff --git a/HanddleAI/HandleAiUi-new/globalStruct.h b/HanddleAI/HandleAiUi-new/globalStruct.h index 0889641e..1178f524 100644 --- a/HanddleAI/HandleAiUi-new/globalStruct.h +++ b/HanddleAI/HandleAiUi-new/globalStruct.h @@ -11,4 +11,11 @@ #define sColor_Black "22, 22, 22" #define sColor_BlackWithWhite "45, 45, 45" +enum backEndError +{ + dllNotFound, + triggerInitFailure, + triggerConnectionError, + camerInitFailure +}; #pragma once \ No newline at end of file diff --git a/HanddleAI/HandleAiUi-new/mainwindow.cpp b/HanddleAI/HandleAiUi-new/mainwindow.cpp index b908bdef..ce0fe348 100644 --- a/HanddleAI/HandleAiUi-new/mainwindow.cpp +++ b/HanddleAI/HandleAiUi-new/mainwindow.cpp @@ -1,5 +1,5 @@ #include "mainwindow.h" -#include "./ui_mainwindow.h" +#include "ui_mainwindow.h" #include "titlebar.h" #include "mywidget.h" #include "cfgwindow.h" @@ -28,13 +28,13 @@ MainWindow::MainWindow(QWidget* parent) this->setStyleSheet(QString("QWidget#MainWidget {background-color: rgb(%1)}").arg(sColor_blue)); this->setCentralWidget(&stackedWidgets); - //加载界面初始化 - - //登录界面 stackedWidgets.addWidget(&_loginWindow); connect(&_loginWindow, &loginWindow::login, this, &MainWindow::login); + //加载界面初始化 + stackedWidgets.addWidget(&_loadingWidget); + //第一层 只有顶部菜单栏和第二层layout mainWidget = new QWidget(); stackedWidgets.addWidget(mainWidget); diff --git a/HanddleAI/HandleAiUi-new/mainwindow.h b/HanddleAI/HandleAiUi-new/mainwindow.h index aada6b94..120f326a 100644 --- a/HanddleAI/HandleAiUi-new/mainwindow.h +++ b/HanddleAI/HandleAiUi-new/mainwindow.h @@ -21,17 +21,9 @@ #include #include #include +#include #pragma execution_character_set("utf-8") -enum DRAG_ABSOLUTE_POSITION -{ - DRAG_KEEP=0, //淇濇寔涓嶅姩 - DRAG_LOCK_LEFT=1, //閿佸畾宸﹁竟鍧愭爣 - DRAG_LOCK_TOP=2, //閿佸畾涓婅竟鍧愭爣 - DRAG_LOCK_RIGHT=3, //閿佸畾鍙宠竟鍧愭爣 - DRAG_LOCK_BOTTOM=4 //閿佸畾涓嬭竟鍧愭爣 -}; - QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } QT_END_NAMESPACE @@ -48,7 +40,8 @@ private: std::vectorpageBtns; QStackedWidget stackedWidgets;//涓�鍏变笁灞傦紝鍔犺浇鐣岄潰锛岀櫥褰曠晫闈紝涓昏鐣岄潰 QStackedWidget pageWidgets;//涓昏鐣岄潰涓殑椤甸潰 - loginWindow _loginWindow; + loginWindow _loginWindow;//鐧诲綍鐣岄潰 + loadingWidget _loadingWidget;//鍔犺浇 绛夊緟鐣岄潰 //鍔ㄧ敾鏁堟灉 QGraphicsBlurEffect* blurEffect; @@ -100,7 +93,7 @@ public slots: blurEffectAnimation->setStartValue(0); blurEffectAnimation->setEndValue(20); blurEffectAnimation->start(); - stackedWidgets.setCurrentIndex(1); + stackedWidgets.setCurrentIndex(2); blurEffectAnimation->setStartValue(20); blurEffectAnimation->setEndValue(0); blurEffectAnimation->start(); @@ -108,6 +101,22 @@ public slots: } else if(input == false)stackedWidgets.setCurrentIndex(0); } + void loading(bool input) + { + if (input == true) + { + blurEffectAnimation->setStartValue(0); + blurEffectAnimation->setEndValue(20); + blurEffectAnimation->start(); + _loadingWidget.setStatus(&stackedWidgets); + stackedWidgets.setCurrentIndex(1); + blurEffectAnimation->setStartValue(20); + blurEffectAnimation->setEndValue(0); + blurEffectAnimation->start(); + + } + else if (input == false)stackedWidgets.setCurrentIndex(2); + } signals: protected: