diff --git a/Classes/main.cpp b/Classes/main.cpp index fa5809c..b529ba2 100644 --- a/Classes/main.cpp +++ b/Classes/main.cpp @@ -1,10 +1,11 @@ -#include "Reconstruction.h" #include +#include "Loading.h" +#include "Reconstruction.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); - Reconstruction w; - w.show(); + Loading l; + l.show(); return a.exec(); } diff --git a/Loading.cpp b/Loading.cpp new file mode 100644 index 0000000..b3caa1a --- /dev/null +++ b/Loading.cpp @@ -0,0 +1,38 @@ +#include "Loading.h" +#include "Classes/Reconstruction.h" + +Loading::Loading(QWidget *parent) + : QWidget(parent) +{ + ui.setupUi(this); + ui.label_2->hide(); + ui.progressBar->setValue(0); + + // todo + + ui.progressBar->setValue(100); + ui.label_2->show(); + ready2Enter = true; +} + +Loading::~Loading() +{ +} + +void Loading::updateSlot() +{ + ui.progressBar->setValue(currentValue); +} + +void Loading::mousePressEvent(QMouseEvent *event) +{ + if(ready2Enter) + { + if (event->button() == Qt::LeftButton) + { + this->hide(); + Reconstruction *w = new Reconstruction(); + w->show(); + } + } +} diff --git a/Loading.h b/Loading.h new file mode 100644 index 0000000..e0852fd --- /dev/null +++ b/Loading.h @@ -0,0 +1,24 @@ +#pragma once + +#include +#include "ui_Loading.h" +#include + +class Loading : public QWidget +{ + Q_OBJECT + +public: + Loading(QWidget *parent = Q_NULLPTR); + ~Loading(); + +private: + Ui::Loading ui; + bool ready2Enter = false; + int currentValue = 0; + void updateSlot(); + +protected: + void mousePressEvent(QMouseEvent *); + +}; diff --git a/Loading.ui b/Loading.ui new file mode 100644 index 0000000..6d229dc --- /dev/null +++ b/Loading.ui @@ -0,0 +1,71 @@ + + + Loading + + + + 0 + 0 + 871 + 494 + + + + Loading + + + + + 340 + 150 + 151 + 41 + + + + + Adobe Devanagari + 18 + + + + LOADING... + + + + + + 80 + 330 + 711 + 23 + + + + 0 + + + + + + 320 + 420 + 181 + 31 + + + + + 书体坊雪纯体3500 + 18 + + + + 按任意键进入 + + + + + + + diff --git a/UI/Reconstruction.ui b/UI/Reconstruction.ui index a4bb1f1..f9b92ab 100644 --- a/UI/Reconstruction.ui +++ b/UI/Reconstruction.ui @@ -7,7 +7,7 @@ 0 0 1111 - 604 + 601 @@ -33,11 +33,11 @@ 249 -1 851 - 551 + 531 - 2 + 0