2017-09-05 18:07:05 +08:00
|
|
|
|
#include "qqtwindow.h"
|
|
|
|
|
#include "ui_qqtwindow.h"
|
2018-04-22 16:17:15 +08:00
|
|
|
|
#include "qqtobjectmanager.h"
|
2017-10-22 12:21:19 +08:00
|
|
|
|
#include "qqt-qt.h"
|
2017-09-05 18:07:05 +08:00
|
|
|
|
#include "qqtcore.h"
|
|
|
|
|
#include "qqtwidgets.h"
|
|
|
|
|
#include "qqtanimation.h"
|
2018-04-22 16:17:15 +08:00
|
|
|
|
#include "qqtobjectmanager.h"
|
2017-09-05 18:07:05 +08:00
|
|
|
|
#include "animationmanager.h"
|
|
|
|
|
|
2019-07-13 23:00:17 +08:00
|
|
|
|
QQTWindow::QQTWindow ( QWidget* parent ) :
|
|
|
|
|
QStackedWidget ( parent ),
|
|
|
|
|
ui ( new Ui::QQTWindow )
|
2017-09-05 18:07:05 +08:00
|
|
|
|
{
|
2019-07-13 23:00:17 +08:00
|
|
|
|
ui->setupUi ( this );
|
2017-09-05 18:07:05 +08:00
|
|
|
|
|
2017-10-20 19:28:52 +08:00
|
|
|
|
#ifdef __EMBEDDED_LINUX__
|
2017-09-05 18:07:05 +08:00
|
|
|
|
/*
|
|
|
|
|
* 这里只要frameless足够
|
|
|
|
|
*/
|
2019-07-13 23:00:17 +08:00
|
|
|
|
setWindowFlags ( Qt::FramelessWindowHint );
|
2017-09-05 18:07:05 +08:00
|
|
|
|
/*
|
|
|
|
|
* 控件背景透明,显示设置的图片背景或者下一级背景。
|
|
|
|
|
*/
|
2019-07-13 23:00:17 +08:00
|
|
|
|
setAttribute ( Qt::WA_TranslucentBackground, true );
|
2017-09-05 18:07:05 +08:00
|
|
|
|
#endif
|
2019-07-13 23:00:17 +08:00
|
|
|
|
setFixedSize ( 1024, 600 );
|
|
|
|
|
moveCenter ( this );
|
|
|
|
|
|
|
|
|
|
QPropertyAnimation* animation = new QPropertyAnimation ( this, "windowOpacity" );
|
|
|
|
|
animation->setDuration ( 1000 );
|
|
|
|
|
animation->setStartValue ( 0 );
|
|
|
|
|
animation->setEndValue ( 1 );
|
|
|
|
|
animation->start();
|
|
|
|
|
|
|
|
|
|
pline() << ui->pushButton->objectName();
|
|
|
|
|
pline() << ui->pushButton_2->objectName();
|
|
|
|
|
pline() << ui->pushButton_3->objectName();
|
|
|
|
|
pline() << ui->pushButton_4->objectName();
|
|
|
|
|
pline() << ui->pushButton_5->objectName();
|
|
|
|
|
pline() << ui->pushButton_6->objectName();
|
2017-09-05 18:07:05 +08:00
|
|
|
|
|
2019-07-13 23:00:17 +08:00
|
|
|
|
QQtObjectManager::registerObject ( this );
|
|
|
|
|
QQtObjectManager::registerObject ( ui->pushButton );
|
|
|
|
|
QQtObjectManager::registerObject ( ui->pushButton_2 );
|
|
|
|
|
QQtObjectManager::registerObject ( ui->pushButton_3 );
|
|
|
|
|
QQtObjectManager::registerObject ( ui->pushButton_4 );
|
|
|
|
|
QQtObjectManager::registerObject ( ui->pushButton_5 );
|
|
|
|
|
QQtObjectManager::registerObject ( ui->pushButton_6 );
|
2017-09-05 18:07:05 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2017-11-21 23:12:29 +08:00
|
|
|
|
* @brief QQtAnimationManager::Instance
|
2017-09-05 18:07:05 +08:00
|
|
|
|
* 开启或者关闭动画
|
|
|
|
|
*/
|
2019-07-13 23:00:17 +08:00
|
|
|
|
AnimationManager::Instance ( this );
|
2017-09-05 18:07:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QQTWindow::~QQTWindow()
|
|
|
|
|
{
|
|
|
|
|
delete ui;
|
|
|
|
|
}
|