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

网站前置审批怎么做seo是付费还是免费推广

网站前置审批怎么做,seo是付费还是免费推广,微信电脑网页版,photoshop手机版下载官网1、概述 源码放在文章末尾 该项目实现了带动画效果的多选框&#xff0c;鼠标放在上面或者选中都会呈现炫酷的动画效果&#xff0c;demo演示如下&#xff1a; 项目部分代码如下所示&#xff1a; #ifndef LINEARCHECKBOX_H #define LINEARCHECKBOX_H#include <QCheckBox> …

1、概述
源码放在文章末尾

该项目实现了带动画效果的多选框,鼠标放在上面或者选中都会呈现炫酷的动画效果,demo演示如下:

在这里插入图片描述

项目部分代码如下所示:


#ifndef LINEARCHECKBOX_H
#define LINEARCHECKBOX_H#include <QCheckBox>
#include <QPropertyAnimation>
#include <QPainter>
#include <QPainterPath>
#include <QDebug>class AniCheckBox : public QCheckBox
{Q_OBJECTQ_PROPERTY(double hover_prog READ getHoverProg WRITE setHoverProg)Q_PROPERTY(double part_prog READ getPartProg WRITE setPartProg)Q_PROPERTY(double check_prog READ getCheckProg WRITE setCheckProg)
public:AniCheckBox(QWidget* parent = nullptr);void setForeColor(QColor c);protected:void paintEvent(QPaintEvent *) override;void enterEvent(QEvent *e) override;void leaveEvent(QEvent *e) override;bool hitButton(const QPoint &) const override;virtual void checkStateChanged(int state);virtual void drawBox(QPainter &painter, QRectF rect);QPropertyAnimation* startAnimation(const QByteArray &property, double begin, double end, int duration = 500, QEasingCurve curve = QEasingCurve::OutQuad);protected:double getHoverProg() const;void setHoverProg(double prog);double getPartProg() const;void setPartProg(double prog);double getCheckProg() const;void setCheckProg(double prog);protected:int boxSide = 0; // 选择框边长,0为自适应QColor foreColor = QColor("#2753ff"); // 前景颜色double hoverProg = 0;   // 鼠标移上去的进度double partyProg = 0;   // 部分选中的进度double checkProg = 0;   // 选中的进度
};#endif // LINEARCHECKBOX_H

