ref: segregate animation screen

This commit is contained in:
semenov
2024-12-28 10:50:26 +03:00
parent f444b48892
commit 43d0a48593
28 changed files with 1012 additions and 175 deletions

View File

@@ -0,0 +1,33 @@
#include "waitanimationwidget.h"
#include "ui_waitanimationwidget.h"
WaitAnimationWidget::WaitAnimationWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::WaitAnimationWidget),
loadingMovie(nullptr)
{
ui->setupUi(this);
}
void WaitAnimationWidget::setMovie(QMovie *movie)
{
ui->MovieLabel->setMovie(movie);
loadingMovie = movie;
}
void WaitAnimationWidget::showWithPlay()
{
show();
loadingMovie->start();
}
void WaitAnimationWidget::hideWithStop()
{
hide();
loadingMovie->stop();
}
WaitAnimationWidget::~WaitAnimationWidget()
{
delete ui;
}

View File

@@ -0,0 +1,27 @@
#ifndef WAITANIMATIONWIDGET_H
#define WAITANIMATIONWIDGET_H
#include <QMovie>
#include <QWidget>
namespace Ui {
class WaitAnimationWidget;
}
class WaitAnimationWidget : public QWidget
{
Q_OBJECT
public:
explicit WaitAnimationWidget(QWidget *parent = nullptr);
void setMovie(QMovie *movie);
void showWithPlay();
void hideWithStop();
~WaitAnimationWidget();
private:
Ui::WaitAnimationWidget *ui;
QMovie *loadingMovie;
};
#endif // WAITANIMATIONWIDGET_H

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>WaitAnimationWidget</class>
<widget class="QWidget" name="WaitAnimationWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>40</y>
<width>801</width>
<height>561</height>
</rect>
</property>
<layout class="QHBoxLayout" name="mainLayout">
<item>
<widget class="QLabel" name="MovieLabel">
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/resource/Icons/762.gif</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources>
<include location="../resources.qrc"/>
</resources>
<connections/>
</ui>