当前位置: 首页 > news >正文

买电脑的怎么下wordpress珠海关键词优化软件

买电脑的怎么下wordpress,珠海关键词优化软件,什么地图能看到实时全景免费,wordpress网站统计插件文章目录 完成效果图ui界面ui样图 main函数窗口文件头文件cpp文件 引言 一般定时关机采用命令行模式#xff0c;还需要我们计算在多久后关机#xff0c;我们可以做一个小程序来定时关机 完成效果图 ui界面 ?xml version1.0 encodingUTF-8?还需要我们计算在多久后关机我们可以做一个小程序来定时关机 完成效果图 ui界面 ?xml version1.0 encodingUTF-8? ui version4.0classMainWindow/classwidget classQMainWindow nameMainWindowproperty namegeometryrectx0/xy0/ywidth330/widthheight240/height/rect/propertyproperty nameminimumSizesizewidth330/widthheight240/height/size/propertyproperty namemaximumSizesizewidth330/widthheight240/height/size/propertyproperty namefontfontpointsize10/pointsize/font/propertywidget classQWidget namecentralwidgetlayout classQGridLayout namegridLayout_2item row3 column1widget classQWidget namewidget nativetruelayout classQGridLayout namegridLayoutitem row2 column0layout classQHBoxLayout namehorizontalLayout_2itemwidget classQPushButton nameshutdownButtonproperty nametextstring关机/string/property/widget/itemitemwidget classQPushButton namecancelShutdownButtonproperty nametextstring取消/string/property/widget/item/layout/itemitem row0 column0layout classQHBoxLayout namehorizontalLayoutitemwidget classQComboBox namehourComboBoxproperty nameminimumSizesizewidth62/widthheight22/height/size/propertyproperty namemaximumSizesizewidth62/widthheight22/height/size/propertyproperty nameeditableboolfalse/bool/property/widget/itemitemwidget classQLabel namehourLabelproperty nameminimumSizesizewidth0/widthheight0/height/size/propertyproperty nametextstring时/string/property/widget/itemitemspacer namehorizontalSpacer_3property nameorientationenumQt::Horizontal/enum/propertyproperty namesizeHint stdset0sizewidth40/widthheight20/height/size/property/spacer/itemitemwidget classQComboBox nameminuteComboBoxproperty nameminimumSizesizewidth62/widthheight22/height/size/propertyproperty namemaximumSizesizewidth62/widthheight22/height/size/propertyproperty nameeditableboolfalse/bool/property/widget/itemitemwidget classQLabel nameminuteLabelproperty nametextstring分/string/property/widget/item/layout/itemitem row1 column0spacer nameverticalSpacer_4property nameorientationenumQt::Vertical/enum/propertyproperty namesizeHint stdset0sizewidth20/widthheight30/height/size/property/spacer/item/layout/widget/itemitem row3 column0spacer namehorizontalSpacerproperty nameorientationenumQt::Horizontal/enum/propertyproperty namesizeHint stdset0sizewidth40/widthheight20/height/size/property/spacer/itemitem row0 column1spacer nameverticalSpacer_2property nameorientationenumQt::Vertical/enum/propertyproperty namesizeHint stdset0sizewidth20/widthheight40/height/size/property/spacer/itemitem row4 column1spacer nameverticalSpacerproperty nameorientationenumQt::Vertical/enum/propertyproperty namesizeHint stdset0sizewidth20/widthheight40/height/size/property/spacer/itemitem row3 column2spacer namehorizontalSpacer_2property nameorientationenumQt::Horizontal/enum/propertyproperty namesizeHint stdset0sizewidth40/widthheight20/height/size/property/spacer/itemitem row1 column1widget classQLabel namelabelproperty nameminimumSizesizewidth186/widthheight30/height/size/propertyproperty namemaximumSizesizewidth186/widthheight30/height/size/propertyproperty nametextstring 设置关机时间/string/property/widget/itemitem row2 column1spacer nameverticalSpacer_3property nameorientationenumQt::Vertical/enum/propertyproperty namesizeHint stdset0sizewidth20/widthheight30/height/size/property/spacer/item/layout/widget/widgetresources/connections/ /ui ui样图 main函数 #include mainwindow.h#include QApplicationint main(int argc, char *argv[]) {QApplication a(argc, argv);MainWindow w;w.show();return a.exec(); } 窗口文件 核心逻辑 采用信号和槽完成事件链接 QProcess::startDetached(shutdown, QStringList() /s /t QString::number(timeSeconds));QProcess::execute(shutdown, QStringList() /a);头文件 // mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H#include QMainWindow #include QTimer #include QDateTime #include QProcess #include QMessageBox #include QString #include QDebugnamespace Ui { class MainWindow; }class MainWindow : public QMainWindow {Q_OBJECTpublic:explicit MainWindow(QWidget *parent nullptr);~MainWindow(); private slots:void onShutdownButtonClicked();void onCancelShutdownButtonClicked();private:Ui::MainWindow *ui;QTimer *shutdownTimer;};#endif // MAINWINDOW_H cpp文件 // mainwindow.cpp#include mainwindow.h #include ui_mainwindow.hMainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow) {ui-setupUi(this);// 获取当前时间QTime currentTime QTime::currentTime();// 设置小时下拉框ui-hourComboBox-setEditable(false);for (int i 0; i 24; i) {// 比较当前时间与选项时间if (currentTime.hour() i) {ui-hourComboBox-addItem(QString::number(i));}}// 选择当前小时作为已选中项ui-hourComboBox-setCurrentIndex(ui-hourComboBox-findText(QString::number(currentTime.hour())));// 设置分钟下拉框ui-minuteComboBox-setEditable(false);for (int i 0; i 60; i) {// 比较当前时间与选项时间if (currentTime.minute() i) {ui-minuteComboBox-addItem(QString::number(i));}}// 选择当前分钟作为已选中项ui-minuteComboBox-setCurrentIndex(ui-minuteComboBox-findText(QString::number(currentTime.minute())));// 连接按钮点击事件到槽函数connect(ui-shutdownButton, QPushButton::clicked, this, MainWindow::onShutdownButtonClicked);connect(ui-cancelShutdownButton, QPushButton::clicked, this, MainWindow::onCancelShutdownButtonClicked); }MainWindow::~MainWindow() {delete ui; }void MainWindow::onShutdownButtonClicked() {// 获取用户选择的小时和分钟int selectedHour ui-hourComboBox-currentText().toInt();int selectedMinute ui-minuteComboBox-currentText().toInt();// 获取当前时间QDateTime currentTime QDateTime::currentDateTime();// 获取用户选择的时间QDateTime shutdownTime QDateTime(currentTime.date(), QTime(selectedHour, selectedMinute));// 计算时间差qint64 timeDifference currentTime.msecsTo(shutdownTime);int timeSecondsint(timeDifference/1000);// 设置定时器的超时时间//shutdownTimer-start(timeDifference);QProcess::startDetached(shutdown, QStringList() /s /t QString::number(timeSeconds));// 提示用户关机已设置QMessageBox::information(this, 关机设置, 关机已设置将在选择的时间执行); }void MainWindow::onCancelShutdownButtonClicked() {// 取消关机QProcess::execute(shutdown, QStringList() /a);QMessageBox::information(this, 取消关机, 已取消关机操作); }
http://www.w-s-a.com/news/838522/

