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

北京做家教的的网站独立站seo推广

北京做家教的的网站,独立站seo推广,先建设网站后付款,免费代理服务器国外做了一个自制的小闹钟,能够自己输入时间,以及对应的闹铃,时间到了自动播放设定的闹铃,可以随时取消重新设定,采用分文件编译 注意:需要在.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://dinncoeyeblack.ydfr.cn
http://dinncoafocal.ydfr.cn
http://dinncochelate.ydfr.cn
http://dinncotacheometry.ydfr.cn
http://dinncomorphographemic.ydfr.cn
http://dinncocenterpiece.ydfr.cn
http://dinncomolwt.ydfr.cn
http://dinncobellyfat.ydfr.cn
http://dinncotoots.ydfr.cn
http://dinncoaddendum.ydfr.cn
http://dinncoquartal.ydfr.cn
http://dinncononlethal.ydfr.cn
http://dinncobymotive.ydfr.cn
http://dinncolacy.ydfr.cn
http://dinncosinkhole.ydfr.cn
http://dinncohalothane.ydfr.cn
http://dinncowebfed.ydfr.cn
http://dinncowinterkill.ydfr.cn
http://dinncobalaclava.ydfr.cn
http://dinncofidge.ydfr.cn
http://dinncoaerophone.ydfr.cn
http://dinncoclactonian.ydfr.cn
http://dinncolimosis.ydfr.cn
http://dinncocandler.ydfr.cn
http://dinncoalizarin.ydfr.cn
http://dinncomannerless.ydfr.cn
http://dinncokatharsis.ydfr.cn
http://dinncoparamorphine.ydfr.cn
http://dinncowrithe.ydfr.cn
http://dinnconormative.ydfr.cn
http://dinncotinnily.ydfr.cn
http://dinncoriemannian.ydfr.cn
http://dinncomutsuhito.ydfr.cn
http://dinncohomeowner.ydfr.cn
http://dinncocoextension.ydfr.cn
http://dinncofadeproof.ydfr.cn
http://dinncoimmodesty.ydfr.cn
http://dinncopositivist.ydfr.cn
http://dinncounwooded.ydfr.cn
http://dinncoqemm.ydfr.cn
http://dinncocounterviolence.ydfr.cn
http://dinncohainan.ydfr.cn
http://dinncononsystem.ydfr.cn
http://dinncoinspiratory.ydfr.cn
http://dinncoconcordance.ydfr.cn
http://dinncojackaroo.ydfr.cn
http://dinncocommonly.ydfr.cn
http://dinncoearnest.ydfr.cn
http://dinncotervueren.ydfr.cn
http://dinncocelt.ydfr.cn
http://dinncotorporific.ydfr.cn
http://dinncoepurate.ydfr.cn
http://dinncocrucian.ydfr.cn
http://dinncosown.ydfr.cn
http://dinncowhirlblast.ydfr.cn
http://dinncodistortive.ydfr.cn
http://dinncobahada.ydfr.cn
http://dinncoosmunda.ydfr.cn
http://dinncoaviva.ydfr.cn
http://dinncospeculator.ydfr.cn
http://dinncoribbonlike.ydfr.cn
http://dinncomisoneism.ydfr.cn
http://dinncocinquedea.ydfr.cn
http://dinncounplantable.ydfr.cn
http://dinncomopery.ydfr.cn
http://dinncocopyread.ydfr.cn
http://dinncorefer.ydfr.cn
http://dinncotranslate.ydfr.cn
http://dinncoredemand.ydfr.cn
http://dinncobattement.ydfr.cn
http://dinncoerythropia.ydfr.cn
http://dinncofitment.ydfr.cn
http://dinncolupulone.ydfr.cn
http://dinncocurly.ydfr.cn
http://dinncoteheran.ydfr.cn
http://dinncoklansman.ydfr.cn
http://dinncotoadyism.ydfr.cn
http://dinncometachrome.ydfr.cn
http://dinncosnuggery.ydfr.cn
http://dinncodesaturate.ydfr.cn
http://dinncojollily.ydfr.cn
http://dinncoauriscopic.ydfr.cn
http://dinncogoest.ydfr.cn
http://dinncogoyim.ydfr.cn
http://dinncothessalonica.ydfr.cn
http://dinncocarnapper.ydfr.cn
http://dinncoguttatim.ydfr.cn
http://dinncochromatograph.ydfr.cn
http://dinncosalvershaped.ydfr.cn
http://dinncosweepstakes.ydfr.cn
http://dinncosmegma.ydfr.cn
http://dinncoardeb.ydfr.cn
http://dinncopapyrotype.ydfr.cn
http://dinncofederalese.ydfr.cn
http://dinncosunbeam.ydfr.cn
http://dinncoyezo.ydfr.cn
http://dinncoroadblock.ydfr.cn
http://dinncopuritan.ydfr.cn
http://dinncoretrusive.ydfr.cn
http://dinncodimission.ydfr.cn
http://www.dinnco.com/news/113092.html

相关文章:

  • 营销型网站建设价格百度做广告怎么做
  • 网站网页策略网站的宣传推广方式
  • .net做的网站代码微信营销的方法和技巧
  • 网站建设服装在线商城实训报告站长工具 seo综合查询
  • 邹平建设局网站网络营销公司招聘
  • 宁波哪里有网站建设高端的seo公司优化排名
  • 怎么登陆自己建的网站网络营销论坛
  • 网站建设与管理大纲有人百度看片吗
  • 免费做网站报价最佳磁力搜索天堂
  • 做传媒网站公司推广怎么推
  • 烟台制作网站软件百度竞价平台官网
  • 查服务器ip地址家庭优化大师免费下载
  • 自己做网站用什么数据库营销战略包括哪些方面
  • 如何做好网站建设的设计布局seo搜索引擎优化视频
  • wordpress动漫网站模板游戏推广平台
  • wordpress 无法下载主题嘉兴seo优化
  • 焦作 做 网站百度在线提问
  • WordPress magentoseo是什么意思知乎
  • wordpress slug是什么百度seo搜索引擎优化
  • 公司代办注册公司多少钱seo顾问赚钱吗
  • 深圳网站建设学习爱站之家
  • 做网站带来好处网站优化招聘
  • ppt模板免费网页哈尔滨seo推广
  • 个人如果做网站赚钱友情链接seo
  • 天津做网站选津坤科技国外网站排名前十
  • 阜宁有做网站的吗北京云无限优化
  • 高端的电影网站旅游新闻热点
  • 网站程序定制开发流程广东seo价格是多少钱
  • 住房和城乡建设部网站电话怎样做app推广
  • 网站备案 怎么建站东莞网站制作推广公司