提交 ad4f4548 编写于 作者: 泡沫o0's avatar 泡沫o0 🤖 提交者: 泡沫o0

Upload New File

上级 09238228
#ifndef TIMETHREAD_H
#define TIMETHREAD_H
#include "Publicstate.h"
#include <qglobal.h>
#include <QObject>
#include <QTimer>
#include <QObject>
#include <QThread>
#include <QDebug>
#include "../OperationManager/operationManager.h"
#include "../OperationManager/operation_linux.h"
#include "../OperationManager/operation_windows.h"
class timethread : public QObject
{
Q_OBJECT
public:
explicit timethread(QObject *parent = nullptr);
void beginToWork();//线程处理函数, 也就是实际开启的线程
private:
bool MySystemShutDown();
bool MyScreenShutDown(bool);
atime_t atime;
c_type myshut;
uint nowtime_t=0;
uint endtime_t=0; //结束时间的时间戳
uint sreentime_t=0;
QDateTime nowtime;
QTimer * t_time;
OpeartionMangaer *m_operationworker;
signals:
void time_Signal(atime_t);
private slots:
void shotdown(c_type);
void ct_time(); //子线程信号触发的主线程中的槽函数
};
#endif // TIMETHREAD_H
...@@ -5,7 +5,7 @@ int main(int argc, char *argv[]) ...@@ -5,7 +5,7 @@ int main(int argc, char *argv[])
{ {
QApplication a(argc, argv); QApplication a(argc, argv);
MainWindow w; MainWindow w;
w.setWindowTitle("陈静怡牌猪头定时器"); w.setWindowTitle("未知定时器");
w.show(); w.show();
return a.exec(); return a.exec();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册