相关文章:

  • 在福州做搬家网站多少钱画册设计网站有哪些
  • 如何让别人浏览我做的网站哪些方法可以建设网站
  • 网站建设与管理网络推广的优点
  • 美食网站的设计与制作做网站的电销话术
  • 中国档案网站建设现状研究陕西建设厅执业资格注册中心网站
  • 网站建设的内容管理怎么用ps切片在dw里做网站
  • 建设婚恋网站用什么搭建涿州网站开发
  • 做知识内容的网站与app哈尔滨哪里有做网站的
  • 青岛企业网站建站模板百度网站建设推广
  • 做360网站中保存的图片存在哪里个人建立网站要多少钱
  • 网站安装部署无锡做网站的公司
  • 怎么将网站做成小程序安装wordpress到服务器
  • 企业网站建设的四大因素沈阳网站建设招标公司
  • wordpress仿站开发公司网站策划宣传
  • 金乡县网站开发网站开发三个流程
  • qq空间网站是多少纺织网站建设方案
  • 建设微网站项目报告网站优化难吗
  • 做网站需要自己上传产品吗企业网站系统设计
  • wordpress个人中心济南网站建设和优化
  • 网站pc端网址和手机端网址建设牡丹江 网站建设
  • 苏州新区城乡建设网站人才招聘网站开发
  • 一般网站是怎么做的威远移动网站建设
  • 赣州网站开发公司怎么才能设计好一个网站
  • 个人网站建设分几个步走培训网站开发哪个好
  • 智能网站价格河北城乡建设网站
  • 做动画在线观看网站网上花店 网站源代码
  • 做网站项目体会商业信息
  • 深圳的设计网站谷歌浏览器下载手机版官网
  • 苏州网站建设都找全网天下外贸响应式网站设计
  • 揭阳专业做网站网站迁移教材