1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #ifndef _RVC_SPSHELL_POLL_CENTER_H_
- #define _RVC_SPSHELL_POLL_CENTER_H_
- #include <Widgets/BootSplashScreen.h>
- #include <Widgets/BootWidget.h>
- #include <Widgets/mainwindow.h>
- #include <QApplication>
- #include <QObject>
- #include <QThread>
- #define WITH_MAIN_WINDOW 1
- class Poller : public QObject
- {
- Q_OBJECT
- public:
- explicit Poller(QObject* parent = nullptr) : QObject(parent)
- {
- }
- ~Poller() {}
- signals:
- void Finished(int exitCode);
- public slots:
- void OnPoll();
- };
- class Center : public QApplication
- {
- Q_OBJECT
- public:
- Center(int& argc, char** argv);
- ~Center();
- int Run();
- BootWidget* mWidget;
- MainWindow* mWindow;
- BootSplashScreen* GetSplash() { return mSplashScreen; }
- void Init();
- signals:
- void StartPoll();
- void EndPoll(int exitCode);
- public slots:
- void OnFinishedReceived(int result);
- private:
- QThread mPollThread;
- Poller* mPoller;
- BootSplashScreen* mSplashScreen;
- enum StopEnum
- {
- NoInit,
- StopFromPoll,
- StopFromGUI,
- StopFinished
- } stopFlag;
- };
- #endif /*_RVC_SPSHELL_POLL_CENTER_H_*/
|