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

高端网站定制开发设计制作做网站都要多少钱

高端网站定制开发设计制作,做网站都要多少钱,制作网站能赚钱吗,网页设计和网站设计网页右下角上经常会出现一些提示性的信息,B/S有的东西,C/S当然也可以有,就像QQ的消息提示一样! 实现一个类似的东西并不困难,只要想明白原理实现起来就很简单了! 实现原理: (1&#…

网页右下角上经常会出现一些提示性的信息,B/S有的东西,C/S当然也可以有,就像QQ的消息提示一样! 实现一个类似的东西并不困难,只要想明白原理实现起来就很简单了! 实现原理: (1)显示:右下角缓慢弹出,定时器启动,逐渐改变位置即可,到达相应位置,停止计时器

(2)驻留:定时器启动,让界面停留一定的时间,相应的时间过后停止定时器

(3)退出:可以直接退出,也可以采用改变透明度的形式模糊退出

标题栏:
#include "message_title.h"
#include "setting.h"
MessageTitle::MessageTitle(QWidget *parent): QWidget(parent)
{setFixedHeight(30);title_label = new QLabel();close_button = new PushButton();layout = new QHBoxLayout();  title_label->setObjectName(QString::fromUtf8("labelOne"));QFont title_font = title_label->font();title_font.setBold(true);title_label->setFont(title_font);close_button->loadPixmap("tipclose");close_button->setToolTip(tr("close"));layout->addWidget(title_label);layout->addStretch();layout->addWidget(close_button);layout->setMargin(0);setLayout(layout);connect(close_button, SIGNAL(clicked()), this, SIGNAL(myClose()));
}
void MessageTitle::paintEvent(QPaintEvent *)
{QLinearGradient linear(rect().topLeft(), rect().bottomRight());linear.setColorAt(0, QColor(55, 135, 215));linear.setColorAt(0.5, QColor(140, 120, 185));linear.setColorAt(1, QColor(55, 135, 215));QPainter painter(this);painter.setBrush(QBrush(linear));painter.setPen(Qt::NoPen);painter.drawRect(rect());
}
void MessageTitle::setTitleText(QString title)
{title_label->setText(title);
} 
弹出框界面:#include "message_widget.h"MessageWidget::MessageWidget(QWidget *parent): QWidget(parent)
{setFixedSize(300, 180);setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);message_title = new MessageTitle();content_label = new QLabel();icon_label = new QLabel();timer_show = new QTimer(this);timer_stay = new QTimer(this);timer_close = new QTimer(this);time_count = 0;transparent = 1.0;desktop_height = QApplication::desktop()->height();icon_label->setFixedSize(64, 64);content_label->setWordWrap(true);content_label->setAlignment(Qt::AlignTop);QVBoxLayout *v_layout = new QVBoxLayout();v_layout->addWidget(icon_label);v_layout->addStretch();QVBoxLayout *v_layout2 = new QVBoxLayout();QSpacerItem *spacerItem = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum);v_layout2->addSpacerItem(spacerItem);v_layout2->addWidget(content_label);QHBoxLayout *h_layout = new QHBoxLayout();h_layout->addLayout(v_layout);h_layout->addLayout(v_layout2);QMargins margins = h_layout->contentsMargins();margins.setTop(20);margins.setLeft(10);margins.setRight(10);h_layout->setContentsMargins(margins);QVBoxLayout *main_layout = new QVBoxLayout();main_layout->setMargin(0);main_layout->addWidget(message_title);main_layout->addLayout(h_layout);setLayout(main_layout);connect(timer_show, SIGNAL(timeout()), this, SLOT(myMove()));connect(timer_stay, SIGNAL(timeout()), this, SLOT(myStay()));connect(timer_close, SIGNAL(timeout()), this, SLOT(myClose()));connect(message_title, SIGNAL(myClose()), this, SLOT(close()));
}void MessageWidget::showMsg(QString title, QString content)
{QPixmap pixmap(":/icon/win");icon_label->setPixmap(pixmap);message_title->setTitleText(" " + title);content_label->setText(" " + content);this->showMessage();
}void MessageWidget::paintEvent(QPaintEvent *)
{QBitmap bitmap(this->size());bitmap.fill(Qt::white);QPainter painter(this);painter.setBrush(QBrush(QColor(250, 240, 230)));painter.setPen(QPen(QBrush(QColor(55, 135, 215)), 6));painter.drawRoundedRect(bitmap.rect(), 5, 5);setMask(bitmap);
}
void MessageWidget::showMessage()
{time_count = 0;transparent = 1.0;desktop_height = QApplication::desktop()->height();timer_show->stop();timer_stay->stop();timer_close->stop();setWindowOpacity(1);QDesktopWidget *desktop = QApplication::desktop();desk_rect = desktop->availableGeometry();normal_point.setX(desk_rect.width() - rect().width());normal_point.setY(desk_rect.height() - rect().height());move(normal_point.x(), normal_point.y());showNormal();timer_show->start(5);
}void MessageWidget::myMove()
{desktop_height--;move(normal_point.x(), desktop_height);if(desktop_height <= normal_point.y()){timer_show->stop();timer_stay->start(1000);}
}void MessageWidget::myStay()
{time_count++;if(time_count >= 9){timer_stay->stop();timer_close->start(200);}
}void MessageWidget::myClose()
{transparent -= 0.1;if(transparent <= 0.0){timer_close->stop();this->close();}else{setWindowOpacity(transparent);}   
}

http://www.15wanjia.com/news/179818.html

相关文章:

  • soho的外贸网站搜索引擎yandex入口
  • 怎么增加网站反链深圳东门老街
  • 国产做爰网站视频网站logo怎么做的
  • 邵阳优秀网站建设mui做的h5网站案例
  • 万全做网站wl17581营销型网站建设的意义
  • 做a视频网站拓者吧官网
  • 绘本馆借阅网站开发无锡网站建设专家
  • 百度网站v2升级到v3怎么做企业系统管理平台
  • 网站开发协议合作个人建设网站论文
  • 网站备案ftp密码广州新闻最新消息10条
  • 河北省建设部网站网站开发前台开发
  • 舟山企业网站建设公司企业网站建设感想
  • 杭州制作网站的公司简介wordpress优化教程
  • 重庆企业免费建站免费素材网站素材库
  • 上海建设厅焊工证查询网站国际贸易综合服务平台
  • 淘宝优惠劵做网站模版开发一个平台app需要多少钱
  • 电子商务网站建设新手企业网站设计好的缺点有哪些
  • 公司网站页脚专做耐克阿迪鞋网站
  • php企业网站模板下载自己制作的网站上传到服务器后怎么原来的网页没有变
  • 化纤公司网站建设上海网站建设开发公司
  • 农村建设集团有限公司网站首页电商网站建设效果
  • 网站后台怎么修改文字海口网站开发
  • 山东省住房和城乡建设厅网站定额站wordpress清空文章备份并对齐id
  • 微网站开发教材镇江金山网镇江新闻
  • 海外制作网站如何由网页生成网站
  • 河南企起网站建设网站怎么做排名呢
  • 有多人做网站是个人备案做求职网站
  • 北京国际建设集团网站wordpress主题 路径
  • 东莞微信网站建设咨询沈阳网站建设策划
  • 襄阳网络公司 网站建设西宁网站建设企业