ref: add entry widget and list of changes

This commit is contained in:
semenov
2024-12-12 12:56:20 +03:00
parent 9991631dd2
commit 4e19ff42c5
34 changed files with 2634 additions and 785 deletions

View File

@@ -72,7 +72,7 @@ void DataParser::createAuthMessage(ClientAutorization *auth)
void DataParser::createServerSettings(QString address, QString port)
void DataParser::createServerSettings(ServerSettings* serverSettings)
{
QFile file(settingsName);
@@ -86,8 +86,8 @@ void DataParser::createServerSettings(QString address, QString port)
xmlWriter.writeStartElement("ServerSettingsContainer");
xmlWriter.writeStartElement("ServerSettings");
xmlWriter.writeAttribute("Address",address);
xmlWriter.writeAttribute("Port",port);
xmlWriter.writeAttribute("Address",serverSettings->Address);
xmlWriter.writeAttribute("Port",serverSettings->Port);
xmlWriter.writeAttribute("Language","RUS");
xmlWriter.writeAttribute("AutoStart",QString::number(false));

View File

@@ -17,7 +17,7 @@ public:
explicit DataParser(QObject *parent = 0);
~DataParser();
ServerSettings* getServerSettings();
void createServerSettings(QString server,QString port);
void createServerSettings(ServerSettings* serverSettings);
void saveClientSettrings(QString language,bool isAutoStart);
void createFileDataList(QList<FileData> fileDataList,QString filename);
void createAuthMessage(ClientAutorization *auth);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -27,11 +27,13 @@ SOURCES += \
Core\tools.cpp\
Core\hashcomparer.cpp \
commonbuttongroupwidget.cpp \
entrywidget.cpp \
instructorbuttongroupwidget.cpp \
main.cpp \
mainwindow.cpp \
mywinheader.cpp \
updatenotifywidget.cpp
updatenotifywidget.cpp \
updatewidget.cpp
HEADERS += \
Core\sendsystem.h \
@@ -46,16 +48,20 @@ HEADERS += \
Core\hashcomparer.h \
Datas.h \
commonbuttongroupwidget.h \
entrywidget.h \
instructorbuttongroupwidget.h \
mainwindow.h \
mywinheader.h \
updatenotifywidget.h
updatenotifywidget.h \
updatewidget.h
FORMS += \
commonbuttongroupwidget.ui \
entrywidget.ui \
instructorbuttongroupwidget.ui \
mainwindow.ui \
updatenotifywidget.ui
updatenotifywidget.ui \
updatewidget.ui
TRANSLATIONS = QtLanguage_ru.ts\
QtLanguage_eng.ts

View File

@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuthData Login="I1" Password="1111" InstructorName="Горинин Г.Г" ClientName="Горинин Г.Г" AccessType="instructor"/>
<AuthData Login="O1" Password="1111" InstructorName="Администратор" ClientName="Иванов И.И." AccessType="trainee"/>

View File

@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<ClientNotify Code="GETSERVERDATALIST"/>
<ClientAutorization Login="O1" Password="1111"/>

Binary file not shown.

Binary file not shown.

BIN
debug/entrywidget.o Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

124
debug/moc_entrywidget.cpp Normal file
View File

@@ -0,0 +1,124 @@
/****************************************************************************
** Meta object code from reading C++ file 'entrywidget.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../entrywidget.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'entrywidget.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.14.2. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_EntryWidget_t {
QByteArrayData data[4];
char stringdata0[64];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_EntryWidget_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_EntryWidget_t qt_meta_stringdata_EntryWidget = {
{
QT_MOC_LITERAL(0, 0, 11), // "EntryWidget"
QT_MOC_LITERAL(1, 12, 22), // "on_loginButton_clicked"
QT_MOC_LITERAL(2, 35, 0), // ""
QT_MOC_LITERAL(3, 36, 27) // "on_saveServerButton_clicked"
},
"EntryWidget\0on_loginButton_clicked\0\0"
"on_saveServerButton_clicked"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_EntryWidget[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
2, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: name, argc, parameters, tag, flags
1, 0, 24, 2, 0x08 /* Private */,
3, 0, 25, 2, 0x08 /* Private */,
// slots: parameters
QMetaType::Void,
QMetaType::Void,
0 // eod
};
void EntryWidget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<EntryWidget *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->on_loginButton_clicked(); break;
case 1: _t->on_saveServerButton_clicked(); break;
default: ;
}
}
Q_UNUSED(_a);
}
QT_INIT_METAOBJECT const QMetaObject EntryWidget::staticMetaObject = { {
QMetaObject::SuperData::link<QWidget::staticMetaObject>(),
qt_meta_stringdata_EntryWidget.data,
qt_meta_data_EntryWidget,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *EntryWidget::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *EntryWidget::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_EntryWidget.stringdata0))
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
int EntryWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 2)
qt_static_metacall(this, _c, _id, _a);
_id -= 2;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 2)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 2;
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

BIN
debug/moc_entrywidget.o Normal file

Binary file not shown.

View File

