当前位置: 首页 > 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.yayakq.cn/news/617808/

相关文章:

  • 南京网站建设哪家专业苏州网站制作排名优化
  • 用html网站登录界面怎么做做网站的微信号
  • 网站建设中成本怎么描述html网站制作模板
  • 有什么好的提供外链网站网站一般要设计几页
  • 做内贸注册什么网站中山网站制作策划
  • 视频网站的服务器建设网站是哪个建站公司做的
  • wamp 做网站发布网站负责人可以备案
  • 网站建设的毕设报告广州网站建设方案案例
  • 慈利网站开发网站怎么做详情页
  • 分析网站规划建设目标做网络销售保温材料用什么网站好
  • 企业网站开发价格设计 p网站
  • 做网站被骗去哪投诉电子商务网站建设步骤
  • 网站 单页软件平台公司
  • 最专业的企业营销型网站建设外链查询
  • 网站开发实现本地注册登录北京建商城网站
  • 南宁企业建站程序破解php网站后台密码
  • 长春网站建设网诚传媒wap网站建设开发
  • 桐乡市建设局官方网站shopxo开源商城
  • wordpress整站备份大连网站建设过程
  • 收录好的博客网站吗宝坻区建设路小学网站
  • 凡科建站可以做几个网站大数据技术就业和发展前景
  • 南阳旅游网站建设现状给公司建网站 深圳
  • 手机数码网站怎么切页面做网站
  • 中国有几大网站网站优化 pdf
  • 网站设计制作的服务好不好网络推广渠道和方法
  • 建设电影推荐网站的项目背景珠海做网站
  • 如何解决网站兼容性问题做钓鱼网站教程视频教程
  • dede 电商网站模板上海电子商务网站制作
  • o2o网站开发价格微信网站平台建设方案
  • 网站建设与seo网站关键词从哪改