mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
feat: add version container
This commit is contained in:
@@ -8,22 +8,20 @@ UpdateNotifyWidget::UpdateNotifyWidget(QWidget *) :
|
||||
ui(new Ui::UpdateNotifyWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowFlag(Qt::FramelessWindowHint);
|
||||
setAttribute(Qt::WA_ShowModal,true);
|
||||
// setWindowFlag(Qt::FramelessWindowHint);
|
||||
// setAttribute(Qt::WA_ShowModal,true);
|
||||
}
|
||||
|
||||
void UpdateNotifyWidget::initialize(MainWindow *mainWindow)
|
||||
void UpdateNotifyWidget::initialize(MainWindow *mainWindow,VersionContainer *verContainer)
|
||||
{
|
||||
this->mainWindow = mainWindow;
|
||||
this->versionContainer = verContainer;
|
||||
currentLoadingCount = 0;
|
||||
hide();
|
||||
|
||||
auto pos = mainWindow->pos();
|
||||
pos.setY(pos.y() + 40);
|
||||
move(pos);
|
||||
// auto point = mainWindow->pos();
|
||||
// point.setY(point.y() + 100);
|
||||
// mapToParent(point);
|
||||
}
|
||||
|
||||
void UpdateNotifyWidget::addToList(FileData fileData)
|
||||
@@ -48,6 +46,12 @@ void UpdateNotifyWidget::showWithFill()
|
||||
|
||||
void UpdateNotifyWidget::on_loadToServerButton_clicked()
|
||||
{
|
||||
if(versionContainer->getServerVersion() == baseNamePackage)
|
||||
{
|
||||
showWarning("В базовую версию загрузка невозможна!");
|
||||
return;
|
||||
}
|
||||
|
||||
mainWindow->loadToServer();
|
||||
}
|
||||
|
||||
@@ -61,12 +65,15 @@ void UpdateNotifyWidget::on_startWithCurrentChangesButton_clicked()
|
||||
mainWindow->startUnityClient();
|
||||
}
|
||||
|
||||
void UpdateNotifyWidget::setButtonWidget(InstructorButtonGroupWidget *widget)
|
||||
void UpdateNotifyWidget::showWarning(QString text)
|
||||
{
|
||||
//ui->ButtonsLayout->addWidget(widget,0,Qt::AlignTop);
|
||||
QMessageBox warning;
|
||||
warning.setText(text);
|
||||
warning.setIcon(QMessageBox::Warning);
|
||||
warning.setWindowTitle(tr("Ошибка"));
|
||||
warning.exec();
|
||||
}
|
||||
|
||||
|
||||
UpdateNotifyWidget::~UpdateNotifyWidget()
|
||||
{
|
||||
delete ui;
|
||||
|
||||
Reference in New Issue
Block a user