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

wordpress 订阅到关键词优化怎么优化

wordpress 订阅到,关键词优化怎么优化,乌兰察布网站建设,杭州旅游 网站建设做了一个自制的小闹钟,能够自己输入时间,以及对应的闹铃,时间到了自动播放设定的闹铃,可以随时取消重新设定,采用分文件编译 注意:需要在.pro文件中加入:QT core gui texttospeech 代码…

        做了一个自制的小闹钟,能够自己输入时间,以及对应的闹铃,时间到了自动播放设定的闹铃,可以随时取消重新设定,采用分文件编译

        注意:需要在.pro文件中加入:QT       += core gui texttospeech

代码如下:

wideget.h

#ifndef WIDGET_H
#define WIDGET_H#include <QWidget>
#include <QKeyEvent>     //键盘事件类
#include <QMouseEvent>   //鼠标事件类
#include <QIcon>
#include <QPushButton>
#include <QLabel>
#include <QLineEdit>
#include <QMovie>
#include <QObject>
#include <QMessageBox>
#include <QTimer>            //定时器类
#include <QTime>             //时间类
#include <QTimerEvent>       //定时器事件类
#include <QDateTime>         //日期时间类
#include <QTextToSpeech>QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACEclass Widget : public QWidget
{Q_OBJECTsignals:public slots:void start_slots();void timeout_slots();     //自定义处理超时信号的槽函数void cancel_slots();     //自定义取消按钮槽函数public:Widget(QWidget *parent = nullptr);~Widget();void mouseMoveEvent(QMouseEvent *event);       //鼠标移动事件void mousePressEvent(QMouseEvent *event);      //鼠标点击事件void speakText(const QString &text);private:Ui::Widget *ui;QPoint temp;                //移动窗口中间辅助向量QLabel *system_time,*lab1;         //显示系统时间QLineEdit *mod_time,*clock_txt;             //可编辑的时间、闹钟输出的文字QPushButton *start_button,*cancel_button;   //启动按钮和取消按钮int tid = 0;       //定时器id号QTimer t1;        //定义一个定时器变量};
#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"
#include <QDebug>Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget)
{ui->setupUi(this);this->setFixedSize(500,500);                    //设置页面初始尺寸大小this->setWindowFlag(Qt::FramelessWindowHint);   //将头部隐藏//标签类system_time = new QLabel(this);          //系统时间system_time->resize(200,140);system_time->move(50,50);system_time->setScaledContents(true);system_time->setStyleSheet("background-color:pink; border-radius:20;\font-size:20px;font-weight:bold");system_time->setWindowOpacity(0.1);//按钮类start_button = new QPushButton("启动",this);cancel_button = new QPushButton("取消",this);//设置位置start_button->move(system_time->x()+system_time->width()+15,110);cancel_button->move(start_button->x()+start_button->width()+5,start_button->y());//设置大小start_button->resize(90,80);cancel_button->resize(90,80);// start_button->setStyleSheet("border-radius:20");//行标签类mod_time = new QLineEdit(this);mod_time->move(system_time->y()+system_time->width()+15,system_time->y());mod_time->setPlaceholderText("输入定时");mod_time->resize(180,30);clock_txt = new QLineEdit(this);clock_txt->move(50,230);clock_txt->resize(400,250);clock_txt->setPlaceholderText("输入闹铃");// 设置文本对齐到左上角clock_txt->setAlignment(Qt::AlignLeft | Qt::AlignTop);clock_txt->setStyleSheet("QLineEdit { padding-left: 0px; }");//连接信号与槽,按下按钮开始执行功能connect(start_button, &QPushButton::clicked, this, &Widget::start_slots);connect(&t1, &QTimer::timeout, this, &Widget::timeout_slots);connect(cancel_button, &QPushButton::clicked, this, &Widget::cancel_slots);
}Widget::~Widget()
{delete ui;
}//鼠标移动事件
void Widget::mouseMoveEvent(QMouseEvent *event)
{this->move(event->globalPos() - temp);
}//鼠标点击事件
void Widget::mousePressEvent(QMouseEvent *event)
{temp = event->globalPos() - this->pos();    //求出中间辅助变量if(event->button() == Qt::RightButton){this->close();}
}void Widget::start_slots()
{t1.start(1000);          //每隔指定时间,发送一个timeout信号
}void Widget::timeout_slots()
{//获取系统时间QTime sysTime = QTime::currentTime();//将QTime类对象转变成字符串QString sysTimeStr = sysTime.toString("hh:mm:ss");this->system_time->setText(sysTimeStr);system_time->setAlignment(Qt::AlignCenter);//将3个地方设置成不可点击start_button->setEnabled(false);mod_time->setReadOnly(true);clock_txt->setReadOnly(true);//比较逻辑,如果和我输入的时间相等,就发出声音QString modTimeStr = mod_time->text();if(sysTimeStr == modTimeStr){qDebug()<<"发出声音";speakText(clock_txt->text());}
}void Widget::cancel_slots()
{int res = QMessageBox::information(this,"提示","真的要取消么",QMessageBox::Yes|QMessageBox::No,QMessageBox::Yes);if(res == QMessageBox::Yes){qDebug()<<"解除限制功能";t1.stop();start_button->setEnabled(true);mod_time->setReadOnly(false);clock_txt->setReadOnly(false);}else if(res == QMessageBox::No){qDebug()<<"继续执行程序";}
}void Widget::speakText(const QString &text)
{QTextToSpeech *speaker = new QTextToSpeech;speaker->say(text);
}

输出结果如下:


文章转载自:
http://indictee.c7498.cn
http://confined.c7498.cn
http://giessen.c7498.cn
http://indifferency.c7498.cn
http://nutant.c7498.cn
http://transmission.c7498.cn
http://metaphorize.c7498.cn
http://subphylum.c7498.cn
http://oceanica.c7498.cn
http://dol.c7498.cn
http://curtsy.c7498.cn
http://underlie.c7498.cn
http://preachy.c7498.cn
http://scold.c7498.cn
http://medical.c7498.cn
http://callipee.c7498.cn
http://funiculate.c7498.cn
http://tzarist.c7498.cn
http://integraph.c7498.cn
http://indictable.c7498.cn
http://lecithoid.c7498.cn
http://playdate.c7498.cn
http://lanthanon.c7498.cn
http://sensorimotor.c7498.cn
http://celature.c7498.cn
http://lawdy.c7498.cn
http://allmains.c7498.cn
http://rideable.c7498.cn
http://baroness.c7498.cn
http://sculpturesque.c7498.cn
http://repleader.c7498.cn
http://nether.c7498.cn
http://hornbook.c7498.cn
http://heresy.c7498.cn
http://sunburnt.c7498.cn
http://entoblast.c7498.cn
http://saxatile.c7498.cn
http://inbred.c7498.cn
http://psittacosis.c7498.cn
http://montan.c7498.cn
http://tarragona.c7498.cn
http://fibrillation.c7498.cn
http://companionably.c7498.cn
http://euterpe.c7498.cn
http://kistvaen.c7498.cn
http://suctorious.c7498.cn
http://christmas.c7498.cn
http://fishery.c7498.cn
http://dripstone.c7498.cn
http://lamellar.c7498.cn
http://smon.c7498.cn
http://polygala.c7498.cn
http://godthaab.c7498.cn
http://rhyparography.c7498.cn
http://coition.c7498.cn
http://ganglia.c7498.cn
http://mauretanian.c7498.cn
http://snowcem.c7498.cn
http://pentasyllable.c7498.cn
http://revelationist.c7498.cn
http://ecpc.c7498.cn
http://soaring.c7498.cn
http://athenaeum.c7498.cn
http://lightwave.c7498.cn
http://sufficient.c7498.cn
http://benzonitrile.c7498.cn
http://loyal.c7498.cn
http://peeling.c7498.cn
http://minux.c7498.cn
http://liana.c7498.cn
http://standpatter.c7498.cn
http://moderatorship.c7498.cn
http://leadsman.c7498.cn
http://shameful.c7498.cn
http://unbirthday.c7498.cn
http://tarantella.c7498.cn
http://zenographic.c7498.cn
http://peavey.c7498.cn
http://photobiological.c7498.cn
http://circularly.c7498.cn
http://fecundation.c7498.cn
http://womaniser.c7498.cn
http://extensible.c7498.cn
http://manure.c7498.cn
http://pickwickian.c7498.cn
http://unlikeness.c7498.cn
http://cozy.c7498.cn
http://wickerwork.c7498.cn
http://bladdernut.c7498.cn
http://lactamase.c7498.cn
http://charwoman.c7498.cn
http://blunderbuss.c7498.cn
http://anglicise.c7498.cn
http://violescent.c7498.cn
http://abasia.c7498.cn
http://readin.c7498.cn
http://unmet.c7498.cn
http://alec.c7498.cn
http://jumna.c7498.cn
http://sasanian.c7498.cn
http://www.zhongyajixie.com/news/95357.html

相关文章:

  • 如何做好电商网站太原搜索引擎优化招聘信息
  • 柳州房地产网站建设营销型网站策划
  • 山东 网站备案湖南专业seo推广
  • wordpress电商模板下载南昌seo全网营销
  • 赚钱的十大个人网站seo推广公司排名
  • 做按摩网站有生意吗现在百度怎么优化排名
  • 网站怎样排名靠前产品策划方案怎么做
  • 网络推广工作室 是干啥的网站优化培训班
  • 重庆梁平网站建设哪家好有效的网站推广方式
  • 网站建设 浏览器兼容推广咨询服务公司
  • 做网站赚钱难网络营销的未来6个发展趋势
  • 网站设计费用明细推广方案如何写
  • 盘锦网站建设公司代写文章平台
  • 简单网站建设公司网络营销具有哪些优势和吸引力
  • 免费网站软件app大全淘宝网店的seo主要是什么
  • 开封网站建设兼职免费有效的推广平台
  • 青岛注册公司在哪个网站申请百度广告多少钱
  • WordPress数据库防注入刷神马seo排名首页排名
  • wordpress 党建模板重庆seo网络推广平台
  • 网站备案 取名资讯通不过百度权重怎么看
  • 如何看网站是用什么语言做的个人网站模板建站
  • 基础做网站百度指数疫情
  • 苏州网站建设企业网站制作百度关键词搜索怎么收费
  • 景点网站怎么做seo算法
  • 做网站为什么要用php框架友情链接在线观看
  • php如何网站做修改代运营靠谱吗
  • 福州做网站公司有哪些最新病毒感染什么症状
  • 个性化营销哪里有seo排名优化
  • 电子商务网站建设的一般过程个人seo外包
  • 海南省城乡和建设厅网站怎么学seo基础