mylogo.cpp
来自「图形软件,用QT编写的,可以用来学习软件的」· C++ 代码 · 共 74 行
CPP
74 行
/************************************************************************************************************************************************************** **** equal III the graphic builder **** **** Copyright (C) 2003 Oleksiy Pylypenko **** **** This file may be distributed and/or modified under the terms of the **** GNU General Public License version 2 as published by the Free Software **** Foundation and appearing in the file license included in the **** packaging of this file. **** **** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE **** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. **** **** Contact earthman@inbox.ru if any conditions of this licensing are **** not clear to you. **** **** ********************************************************************************* *****************************************************************************/#include <qlayout.h>#include <qlabel.h>#include <qvalidator.h>#include <qtimer.h>#include "mylogo.h"#include "xpms.h"#include <qpainter.h>#include "logo.h" myLogo::myLogo( QWidget *parent) : QDialog( parent,0,TRUE,WStyle_Customize | WStyle_NoBorder){ QByteArray a; a.setRawData( logo_png, sizeof(logo_png) ); alogo.loadFromData(a); a.resetRawData( logo_png, sizeof(logo_png) ); resize(alogo.size()); QTimer *atimer = new QTimer(this); connect(atimer,SIGNAL(timeout()),SLOT(accept())); atimer->start(3000,TRUE); setIcon(QPixmap(equal3)); setCaption(tr("equal III")); } bool myLogo::event(QEvent *e){ switch(e->type()){ case(QEvent::MouseButtonRelease): case(QEvent::KeyRelease): done(0); return TRUE; break; default: ; } return QDialog::event(e);}void myLogo::paintEvent( QPaintEvent * /* event */ ){ QPainter p; p.begin( this ); p.drawPixmap(QPoint(0,0),alogo); p.end();}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?