mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
ref: segregate animation screen
This commit is contained in:
33
Widgets/waitanimationwidget.cpp
Normal file
33
Widgets/waitanimationwidget.cpp
Normal 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;
|
||||
}
|
||||
27
Widgets/waitanimationwidget.h
Normal file
27
Widgets/waitanimationwidget.h
Normal 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
|
||||
58
Widgets/waitanimationwidget.ui
Normal file
58
Widgets/waitanimationwidget.ui
Normal 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>
|
||||
Reference in New Issue
Block a user