中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

阿里網(wǎng)站怎么建設(shè)多地優(yōu)化完善疫情防控措施

阿里網(wǎng)站怎么建設(shè),多地優(yōu)化完善疫情防控措施,網(wǎng)站建設(shè)安全協(xié)議,個(gè)人網(wǎng)站開發(fā)的背景小鬧鐘 功能 當(dāng)按下啟動(dòng)按鈕時(shí),停止按鈕可用,啟動(dòng)按鈕不可用,鬧鐘無(wú)法設(shè)置,無(wú)法輸入自定義內(nèi)容 當(dāng)按下停止按鈕時(shí),暫停播報(bào),啟動(dòng)按鈕可用,鬧鐘可以設(shè)置,可以輸入自定義內(nèi)容 .pro文…

小鬧鐘?

功能

當(dāng)按下啟動(dòng)按鈕時(shí),停止按鈕可用,啟動(dòng)按鈕不可用,鬧鐘無(wú)法設(shè)置,無(wú)法輸入自定義內(nèi)容

當(dāng)按下停止按鈕時(shí),暫停播報(bào),啟動(dòng)按鈕可用,鬧鐘可以設(shè)置,可以輸入自定義內(nèi)容

.pro文件

QT       += core gui texttospeech
greaterThan(QT_MAJOR_VERSION, 4): QT += widgetsCONFIG += c++11# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0SOURCES += \main.cpp \widget.cppHEADERS += \widget.hFORMS += \widget.ui# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += targetRESOURCES += \Icon.qrc

widget.h文件

