Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
泡沫o0
Qt定时关机器
提交
ad4f4548
Qt定时关机器
项目概览
泡沫o0
/
Qt定时关机器
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Qt定时关机器
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ad4f4548
编写于
10月 28, 2022
作者:
泡沫o0
🤖
提交者:
泡沫o0
11月 23, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Upload New File
上级
09238228
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
43 addition
and
1 deletion
+43
-1
TimeManager/timethread.h
TimeManager/timethread.h
+42
-0
main.cpp
main.cpp
+1
-1
未找到文件。
TimeManager/timethread.h
0 → 100644
浏览文件 @
ad4f4548
#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
main.cpp
浏览文件 @
ad4f4548
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录