#include "anicheckbox.h"AniCheckBox::AniCheckBox(QWidget *parent) : QCheckBox(parent)
{setCursor(Qt::PointingHandCursor);connect(this, &QCheckBox::stateChanged, this, [=](int state) {// qInfo() << "状态变化:" << static_cast<Qt::CheckState>(state);checkStateChanged(state);});
}void AniCheckBox::setForeColor(QColor c)
{this->foreColor = c;
}void AniCheckBox::paintEvent(QPaintEvent *)
{// QCheckBox::paintEvent(e);QPainter painter(this);// painter.setRenderHint(QPainter::Antialiasing, true);QRectF rect;double textLeft;if (boxSide <= 0){// 自适应大小:优先一行文字大小,其次按比例const double fixedProp = 0.8; // 默认比例QFontMetricsF fm(painter.font());double side = fm.height(); // 一行文字的高度if (side >= this->height() * fixedProp)side = this->height() * fixedProp;double margin = side / 2;rect = QRectF(margin, (height() - side) / 2, side, side);textLeft = rect.right() + margin;}else{// 固定大小double margin = (this->height() - boxSide) / 2;rect = QRectF(margin, margin, boxSide, boxSide);textLeft = rect.right() + margin;}// 绘制选择框painter.save();drawBox(painter, rect);painter.restore();// 绘制文字painter.save();painter.drawText(QRectF(textLeft, 0, this->width() - textLeft, this->height()), this->text(), Qt::AlignVCenter | Qt::AlignLeft);painter.restore();
}void AniCheckBox::enterEvent(QEvent *e)
{QCheckBox::enterEvent(e);startAnimation("hover_prog", getHoverProg(), 1);
}void AniCheckBox::leaveEvent(QEvent *e)
{QCheckBox::leaveEvent(e);startAnimation("hover_prog", getHoverProg(), 0);
}bool AniCheckBox::hitButton(const QPoint &) const
{return true;
}void AniCheckBox::checkStateChanged(int state)
{if (state == Qt::Unchecked){startAnimation("check_prog", getCheckProg(), 0, 800, QEasingCurve::OutBounce);}else if (state == Qt::PartiallyChecked){}else if (state == Qt::Checked){startAnimation("check_prog", getCheckProg(), 1, 500, QEasingCurve::OutBack);}
}void AniCheckBox::drawBox(QPainter& painter, QRectF rect)
{painter.setPen(foreColor);painter.setRenderHint(QPainter::Antialiasing, true);// 绘制边缘方框,和悬浮状态有关double radius = 3;radius *= (1 - hoverProg);painter.drawRoundedRect(rect, radius, radius);// 绘制选中状态int state = this->checkState();double prop = 0.6;prop *= checkProg;rect = QRectF(rect.left() + rect.width() * (1 - prop) / 2,rect.top() + rect.height() * (1 - prop) / 2,rect.width() * prop,rect.height() * prop);QPainterPath path;path.addRoundedRect(rect, radius, radius);painter.fillPath(path, foreColor);if (state == Qt::Unchecked){}else if (state == Qt::PartiallyChecked){}else if (state == Qt::Checked){}
}QPropertyAnimation *AniCheckBox::startAnimation(const QByteArray &property, double begin, double end, int duration, QEasingCurve curve)
{QPropertyAnimation* ani = new QPropertyAnimation(this, property);ani->setStartValue(begin);ani->setEndValue(end);ani->setDuration(duration);ani->setEasingCurve(curve);connect(ani, SIGNAL(finished()), ani, SLOT(deleteLater()));connect(ani, SIGNAL(valueChanged(const QVariant&)), this, SLOT(update()));ani->start();return ani;
}double AniCheckBox::getHoverProg() const
{return hoverProg;
}void AniCheckBox::setHoverProg(double prog)
{this->hoverProg = prog;
}double AniCheckBox::getPartProg() const
{return partyProg;
}void AniCheckBox::setPartProg(double prog)
{this->partyProg = prog;
}double AniCheckBox::getCheckProg() const
{return checkProg;
}void AniCheckBox::setCheckProg(double prog)
{this->checkProg = prog;
}

源码下载


文章转载自:
http://aggravating.c7512.cn
http://atheoretical.c7512.cn
http://mayor.c7512.cn
http://cop.c7512.cn
http://mushroomy.c7512.cn
http://phenakite.c7512.cn
http://succise.c7512.cn
http://ashur.c7512.cn
http://deprival.c7512.cn
http://unlicensed.c7512.cn
http://weldless.c7512.cn
http://goyische.c7512.cn
http://sackful.c7512.cn
http://loxodrome.c7512.cn
http://sgraffito.c7512.cn
http://hooked.c7512.cn
http://mangosteen.c7512.cn
http://infidel.c7512.cn
http://nwbw.c7512.cn
http://crispation.c7512.cn
http://navelwort.c7512.cn
http://polite.c7512.cn
http://memberless.c7512.cn
http://justle.c7512.cn
http://sensibly.c7512.cn
http://electioneeringa.c7512.cn
http://misinform.c7512.cn
http://sendmail.c7512.cn
http://ruridecanal.c7512.cn
http://ministry.c7512.cn
http://theorem.c7512.cn
http://avalon.c7512.cn
http://roentgenograph.c7512.cn
http://earthday.c7512.cn
http://backspin.c7512.cn
http://honcho.c7512.cn
http://inherence.c7512.cn
http://am.c7512.cn
http://cassab.c7512.cn
http://tiptoe.c7512.cn
http://gunman.c7512.cn
http://lapland.c7512.cn
http://airworthiness.c7512.cn
http://loop.c7512.cn
http://flocculous.c7512.cn
http://velutinous.c7512.cn
http://ezekias.c7512.cn
http://uncountable.c7512.cn
http://winding.c7512.cn
http://toe.c7512.cn
http://bearbaiting.c7512.cn
http://univocal.c7512.cn
http://emissive.c7512.cn
http://chatelain.c7512.cn
http://corpman.c7512.cn
http://attire.c7512.cn
http://radicular.c7512.cn
http://eruptive.c7512.cn
http://heliox.c7512.cn
http://dolabriform.c7512.cn
http://arises.c7512.cn
http://harmoniously.c7512.cn
http://grappler.c7512.cn
http://antisocial.c7512.cn
http://coppice.c7512.cn
http://unransomed.c7512.cn
http://snapper.c7512.cn
http://fishpot.c7512.cn
http://moorstone.c7512.cn
http://smoothy.c7512.cn
http://phytobiology.c7512.cn
http://bullroarer.c7512.cn
http://condiment.c7512.cn
http://dwelt.c7512.cn
http://deforestation.c7512.cn
http://entomofauna.c7512.cn
http://cavu.c7512.cn
http://tulle.c7512.cn
http://gastralgia.c7512.cn
http://bathurst.c7512.cn
http://tangoist.c7512.cn
http://disembodiment.c7512.cn
http://unable.c7512.cn
http://demiurgic.c7512.cn
http://sloven.c7512.cn
http://shuba.c7512.cn
http://charmer.c7512.cn
http://electrize.c7512.cn
http://starlit.c7512.cn
http://passivation.c7512.cn
http://chionodoxa.c7512.cn
http://programmatic.c7512.cn
http://applicatory.c7512.cn
http://niggertoe.c7512.cn
http://ache.c7512.cn
http://ectropion.c7512.cn
http://venturesome.c7512.cn
http://demargarinated.c7512.cn
http://spcc.c7512.cn
http://mastoidal.c7512.cn
http://www.zhongyajixie.com/news/81576.html

相关文章:

  • 网站开发怎么用自己的电脑友情链接买卖代理
  • 建站网站插件搜索引擎优化理解
  • 男女做那事是什 网站win10优化
  • 网站编辑步骤有哪些最近时政热点新闻
  • 网站建设与维护 电子版怎么制作网页推广
  • 广东门户网站建设百度网站推广排名
  • 商业网站建设案例seo排名规则
  • 一流的江苏网站建设二级域名和一级域名优化难度
  • 不会代码可以做网站维护吗整站优化
  • pc网站自动生成app搜索引擎调词工具
  • 白云移动网站建设谷歌chrome官网
  • 哈尔滨网页设计师人才招聘西安网站seo技术厂家
  • 建设部资质申报网站2022网站快速收录技术
  • 高性能网站建设指南在线阅读企业qq官方下载
  • 网页设计论文目录郑州网站运营专业乐云seo
  • 哪种编程语言可以做网站河北疫情最新情况
  • 免费建网站抚顺产品推广哪个平台好
  • ui中国设计网站页面百度 站长工具
  • 做百度网站费用多少电商培训基地
  • 网站页面那个图怎么做网页优化seo公司
  • 一个网站做局打水网络营销包括哪些
  • 工信部网站备案举报万网官网域名注册
  • 可以兼职做翻译的网站或app全部列表支持安卓浏览器软件下载
  • 工厂做哪个网站好站长综合查询工具
  • 网站上滚动海报怎么做域名购买平台
  • 一个网站开发流程上百度首页
  • 织梦网站模板百度搜索广告
  • 建e网模型优化网站视频
  • 苏州制作网站的公司哪家好seo基本步骤
  • 镇江网站建设个杭州千锋教育地址