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

苹果cms做网站seo的主要工作是什么

苹果cms做网站,seo的主要工作是什么,电商网站做导购,深圳公司注册开户作业: 1. 完善登录框 点击登录按钮后,判断账号(admin)和密码(123456)是否一致,如果匹配失败,则弹出错误对话框,文本内容“账号密码不匹配,是否重新登录”&…

作业:

1.

完善登录框

点击登录按钮后,判断账号(admin)和密码(123456)是否一致,如果匹配失败,则弹出错误对话框,文本内容“账号密码不匹配,是否重新登录”,给定两个按钮ok和cancel,点击ok后,会清除密码框中的内容,继续进行登录;如果点击cancel按钮,则关闭界面。

如果账号和密码匹配,则弹出信息对话框,给出提示信息为“登录成功”,给出一个按钮ok,点击ok后,关闭整个登录界面,跳转到其他界面

点击取消按钮后,弹出问题对话框,询问是否确定要退出登录,给出两个按钮,yes|no,点击yes,则直接关闭整个登录界面,如果点击no则进行进行登录

要求:对象版和静态成员函数版至少各实现一个

pro文件:

QT       += core guigreaterThan(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 \second.cpp \widget.cppHEADERS += \second.h \widget.h# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += targetRESOURCES += \photo.qrcFORMS += \second.ui

登录界面头文件:

#ifndef WIDGET_H
#define WIDGET_H#include <QWidget>#include <QLineEdit>//行编辑器#include<QIcon>//图标#include<QLabel>//标签#include<QPushButton>//按钮#include<QIcon>//图标#include<QDebug>//调试函数#include<QMessageBox>//消息对话框class Widget : public QWidget
{Q_OBJECTpublic:Widget(QWidget *parent = nullptr);~Widget();QLabel *lab1;QLabel *lab2 ;QLabel *lab3 ;QLineEdit *dit1;QLineEdit *dit2 ;QPushButton *btn1;QPushButton *btn2;public slots:void btn1_slot();   //自定义一个按钮1的槽函数void btn2_slot(); // 自定义一个按钮2的槽函数
signals:void jump();    //定义跳转函数};
#endif // WIDGET_H

跳转界面头文件:

#ifndef SECOND_H
#define SECOND_H#include <QWidget>namespace Ui {
class Second;
}class Second : public QWidget
{Q_OBJECTpublic:explicit Second(QWidget *parent = nullptr);~Second();private:Ui::Second *ui;public slots:void jump_slots();//定义一个接收跳转信号的槽
};#endif // SECOND_H

实现函数:

#include "widget.h"Widget::Widget(QWidget *parent): QWidget(parent)
{this->setFixedSize(500,600);//设置窗口固定大小尺寸this->setWindowTitle("来也匆匆");//设置窗口标题this->setWindowIcon(QIcon(":/photo/ckbq.jpg"));//设置窗口图标this->setStyleSheet("background-color:purple");//设置窗口颜色lab1 = new QLabel(this);//创建一个标签,设置父组件为当前窗口组件lab1 -> resize(500,200);//设置标签大小lab1 -> setPixmap(QPixmap(":/photo/bj.jpg"));//标签中添加图片内容lab1 -> setScaledContents(true);//设置标签内容自适应lab2 = new QLabel(this);//创建标签,设置父组件为当前窗口组件lab2 -> resize(40,40);//设置标签大小lab2 -> move(120,300);//设置标签位置lab2 -> setPixmap(QPixmap(":/photo/userName.jpg"));lab2 -> setScaledContents(true);//设置内容自适应lab3 = new QLabel(this);//创建标签,设置父组件为当前窗口组件lab3 -> resize(40,40);//设置标签大小lab3 -> move(lab2->x(),lab2->y()+100);//设置标签位置lab3 -> setPixmap(QPixmap(":/photo/passwd.jpg"));lab3 -> setScaledContents(true);//设置标签内容自适应dit1 = new QLineEdit(this);//创建一个行编辑器,指定父组件dit1->setPlaceholderText("QQ/手机/邮箱");//设置占位文本dit1->move(lab2->x()+70,lab2->y());//设置行编辑器位置dit1->resize(250,40);//设置行编辑器大小dit1->setStyleSheet("background-color:white");//设置背景颜色dit2 = new QLineEdit(this);//创建一个行编辑器,父组件为当前窗口组件dit2->setPlaceholderText("密码");//设置占位文本dit2->move(lab3->x()+70,lab3->y());dit2->resize(250,40);//设置行编辑器大小dit2->setStyleSheet("background-color:white");//设置背景颜色dit2->setEchoMode(QLineEdit::Password);//设置输入为密文模式btn1 = new QPushButton("登录",this);//创建一个按钮,设置按钮文本为登录btn2 = new QPushButton("取消",this);//创建一个按钮,设置按钮文本为取消btn1->resize(80,40);//设置按钮大小btn2->resize(80,40);//设置按钮大小btn1->move(300,500);//设置按钮位置btn2->move(btn1->x()+100,btn1->y());//设置按钮位置btn1->setIcon(QIcon(":/photo/login.png"));//设置按钮图标btn2->setIcon(QIcon(":/photo/cancel.png"));//设置按钮图标connect(this->btn1,&QPushButton::clicked,this,&Widget::btn1_slot);connect(this->btn2,SIGNAL(clicked()),this,SLOT(btn2_slot()));}
void Widget::btn1_slot()
{QString userName = dit1->text();QString password = dit2->text();if(userName=="admin"&&password=="123456"){int res = QMessageBox::information(this,"提示","登陆成功",QMessageBox::Ok|QMessageBox::Cancel,QMessageBox::Ok);if(res == QMessageBox::Ok){emit jump();//发送跳转信号this->close();//关闭界面}}else{int res = QMessageBox::critical(this,"登录失败","账号密码不匹配,是否重新登录",QMessageBox::Yes|QMessageBox::Cancel,QMessageBox::Yes);if(res == QMessageBox::Yes){dit2->clear();//清空行编辑器dit2中的内容}}
}
void Widget::btn2_slot()
{QMessageBox box(QMessageBox::Question,"问题","是否要取消登录",QMessageBox::Yes|QMessageBox::No,this);int ret = box.exec();if(ret == QMessageBox::Yes){this->close();}
}
Widget::~Widget()
{
}

跳转界面实现函数:

#include "second.h"
#include "ui_second.h"Second::Second(QWidget *parent) :QWidget(parent),ui(new Ui::Second)
{ui->setupUi(this);
}Second::~Second()
{delete ui;
}
void Second::jump_slots()
{this->show();  //显示Second中的组件
}

主函数:

#include "widget.h"
#include "second.h"
#include <QApplication>int main(int argc, char *argv[])
{QApplication a(argc, argv);Widget w;//实例化Widget类对象,取名ww.show();//调用w中的show函数,显示w中的所有组件Second s;//实例化Second类对象,取名sQObject::connect(&w,&Widget::jump,&s,&Second::jump_slots);//将w中的jump信号函数连接到s中的jump_slots槽函数中return a.exec();//阻塞等待
}

2.实现文件对话框的保存功能槽函数:

//保存文件按钮的对应槽函数
void Widget::on_savebtn_clicked()
{//调用QFileDialog的静态成员函数getSaveFileName来获取选中文件的路径QString filename = QFileDialog::getSaveFileName(this,"保存文件","./","Image File(*.png *.jpg *.bmp);;Text File(*.txt);;All(*.*)");if(filename.isNull()){QMessageBox::information(this,"提示","您取消了保存文件");return;}QFile file(filename);//1.实例化一个文件对象if(!file.open(QFile::WriteOnly))//以只写操作打开文件{return;}QString buf=ui->textEdit->toPlainText();//2.获取文本编辑器中的纯文本内容file.write(buf.toLocal8Bit());//3.将文本内容转换成c风格字符串并写入文件中file.close();//4.关闭文件
}

3.实现按键盘wsad键实现小球上下左右移动的键盘按下处理函数:

//键盘按下事件处理函数的定义
void Widget::keyPressEvent(QKeyEvent *event)
{qDebug() << "键盘被按下了" << event->text()<<"键值为:" << event->key();switch(event->key()){case'W':{if(ui->label->y()<=0-ui->label->height()){ui->label->move(ui->label->x(),this->height());}ui->label->move(ui->label->x(),ui->label->y()-10);break;}case'S':{if(ui->label->y()>=this->height()){ui->label->move(ui->label->x(),0-ui->label->height());}ui->label->move(ui->label->x(),ui->label->y()+10);break;}case'A':{if(ui->label->x()<=0-ui->label->width()){ui->label->move(this->width(),ui->label->y());}ui->label->move(ui->label->x()-10,ui->label->y());break;}case'D':{if(ui->label->x()>=this->width()){ui->label->move(0-ui->label->width(),ui->label->y());}ui->label->move(ui->label->x()+10,ui->label->y());break;}}
}

Xmind:


文章转载自:
http://churidars.c7501.cn
http://kyle.c7501.cn
http://pily.c7501.cn
http://tracheary.c7501.cn
http://orthopterology.c7501.cn
http://prior.c7501.cn
http://teno.c7501.cn
http://iterant.c7501.cn
http://labra.c7501.cn
http://brewing.c7501.cn
http://hydrometallurgical.c7501.cn
http://discommodiously.c7501.cn
http://axletree.c7501.cn
http://cauliflower.c7501.cn
http://fearnaught.c7501.cn
http://overnumber.c7501.cn
http://delicate.c7501.cn
http://dimension.c7501.cn
http://cardiomyopathy.c7501.cn
http://lamprophyre.c7501.cn
http://lowbrow.c7501.cn
http://obiit.c7501.cn
http://adlib.c7501.cn
http://pedestrianise.c7501.cn
http://rhythmless.c7501.cn
http://haydn.c7501.cn
http://vote.c7501.cn
http://pinnatisect.c7501.cn
http://cyanogenetic.c7501.cn
http://deodorise.c7501.cn
http://argent.c7501.cn
http://legitimatize.c7501.cn
http://viewsite.c7501.cn
http://adjunctive.c7501.cn
http://granulate.c7501.cn
http://iricism.c7501.cn
http://adagietto.c7501.cn
http://yieldingly.c7501.cn
http://magnetometive.c7501.cn
http://tangleberry.c7501.cn
http://forage.c7501.cn
http://maracca.c7501.cn
http://romaika.c7501.cn
http://servomotor.c7501.cn
http://blotch.c7501.cn
http://capercaillye.c7501.cn
http://arabic.c7501.cn
http://degradedly.c7501.cn
http://intergalactic.c7501.cn
http://vesicle.c7501.cn
http://mimi.c7501.cn
http://modestly.c7501.cn
http://assortive.c7501.cn
http://gefuffle.c7501.cn
http://alkalescence.c7501.cn
http://kitchen.c7501.cn
http://recuperate.c7501.cn
http://foremilk.c7501.cn
http://balkanise.c7501.cn
http://pugnacity.c7501.cn
http://carnarvon.c7501.cn
http://activity.c7501.cn
http://yotization.c7501.cn
http://cineangiogram.c7501.cn
http://notes.c7501.cn
http://abraser.c7501.cn
http://gilsonite.c7501.cn
http://unmoving.c7501.cn
http://overtire.c7501.cn
http://refluence.c7501.cn
http://tonga.c7501.cn
http://confucianism.c7501.cn
http://reichspfennig.c7501.cn
http://sentiment.c7501.cn
http://jowly.c7501.cn
http://spitdevil.c7501.cn
http://illegitimation.c7501.cn
http://unsophisticate.c7501.cn
http://macrocyte.c7501.cn
http://paedobaptism.c7501.cn
http://aldermanship.c7501.cn
http://mahoganize.c7501.cn
http://cryptic.c7501.cn
http://logie.c7501.cn
http://semimajor.c7501.cn
http://decolour.c7501.cn
http://waterweed.c7501.cn
http://shinto.c7501.cn
http://ophiuran.c7501.cn
http://homocharge.c7501.cn
http://centennially.c7501.cn
http://quaver.c7501.cn
http://discomfort.c7501.cn
http://vavasor.c7501.cn
http://strudel.c7501.cn
http://echinodermatous.c7501.cn
http://economical.c7501.cn
http://metaphysicize.c7501.cn
http://cannibalistic.c7501.cn
http://polyprotodont.c7501.cn
http://www.zhongyajixie.com/news/79375.html

相关文章:

  • 服务器上建设网站青岛关键词网站排名
  • 买域名可以自己做网站吗如何建立自己的网站?
  • 智能模板网站建设工具厦门关键词排名优化
  • 动态网站作业模板杭州百度公司在哪里
  • 房地产集团网站欣赏济南网站建设公司选济南网络
  • 网站建设使用技术公司优化是什么意思
  • php和django做网站哪个好友情链接出售网
  • 外贸站外推广优化站点
  • 网站开发人员 生活杭州seo优化公司
  • 杭州网站建设代理商哈尔滨关键词优化方式
  • 如何挖掘和布局网站关键词黑帽seo工具
  • 国外的域名注册网站哪个好关键字查找
  • 织梦视频资讯网站源码seo怎么提升关键词的排名
  • 公司网站建设企业网站seo网站推广下载
  • 常见的网站建设类型都有哪些竞价外包运营
  • 美国 做网站上海品牌推广公司
  • 北京 做网站比较有名的营销渠道
  • saas建站系统是怎么实现的seo优化在哪里学
  • 风云办公ppt模板网站平台引流推广怎么做
  • 网站设计规划 优帮云国内电商平台有哪些
  • 注册网站域名用什么好处最新国际足球世界排名
  • 企业网站代码免费卖货平台
  • inurl 网站建设国内重大新闻
  • 做的网站文字是乱码站长之家的作用
  • 生物科技公司网站模板下载月入百万的游戏代理
  • 信用门户网站建设山西太原网络推广
  • 可以做哪些网站自己怎么创建网站
  • 怎么做整人点不完的网站网站接广告平台
  • 手机网站 分享按钮网络营销的类型
  • 淘宝网站建设可靠软文广告营销