@@ -23,8 +23,8 @@ QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_MainWindow_t {
QByteArrayData data[45];
char stringdata0[719];
QByteArrayData data[43];
char stringdata0[668];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
@@ -66,18 +66,16 @@ QT_MOC_LITERAL(29, 419, 13), // "setNeedUpdate"
QT_MOC_LITERAL(30, 433, 4), // "flag"
QT_MOC_LITERAL(31, 438, 4), // "size"
QT_MOC_LITERAL(32, 443, 9), // "fileCount"
QT_MOC_LITERAL(33, 453, 22), // "on_loginButton_clicked"
QT_MOC_LITERAL(34, 476, 27), // "on_saveServerButton_clicked"
QT_MOC_LITERAL(35, 504, 25), // "on_settingsButton_clicked"
QT_MOC_LITERAL(36, 530, 29), // "on_languageComboBox_activated"
QT_MOC_LITERAL(37, 560, 4), // "arg1"
QT_MOC_LITERAL(38, 565, 17), // "slotDisableNotify"
QT_MOC_LITERAL(39, 583, 19), // "slotConnectionState"
QT_MOC_LITERAL(40, 603, 20), // "slotServerDisconnect"
QT_MOC_LITERAL(41, 624, 37), // "on_updateListGuideLabel_linkA..."
QT_MOC_LITERAL(42, 662, 4), // "link"
QT_MOC_LITERAL(43, 667, 21), // "on_exitButton_clicked"
QT_MOC_LITERAL(44, 689, 29) // "on_offlineStartButton_clicked"
QT_MOC_LITERAL(33, 453, 25), // "on_settingsButton_clicked"
QT_MOC_LITERAL(34, 479, 29), // "on_languageComboBox_activated"
QT_MOC_LITERAL(35, 509, 4), // "arg1"
QT_MOC_LITERAL(36, 514, 17), // "slotDisableNotify"
QT_MOC_LITERAL(37, 532, 19), // "slotConnectionState"
QT_MOC_LITERAL(38, 552, 20), // "slotServerDisconnect"
QT_MOC_LITERAL(39, 573, 37), // "on_updateListGuideLabel_linkA..."
QT_MOC_LITERAL(40, 611, 4), // "link"
QT_MOC_LITERAL(41, 616, 21), // "on_exitButton_clicked"
QT_MOC_LITERAL(42, 638, 29) // "on_offlineStartButton_clicked"
},
"MainWindow\0sigInitializeClient\0\0"
@@ -93,8 +91,6 @@ QT_MOC_LITERAL(44, 689, 29) // "on_offlineStartButton_clicked"
"serverBlocked\0checkLoginResult\0"
"ServerAuthorization*\0serverAuth\0"
"setNeedUpdate\0flag\0size\0fileCount\0"
"on_loginButton_clicked\0"
"on_saveServerButton_clicked\0"
"on_settingsButton_clicked\0"
"on_languageComboBox_activated\0arg1\0"
"slotDisableNotify\0slotConnectionState\0"
@@ -111,7 +107,7 @@ static const uint qt_meta_data_MainWindow[] = {
8, // revision
0, // classname
0, 0, // classinfo
23, 14, // methods
21, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
@@ -119,31 +115,29 @@ static const uint qt_meta_data_MainWindow[] = {
7, // signalCount
// signals: name, argc, parameters, tag, flags
1, 4, 129, 2, 0x06 /* Public */,
11, 1, 138, 2, 0x06 /* Public */,
13, 1, 141, 2, 0x06 /* Public */,
16, 2, 144, 2, 0x06 /* Public */,
19, 0, 149, 2, 0x06 /* Public */,
20, 0, 150, 2, 0x06 /* Public */,
21, 0, 151, 2, 0x06 /* Public */,
1, 4, 119, 2, 0x06 /* Public */,
11, 1, 128, 2, 0x06 /* Public */,
13, 1, 131, 2, 0x06 /* Public */,
16, 2, 134, 2, 0x06 /* Public */,
19, 0, 139, 2, 0x06 /* Public */,
20, 0, 140, 2, 0x06 /* Public */,
21, 0, 141, 2, 0x06 /* Public */,
// slots: name, argc, parameters, tag, flags
22, 0, 152, 2, 0x0a /* Public */,
23, 0, 153, 2, 0x0a /* Public */,
24, 0, 154, 2, 0x0a /* Public */,
25, 0, 155, 2, 0x0a /* Public */,
26, 1, 156, 2, 0x0a /* Public */,
29, 3, 159, 2, 0x0a /* Public */,
33, 0, 166, 2, 0x08 /* Private */,
34, 0, 167, 2, 0x08 /* Private */,
35, 0, 168, 2, 0x08 /* Private */,
36, 1, 169, 2, 0x08 /* Private */,
38, 0, 172, 2, 0x08 /* Private */,
39, 1, 173, 2, 0x08 /* Private */,
40, 0, 176, 2, 0x08 /* Private */,
41, 1, 177, 2, 0x08 /* Private */,
43, 0, 180, 2, 0x08 /* Private */,
44, 0, 181, 2, 0x08 /* Private */,
22, 0, 142, 2, 0x0a /* Public */,
23, 0, 143, 2, 0x0a /* Public */,
24, 0, 144, 2, 0x0a /* Public */,
25, 0, 145, 2, 0x0a /* Public */,
26, 1, 146, 2, 0x0a /* Public */,
29, 3, 149, 2, 0x0a /* Public */,
33, 0, 156, 2, 0x08 /* Private */,
34, 1, 157, 2, 0x08 /* Private */,
36, 0, 160, 2, 0x08 /* Private */,
37, 1, 161, 2, 0x08 /* Private */,
38, 0, 164, 2, 0x08 /* Private */,
39, 1, 165, 2, 0x08 /* Private */,
41, 0, 168, 2, 0x08 /* Private */,
42, 0, 169, 2, 0x08 /* Private */,
// signals: parameters
QMetaType::Void, 0x80000000 | 3, 0x80000000 | 5, 0x80000000 | 7, 0x80000000 | 9, 4, 6, 8, 10,
@@ -162,13 +156,11 @@ static const uint qt_meta_data_MainWindow[] = {
QMetaType::Void, 0x80000000 | 27, 28,
QMetaType::Void, QMetaType::Bool, QMetaType::ULongLong, QMetaType::ULongLong, 30, 31, 32,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void, QMetaType::QString, 37,
QMetaType::Void, QMetaType::QString, 35,
QMetaType::Void,
QMetaType::Void, QMetaType::Bool, 30,
QMetaType::Void,
QMetaType::Void, QMetaType::QString, 42,
QMetaType::Void, QMetaType::QString, 40,
QMetaType::Void,
QMetaType::Void,
@@ -195,16 +187,14 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
case 10: _t->serverBlocked(); break;
case 11: _t->checkLoginResult((*reinterpret_cast< ServerAuthorization*(*)>(_a[1]))); break;
case 12: _t->setNeedUpdate((*reinterpret_cast< bool(*)>(_a[1])),(*reinterpret_cast< quint64(*)>(_a[2])),(*reinterpret_cast< quint64(*)>(_a[3]))); break;
case 13: _t->on_loginButton_clicked(); break;
case 14: _t->on_saveServerButton_clicked(); break;
case 15: _t->on_settingsButton_clicked(); break;
case 16: _t->on_languageComboBox_activated((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 17: _t->slotDisableNotify(); break;
case 18: _t->slotConnectionState((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 19: _t->slotServerDisconnect(); break;
case 20: _t->on_updateListGuideLabel_linkActivated((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 21: _t->on_exitButton_clicked(); break;
case 22: _t->on_offlineStartButton_clicked(); break;
case 13: _t->on_settingsButton_clicked(); break;
case 14: _t->on_languageComboBox_activated((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 15: _t->slotDisableNotify(); break;
case 16: _t->slotConnectionState((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 17: _t->slotServerDisconnect(); break;
case 18: _t->on_updateListGuideLabel_linkActivated((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 19: _t->on_exitButton_clicked(); break;
case 20: _t->on_offlineStartButton_clicked(); break;
default: ;
}
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
@@ -314,13 +304,13 @@ int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 23)
if (_id < 21)
qt_static_metacall(this, _c, _id, _a);
_id -= 23;
_id -= 21;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 23)
if (_id < 21)
qt_static_metacall(this, _c, _id, _a);
_id -= 23;
_id -= 21;
}
return _id;
}

Binary file not shown.

View File

@@ -0,0 +1,95 @@
/****************************************************************************
** Meta object code from reading C++ file 'updatewidget.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../updatewidget.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'updatewidget.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.14.2. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_UpdateWidget_t {
QByteArrayData data[1];
char stringdata0[13];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_UpdateWidget_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_UpdateWidget_t qt_meta_stringdata_UpdateWidget = {
{
QT_MOC_LITERAL(0, 0, 12) // "UpdateWidget"
},
"UpdateWidget"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_UpdateWidget[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
0 // eod
};
void UpdateWidget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
Q_UNUSED(_o);
Q_UNUSED(_id);
Q_UNUSED(_c);
Q_UNUSED(_a);
}
QT_INIT_METAOBJECT const QMetaObject UpdateWidget::staticMetaObject = { {
QMetaObject::SuperData::link<QWidget::staticMetaObject>(),
qt_meta_stringdata_UpdateWidget.data,
qt_meta_data_UpdateWidget,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *UpdateWidget::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *UpdateWidget::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_UpdateWidget.stringdata0))
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
int UpdateWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

BIN
debug/moc_updatewidget.o Normal file

Binary file not shown.

BIN
debug/updatewidget.o Normal file

Binary file not shown.

100
entrywidget.cpp Normal file
View File

@@ -0,0 +1,100 @@
#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()
{
ui->offlineWidget->show();
ui->loginWidget->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::offlineWidgetIsActive(bool flag)
{
}
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;
}

41
entrywidget.h Normal file
View File

@@ -0,0 +1,41 @@
#ifndef ENTRYWIDGET_H
#define ENTRYWIDGET_H
#include "Datas.h"
#include "mainwindow.h"
#include <QWidget>
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 offlineWidgetIsActive(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
entrywidget.ui Normal file
View 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>

View File

@@ -1,7 +1,6 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "updatenotifywidget.h"
#include "updatenotifywidget.h"
#include <QFontDatabase>
#include <QMessageBox>
@@ -20,35 +19,25 @@ MainWindow::MainWindow(QWidget *parent)
painting();
}
void MainWindow::bindWidgets(UpdateNotifyWidget *widget,CommonButtonGroupWidget *commonButtonGroup,
InstructorButtonGroupWidget *instructorButtonGroup)
{
updateWidget = widget;
this->commonButtonGroupWidget = commonButtonGroup;
this->instructorButtonGroupWidget = instructorButtonGroup;
}
void MainWindow::initialize()
{
createObjects();
updateTextWidget->initialize();
entryWidget->initialize(this);
commonButtonGroupWidget->initialize(externalExecuter,sendSystem,client);
commonButtonGroupWidget->show();
instructorButtonGroupWidget->initialize(this);
ui->settingsWidget->hide();
ui->notificationLabel->hide();
ui->offlineWidget->hide();
ui->offlineStartButton->show();
ui->offlineStartButton->setEnabled(false);
ui->offlineStartButton->setGeometry(540,549,250,40);
ui->displayGroupWidget->show();
ui->autostartCheckBox->hide();
ui->loginWidget->hide();
ui->updateWidget->hide();
bindConnection();
emit sigCalculateHash();
@@ -71,10 +60,15 @@ void MainWindow::createObjects()
updateWidget = new UpdateNotifyWidget;
commonButtonGroupWidget = new CommonButtonGroupWidget;
instructorButtonGroupWidget = new InstructorButtonGroupWidget;
updateTextWidget = new UpdateWidget;
entryWidget = new EntryWidget;
ui->changButtonGroup->addWidget(commonButtonGroupWidget);
ui->changButtonGroup->addWidget(instructorButtonGroupWidget);
ui->interactiveGroup->addWidget(entryWidget);
ui->interactiveGroup->addWidget(updateTextWidget);
connectionThread = new QThread;
animationThread = new QThread;
@@ -206,7 +200,7 @@ void MainWindow::checkLoginResult(ServerAuthorization *serverAuth)
}
dataParser->createAuthData(serverAuth);
ui->loginWidget->hide();
entryWidget->loginIsActive(false);
ui->LanguageWidget->hide();
ui->settingsButton->hide();
ui->offlineStartButton->show();
@@ -260,8 +254,7 @@ void MainWindow::loadStaticData()
{
ServerSettings *currentSettings = dataParser->getServerSettings();
ui->serverInputField->setText(currentSettings->Address);
ui->portInputField->setText(currentSettings->Port);
entryWidget->fillSettings(currentSettings);
ui->languageComboBox->setCurrentText(currentSettings->Language);
ui->autostartCheckBox->setChecked(currentSettings->isAutoStart);
@@ -273,12 +266,11 @@ void MainWindow::showConnectionEmpty()
QPalette palette = ui->notificationLabel->palette();
palette.setColor(ui->notificationLabel->foregroundRole(),Qt::red);
ui->notificationLabel->setText(tr("Соединение отсутсвует"));
ui->offlineWidget->show();
entryWidget->connectionEmptyState();
updateTextWidget->hide();
ui->offlineStartButton->show();
ui->offlineStartButton->setGeometry(280,340,250,40);
ui->settingsButton->show();
ui->loginWidget->hide();
ui->updateWidget->hide();
instructorButtonGroupWidget->hide();
}
@@ -293,7 +285,7 @@ void MainWindow::slotConnectionState(bool flag)
{
palette.setColor(ui->notificationLabel->foregroundRole(),Qt::green);
ui->notificationLabel->setText(tr("Соединение установлено"));
ui->loginWidget->show();
entryWidget->loginIsActive(true);
ui->offlineStartButton->show();
ui->offlineStartButton->setGeometry(540,549,250,40);
@@ -337,7 +329,7 @@ void MainWindow::callUpdateList()
}
void MainWindow::on_loginButton_clicked()
void MainWindow::login()
{
if (!client->getIsConnected())
{
@@ -345,44 +337,35 @@ void MainWindow::on_loginButton_clicked()
return;
}
QString username = ui->loginInputField->text();
QString password = ui->passwordInputField->text();
ClientAutorization *autorization = new ClientAutorization;
autorization->Login = username;
autorization->Password = password;
entryWidget->loginIsActive(false);
ClientAutorization *autorization = entryWidget->getAuthData();
dataParser->createAuthMessage(autorization);
emit sigSendAutorization();
}
void MainWindow::on_saveServerButton_clicked()
void MainWindow::saveServerSettingsWithConnect()
{
startLoadingAnim();
ui->settingsWidget->hide();
entryWidget->settingsWidgetIsActive(false);
if(client->getIsConnected())
{
ui->loginWidget->show();
entryWidget->loginIsActive(true);
ui->offlineStartButton->show();
stopLoadingMovie();
return;
}
//TODO: не заполняется 2 поля (автостарт и язык)
ServerSettings *settings = entryWidget->getServerSettings();
dataParser->createServerSettings(settings);
QString server = ui->serverInputField->text();
QString port = ui->portInputField->text();
dataParser->createServerSettings(server,port);
emit sigSetConnect(dataParser->getServerSettings(),connectionThread);
emit sigSetConnect(settings,connectionThread);
}
void MainWindow::on_settingsButton_clicked()
{
ui->settingsWidget->show();
ui->loginWidget->hide();
ui->offlineWidget->hide();
entryWidget->settingsState();
ui->offlineStartButton->hide();
}
@@ -400,7 +383,7 @@ void MainWindow::loadToServer()
commonButtonGroupWidget->showProgressBar(true);
instructorButtonGroupWidget->hide();
ui->offlineStartButton->setEnabled(false);
ui->updateWidget->hide();
updateTextWidget->hide();
emit sigUpdateFilesOnServer(hashComparer->getFilesForUpdate());
}
@@ -412,7 +395,7 @@ void MainWindow::undoCurrentChanges()
commonButtonGroupWidget->showProgressBar(true);
ui->offlineStartButton->setEnabled(false);
instructorButtonGroupWidget->hide();
ui->updateWidget->hide();
updateTextWidget->hide();
startLoadingAnim();
@@ -459,18 +442,8 @@ void MainWindow::checkUpdate()
void MainWindow::showUpdateInfo()
{
stopLoadingMovie();
QString text = tr("Есть изменения в локальных файлах <A HREF=\"LINK\" style=color:rgb(45,84,130)>(список)</A> ");
QString list = tr("Возможные действия:\n"
" 1. Выгрузить изменения на сервер\n"
" 2. Отменить изменения с загрузкой версии с сервера \n"
" 3. Запустить без отправки файлов, но с текущими изменениями");
ui->updateListGuideLabel->setText(text);
ui->updateActionListLabel->setText(list);
ui->updateWidget->show();
updateTextWidget->showWithFill();
entryWidget->hide();
commonButtonGroupWidget->hide();
instructorButtonGroupWidget->show();
ui->offlineStartButton->setGeometry(540,549,250,40);
@@ -500,12 +473,10 @@ void MainWindow::startUnityClient()
void MainWindow::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return)
{
if (ui->loginInputField->text().length() <= 0 || ui->passwordInputField->text() <= 0) return;
on_loginButton_clicked();
if (entryWidget->isLoginFieldsFill()) return;
login();
}
}

View File

@@ -13,9 +13,11 @@
#include <Core/hashcomparer.h>
#include "Datas.h"
#include "commonbuttongroupwidget.h"
#include "entrywidget.h"
#include "instructorbuttongroupwidget.h"
#include "mywinheader.h"
#include "updatenotifywidget.h"
#include "updatewidget.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
@@ -29,6 +31,7 @@ class UpdateNotifyWidget;
class HashComparer;
class CommonButtonGroupWidget;
class InstructorButtonGroupWidget;
class EntryWidget;
class MainWindow : public QMainWindow
{
@@ -37,8 +40,6 @@ class MainWindow : public QMainWindow
public:
MainWindow(QWidget *parent = nullptr);
void callUpdateList();
void bindWidgets(UpdateNotifyWidget *widget,CommonButtonGroupWidget *commonButtonGroup,
InstructorButtonGroupWidget *instructorButtonGroup);
void checkUpdate();
~MainWindow();
@@ -67,8 +68,6 @@ public slots:
private slots:
void on_loginButton_clicked();
void on_saveServerButton_clicked();
void on_settingsButton_clicked();
void on_languageComboBox_activated(const QString &arg1);
void slotDisableNotify();
@@ -85,6 +84,8 @@ private:
UpdateNotifyWidget *updateWidget;
CommonButtonGroupWidget *commonButtonGroupWidget;
InstructorButtonGroupWidget *instructorButtonGroupWidget;
EntryWidget *entryWidget;
UpdateWidget *updateTextWidget;
QTranslator translator;
TCPClient *client;
DataParser *dataParser;
@@ -105,6 +106,7 @@ private:
int filesLoaded;
bool isRecovery;
void painting();
void checkAppAvailable();
void checkLanguage(QString language);
@@ -120,6 +122,8 @@ private:
public:
void initialize();
void login();
void saveServerSettingsWithConnect();
void loadToServer();
void undoCurrentChanges();
void startUnityClient();

View File

@@ -53,7 +53,7 @@
<x>10</x>
<y>44</y>
<width>781</width>
<height>211</height>
<height>201</height>
</rect>
</property>
<property name="frameShape">
@@ -282,346 +282,6 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalWidget" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>220</y>
<width>801</width>
<height>211</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>0</number>
</property>
<item>
<widget class="QWidget" name="loginLayoutWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>190</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>240</width>
<height>250</height>
</size>
</property>
<layout class="QVBoxLayout" name="loginLayout">
<property name="spacing">
<number>4</number>
</property>
<item>
<widget class="QLabel" name="loginTitle">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<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>
</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 class="QLabel" name="notificationLabel">
<property name="geometry">
<rect>
@@ -732,71 +392,6 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="updateWidget" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>330</y>
<width>781</width>
<height>171</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<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>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="updateListGuideLabel">
<property name="minimumSize">
<size>
<width>500</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="font">
<font>
<family>Calibri</family>
<pointsize>10</pointsize>
</font>
</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="updateActionListLabel">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="headerWidget" native="true">
<property name="geometry">
<rect>
@@ -948,15 +543,25 @@
</property>
</layout>
</widget>
<widget class="QWidget" name="verticalLayoutWidget_2">
<property name="geometry">
<rect>
<x>10</x>
<y>209</y>
<width>781</width>
<height>251</height>
</rect>
</property>
<layout class="QVBoxLayout" name="interactiveGroup"/>
</widget>
<zorder>mainFrame</zorder>
<zorder>horizontalWidget</zorder>
<zorder>notificationLabel</zorder>
<zorder>debugWidget</zorder>
<zorder>updateWidget</zorder>
<zorder>headerWidget</zorder>
<zorder>LanguageWidget</zorder>
<zorder>offlineStartButton</zorder>
<zorder>verticalLayoutWidget</zorder>
<zorder>verticalLayoutWidget_2</zorder>
</widget>
</widget>
<customwidgets>

View File

@@ -8,11 +8,13 @@ debug/tcpclient.o
debug/tools.o
debug/hashcomparer.o
debug/commonbuttongroupwidget.o
debug/entrywidget.o
debug/instructorbuttongroupwidget.o
debug/main.o
debug/mainwindow.o
debug/mywinheader.o
debug/updatenotifywidget.o
debug/updatewidget.o
debug/qrc_resources.o
debug/moc_sendsystem.o
debug/moc_updatecontroller.o
@@ -23,7 +25,9 @@ debug/moc_screenchecker.o
debug/moc_tcpclient.o
debug/moc_hashcomparer.o
debug/moc_commonbuttongroupwidget.o
debug/moc_entrywidget.o
debug/moc_instructorbuttongroupwidget.o
debug/moc_mainwindow.o
debug/moc_mywinheader.o
debug/moc_updatenotifywidget.o
debug/moc_updatewidget.o

View File

@@ -8,11 +8,13 @@ release/tcpclient.o
release/tools.o
release/hashcomparer.o
release/commonbuttongroupwidget.o
release/entrywidget.o
release/instructorbuttongroupwidget.o
release/main.o
release/mainwindow.o
release/mywinheader.o
release/updatenotifywidget.o
release/updatewidget.o
release/qrc_resources.o
release/moc_sendsystem.o
release/moc_updatecontroller.o
@@ -23,7 +25,9 @@ release/moc_screenchecker.o
release/moc_tcpclient.o
release/moc_hashcomparer.o
release/moc_commonbuttongroupwidget.o
release/moc_entrywidget.o
release/moc_instructorbuttongroupwidget.o
release/moc_mainwindow.o
release/moc_mywinheader.o
release/moc_updatenotifywidget.o
release/moc_updatewidget.o

223
ui_entrywidget.h Normal file
View File

@@ -0,0 +1,223 @@
/********************************************************************************
** Form generated from reading UI file 'entrywidget.ui'
**
** Created by: Qt User Interface Compiler version 5.14.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_ENTRYWIDGET_H
#define UI_ENTRYWIDGET_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_EntryWidget
{
public:
QWidget *horizontalWidget;
QHBoxLayout *horizontalLayout;
QWidget *loginWidget;
QVBoxLayout *verticalLayout;
QLabel *loginTitle;
QLineEdit *loginInputField;
QLineEdit *passwordInputField;
QPushButton *loginButton;
QWidget *offlineWidget;
QVBoxLayout *verticalLayout_3;
QLabel *offlineNotifyLabel;
QWidget *settingsWidget;
QVBoxLayout *verticalLayout_2;
QLabel *serverSettingsTitle;
QHBoxLayout *serverInputLayout;
QLineEdit *serverInputField;
QHBoxLayout *portInputLayout;
QLineEdit *portInputField;
QPushButton *saveServerButton;
void setupUi(QWidget *EntryWidget)
{
if (EntryWidget->objectName().isEmpty())
EntryWidget->setObjectName(QString::fromUtf8("EntryWidget"));
EntryWidget->resize(800, 173);
horizontalWidget = new QWidget(EntryWidget);
horizontalWidget->setObjectName(QString::fromUtf8("horizontalWidget"));
horizontalWidget->setGeometry(QRect(0, 0, 801, 181));
horizontalLayout = new QHBoxLayout(horizontalWidget);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
horizontalLayout->setSizeConstraint(QLayout::SetDefaultConstraint);
horizontalLayout->setContentsMargins(1, -1, -1, -1);
loginWidget = new QWidget(horizontalWidget);
loginWidget->setObjectName(QString::fromUtf8("loginWidget"));
loginWidget->setEnabled(true);
QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(loginWidget->sizePolicy().hasHeightForWidth());
loginWidget->setSizePolicy(sizePolicy);
loginWidget->setMinimumSize(QSize(0, 0));
loginWidget->setMaximumSize(QSize(250, 300));
loginWidget->setAutoFillBackground(false);
verticalLayout = new QVBoxLayout(loginWidget);
verticalLayout->setSpacing(5);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
verticalLayout->setContentsMargins(0, 0, 0, 9);
loginTitle = new QLabel(loginWidget);
loginTitle->setObjectName(QString::fromUtf8("loginTitle"));
QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(loginTitle->sizePolicy().hasHeightForWidth());
loginTitle->setSizePolicy(sizePolicy1);
loginTitle->setMaximumSize(QSize(250, 30));
loginTitle->setAlignment(Qt::AlignCenter);
verticalLayout->addWidget(loginTitle);
loginInputField = new QLineEdit(loginWidget);
loginInputField->setObjectName(QString::fromUtf8("loginInputField"));
QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Fixed);
sizePolicy2.setHorizontalStretch(0);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(loginInputField->sizePolicy().hasHeightForWidth());
loginInputField->setSizePolicy(sizePolicy2);
loginInputField->setMinimumSize(QSize(230, 35));
verticalLayout->addWidget(loginInputField);
passwordInputField = new QLineEdit(loginWidget);
passwordInputField->setObjectName(QString::fromUtf8("passwordInputField"));
sizePolicy2.setHeightForWidth(passwordInputField->sizePolicy().hasHeightForWidth());
passwordInputField->setSizePolicy(sizePolicy2);
passwordInputField->setMinimumSize(QSize(230, 35));
verticalLayout->addWidget(passwordInputField);
loginButton = new QPushButton(loginWidget);
loginButton->setObjectName(QString::fromUtf8("loginButton"));
loginButton->setMinimumSize(QSize(230, 35));
loginButton->setProperty("isGreen", QVariant(true));
verticalLayout->addWidget(loginButton);
horizontalLayout->addWidget(loginWidget);
offlineWidget = new QWidget(horizontalWidget);
offlineWidget->setObjectName(QString::fromUtf8("offlineWidget"));
offlineWidget->setMinimumSize(QSize(0, 0));
offlineWidget->setMaximumSize(QSize(500, 16777215));
verticalLayout_3 = new QVBoxLayout(offlineWidget);
verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
verticalLayout_3->setContentsMargins(0, 0, 0, -1);
offlineNotifyLabel = new QLabel(offlineWidget);
offlineNotifyLabel->setObjectName(QString::fromUtf8("offlineNotifyLabel"));
offlineNotifyLabel->setEnabled(true);
sizePolicy1.setHeightForWidth(offlineNotifyLabel->sizePolicy().hasHeightForWidth());
offlineNotifyLabel->setSizePolicy(sizePolicy1);
offlineNotifyLabel->setMinimumSize(QSize(0, 50));
offlineNotifyLabel->setMaximumSize(QSize(600, 100));
QFont font;
font.setPointSize(8);
offlineNotifyLabel->setFont(font);
offlineNotifyLabel->setAutoFillBackground(false);
offlineNotifyLabel->setScaledContents(true);
offlineNotifyLabel->setAlignment(Qt::AlignHCenter|Qt::AlignTop);
offlineNotifyLabel->setWordWrap(true);
offlineNotifyLabel->setMargin(0);
verticalLayout_3->addWidget(offlineNotifyLabel);
horizontalLayout->addWidget(offlineWidget);
settingsWidget = new QWidget(horizontalWidget);
settingsWidget->setObjectName(QString::fromUtf8("settingsWidget"));
settingsWidget->setEnabled(true);
QSizePolicy sizePolicy3(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizePolicy3.setHorizontalStretch(0);
sizePolicy3.setVerticalStretch(0);
sizePolicy3.setHeightForWidth(settingsWidget->sizePolicy().hasHeightForWidth());
settingsWidget->setSizePolicy(sizePolicy3);
settingsWidget->setMinimumSize(QSize(0, 0));
settingsWidget->setMaximumSize(QSize(200, 16777215));
settingsWidget->setAutoFillBackground(false);
verticalLayout_2 = new QVBoxLayout(settingsWidget);
verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
serverSettingsTitle = new QLabel(settingsWidget);
serverSettingsTitle->setObjectName(QString::fromUtf8("serverSettingsTitle"));
serverSettingsTitle->setAlignment(Qt::AlignCenter);
verticalLayout_2->addWidget(serverSettingsTitle);
serverInputLayout = new QHBoxLayout();
serverInputLayout->setObjectName(QString::fromUtf8("serverInputLayout"));
serverInputField = new QLineEdit(settingsWidget);
serverInputField->setObjectName(QString::fromUtf8("serverInputField"));
serverInputField->setMinimumSize(QSize(0, 35));
serverInputLayout->addWidget(serverInputField);
verticalLayout_2->addLayout(serverInputLayout);
portInputLayout = new QHBoxLayout();
portInputLayout->setObjectName(QString::fromUtf8("portInputLayout"));
portInputField = new QLineEdit(settingsWidget);
portInputField->setObjectName(QString::fromUtf8("portInputField"));
portInputField->setMinimumSize(QSize(0, 35));
portInputLayout->addWidget(portInputField);
verticalLayout_2->addLayout(portInputLayout);
saveServerButton = new QPushButton(settingsWidget);
saveServerButton->setObjectName(QString::fromUtf8("saveServerButton"));
saveServerButton->setMinimumSize(QSize(0, 40));
saveServerButton->setMaximumSize(QSize(16777215, 50));
saveServerButton->setProperty("blueButton", QVariant(true));
verticalLayout_2->addWidget(saveServerButton);
horizontalLayout->addWidget(settingsWidget);
retranslateUi(EntryWidget);
QMetaObject::connectSlotsByName(EntryWidget);
} // setupUi
void retranslateUi(QWidget *EntryWidget)
{
EntryWidget->setWindowTitle(QCoreApplication::translate("EntryWidget", "Form", nullptr));
loginTitle->setText(QCoreApplication::translate("EntryWidget", "\320\222\321\205\320\276\320\264 \320\262 \321\201\320\270\321\201\321\202\320\265\320\274\321\203", nullptr));
loginInputField->setText(QString());
loginInputField->setPlaceholderText(QCoreApplication::translate("EntryWidget", "\320\233\320\276\320\263\320\270\320\275", nullptr));
passwordInputField->setPlaceholderText(QCoreApplication::translate("EntryWidget", "\320\237\320\260\321\200\320\276\320\273\321\214", nullptr));
loginButton->setText(QCoreApplication::translate("EntryWidget", "\320\222\320\276\320\271\321\202\320\270", nullptr));
offlineNotifyLabel->setText(QCoreApplication::translate("EntryWidget", "\320\241\320\262\321\217\320\267\321\214 \321\201 \321\201\320\265\321\200\320\262\320\265\321\200\320\276\320\274 \320\275\320\265 \321\203\321\201\321\202\320\260\320\275\320\276\320\262\320\273\320\265\320\275\320\260! \320\237\321\200\320\276\320\262\320\265\321\200\321\214\321\202\320\265 \320\275\320\260\321\201\321\202\321\200\320\276\320\271\320\272\320\270 \320\270\320\273\320\270 \320\267\320\260\320\277\321\203\321\201\321\202\320\270\321\202\320\265 \320\262 \320\260\320\262\321\202\320\276\320\275\320\276\320\274\320\275\320\276\320\274 \321\200\320\265\320\266\320\270\320\274\320\265", nullptr));
serverSettingsTitle->setText(QCoreApplication::translate("EntryWidget", "\320\235\320\260\321\201\321\202\321\200\320\276\320\271\320\272\320\270 \321\201\320\265\321\200\320\262\320\265\321\200\320\260", nullptr));
serverInputField->setPlaceholderText(QCoreApplication::translate("EntryWidget", "\320\241\320\265\321\200\320\262\320\265\321\200", nullptr));
portInputField->setPlaceholderText(QCoreApplication::translate("EntryWidget", "\320\237\320\276\321\200\321\202", nullptr));
saveServerButton->setText(QCoreApplication::translate("EntryWidget", "\320\241\320\276\321\205\321\200\320\260\320\275\320\270\321\202\321\214", nullptr));
} // retranslateUi
};
namespace Ui {
class EntryWidget: public Ui_EntryWidget {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_ENTRYWIDGET_H

View File

@@ -16,7 +16,6 @@
#include <QtWidgets/QFrame>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QVBoxLayout>
@@ -41,36 +40,11 @@ public:
QHBoxLayout *horizontalLayout_2;
QLabel *languageTitle;
QComboBox *languageComboBox;
QWidget *horizontalWidget;
QHBoxLayout *horizontalLayout;
QWidget *loginWidget;
QVBoxLayout *verticalLayout;
QWidget *loginLayoutWidget;
QVBoxLayout *loginLayout;
QLabel *loginTitle;
QLineEdit *loginInputField;
QLineEdit *passwordInputField;
QPushButton *loginButton;
QWidget *offlineWidget;
QVBoxLayout *verticalLayout_3;
QLabel *offlineNotifyLabel;
QWidget *settingsWidget;
QVBoxLayout *verticalLayout_2;
QLabel *serverSettingsTitle;
QHBoxLayout *serverInputLayout;
QLineEdit *serverInputField;
QHBoxLayout *portInputLayout;
QLineEdit *portInputField;
QPushButton *saveServerButton;
QLabel *notificationLabel;
QWidget *debugWidget;
QVBoxLayout *verticalLayout_5;
QCheckBox *autostartCheckBox;
QLabel *inlineTextDebug;
QWidget *updateWidget;
QVBoxLayout *verticalLayout_10;
QLabel *updateListGuideLabel;
QLabel *updateActionListLabel;
QWidget *headerWidget;
QHBoxLayout *headerLayout;
QWidget *iconWidget;
@@ -79,6 +53,8 @@ public:
QPushButton *offlineStartButton;
QWidget *verticalLayoutWidget;
QVBoxLayout *changButtonGroup;
QWidget *verticalLayoutWidget_2;
QVBoxLayout *interactiveGroup;
void setupUi(QMainWindow *MainWindow)
{
@@ -99,7 +75,7 @@ public:
mainFrame = new QFrame(centralwidget);
mainFrame->setObjectName(QString::fromUtf8("mainFrame"));
mainFrame->setEnabled(true);
mainFrame->setGeometry(QRect(10, 44, 781, 211));
mainFrame->setGeometry(QRect(10, 44, 781, 201));
mainFrame->setFrameShape(QFrame::StyledPanel);
mainFrame->setFrameShadow(QFrame::Raised);
displayGroupWidget = new QWidget(mainFrame);
@@ -192,155 +168,6 @@ public:
horizontalLayout_2->addWidget(languageComboBox);
horizontalWidget = new QWidget(centralwidget);
horizontalWidget->setObjectName(QString::fromUtf8("horizontalWidget"));
horizontalWidget->setGeometry(QRect(0, 220, 801, 211));
horizontalLayout = new QHBoxLayout(horizontalWidget);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
horizontalLayout->setSizeConstraint(QLayout::SetDefaultConstraint);
horizontalLayout->setContentsMargins(1, -1, -1, -1);
loginWidget = new QWidget(horizontalWidget);
loginWidget->setObjectName(QString::fromUtf8("loginWidget"));
loginWidget->setEnabled(true);
QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Preferred);
sizePolicy3.setHorizontalStretch(0);
sizePolicy3.setVerticalStretch(0);
sizePolicy3.setHeightForWidth(loginWidget->sizePolicy().hasHeightForWidth());
loginWidget->setSizePolicy(sizePolicy3);
loginWidget->setMinimumSize(QSize(0, 0));
loginWidget->setMaximumSize(QSize(250, 300));
loginWidget->setAutoFillBackground(false);
verticalLayout = new QVBoxLayout(loginWidget);
verticalLayout->setSpacing(5);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
verticalLayout->setContentsMargins(0, 0, 0, 0);
loginLayoutWidget = new QWidget(loginWidget);
loginLayoutWidget->setObjectName(QString::fromUtf8("loginLayoutWidget"));
sizePolicy3.setHeightForWidth(loginLayoutWidget->sizePolicy().hasHeightForWidth());
loginLayoutWidget->setSizePolicy(sizePolicy3);
loginLayoutWidget->setMinimumSize(QSize(250, 190));
loginLayoutWidget->setMaximumSize(QSize(240, 250));
loginLayout = new QVBoxLayout(loginLayoutWidget);
loginLayout->setSpacing(4);
loginLayout->setObjectName(QString::fromUtf8("loginLayout"));
loginTitle = new QLabel(loginLayoutWidget);
loginTitle->setObjectName(QString::fromUtf8("loginTitle"));
sizePolicy2.setHeightForWidth(loginTitle->sizePolicy().hasHeightForWidth());
loginTitle->setSizePolicy(sizePolicy2);
loginTitle->setMaximumSize(QSize(250, 30));
loginTitle->setAlignment(Qt::AlignCenter);
loginLayout->addWidget(loginTitle);
loginInputField = new QLineEdit(loginLayoutWidget);
loginInputField->setObjectName(QString::fromUtf8("loginInputField"));
QSizePolicy sizePolicy4(QSizePolicy::Minimum, QSizePolicy::Fixed);
sizePolicy4.setHorizontalStretch(0);
sizePolicy4.setVerticalStretch(0);
sizePolicy4.setHeightForWidth(loginInputField->sizePolicy().hasHeightForWidth());
loginInputField->setSizePolicy(sizePolicy4);
loginInputField->setMinimumSize(QSize(230, 35));
loginLayout->addWidget(loginInputField);
passwordInputField = new QLineEdit(loginLayoutWidget);
passwordInputField->setObjectName(QString::fromUtf8("passwordInputField"));
sizePolicy4.setHeightForWidth(passwordInputField->sizePolicy().hasHeightForWidth());
passwordInputField->setSizePolicy(sizePolicy4);
passwordInputField->setMinimumSize(QSize(230, 35));
loginLayout->addWidget(passwordInputField);
loginButton = new QPushButton(loginLayoutWidget);
loginButton->setObjectName(QString::fromUtf8("loginButton"));
loginButton->setMinimumSize(QSize(230, 35));
loginButton->setProperty("isGreen", QVariant(true));
loginLayout->addWidget(loginButton);
verticalLayout->addWidget(loginLayoutWidget);
horizontalLayout->addWidget(loginWidget);
offlineWidget = new QWidget(horizontalWidget);
offlineWidget->setObjectName(QString::fromUtf8("offlineWidget"));
offlineWidget->setMinimumSize(QSize(0, 0));
offlineWidget->setMaximumSize(QSize(500, 16777215));
verticalLayout_3 = new QVBoxLayout(offlineWidget);
verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
verticalLayout_3->setContentsMargins(0, 0, 0, -1);
offlineNotifyLabel = new QLabel(offlineWidget);
offlineNotifyLabel->setObjectName(QString::fromUtf8("offlineNotifyLabel"));
offlineNotifyLabel->setEnabled(true);
sizePolicy1.setHeightForWidth(offlineNotifyLabel->sizePolicy().hasHeightForWidth());
offlineNotifyLabel->setSizePolicy(sizePolicy1);
offlineNotifyLabel->setMinimumSize(QSize(0, 50));
offlineNotifyLabel->setMaximumSize(QSize(600, 100));
QFont font3;
font3.setPointSize(8);
offlineNotifyLabel->setFont(font3);
offlineNotifyLabel->setAutoFillBackground(false);
offlineNotifyLabel->setScaledContents(true);
offlineNotifyLabel->setAlignment(Qt::AlignHCenter|Qt::AlignTop);
offlineNotifyLabel->setWordWrap(true);
offlineNotifyLabel->setMargin(0);
verticalLayout_3->addWidget(offlineNotifyLabel);
horizontalLayout->addWidget(offlineWidget);
settingsWidget = new QWidget(horizontalWidget);
settingsWidget->setObjectName(QString::fromUtf8("settingsWidget"));
settingsWidget->setEnabled(true);
sizePolicy.setHeightForWidth(settingsWidget->sizePolicy().hasHeightForWidth());
settingsWidget->setSizePolicy(sizePolicy);
settingsWidget->setMinimumSize(QSize(0, 0));
settingsWidget->setMaximumSize(QSize(200, 16777215));
settingsWidget->setAutoFillBackground(false);
verticalLayout_2 = new QVBoxLayout(settingsWidget);
verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
serverSettingsTitle = new QLabel(settingsWidget);
serverSettingsTitle->setObjectName(QString::fromUtf8("serverSettingsTitle"));
serverSettingsTitle->setAlignment(Qt::AlignCenter);
verticalLayout_2->addWidget(serverSettingsTitle);
serverInputLayout = new QHBoxLayout();
serverInputLayout->setObjectName(QString::fromUtf8("serverInputLayout"));
serverInputField = new QLineEdit(settingsWidget);
serverInputField->setObjectName(QString::fromUtf8("serverInputField"));
serverInputField->setMinimumSize(QSize(0, 35));
serverInputLayout->addWidget(serverInputField);
verticalLayout_2->addLayout(serverInputLayout);
portInputLayout = new QHBoxLayout();
portInputLayout->setObjectName(QString::fromUtf8("portInputLayout"));
portInputField = new QLineEdit(settingsWidget);
portInputField->setObjectName(QString::fromUtf8("portInputField"));
portInputField->setMinimumSize(QSize(0, 35));
portInputLayout->addWidget(portInputField);
verticalLayout_2->addLayout(portInputLayout);
saveServerButton = new QPushButton(settingsWidget);
saveServerButton->setObjectName(QString::fromUtf8("saveServerButton"));
saveServerButton->setMinimumSize(QSize(0, 40));
saveServerButton->setMaximumSize(QSize(16777215, 50));
saveServerButton->setProperty("blueButton", QVariant(true));
verticalLayout_2->addWidget(saveServerButton);
horizontalLayout->addWidget(settingsWidget);
notificationLabel = new QLabel(centralwidget);
notificationLabel->setObjectName(QString::fromUtf8("notificationLabel"));
notificationLabel->setGeometry(QRect(250, 460, 300, 40));
@@ -376,31 +203,6 @@ public:
verticalLayout_5->addWidget(inlineTextDebug);
updateWidget = new QWidget(centralwidget);
updateWidget->setObjectName(QString::fromUtf8("updateWidget"));
updateWidget->setGeometry(QRect(10, 330, 781, 171));
verticalLayout_10 = new QVBoxLayout(updateWidget);
verticalLayout_10->setSpacing(6);
verticalLayout_10->setObjectName(QString::fromUtf8("verticalLayout_10"));
verticalLayout_10->setContentsMargins(5, 5, 0, 0);
updateListGuideLabel = new QLabel(updateWidget);
updateListGuideLabel->setObjectName(QString::fromUtf8("updateListGuideLabel"));
updateListGuideLabel->setMinimumSize(QSize(500, 25));
updateListGuideLabel->setMaximumSize(QSize(16777215, 20));
QFont font4;
font4.setFamily(QString::fromUtf8("Calibri"));
font4.setPointSize(10);
updateListGuideLabel->setFont(font4);
updateListGuideLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop);
verticalLayout_10->addWidget(updateListGuideLabel);
updateActionListLabel = new QLabel(updateWidget);
updateActionListLabel->setObjectName(QString::fromUtf8("updateActionListLabel"));
updateActionListLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop);
verticalLayout_10->addWidget(updateActionListLabel);
headerWidget = new QWidget(centralwidget);
headerWidget->setObjectName(QString::fromUtf8("headerWidget"));
headerWidget->setGeometry(QRect(0, 0, 801, 40));
@@ -437,11 +239,11 @@ public:
offlineStartButton->setObjectName(QString::fromUtf8("offlineStartButton"));
offlineStartButton->setEnabled(true);
offlineStartButton->setGeometry(QRect(540, 550, 250, 40));
QSizePolicy sizePolicy5(QSizePolicy::Preferred, QSizePolicy::Minimum);
sizePolicy5.setHorizontalStretch(0);
sizePolicy5.setVerticalStretch(0);
sizePolicy5.setHeightForWidth(offlineStartButton->sizePolicy().hasHeightForWidth());
offlineStartButton->setSizePolicy(sizePolicy5);
QSizePolicy sizePolicy3(QSizePolicy::Preferred, QSizePolicy::Minimum);
sizePolicy3.setHorizontalStretch(0);
sizePolicy3.setVerticalStretch(0);
sizePolicy3.setHeightForWidth(offlineStartButton->sizePolicy().hasHeightForWidth());
offlineStartButton->setSizePolicy(sizePolicy3);
offlineStartButton->setMinimumSize(QSize(250, 40));
offlineStartButton->setMaximumSize(QSize(1500, 40));
offlineStartButton->setCheckable(false);
@@ -453,16 +255,21 @@ public:
changButtonGroup->setSpacing(0);
changButtonGroup->setObjectName(QString::fromUtf8("changButtonGroup"));
changButtonGroup->setContentsMargins(0, 0, 0, 0);
verticalLayoutWidget_2 = new QWidget(centralwidget);
verticalLayoutWidget_2->setObjectName(QString::fromUtf8("verticalLayoutWidget_2"));
verticalLayoutWidget_2->setGeometry(QRect(10, 209, 781, 251));
interactiveGroup = new QVBoxLayout(verticalLayoutWidget_2);
interactiveGroup->setObjectName(QString::fromUtf8("interactiveGroup"));
interactiveGroup->setContentsMargins(0, 0, 0, 0);
MainWindow->setCentralWidget(centralwidget);
mainFrame->raise();
horizontalWidget->raise();
notificationLabel->raise();
debugWidget->raise();
updateWidget->raise();
headerWidget->raise();
LanguageWidget->raise();
offlineStartButton->raise();
verticalLayoutWidget->raise();
verticalLayoutWidget_2->raise();
retranslateUi(MainWindow);
@@ -478,21 +285,9 @@ public:
languageComboBox->setItemText(0, QCoreApplication::translate("MainWindow", "RUS", nullptr));
languageComboBox->setItemText(1, QCoreApplication::translate("MainWindow", "ENG", nullptr));
loginTitle->setText(QCoreApplication::translate("MainWindow", "\320\222\321\205\320\276\320\264 \320\262 \321\201\320\270\321\201\321\202\320\265\320\274\321\203", nullptr));
loginInputField->setText(QString());
loginInputField->setPlaceholderText(QCoreApplication::translate("MainWindow", "\320\233\320\276\320\263\320\270\320\275", nullptr));
passwordInputField->setPlaceholderText(QCoreApplication::translate("MainWindow", "\320\237\320\260\321\200\320\276\320\273\321\214", nullptr));
loginButton->setText(QCoreApplication::translate("MainWindow", "\320\222\320\276\320\271\321\202\320\270", nullptr));
offlineNotifyLabel->setText(QCoreApplication::translate("MainWindow", "\320\241\320\262\321\217\320\267\321\214 \321\201 \321\201\320\265\321\200\320\262\320\265\321\200\320\276\320\274 \320\275\320\265 \321\203\321\201\321\202\320\260\320\275\320\276\320\262\320\273\320\265\320\275\320\260! \320\237\321\200\320\276\320\262\320\265\321\200\321\214\321\202\320\265 \320\275\320\260\321\201\321\202\321\200\320\276\320\271\320\272\320\270 \320\270\320\273\320\270 \320\267\320\260\320\277\321\203\321\201\321\202\320\270\321\202\320\265 \320\262 \320\260\320\262\321\202\320\276\320\275\320\276\320\274\320\275\320\276\320\274 \321\200\320\265\320\266\320\270\320\274\320\265", nullptr));
serverSettingsTitle->setText(QCoreApplication::translate("MainWindow", "\320\235\320\260\321\201\321\202\321\200\320\276\320\271\320\272\320\270 \321\201\320\265\321\200\320\262\320\265\321\200\320\260", nullptr));
serverInputField->setPlaceholderText(QCoreApplication::translate("MainWindow", "\320\241\320\265\321\200\320\262\320\265\321\200", nullptr));
portInputField->setPlaceholderText(QCoreApplication::translate("MainWindow", "\320\237\320\276\321\200\321\202", nullptr));
saveServerButton->setText(QCoreApplication::translate("MainWindow", "\320\241\320\276\321\205\321\200\320\260\320\275\320\270\321\202\321\214", nullptr));
notificationLabel->setText(QCoreApplication::translate("MainWindow", "\320\232\320\260\320\272\320\260\321\217-\321\202\320\276 \320\276\321\210\320\270\320\261\320\272\320\260", nullptr));
autostartCheckBox->setText(QCoreApplication::translate("MainWindow", "\320\220\320\262\321\202\320\276\320\267\320\260\320\277\321\203\321\201\320\272", nullptr));
inlineTextDebug->setText(QString());
updateListGuideLabel->setText(QCoreApplication::translate("MainWindow", "\320\225\321\201\321\202\321\214 \320\270\320\267\320\274\320\265\320\275\320\265\320\275\320\270\321\217 \320\262 \320\273\320\276\320\272\320\260\320\273\321\214\320\275\321\213\321\205 \321\204\320\260\320\271\320\273\320\260\321\205", nullptr));
updateActionListLabel->setText(QString());
headerLabel->setText(QCoreApplication::translate("MainWindow", "\320\242\321\200\320\265\320\275\320\260\320\266\320\265\321\200 \320\277\321\200\320\276\321\206\320\265\320\264\321\203\321\200 \321\202\320\265\321\205\320\275\320\270\321\207\320\265\321\201\320\272\320\276\320\263\320\276 \320\276\320\261\321\201\320\273\321\203\320\266\320\270\320\262\320\260\320\275\320\270\321\217 \321\201\320\260\320\274\320\276\320\273\320\265\321\202\320\260 RRJ-95NEW-100", nullptr));
exitButton->setText(QString());
offlineStartButton->setText(QCoreApplication::translate("MainWindow", "\320\227\320\260\320\277\321\203\321\201\320\272 \320\262 \320\260\320\262\321\202\320\276\320\275\320\276\320\274\320\275\320\276\320\274 \321\200\320\265\320\266\320\270\320\274\320\265", nullptr));

79
ui_updatewidget.h Normal file
View File

@@ -0,0 +1,79 @@
/********************************************************************************
** Form generated from reading UI file 'updatewidget.ui'
**
** Created by: Qt User Interface Compiler version 5.14.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_UPDATEWIDGET_H
#define UI_UPDATEWIDGET_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QLabel>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_UpdateWidget
{
public:
QWidget *updateWidget;
QVBoxLayout *verticalLayout_10;
QLabel *updateListGuideLabel;
QLabel *updateActionListLabel;
void setupUi(QWidget *UpdateWidget)
{
if (UpdateWidget->objectName().isEmpty())
UpdateWidget->setObjectName(QString::fromUtf8("UpdateWidget"));
UpdateWidget->resize(781, 172);
updateWidget = new QWidget(UpdateWidget);
updateWidget->setObjectName(QString::fromUtf8("updateWidget"));
updateWidget->setGeometry(QRect(0, 0, 781, 171));
verticalLayout_10 = new QVBoxLayout(updateWidget);
verticalLayout_10->setSpacing(6);
verticalLayout_10->setObjectName(QString::fromUtf8("verticalLayout_10"));
verticalLayout_10->setContentsMargins(5, 5, 0, 0);
updateListGuideLabel = new QLabel(updateWidget);
updateListGuideLabel->setObjectName(QString::fromUtf8("updateListGuideLabel"));
updateListGuideLabel->setMinimumSize(QSize(500, 25));
updateListGuideLabel->setMaximumSize(QSize(16777215, 20));
QFont font;
font.setFamily(QString::fromUtf8("Calibri"));
font.setPointSize(10);
updateListGuideLabel->setFont(font);
updateListGuideLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop);
verticalLayout_10->addWidget(updateListGuideLabel);
updateActionListLabel = new QLabel(updateWidget);
updateActionListLabel->setObjectName(QString::fromUtf8("updateActionListLabel"));
updateActionListLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop);
verticalLayout_10->addWidget(updateActionListLabel);
retranslateUi(UpdateWidget);
QMetaObject::connectSlotsByName(UpdateWidget);
} // setupUi
void retranslateUi(QWidget *UpdateWidget)
{
UpdateWidget->setWindowTitle(QCoreApplication::translate("UpdateWidget", "Form", nullptr));
updateListGuideLabel->setText(QCoreApplication::translate("UpdateWidget", "\320\225\321\201\321\202\321\214 \320\270\320\267\320\274\320\265\320\275\320\265\320\275\320\270\321\217 \320\262 \320\273\320\276\320\272\320\260\320\273\321\214\320\275\321\213\321\205 \321\204\320\260\320\271\320\273\320\260\321\205", nullptr));
updateActionListLabel->setText(QString());
} // retranslateUi
};
namespace Ui {
class UpdateWidget: public Ui_UpdateWidget {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_UPDATEWIDGET_H

34
updatewidget.cpp Normal file
View File

@@ -0,0 +1,34 @@
#include "updatewidget.h"
#include "ui_updatewidget.h"
UpdateWidget::UpdateWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::UpdateWidget)
{
ui->setupUi(this);
}
void UpdateWidget::initialize()
{
hide();
}
void UpdateWidget::showWithFill()
{
QString text = tr("Есть изменения в локальных файлах <A HREF=\"LINK\" style=color:rgb(45,84,130)>(список)</A> ");
QString list = tr("Возможные действия:\n"
" 1. Выгрузить изменения на сервер\n"
" 2. Отменить изменения с загрузкой версии с сервера \n"
" 3. Запустить без отправки файлов, но с текущими изменениями");
ui->updateListGuideLabel->setText(text);
ui->updateActionListLabel->setText(list);
show();
}
UpdateWidget::~UpdateWidget()
{
delete ui;
}

24
updatewidget.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef UPDATEWIDGET_H
#define UPDATEWIDGET_H
#include <QWidget>
namespace Ui {
class UpdateWidget;
}
class UpdateWidget : public QWidget
{
Q_OBJECT
public:
explicit UpdateWidget(QWidget *parent = nullptr);
void initialize();
void showWithFill();
~UpdateWidget();
private:
Ui::UpdateWidget *ui;
};
#endif // UPDATEWIDGET_H

84
updatewidget.ui Normal file
View File

@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>UpdateWidget</class>
<widget class="QWidget" name="UpdateWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>781</width>
<height>172</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QWidget" name="updateWidget" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>781</width>
<height>171</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<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>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="updateListGuideLabel">
<property name="minimumSize">
<size>
<width>500</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="font">
<font>
<family>Calibri</family>
<pointsize>10</pointsize>
</font>
</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="updateActionListLabel">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>