14.06.2023

This commit is contained in:
Plotnikov
2023-06-14 18:08:32 +03:00
parent b0a0566f19
commit bdf6eab9ec
221 changed files with 203557 additions and 585 deletions

View File

@@ -0,0 +1,46 @@
#include "splashform.h"
#include "ui_splashform.h"
#include <QDesktopWidget>
#include <qdebug.h>
#include <QMessageBox>
SplashForm::SplashForm(QWidget *parent) :
QDialog(parent),
ui(new Ui::SplashForm)
{
ui->setupUi(this);
QDesktopWidget desktop;
QRect rect = desktop.availableGeometry(this);
QPoint center = rect.center();
int x = center.x() - (width()/2);
int y = center.y() - (height()/2);
center.setX(x); center.setY(y);
this->move(center);
this->setWindowFlag(Qt::SplashScreen, true);
this->setWindowFlag(Qt::WindowStaysOnTopHint, true);
}
SplashForm::~SplashForm()
{
delete ui;
}
void SplashForm::Reset() {
ui->progressBar->setValue(100);
ui->lblTitle->setText("Задумались...");
}
void SplashForm::Step() {
if(ui->progressBar->value() >= 100)
ui->progressBar->setValue(0);
else
ui->progressBar->setValue(ui->progressBar->value()+1);
}
void SplashForm::SetTitle(QString title) {
ui->lblTitle->setText(title);
}
void SplashForm::ErrMessage(QString title, QString msg) {
QMessageBox::critical(this,title,msg,QMessageBox::Ok);
}