mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
36 lines
674 B
C++
36 lines
674 B
C++
#include "waitanimationwidget.h"
|
|
#include "ui_waitanimationwidget.h"
|
|
|
|
WaitAnimationWidget::WaitAnimationWidget(QWidget *parent) :
|
|
QWidget(parent),
|
|
ui(new Ui::WaitAnimationWidget),
|
|
loadingMovie(nullptr)
|
|
{
|
|
ui->setupUi(this);
|
|
}
|
|
|
|
void WaitAnimationWidget::initialize(QMovie *movie,QWidget *parent)
|
|
{
|
|
ui->MovieLabel->setMovie(movie);
|
|
loadingMovie = movie;
|
|
setFixedSize(parent->width(),parent->height());
|
|
hide();
|
|
}
|
|
|
|
void WaitAnimationWidget::showWithPlay()
|
|
{
|
|
show();
|
|
loadingMovie->start();
|
|
}
|
|
|
|
void WaitAnimationWidget::hideWithStop()
|
|
{
|
|
hide();
|
|
loadingMovie->stop();
|
|
}
|
|
|
|
WaitAnimationWidget::~WaitAnimationWidget()
|
|
{
|
|
delete ui;
|
|
}
|