mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
ref: segregate systems, codestyle, busy message
This commit is contained in:
104
Widgets/commonbuttongroupwidget.cpp
Normal file
104
Widgets/commonbuttongroupwidget.cpp
Normal file
@@ -0,0 +1,104 @@
|
||||
#include "commonbuttongroupwidget.h"
|
||||
#include "ui_commonbuttongroupwidget.h"
|
||||
|
||||
CommonButtonGroupWidget::CommonButtonGroupWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::CommonButtonGroupWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
void CommonButtonGroupWidget::initialize(MainWindow *mainWindow,ExternalExecuter *extExec,SendSystem *sendSystem,TCPClient *client)
|
||||
{
|
||||
externalExecuter = extExec;
|
||||
this->sendSystem = sendSystem;
|
||||
this->mainWindow = mainWindow;
|
||||
ui->loadingProgressBar->setValue(0);
|
||||
ui->loadingProgressBar->hide();
|
||||
ui->updateButton->hide();
|
||||
ui->startButton->hide();
|
||||
ui->startButton->setEnabled(false);
|
||||
|
||||
|
||||
connect(this,&CommonButtonGroupWidget::sigSendCommand,client,&TCPClient::slotSendCommand,Qt::AutoConnection);
|
||||
connect(this,&CommonButtonGroupWidget::sigSendXMLAnswer,sendSystem,&SendSystem::xmlAnswer,Qt::DirectConnection);
|
||||
}
|
||||
|
||||
void CommonButtonGroupWidget::updateProgressBar(float value)
|
||||
{
|
||||
ui->loadingProgressBar->setValue(value);
|
||||
}
|
||||
|
||||
void CommonButtonGroupWidget::loadCompleteState()
|
||||
{
|
||||
ui->updateButton->setEnabled(false);
|
||||
ui->startButton->setEnabled(true);
|
||||
ui->loadingProgressBar->setValue(100);
|
||||
ui->startButton->show();
|
||||
ui->loadingProgressBar->hide();
|
||||
}
|
||||
|
||||
void CommonButtonGroupWidget::lastVerInstalledState()
|
||||
{
|
||||
show();
|
||||
ui->updateButton->hide();
|
||||
ui->loadingProgressBar->hide();
|
||||
ui->startButton->show();
|
||||
}
|
||||
|
||||
void CommonButtonGroupWidget::disconnectState()
|
||||
{
|
||||
ui->startButton->hide();
|
||||
ui->loadingProgressBar->hide();
|
||||
ui->updateButton->hide();
|
||||
ui->updateButton->setEnabled(false);
|
||||
}
|
||||
|
||||
void CommonButtonGroupWidget::startUpdateState()
|
||||
{
|
||||
ui->updateButton->hide();
|
||||
ui->startButton->hide();
|
||||
ui->loadingProgressBar->setValue(0);
|
||||
ui->loadingProgressBar->show();
|
||||
}
|
||||
|
||||
void CommonButtonGroupWidget::showProgressBar(bool flag)
|
||||
{
|
||||
if (flag) ui->loadingProgressBar->show();
|
||||
else ui->loadingProgressBar->hide();
|
||||
}
|
||||
|
||||
void CommonButtonGroupWidget::needUpdateState(bool flag)
|
||||
{
|
||||
ui->startButton->show();
|
||||
ui->updateButton->setEnabled(flag);
|
||||
ui->startButton->setEnabled(externalExecuter->findApp());
|
||||
ui->updateButton->show();
|
||||
}
|
||||
|
||||
void CommonButtonGroupWidget::startButtonActive(bool flag)
|
||||
{
|
||||
ui->startButton->setEnabled(flag);
|
||||
}
|
||||
|
||||
void CommonButtonGroupWidget::on_updateButton_clicked()
|
||||
{
|
||||
emit sigSendCommand("update");
|
||||
startUpdateState();
|
||||
mainWindow->disableUnsaveButton(true);
|
||||
}
|
||||
|
||||
void CommonButtonGroupWidget::on_startButton_clicked()
|
||||
{
|
||||
externalExecuter->callApp();
|
||||
emit sigSendXMLAnswer("DISABLE");
|
||||
}
|
||||
|
||||
CommonButtonGroupWidget::~CommonButtonGroupWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
49
Widgets/commonbuttongroupwidget.h
Normal file
49
Widgets/commonbuttongroupwidget.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#ifndef COMMONBUTTONGROUPWIDGET_H
|
||||
#define COMMONBUTTONGROUPWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <Core/tcpclient.h>
|
||||
|
||||
namespace Ui {
|
||||
class CommonButtonGroupWidget;
|
||||
}
|
||||
|
||||
class TCPClient;
|
||||
class ExternalExecuter;
|
||||
class SendSystem;
|
||||
|
||||
class CommonButtonGroupWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CommonButtonGroupWidget(QWidget *parent = nullptr);
|
||||
void initialize(MainWindow *mainWindow,ExternalExecuter *extExec,SendSystem *sendSystem,TCPClient *client);
|
||||
void loadCompleteState();
|
||||
void lastVerInstalledState();
|
||||
void disconnectState();
|
||||
void startUpdateState();
|
||||
void showProgressBar(bool flag);
|
||||
void needUpdateState(bool flag);
|
||||
void startButtonActive(bool flag);
|
||||
~CommonButtonGroupWidget();
|
||||
|
||||
signals:
|
||||
void sigSendCommand(QString command);
|
||||
void sigSendXMLAnswer(QString answer);
|
||||
|
||||
private slots:
|
||||
void on_updateButton_clicked();
|
||||
void on_startButton_clicked();
|
||||
|
||||
public:
|
||||
void updateProgressBar(float value);
|
||||
|
||||
private:
|
||||
Ui::CommonButtonGroupWidget *ui;
|
||||
MainWindow *mainWindow;
|
||||
ExternalExecuter *externalExecuter;
|
||||
SendSystem *sendSystem;
|
||||
};
|
||||
|
||||
#endif // COMMONBUTTONGROUPWIDGET_H
|
||||
166
Widgets/commonbuttongroupwidget.ui
Normal file
166
Widgets/commonbuttongroupwidget.ui
Normal file
@@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CommonButtonGroupWidget</class>
|
||||
<widget class="QWidget" name="CommonButtonGroupWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>520</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>520</width>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="downLayout" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>520</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>520</width>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="downlayout">
|
||||
<property name="spacing">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="loadingProgressBar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="updateButton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>2000</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Calibri</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Обновить</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="startButton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>2000</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Запуск</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
97
Widgets/entrywidget.cpp
Normal file
97
Widgets/entrywidget.cpp
Normal file
@@ -0,0 +1,97 @@
|
||||
#include "entrywidget.h"
|
||||
#include "ui_entrywidget.h"
|
||||
|
||||
EntryWidget::EntryWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::EntryWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
void EntryWidget::initialize(MainWindow *mainWindow)
|
||||
{
|
||||
ui->settingsWidget->hide();
|
||||
ui->offlineWidget->hide();
|
||||
ui->loginWidget->hide();
|
||||
this->mainWindow = mainWindow;
|
||||
|
||||
}
|
||||
|
||||
void EntryWidget::connectionEmptyState()
|
||||
{
|
||||
show();
|
||||
ui->offlineWidget->show();
|
||||
ui->loginWidget->hide();
|
||||
ui->settingsWidget->hide();
|
||||
}
|
||||
|
||||
void EntryWidget::settingsState()
|
||||
{
|
||||
ui->settingsWidget->show();
|
||||
ui->loginWidget->hide();
|
||||
ui->offlineWidget->hide();
|
||||
}
|
||||
|
||||
bool EntryWidget::isLoginFieldsFill()
|
||||
{
|
||||
return ui->loginInputField->text().length() <= 0 || ui->passwordInputField->text() <= 0;
|
||||
}
|
||||
|
||||
ClientAutorization* EntryWidget::getAuthData()
|
||||
{
|
||||
ClientAutorization *data = new ClientAutorization;
|
||||
QString username = ui->loginInputField->text();
|
||||
QString password = ui->passwordInputField->text();
|
||||
data->Login = username;
|
||||
data->Password = password;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ServerSettings *EntryWidget::getServerSettings()
|
||||
{
|
||||
ServerSettings *data = new ServerSettings;
|
||||
QString server = ui->serverInputField->text();
|
||||
QString port = ui->portInputField->text();
|
||||
|
||||
data->Address = server;
|
||||
data->Port = port;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void EntryWidget::loginIsActive(bool flag)
|
||||
{
|
||||
if(flag) ui->loginWidget->show();
|
||||
else ui->loginWidget->hide();
|
||||
}
|
||||
|
||||
void EntryWidget::settingsWidgetIsActive(bool flag)
|
||||
{
|
||||
if(flag) ui->settingsWidget->show();
|
||||
else ui->settingsWidget->hide();
|
||||
}
|
||||
|
||||
void EntryWidget::fillSettings(ServerSettings *settings)
|
||||
{
|
||||
ui->serverInputField->setText(settings->Address);
|
||||
ui->portInputField->setText(settings->Port);
|
||||
}
|
||||
|
||||
void EntryWidget::on_loginButton_clicked()
|
||||
{
|
||||
mainWindow->login();
|
||||
}
|
||||
|
||||
void EntryWidget::on_saveServerButton_clicked()
|
||||
{
|
||||
mainWindow->saveServerSettingsWithConnect();
|
||||
}
|
||||
|
||||
EntryWidget::~EntryWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
|
||||
39
Widgets/entrywidget.h
Normal file
39
Widgets/entrywidget.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef ENTRYWIDGET_H
|
||||
#define ENTRYWIDGET_H
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include <QWidget>
|
||||
#include <Data/Datas.h>
|
||||
|
||||
namespace Ui {
|
||||
class EntryWidget;
|
||||
}
|
||||
|
||||
class EntryWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit EntryWidget(QWidget *parent = nullptr);
|
||||
void initialize(MainWindow *mainWindow);
|
||||
void connectionEmptyState();
|
||||
void settingsState();
|
||||
bool isLoginFieldsFill();
|
||||
ClientAutorization* getAuthData();
|
||||
ServerSettings* getServerSettings();
|
||||
void loginIsActive(bool flag);
|
||||
void settingsWidgetIsActive(bool flag);
|
||||
void fillSettings(ServerSettings *settings);
|
||||
~EntryWidget();
|
||||
|
||||
private slots:
|
||||
void on_loginButton_clicked();
|
||||
|
||||
void on_saveServerButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::EntryWidget *ui;
|
||||
MainWindow *mainWindow;
|
||||
};
|
||||
|
||||
#endif // ENTRYWIDGET_H
|
||||
332
Widgets/entrywidget.ui
Normal file
332
Widgets/entrywidget.ui
Normal file
@@ -0,0 +1,332 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>EntryWidget</class>
|
||||
<widget class="QWidget" name="EntryWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>173</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="horizontalWidget" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>801</width>
|
||||
<height>181</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="loginWidget" native="true">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="loginTitle">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Вход в систему</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="loginInputField">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>230</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Логин</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="passwordInputField">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>230</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Пароль</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="loginButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>230</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Войти</string>
|
||||
</property>
|
||||
<property name="isGreen" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="offlineWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="offlineNotifyLabel">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Связь с сервером не установлена! Проверьте настройки или запустите в автономном режиме</string>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignHCenter|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="settingsWidget" native="true">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="serverSettingsTitle">
|
||||
<property name="text">
|
||||
<string>Настройки сервера</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="serverInputLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="serverInputField">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Сервер</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="portInputLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="portInputField">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Порт</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="saveServerButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Сохранить</string>
|
||||
</property>
|
||||
<property name="blueButton" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
41
Widgets/instructorbuttongroupwidget.cpp
Normal file
41
Widgets/instructorbuttongroupwidget.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#include "instructorbuttongroupwidget.h"
|
||||
#include "ui_instructorbuttongroupwidget.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
InstructorButtonGroupWidget::InstructorButtonGroupWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::InstructorButtonGroupWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
void InstructorButtonGroupWidget::initialize(MainWindow *mainWindow)
|
||||
{
|
||||
this->mainWindow = mainWindow;
|
||||
hide();
|
||||
}
|
||||
|
||||
void InstructorButtonGroupWidget::on_loadToServerButton_clicked()
|
||||
{
|
||||
mainWindow->loadToServer();
|
||||
}
|
||||
|
||||
void InstructorButtonGroupWidget::on_undoChangesButton_clicked()
|
||||
{
|
||||
mainWindow->undoCurrentChanges();
|
||||
}
|
||||
|
||||
void InstructorButtonGroupWidget::on_startWithCurrentChangesButton_clicked()
|
||||
{
|
||||
mainWindow->startUnityClient();
|
||||
}
|
||||
|
||||
|
||||
|
||||
InstructorButtonGroupWidget::~InstructorButtonGroupWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
35
Widgets/instructorbuttongroupwidget.h
Normal file
35
Widgets/instructorbuttongroupwidget.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef INSTRUCTORBUTTONGROUPWIDGET_H
|
||||
#define INSTRUCTORBUTTONGROUPWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "mainwindow.h"
|
||||
|
||||
namespace Ui {
|
||||
class InstructorButtonGroupWidget;
|
||||
}
|
||||
|
||||
class MainWindow;
|
||||
|
||||
class InstructorButtonGroupWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit InstructorButtonGroupWidget(QWidget *parent = nullptr);
|
||||
void initialize(MainWindow *mainWindow);
|
||||
|
||||
~InstructorButtonGroupWidget();
|
||||
|
||||
private slots:
|
||||
void on_loadToServerButton_clicked();
|
||||
|
||||
void on_undoChangesButton_clicked();
|
||||
|
||||
void on_startWithCurrentChangesButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::InstructorButtonGroupWidget *ui;
|
||||
MainWindow *mainWindow;
|
||||
};
|
||||
|
||||
#endif // INSTRUCTORBUTTONGROUPWIDGET_H
|
||||
148
Widgets/instructorbuttongroupwidget.ui
Normal file
148
Widgets/instructorbuttongroupwidget.ui
Normal file
@@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>InstructorButtonGroupWidget</class>
|
||||
<widget class="QWidget" name="InstructorButtonGroupWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>520</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>520</width>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="instructorButtonGroup" native="true">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>520</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>520</width>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="updateButtonGroup">
|
||||
<property name="spacing">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="loadToServerButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Выгрузить изменения</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="undoChangesButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отменить изменения</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="startWithCurrentChangesButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Запустить без отправки</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
38
Widgets/newversionwidget.cpp
Normal file
38
Widgets/newversionwidget.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#include "newversionwidget.h"
|
||||
#include "ui_newversionwidget.h"
|
||||
|
||||
NewVersionWidget::NewVersionWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::NewVersionWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(Qt::SubWindow | Qt::FramelessWindowHint | Qt::CustomizeWindowHint );
|
||||
setAttribute(Qt::WA_ShowModal,true);
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
}
|
||||
|
||||
void NewVersionWidget::initialize(VersionSelectWidget *versionSelectWidget, QString prevName)
|
||||
{
|
||||
this->versionSelectWidget = versionSelectWidget;
|
||||
ui->prevVerValue->setText(prevName);
|
||||
}
|
||||
|
||||
|
||||
void NewVersionWidget::on_createButton_clicked()
|
||||
{
|
||||
if(ui->lineEdit->text() != "")
|
||||
{
|
||||
versionSelectWidget->sendCopyEmit(ui->lineEdit->text());
|
||||
hide();
|
||||
}
|
||||
}
|
||||
|
||||
void NewVersionWidget::on_cancelButton_clicked()
|
||||
{
|
||||
hide();
|
||||
}
|
||||
|
||||
NewVersionWidget::~NewVersionWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
31
Widgets/newversionwidget.h
Normal file
31
Widgets/newversionwidget.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef NEWVERSIONWIDGET_H
|
||||
#define NEWVERSIONWIDGET_H
|
||||
|
||||
#include <Widgets/versionselectwidget.h>
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class NewVersionWidget;
|
||||
}
|
||||
|
||||
class VersionSelectWidget;
|
||||
class NewVersionWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit NewVersionWidget(QWidget *parent = nullptr);
|
||||
void initialize(VersionSelectWidget *versionSelectWidget,QString prevName);
|
||||
~NewVersionWidget();
|
||||
|
||||
private slots:
|
||||
void on_createButton_clicked();
|
||||
|
||||
void on_cancelButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::NewVersionWidget *ui;
|
||||
VersionSelectWidget *versionSelectWidget;
|
||||
};
|
||||
|
||||
#endif // NEWVERSIONWIDGET_H
|
||||
245
Widgets/newversionwidget.ui
Normal file
245
Widgets/newversionwidget.ui
Normal file
@@ -0,0 +1,245 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>NewVersionWidget</class>
|
||||
<widget class="QWidget" name="NewVersionWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>310</width>
|
||||
<height>152</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Создать копию...</string>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<widget class="QFrame" name="NewVerBackground">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>311</width>
|
||||
<height>191</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>311</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="baseVerLayout">
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="prevVerTitle">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Базовая версия:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="prevVerValue">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>50</y>
|
||||
<width>311</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="newNameLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="newNameVersionTitle">
|
||||
<property name="text">
|
||||
<string>Новое название:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>100</y>
|
||||
<width>311</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="createButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Создать</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отмена</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
90
Widgets/updatenotifywidget.cpp
Normal file
90
Widgets/updatenotifywidget.cpp
Normal file
@@ -0,0 +1,90 @@
|
||||
#include "updatenotifywidget.h"
|
||||
#include "ui_updatenotifywidget.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
UpdateNotifyWidget::UpdateNotifyWidget(QWidget *) :
|
||||
ui(new Ui::UpdateNotifyWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
// setWindowFlag(Qt::FramelessWindowHint);
|
||||
// setAttribute(Qt::WA_ShowModal,true);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
void UpdateNotifyWidget::addToList(FileData fileData)
|
||||
{
|
||||
QString itemName = fileData.path;
|
||||
itemName = itemName.remove(streamingAssetsPath);
|
||||
ui->updateListWidget->addItem(itemName);
|
||||
}
|
||||
|
||||
void UpdateNotifyWidget::showWithFill()
|
||||
{
|
||||
QString list = tr("Возможные действия:\n"
|
||||
" 1. Выгрузить изменения на сервер\n"
|
||||
" 2. Отменить изменения с загрузкой версии с сервера \n"
|
||||
" 3. Запустить без отправки файлов, но с текущими изменениями");
|
||||
|
||||
|
||||
ui->updateActionListLabel->setText(list);
|
||||
|
||||
show();
|
||||
}
|
||||
|
||||
void UpdateNotifyWidget::on_loadToServerButton_clicked()
|
||||
{
|
||||
if(versionContainer->getServerVersion() == baseNamePackage)
|
||||
{
|
||||
showWarning("В базовую версию загрузка невозможна!");
|
||||
return;
|
||||
}
|
||||
|
||||
mainWindow->loadToServer();
|
||||
}
|
||||
|
||||
void UpdateNotifyWidget::on_undoChangesButton_clicked()
|
||||
{
|
||||
mainWindow->undoCurrentChanges();
|
||||
}
|
||||
|
||||
void UpdateNotifyWidget::on_startWithCurrentChangesButton_clicked()
|
||||
{
|
||||
mainWindow->startUnityClient();
|
||||
}
|
||||
|
||||
void UpdateNotifyWidget::showWarning(QString text)
|
||||
{
|
||||
QMessageBox warning;
|
||||
warning.setText(text);
|
||||
warning.setIcon(QMessageBox::Warning);
|
||||
warning.setWindowTitle(tr("Ошибка"));
|
||||
warning.exec();
|
||||
}
|
||||
|
||||
UpdateNotifyWidget::~UpdateNotifyWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void UpdateNotifyWidget::on_closeButton_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void UpdateNotifyWidget::on_updateActionListLabel_linkActivated(const QString &link)
|
||||
{
|
||||
|
||||
}
|
||||
48
Widgets/updatenotifywidget.h
Normal file
48
Widgets/updatenotifywidget.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#ifndef UPDATENOTIFYWIDGET_H
|
||||
#define UPDATENOTIFYWIDGET_H
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QWidget>
|
||||
|
||||
#include <Data/FileData.h>
|
||||
|
||||
namespace Ui {
|
||||
class UpdateNotifyWidget;
|
||||
}
|
||||
|
||||
class MainWindow;
|
||||
class UpdateController;
|
||||
class InstructorButtonGroupWidget;
|
||||
class VersionContainer;
|
||||
|
||||
class UpdateNotifyWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit UpdateNotifyWidget(QWidget *parent = nullptr);
|
||||
void initialize(MainWindow *mainWindow,VersionContainer *versionContainer);
|
||||
void addToList(FileData fileData);
|
||||
void showWithFill();
|
||||
|
||||
~UpdateNotifyWidget();
|
||||
|
||||
private slots:
|
||||
void on_closeButton_clicked();
|
||||
void on_loadToServerButton_clicked();
|
||||
void on_undoChangesButton_clicked();
|
||||
void on_startWithCurrentChangesButton_clicked();
|
||||
|
||||
void on_updateActionListLabel_linkActivated(const QString &link);
|
||||
|
||||
private:
|
||||
Ui::UpdateNotifyWidget *ui;
|
||||
MainWindow *mainWindow;
|
||||
VersionContainer *versionContainer;
|
||||
int currentLoadingCount;
|
||||
void showWarning(QString text);
|
||||
};
|
||||
|
||||
#endif // UPDATENOTIFYWIDGET_H
|
||||
245
Widgets/updatenotifywidget.ui
Normal file
245
Widgets/updatenotifywidget.ui
Normal file
@@ -0,0 +1,245 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>UpdateNotifyWidget</class>
|
||||
<widget class="QWidget" name="UpdateNotifyWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>560</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="backgroundUpdate">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>801</width>
|
||||
<height>561</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-10</y>
|
||||
<width>801</width>
|
||||
<height>571</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="mainLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="updateListLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="NotificationLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Обнаружены новые файлы:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="updateListWidget">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="updateActionListLabel">
|
||||
<property name="text">
|
||||
<string>text</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="ButtonsLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="instructorButtonGroup" native="true">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>520</width>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="updateButtonGroup">
|
||||
<property name="spacing">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="loadToServerButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Выгрузить изменения</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="undoChangesButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Отменить изменения</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="startWithCurrentChangesButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Запустить без отправки</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="closeButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Закрыть</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
129
Widgets/versionselectwidget.cpp
Normal file
129
Widgets/versionselectwidget.cpp
Normal file
@@ -0,0 +1,129 @@
|
||||
#include "versionselectwidget.h"
|
||||
#include "ui_versionselectwidget.h"
|
||||
#include "ui_versionselectwidget.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
VersionSelectWidget::VersionSelectWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::VersionSelectWidget),
|
||||
selectedVersion(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
void VersionSelectWidget::initialize(SendSystem *sendSystem,VersionContainer *versionContainer)
|
||||
{
|
||||
connect(this,&VersionSelectWidget::sigSendSwitchVersion,sendSystem,&SendSystem::sendChangeVersion,Qt::AutoConnection);
|
||||
connect(this,&VersionSelectWidget::sigSendCopyVersion,sendSystem,&SendSystem::sendCopyVersion,Qt::AutoConnection);
|
||||
connect(this,&VersionSelectWidget::sigSendDeleteVersion,sendSystem,&SendSystem::sendDeleteVersion,Qt::AutoConnection);
|
||||
this->versionContainer = versionContainer;
|
||||
hide();
|
||||
}
|
||||
|
||||
void VersionSelectWidget::fillView(QList<StreamingVersionData *> *serverData)
|
||||
{
|
||||
show();
|
||||
ui->verListView->clear();
|
||||
serverDataList = serverData;
|
||||
ui->verValue->setText(versionContainer->getServerVersionData()->getViewName());
|
||||
|
||||
foreach(StreamingVersionData *data,*serverData)
|
||||
{
|
||||
ui->verListView->addItem(data->getViewName());
|
||||
}
|
||||
}
|
||||
|
||||
void VersionSelectWidget::on_verListView_itemDoubleClicked(QListWidgetItem *item)
|
||||
{
|
||||
foreach(StreamingVersionData *data,*serverDataList)
|
||||
{
|
||||
if(data->getViewName() == item->text())
|
||||
{
|
||||
QString info = "Имя версии: " + data->getViewName() + "\n";
|
||||
info.append("Создан: " + data->getCreateData().toString());
|
||||
ui->infoValue->setText(info);
|
||||
selectedVersion = data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void VersionSelectWidget::on_createDuplicateButton_clicked()
|
||||
{
|
||||
NewVersionWidget *newVersionWidget = new NewVersionWidget;
|
||||
newVersionWidget->initialize(this,selectedVersion->getViewName());
|
||||
newVersionWidget->show();
|
||||
}
|
||||
|
||||
void VersionSelectWidget::sendCopyEmit(QString newName)
|
||||
{
|
||||
QString result = selectedVersion->getViewName() + ";" + newName;
|
||||
|
||||
if (selectedVersion == nullptr)
|
||||
{
|
||||
showWarning(tr("Версия не выбрана"));
|
||||
return;
|
||||
}
|
||||
|
||||
quint16 matchIndex = ui->verListView->findItems(newName,Qt::MatchFlag::MatchFixedString).length();
|
||||
|
||||
if (matchIndex > 0)
|
||||
{
|
||||
showWarning(tr("Версия с таким именем уже существует"));
|
||||
return;
|
||||
}
|
||||
|
||||
versionContainer->setLocalVersionData(selectedVersion);
|
||||
emit sigSendCopyVersion(result);
|
||||
}
|
||||
|
||||
void VersionSelectWidget::on_DeleteVersionButton_clicked()
|
||||
{
|
||||
if (selectedVersion == nullptr)
|
||||
{
|
||||
showWarning(tr("Версия не выбрана"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (selectedVersion->getViewName() == baseNamePackage)
|
||||
{
|
||||
showWarning(tr("Нельзя удалить базовый пакет"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (selectedVersion->getViewName() == versionContainer->getServerVersion())
|
||||
{
|
||||
showWarning(tr("Нельзя удалить активную версию"));
|
||||
return;
|
||||
}
|
||||
emit sigSendDeleteVersion(selectedVersion);
|
||||
}
|
||||
|
||||
void VersionSelectWidget::on_switchServerVersionButton_clicked()
|
||||
{
|
||||
if (selectedVersion == nullptr)
|
||||
{
|
||||
showWarning(tr("Версия не выбрана"));
|
||||
return;
|
||||
}
|
||||
|
||||
versionContainer->setServerVersonData(selectedVersion);
|
||||
ui->verValue->setText(selectedVersion->getViewName());
|
||||
emit sigSendSwitchVersion(selectedVersion);
|
||||
}
|
||||
|
||||
void VersionSelectWidget::showWarning(QString text)
|
||||
{
|
||||
QMessageBox warning;
|
||||
warning.setText(text);
|
||||
warning.setIcon(QMessageBox::Warning);
|
||||
warning.setWindowTitle(tr("Ошибка"));
|
||||
warning.exec();
|
||||
}
|
||||
|
||||
VersionSelectWidget::~VersionSelectWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
47
Widgets/versionselectwidget.h
Normal file
47
Widgets/versionselectwidget.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef VERSIONSELECTWIDGET_H
|
||||
#define VERSIONSELECTWIDGET_H
|
||||
|
||||
#include <QListWidget>
|
||||
#include <QWidget>
|
||||
|
||||
#include <Core/sendsystem.h>
|
||||
#include <Data/streamingversiondata.h>
|
||||
#include <Widgets/newversionwidget.h>
|
||||
|
||||
namespace Ui {
|
||||
class VersionSelectWidget;
|
||||
}
|
||||
|
||||
class VersionSelectWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit VersionSelectWidget(QWidget *parent = nullptr);
|
||||
|
||||
void initialize(SendSystem *sendSystem,VersionContainer *versionContainer);
|
||||
void fillView(QList<StreamingVersionData*> *serverData);
|
||||
void sendCopyEmit(QString newName);
|
||||
void showWarning(QString text);
|
||||
|
||||
~VersionSelectWidget();
|
||||
private slots:
|
||||
void on_verListView_itemDoubleClicked(QListWidgetItem *item);
|
||||
void on_createDuplicateButton_clicked();
|
||||
void on_DeleteVersionButton_clicked();
|
||||
void on_switchServerVersionButton_clicked();
|
||||
|
||||
signals:
|
||||
void sigSendDeleteVersion(StreamingVersionData *streaming);
|
||||
void sigSendSwitchVersion(StreamingVersionData *selectVersion);
|
||||
void sigSendCopyVersion(QString versionPair);
|
||||
|
||||
private:
|
||||
Ui::VersionSelectWidget *ui;
|
||||
SendSystem *sendSystem;
|
||||
QList<StreamingVersionData*> *serverDataList;
|
||||
VersionContainer *versionContainer;
|
||||
StreamingVersionData *selectedVersion;
|
||||
};
|
||||
|
||||
#endif // VERSIONSELECTWIDGET_H
|
||||
240
Widgets/versionselectwidget.ui
Normal file
240
Widgets/versionselectwidget.ui
Normal file
@@ -0,0 +1,240 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>VersionSelectWidget</class>
|
||||
<widget class="QWidget" name="VersionSelectWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>786</width>
|
||||
<height>229</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>301</width>
|
||||
<height>171</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="actualServerListLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="verListTitle">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Calibri</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::PreventContextMenu</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Доступные версии на сервере</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="verListView"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>180</y>
|
||||
<width>781</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="ButtonLayout" stretch="0,0,0">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="createDuplicateButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Создать копию</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="DeleteVersionButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeIncrement">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Удалить</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="switchServerVersionButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Переключить версию сервера</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>170</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="verticalLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>310</x>
|
||||
<y>0</y>
|
||||
<width>471</width>
|
||||
<height>131</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="infoViewTitle">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Информация:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="infoValue">
|
||||
<property name="text">
|
||||
<string>Тут будет информация о версии...</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>310</x>
|
||||
<y>140</y>
|
||||
<width>471</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="ServerInfoLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="verTitle">
|
||||
<property name="text">
|
||||
<string>Текущая версия сервера:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="verValue">
|
||||
<property name="text">
|
||||
<string>none</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user