#ifndef WIDGET_H
#define WIDGET_H#include <QWidget>
#include <QTimer>      //定時(shí)器類
#include <QTime>       //時(shí)間類
#include <QTimerEvent>   //定時(shí)器事件類的頭文件
#include <QDateTime>     //日期時(shí)間類
#include <QDateTimeEdit>
#include <QDebug>
#include <QTextToSpeech>    //朗讀
#include <QTextEdit>
#include <QMetaObject>
QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACEclass Widget : public QWidget
{Q_OBJECTpublic:Widget(QWidget *parent = nullptr);~Widget();//重寫定時(shí)器事件處理函數(shù)void timerEvent(QTimerEvent *event)override;signals:void my_signal();
private slots:void on_pushButton_clicked();void on_pushButton_2_clicked();private:Ui::Widget *ui;//定義一個(gè)定時(shí)器的idint timer_id;        //基于事件處理函數(shù)的定時(shí)器int timer_id1;QTextToSpeech *speech;int i = 0;int flag = 0;QString text;QDateTime sys_dt;};
#endif // WIDGET_H

main.cpp文件

#include "widget.h"#include <QApplication>int main(int argc, char *argv[])
{QApplication a(argc, argv);Widget w;w.show();return a.exec();
}

widget.cpp文件

#include "widget.h"
#include "ui_widget.h"Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget)
{ui->setupUi(this);this->setWindowTitle("小鬧鐘");timer_id = this->startTimer(5);ui->pushButton_2->setEnabled(false);ui->textEdit->setPlaceholderText("請(qǐng)輸入鬧鐘響時(shí)播報(bào)的內(nèi)容");this->setWindowIcon(QIcon(":/new/prefix1/666.png"));}Widget::~Widget()
{delete ui;
}void Widget::timerEvent(QTimerEvent *event)
{if(event->timerId()) //== timer_id)  //用來(lái)判斷不同的定時(shí)器的id{//獲取當(dāng)前系統(tǒng)的日期時(shí)間sys_dt = QDateTime::currentDateTime();//展示時(shí)間到ui界面的lable2中ui->label->setText(sys_dt.toString("yyyy-MM-dd hh:mm:ss"));//居中顯示               標(biāo)簽文本對(duì)齊方式ui->label->setAlignment(Qt::AlignCenter);ui->label->setFont(QFont("微軟雅黑",20));QString timeText = sys_dt.toString("yyyy-MM-dd hh:mm:ss");QString timeText1 = ui->dateTimeEdit->text();if(flag == 1){if(timeText1 == timeText){speech->say(text); // 朗讀文本}}}
}
void Widget::on_pushButton_clicked()
{flag = 1;speech = new QTextToSpeech;text = ui->textEdit->toPlainText();ui->pushButton_2->setEnabled(true);ui->pushButton->setEnabled(false);ui->textEdit->setEnabled(false);ui->dateTimeEdit->setEnabled(false);
}void Widget::on_pushButton_2_clicked()
{flag = 0;ui->pushButton->setEnabled(true);ui->pushButton_2->setEnabled(false);ui->textEdit->setEnabled(true);ui->dateTimeEdit->setEnabled(true);speech->stop();
}

widget.ui文件

?

http://www.risenshineclean.com/news/50699.html

相關(guān)文章:

  • 紹興 網(wǎng)站建設(shè)快速排名推薦
  • 上海網(wǎng)站建設(shè) s廣告網(wǎng)站留電話不用驗(yàn)證碼
  • 禪城專業(yè)網(wǎng)站建設(shè)公司網(wǎng)絡(luò)營(yíng)銷工具的特點(diǎn)
  • 網(wǎng)絡(luò)設(shè)備維護(hù)是做什么的合肥seo培訓(xùn)
  • 最全的域名注冊(cè)廣州網(wǎng)站優(yōu)化公司排名
  • 太原做手機(jī)網(wǎng)站建設(shè)優(yōu)化推廣
  • 天津非常好的網(wǎng)站建設(shè)seo變現(xiàn)培訓(xùn)
  • 哪個(gè)網(wǎng)站可以做驗(yàn)證碼兼職軟件開發(fā)平臺(tái)
  • 百度 醫(yī)療網(wǎng)站建設(shè)公司做網(wǎng)站需要多少錢
  • php企業(yè)網(wǎng)站demo長(zhǎng)沙網(wǎng)站建設(shè)
  • 西安給大學(xué)做網(wǎng)站公司國(guó)外瀏覽器搜索引擎入口
  • 錦州 做網(wǎng)站茂名網(wǎng)站建設(shè)制作
  • 昆明網(wǎng)站做谷歌官網(wǎng)下載app
  • 濟(jì)南網(wǎng)站建設(shè)就選搜點(diǎn)網(wǎng)絡(luò)ok線上營(yíng)銷的方式
  • 公司建設(shè)網(wǎng)站的費(fèi)用廣告文案經(jīng)典范例200字
  • 開平 做一網(wǎng)站南京seo整站優(yōu)化技術(shù)
  • wordpress4.8內(nèi)存seo自動(dòng)工具
  • 外貿(mào)客戶管理軟件排名排名優(yōu)化方法
  • 做網(wǎng)站通常用的軟件肇慶網(wǎng)站建設(shè)制作
  • css網(wǎng)站做光暈效果產(chǎn)品推廣方案范例
  • 楊園建設(shè)社區(qū)網(wǎng)站電商seo名詞解釋
  • 多站點(diǎn)網(wǎng)站群的建設(shè)與管理社交媒體營(yíng)銷
  • 網(wǎng)站開發(fā)的前臺(tái)開發(fā)工具武漢seo百度
  • 做垂直網(wǎng)站營(yíng)銷策劃書格式及范文
  • 簡(jiǎn)單自適應(yīng)網(wǎng)站友情鏈接交換平臺(tái)有哪些
  • 網(wǎng)站建站費(fèi)用多少?gòu)V州百度關(guān)鍵詞搜索
  • 項(xiàng)目建設(shè)管理福州百度seo排名軟件
  • 大型門戶網(wǎng)站都有抖音關(guān)鍵詞排名優(yōu)化軟件
  • 濟(jì)南最好的網(wǎng)站制作公司哪家好第一設(shè)計(jì)
  • wordpress安裝后輸入什么域名電腦系統(tǒng)優(yōu)化軟件排行榜