mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
feat: add scenario conflict resolver
This commit is contained in:
@@ -3,8 +3,8 @@
|
|||||||
void ExternalExecuter::callApp()
|
void ExternalExecuter::callApp()
|
||||||
{
|
{
|
||||||
QProcess *myProcess = new QProcess(this);
|
QProcess *myProcess = new QProcess(this);
|
||||||
QStringList args;
|
QStringList args = QCoreApplication::arguments();
|
||||||
args << "1";
|
args.removeFirst();
|
||||||
|
|
||||||
myProcess->start(programPath,args);
|
myProcess->start(programPath,args);
|
||||||
myProcess->waitForStarted();
|
myProcess->waitForStarted();
|
||||||
@@ -21,10 +21,11 @@ bool ExternalExecuter::findApp()
|
|||||||
|
|
||||||
if(iterator.fileInfo().fileName() == applicationEXEName){
|
if(iterator.fileInfo().fileName() == applicationEXEName){
|
||||||
programPath = iterator.fileInfo().absoluteFilePath();
|
programPath = iterator.fileInfo().absoluteFilePath();
|
||||||
|
isAvailable = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
isAvailable = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,3 +38,8 @@ void ExternalExecuter::setIsAutoStart(bool value)
|
|||||||
{
|
{
|
||||||
isAutoStart = value;
|
isAutoStart = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ExternalExecuter::getIsAvailable() const
|
||||||
|
{
|
||||||
|
return isAvailable;
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,9 +23,12 @@ public:
|
|||||||
bool getIsAutoStart() const;
|
bool getIsAutoStart() const;
|
||||||
void setIsAutoStart(bool value);
|
void setIsAutoStart(bool value);
|
||||||
|
|
||||||
|
bool getIsAvailable() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString programPath;
|
QString programPath;
|
||||||
bool isAutoStart;
|
bool isAutoStart;
|
||||||
|
bool isAvailable;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // EXTERNALEXECUTER_H
|
#endif // EXTERNALEXECUTER_H
|
||||||
|
|||||||
@@ -29,8 +29,13 @@ void HashComparer::CompareDeltas(QList<FileData> *serverStreamingHash, QList<Fil
|
|||||||
if(!serverStreamingHash->contains(item))
|
if(!serverStreamingHash->contains(item))
|
||||||
{
|
{
|
||||||
if (item.path.contains("docs.xml")) continue; //фильтр на docs
|
if (item.path.contains("docs.xml")) continue; //фильтр на docs
|
||||||
quint32 fileDataIndex = findIndexByPath(*serverStreamingHash, item.path);
|
if (item.path.contains("CfiList.xml")) continue;
|
||||||
|
|
||||||
|
qint32 fileDataIndex = findIndexByPath(*serverStreamingHash, item.path);
|
||||||
|
if (fileDataIndex != -1)
|
||||||
|
{
|
||||||
serverFiles->append(serverStreamingHash->at(fileDataIndex));
|
serverFiles->append(serverStreamingHash->at(fileDataIndex));
|
||||||
|
}
|
||||||
files->append(item);
|
files->append(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,7 +67,14 @@ void HashComparer::showDeltas()
|
|||||||
for (int i = 0; i < filesForUpdate->size(); i++)
|
for (int i = 0; i < filesForUpdate->size(); i++)
|
||||||
{
|
{
|
||||||
FileData local = filesForUpdate->at(i);
|
FileData local = filesForUpdate->at(i);
|
||||||
FileData server = serverFiles->at(i);
|
FileData server = FileData();
|
||||||
|
server.lastUpdate = "нет";
|
||||||
|
|
||||||
|
if (serverFiles->size() > i)
|
||||||
|
{
|
||||||
|
server = serverFiles->at(i);
|
||||||
|
}
|
||||||
|
|
||||||
emit sigAddToList(local,server);
|
emit sigAddToList(local,server);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<AuthData Login="I1" Password="b59c67bf196a4758191e42f76670ceba" InstructorName="Колобков В.Р." ClientName="Колобков В.Р." AccessType="instructor"/>
|
<AuthData Login="I3" Password="2be9bd7a3434f7038ca27d1918de58bd" InstructorName="Моськин В.М." ClientName="Моськин В.М." AccessType="instructor"/>
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,9 @@ void CommonButtonGroupWidget::initialize()
|
|||||||
ui->updateButton->hide();
|
ui->updateButton->hide();
|
||||||
ui->startButton->hide();
|
ui->startButton->hide();
|
||||||
ui->startButton->setEnabled(false);
|
ui->startButton->setEnabled(false);
|
||||||
|
ui->offlineStartButton->hide();
|
||||||
show();
|
show();
|
||||||
|
down = ui->downlayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommonButtonGroupWidget::updateProgressBar(float value)
|
void CommonButtonGroupWidget::updateProgressBar(float value)
|
||||||
@@ -23,13 +25,19 @@ void CommonButtonGroupWidget::updateProgressBar(float value)
|
|||||||
ui->loadingProgressBar->setValue(value);
|
ui->loadingProgressBar->setValue(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QHBoxLayout *CommonButtonGroupWidget::getDown() const
|
||||||
|
{
|
||||||
|
return down;
|
||||||
|
}
|
||||||
|
|
||||||
void CommonButtonGroupWidget::loadCompleteState()
|
void CommonButtonGroupWidget::loadCompleteState()
|
||||||
{
|
{
|
||||||
show();
|
show();
|
||||||
ui->updateButton->hide();
|
ui->updateButton->hide();
|
||||||
ui->startButton->setEnabled(true);
|
ui->startButton->setEnabled(true);
|
||||||
ui->loadingProgressBar->setValue(100);
|
|
||||||
ui->startButton->show();
|
ui->startButton->show();
|
||||||
|
ui->offlineStartButton->show();
|
||||||
|
ui->loadingProgressBar->setValue(100);
|
||||||
ui->loadingProgressBar->hide();
|
ui->loadingProgressBar->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +47,9 @@ void CommonButtonGroupWidget::lastVerInstalledState()
|
|||||||
ui->updateButton->hide();
|
ui->updateButton->hide();
|
||||||
ui->loadingProgressBar->hide();
|
ui->loadingProgressBar->hide();
|
||||||
ui->startButton->setEnabled(true);
|
ui->startButton->setEnabled(true);
|
||||||
|
hideSpacer(true);
|
||||||
ui->startButton->show();
|
ui->startButton->show();
|
||||||
|
ui->offlineStartButton->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommonButtonGroupWidget::disconnectState()
|
void CommonButtonGroupWidget::disconnectState()
|
||||||
@@ -48,16 +58,32 @@ void CommonButtonGroupWidget::disconnectState()
|
|||||||
ui->loadingProgressBar->hide();
|
ui->loadingProgressBar->hide();
|
||||||
ui->updateButton->hide();
|
ui->updateButton->hide();
|
||||||
ui->updateButton->setEnabled(false);
|
ui->updateButton->setEnabled(false);
|
||||||
|
ui->offlineStartButton->hide();
|
||||||
|
hideSpacer(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommonButtonGroupWidget::startUpdateState()
|
void CommonButtonGroupWidget::startUpdateState()
|
||||||
{
|
{
|
||||||
ui->updateButton->hide();
|
ui->updateButton->hide();
|
||||||
ui->startButton->hide();
|
ui->startButton->hide();
|
||||||
|
ui->offlineStartButton->hide();
|
||||||
ui->loadingProgressBar->setValue(0);
|
ui->loadingProgressBar->setValue(0);
|
||||||
ui->loadingProgressBar->show();
|
ui->loadingProgressBar->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CommonButtonGroupWidget::loginState()
|
||||||
|
{
|
||||||
|
bool isAvailable = emit sigAppAvailable();
|
||||||
|
if (isAvailable)
|
||||||
|
{
|
||||||
|
ui->offlineStartButton->show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->offlineStartButton->hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CommonButtonGroupWidget::showProgressBar(bool flag)
|
void CommonButtonGroupWidget::showProgressBar(bool flag)
|
||||||
{
|
{
|
||||||
if (flag) ui->loadingProgressBar->show();
|
if (flag) ui->loadingProgressBar->show();
|
||||||
@@ -67,6 +93,7 @@ void CommonButtonGroupWidget::showProgressBar(bool flag)
|
|||||||
void CommonButtonGroupWidget::needUpdateState(bool flag)
|
void CommonButtonGroupWidget::needUpdateState(bool flag)
|
||||||
{
|
{
|
||||||
show();
|
show();
|
||||||
|
hideSpacer(true);
|
||||||
ui->loadingProgressBar->hide();
|
ui->loadingProgressBar->hide();
|
||||||
ui->startButton->hide();
|
ui->startButton->hide();
|
||||||
ui->updateButton->setEnabled(flag);
|
ui->updateButton->setEnabled(flag);
|
||||||
@@ -75,6 +102,9 @@ void CommonButtonGroupWidget::needUpdateState(bool flag)
|
|||||||
|
|
||||||
void CommonButtonGroupWidget::startButtonActive(bool flag)
|
void CommonButtonGroupWidget::startButtonActive(bool flag)
|
||||||
{
|
{
|
||||||
|
if(flag) ui->offlineStartButton->show();
|
||||||
|
else ui->offlineStartButton->hide();
|
||||||
|
|
||||||
ui->startButton->setEnabled(flag);
|
ui->startButton->setEnabled(flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,6 +126,13 @@ CommonButtonGroupWidget::~CommonButtonGroupWidget()
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CommonButtonGroupWidget::hideSpacer(bool flag)
|
||||||
|
{
|
||||||
|
if(flag) ui->horizontalSpacer->changeSize(0,0,QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||||||
|
else ui->horizontalSpacer->changeSize(40,20,QSizePolicy::Expanding,QSizePolicy::Minimum);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CommonButtonGroupWidget::on_offlineStartButton_clicked()
|
||||||
|
{
|
||||||
|
emit sigStartOfflineUnityClient();
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#ifndef COMMONBUTTONGROUPWIDGET_H
|
#ifndef COMMONBUTTONGROUPWIDGET_H
|
||||||
#define COMMONBUTTONGROUPWIDGET_H
|
#define COMMONBUTTONGROUPWIDGET_H
|
||||||
|
|
||||||
|
#include <QHBoxLayout>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <Core/tcpclient.h>
|
#include <Core/tcpclient.h>
|
||||||
|
|
||||||
@@ -20,6 +21,7 @@ public:
|
|||||||
void lastVerInstalledState();
|
void lastVerInstalledState();
|
||||||
void disconnectState();
|
void disconnectState();
|
||||||
void startUpdateState();
|
void startUpdateState();
|
||||||
|
void loginState();
|
||||||
void showProgressBar(bool flag);
|
void showProgressBar(bool flag);
|
||||||
void needUpdateState(bool flag);
|
void needUpdateState(bool flag);
|
||||||
void startButtonActive(bool flag);
|
void startButtonActive(bool flag);
|
||||||
@@ -28,16 +30,22 @@ signals:
|
|||||||
void sigSendPacket(PacketType packet);
|
void sigSendPacket(PacketType packet);
|
||||||
void sigUpdateCommonWidget();
|
void sigUpdateCommonWidget();
|
||||||
void sigStartUnityClient();
|
void sigStartUnityClient();
|
||||||
|
void sigStartOfflineUnityClient();
|
||||||
|
bool sigAppAvailable();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_updateButton_clicked();
|
void on_updateButton_clicked();
|
||||||
void on_startButton_clicked();
|
void on_startButton_clicked();
|
||||||
|
void on_offlineStartButton_clicked();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void updateProgressBar(float value);
|
void updateProgressBar(float value);
|
||||||
|
QHBoxLayout *getDown() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::CommonButtonGroupWidget *ui;
|
Ui::CommonButtonGroupWidget *ui;
|
||||||
|
QHBoxLayout *down;
|
||||||
|
void hideSpacer(bool flag);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COMMONBUTTONGROUPWIDGET_H
|
#endif // COMMONBUTTONGROUPWIDGET_H
|
||||||
|
|||||||
@@ -6,12 +6,12 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>520</width>
|
<width>763</width>
|
||||||
<height>45</height>
|
<height>45</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@@ -30,12 +30,12 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>520</width>
|
<width>761</width>
|
||||||
<height>45</height>
|
<height>45</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@@ -99,14 +99,14 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>500</width>
|
||||||
<height>35</height>
|
<height>35</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>500</width>
|
||||||
<height>35</height>
|
<height>35</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@@ -158,6 +158,47 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="offlineStartButton">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>250</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sizeIncrement">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Запуск в автономном режиме</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
EntryWidget::EntryWidget(QWidget *parent) :
|
EntryWidget::EntryWidget(QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::EntryWidget)
|
ui(new Ui::EntryWidget),
|
||||||
|
isAppAvailable(false)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
}
|
}
|
||||||
@@ -22,6 +23,7 @@ void EntryWidget::initialize()
|
|||||||
void EntryWidget::disconnectState()
|
void EntryWidget::disconnectState()
|
||||||
{
|
{
|
||||||
show();
|
show();
|
||||||
|
setAppAvailable(emit sigAppAvalable());
|
||||||
ui->offlineWidget->show();
|
ui->offlineWidget->show();
|
||||||
ui->loginWidget->hide();
|
ui->loginWidget->hide();
|
||||||
}
|
}
|
||||||
@@ -69,7 +71,6 @@ void EntryWidget::fillSettings(Settings *settings)
|
|||||||
{
|
{
|
||||||
ui->serverInputField->setText(settings->Address);
|
ui->serverInputField->setText(settings->Address);
|
||||||
ui->portInputField->setText(settings->Port);
|
ui->portInputField->setText(settings->Port);
|
||||||
//ui->mathModelUsecheckBox->setChecked(settings->mathModelUse);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryWidget::isActive(bool flag)
|
void EntryWidget::isActive(bool flag)
|
||||||
@@ -83,6 +84,22 @@ bool EntryWidget::getLoginWidgetIsHidden()
|
|||||||
return ui->loginWidget->isHidden();
|
return ui->loginWidget->isHidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EntryWidget::setAppAvailable(bool flag)
|
||||||
|
{
|
||||||
|
isAppAvailable = flag;
|
||||||
|
|
||||||
|
if (flag)
|
||||||
|
{
|
||||||
|
QString text = tr("Связь с сервером не установлена! Проверьте настройки или запустите в автономном режиме");
|
||||||
|
ui->offlineNotifyLabel->setText(text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
QString text = tr("Связь с сервером не установлена! Проверьте настройки подключения и загрузите клиент с сервера");
|
||||||
|
ui->offlineNotifyLabel->setText(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString EntryWidget::getAddress(){
|
QString EntryWidget::getAddress(){
|
||||||
return ui->serverInputField->text();
|
return ui->serverInputField->text();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public:
|
|||||||
void fillSettings(Settings *settings);
|
void fillSettings(Settings *settings);
|
||||||
void isActive(bool flag);
|
void isActive(bool flag);
|
||||||
bool getLoginWidgetIsHidden();
|
bool getLoginWidgetIsHidden();
|
||||||
|
void setAppAvailable(bool flag);
|
||||||
ClientAutorization* getAuthData();
|
ClientAutorization* getAuthData();
|
||||||
|
|
||||||
QString getAddress();
|
QString getAddress();
|
||||||
@@ -30,6 +31,7 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void sigTryLogin();
|
void sigTryLogin();
|
||||||
void sigSaveServerSettings();
|
void sigSaveServerSettings();
|
||||||
|
bool sigAppAvalable();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_loginButton_clicked();
|
void on_loginButton_clicked();
|
||||||
@@ -37,6 +39,7 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::EntryWidget *ui;
|
Ui::EntryWidget *ui;
|
||||||
|
bool isAppAvailable;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ENTRYWIDGET_H
|
#endif // ENTRYWIDGET_H
|
||||||
|
|||||||
@@ -351,7 +351,7 @@
|
|||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Связь с сервером не установлена! Проверьте настройки или запустите в автономном режиме</string>
|
<string>тест</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="scaledContents">
|
<property name="scaledContents">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|||||||
@@ -16,10 +16,23 @@ void UpdateFileSlot::fill(QString itemName, FileData serverData, FileData localD
|
|||||||
ui->Path->setText(itemName);
|
ui->Path->setText(itemName);
|
||||||
local = localData;
|
local = localData;
|
||||||
|
|
||||||
|
bool haveData = serverData.lastUpdate != "нет";
|
||||||
|
|
||||||
QString result = " Сервер: ";
|
QString result = " Сервер: ";
|
||||||
QDateTime serverFileTime = QDateTime::fromString(serverData.lastUpdate,"dd.MM.yyyy hh:mm:ss");
|
|
||||||
QDateTime localFileTime = QDateTime::fromString(localData.lastUpdate,"dd.MM.yyyy hh:mm:ss");
|
QDateTime serverFileTime;
|
||||||
|
if (haveData)
|
||||||
|
{
|
||||||
|
serverFileTime = QDateTime::fromString(serverData.lastUpdate,"dd.MM.yyyy hh:mm:ss");
|
||||||
result.append(serverFileTime.toString("dd.MM.yyyy"));
|
result.append(serverFileTime.toString("dd.MM.yyyy"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.append("НЕТ");
|
||||||
|
}
|
||||||
|
|
||||||
|
QDateTime localFileTime = QDateTime::fromString(localData.lastUpdate,"dd.MM.yyyy hh:mm:ss");
|
||||||
|
|
||||||
result.append(" Локально: ");
|
result.append(" Локально: ");
|
||||||
result.append(localFileTime.toString("dd.MM.yyyy"));
|
result.append(localFileTime.toString("dd.MM.yyyy"));
|
||||||
ui->Dates->setText(result);
|
ui->Dates->setText(result);
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>30</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>721</width>
|
<width>701</width>
|
||||||
<height>41</height>
|
<height>41</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -42,17 +42,17 @@
|
|||||||
<widget class="QLabel" name="Image">
|
<widget class="QLabel" name="Image">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>755</x>
|
<x>735</x>
|
||||||
<y>5</y>
|
<y>-4</y>
|
||||||
<width>31</width>
|
<width>51</width>
|
||||||
<height>31</height>
|
<height>51</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="pixmap">
|
<property name="pixmap">
|
||||||
<pixmap resource="../resources.qrc">:/resource/Icons/checked.png</pixmap>
|
<pixmap resource="../resources.qrc">:/resource/Icons/new.png</pixmap>
|
||||||
</property>
|
</property>
|
||||||
<property name="scaledContents">
|
<property name="scaledContents">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Обнаружены новые файлы:</string>
|
<string>Обнаружены новые или измененные файлы:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="openExternalLinks">
|
<property name="openExternalLinks">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ void CoreManager::initialize(WidgetManager *widgetManager,QThread *workerThread)
|
|||||||
|
|
||||||
void CoreManager::start()
|
void CoreManager::start()
|
||||||
{
|
{
|
||||||
checkAppAvailable();
|
//checkAppAvailable();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreManager::loadStaticData()
|
void CoreManager::loadStaticData()
|
||||||
@@ -56,8 +56,6 @@ void CoreManager::loadStaticData()
|
|||||||
setLanguage(settings->Language);
|
setLanguage(settings->Language);
|
||||||
setLocalVersion();
|
setLocalVersion();
|
||||||
externalExecuter->setIsAutoStart(settings->isAutoStart);
|
externalExecuter->setIsAutoStart(settings->isAutoStart);
|
||||||
bool appAvailable = externalExecuter->findApp();
|
|
||||||
widgetManager->setAppAvailable(appAvailable);
|
|
||||||
emit sigSetLoadSettings(settings);
|
emit sigSetLoadSettings(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,9 +104,12 @@ void CoreManager::binding()
|
|||||||
connect(tcpClient,&TCPClient::sigServerDisconnect,widgetManager,&WidgetManager::setServerDisconnectState,Qt::AutoConnection);
|
connect(tcpClient,&TCPClient::sigServerDisconnect,widgetManager,&WidgetManager::setServerDisconnectState,Qt::AutoConnection);
|
||||||
|
|
||||||
connect(sendSystem,&SendSystem::sigSend,this,&CoreManager::calcUpdateProgress,Qt::AutoConnection);
|
connect(sendSystem,&SendSystem::sigSend,this,&CoreManager::calcUpdateProgress,Qt::AutoConnection);
|
||||||
|
|
||||||
connect(sendSystem,&SendSystem::sigGetXmlAnswer,dataParserOutput,&DataParserOutput::xmlAnswer_notify,Qt::DirectConnection);
|
connect(sendSystem,&SendSystem::sigGetXmlAnswer,dataParserOutput,&DataParserOutput::xmlAnswer_notify,Qt::DirectConnection);
|
||||||
|
|
||||||
|
connect(widgetManager->getEntryWidget(),&EntryWidget::sigAppAvalable,externalExecuter,&ExternalExecuter::findApp,Qt::DirectConnection);
|
||||||
|
connect(widgetManager->getMainWindow(),&MainWindow::sigAppAvailable,externalExecuter,&ExternalExecuter::findApp,Qt::DirectConnection);
|
||||||
|
connect(widgetManager->getCommonButtonGroupWidget(),&CommonButtonGroupWidget::sigAppAvailable,externalExecuter,&ExternalExecuter::findApp,Qt::DirectConnection);
|
||||||
|
connect(widgetManager,&WidgetManager::sigAppAvailable,externalExecuter,&ExternalExecuter::findApp,Qt::DirectConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreManager::initializeSystems()
|
void CoreManager::initializeSystems()
|
||||||
@@ -154,6 +155,7 @@ void CoreManager::initializeWidgets()
|
|||||||
connect(widgetManager->getMainWindow(),&MainWindow::sigExit,this,&CoreManager::exit,Qt::DirectConnection);
|
connect(widgetManager->getMainWindow(),&MainWindow::sigExit,this,&CoreManager::exit,Qt::DirectConnection);
|
||||||
connect(widgetManager->getMainWindow(),&MainWindow::sigTryLogin,this,&CoreManager::tryLogin,Qt::AutoConnection);
|
connect(widgetManager->getMainWindow(),&MainWindow::sigTryLogin,this,&CoreManager::tryLogin,Qt::AutoConnection);
|
||||||
connect(widgetManager->getMainWindow(),&MainWindow::sigStartOffline,this,&CoreManager::startOffline,Qt::AutoConnection);
|
connect(widgetManager->getMainWindow(),&MainWindow::sigStartOffline,this,&CoreManager::startOffline,Qt::AutoConnection);
|
||||||
|
connect(widgetManager->getCommonButtonGroupWidget(),&CommonButtonGroupWidget::sigStartOfflineUnityClient,this,&CoreManager::startOffline,Qt::AutoConnection);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,8 +347,6 @@ void CoreManager::undoCurrentChanges()
|
|||||||
isRecovery = true;
|
isRecovery = true;
|
||||||
widgetManager->setUndoCurrentChangesState();
|
widgetManager->setUndoCurrentChangesState();
|
||||||
emit sigSendCheckUpdate();
|
emit sigSendCheckUpdate();
|
||||||
//emit sigSendPacketType(PacketType::TYPE_UPDATE);
|
|
||||||
//тут был таймер
|
|
||||||
isRecovery = false;
|
isRecovery = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -380,7 +380,6 @@ void CoreManager::saveServerSettingsWithConnect()
|
|||||||
emit sigSendXMLAnswer(cmd_Disable);
|
emit sigSendXMLAnswer(cmd_Disable);
|
||||||
tcpClient->setDisconnect();
|
tcpClient->setDisconnect();
|
||||||
entryWidget->showLoginWidget(true);
|
entryWidget->showLoginWidget(true);
|
||||||
widgetManager->getMainWindow()->showOfflineButton(true);
|
|
||||||
widgetManager->activateLoadingAnimation(false);
|
widgetManager->activateLoadingAnimation(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,12 +391,6 @@ void CoreManager::createNewServerSettings()
|
|||||||
dataParserOutput->createServerSettings();
|
dataParserOutput->createServerSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreManager::checkAppAvailable()
|
|
||||||
{
|
|
||||||
bool isAvailable = externalExecuter->findApp();
|
|
||||||
widgetManager->setAppAvailable(isAvailable);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CoreManager::setLanguage(const QString& language)
|
void CoreManager::setLanguage(const QString& language)
|
||||||
{
|
{
|
||||||
if (language == "RUS")
|
if (language == "RUS")
|
||||||
|
|||||||
@@ -43,9 +43,6 @@ public:
|
|||||||
void sendPacketType(PacketType packetType);
|
void sendPacketType(PacketType packetType);
|
||||||
|
|
||||||
void saveServerSettingsWithConnect();
|
void saveServerSettingsWithConnect();
|
||||||
|
|
||||||
|
|
||||||
void checkAppAvailable();
|
|
||||||
void exit();
|
void exit();
|
||||||
void initializeWidgets();
|
void initializeWidgets();
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
: QMainWindow(parent),
|
: QMainWindow(parent),
|
||||||
ui(new Ui::MainWindow),
|
ui(new Ui::MainWindow),
|
||||||
bottomRightPosition(QRect(530,506,250,40)),
|
bottomRightPosition(QRect(530,506,250,40)),
|
||||||
offlinePosition(240,340,300,40)
|
offlinePosition(240,350,300,40)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setAttribute(Qt::WA_TranslucentBackground);
|
setAttribute(Qt::WA_TranslucentBackground);
|
||||||
@@ -44,7 +44,8 @@ void MainWindow::initialize(ResourceManager *resourceManager)
|
|||||||
bindConnection();
|
bindConnection();
|
||||||
this->resourceManager = resourceManager;
|
this->resourceManager = resourceManager;
|
||||||
ui->LanguageWidget->hide();
|
ui->LanguageWidget->hide();
|
||||||
|
ui->offlineStartButton->setGeometry(offlinePosition);
|
||||||
|
ui->offlineStartButton->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setStartState()
|
void MainWindow::setStartState()
|
||||||
@@ -74,9 +75,7 @@ void MainWindow::bindConnection()
|
|||||||
void MainWindow::loadCompleteState()
|
void MainWindow::loadCompleteState()
|
||||||
{
|
{
|
||||||
ui->inlineTextDebug->setText(tr("Обновление завершено"));
|
ui->inlineTextDebug->setText(tr("Обновление завершено"));
|
||||||
ui->offlineStartButton->setEnabled(true);
|
|
||||||
ui->autostartCheckBox->hide();
|
ui->autostartCheckBox->hide();
|
||||||
ui->offlineStartButton->show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::getIsAutoStart()
|
bool MainWindow::getIsAutoStart()
|
||||||
@@ -133,15 +132,9 @@ void MainWindow::serverNotifyShow(QString text, int durationMS)
|
|||||||
void MainWindow::setLoginSuccessState()
|
void MainWindow::setLoginSuccessState()
|
||||||
{
|
{
|
||||||
ui->settingsButton->hide();
|
ui->settingsButton->hide();
|
||||||
ui->offlineStartButton->show();
|
|
||||||
ui->versionLayoutWidget->show();
|
ui->versionLayoutWidget->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setStartOfflineButton(bool isAvailable)
|
|
||||||
{
|
|
||||||
ui->offlineStartButton->setEnabled(isAvailable);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::setClientVersionName(const QString& versionName)
|
void MainWindow::setClientVersionName(const QString& versionName)
|
||||||
{
|
{
|
||||||
ui->valueClientVersion->setText(versionName);
|
ui->valueClientVersion->setText(versionName);
|
||||||
@@ -153,9 +146,7 @@ void MainWindow::showConnectionEmpty()
|
|||||||
QPalette palette = ui->notificationLabel->palette();
|
QPalette palette = ui->notificationLabel->palette();
|
||||||
palette.setColor(ui->notificationLabel->foregroundRole(),Qt::red);
|
palette.setColor(ui->notificationLabel->foregroundRole(),Qt::red);
|
||||||
ui->notificationLabel->setText(tr("Соединение отсутсвует"));
|
ui->notificationLabel->setText(tr("Соединение отсутсвует"));
|
||||||
ui->offlineStartButton->show();
|
|
||||||
ui->offlineStartButton->setGeometry(offlinePosition);
|
|
||||||
ui->offlineStartButton->raise();
|
|
||||||
ui->settingsButton->show();
|
ui->settingsButton->show();
|
||||||
ui->unsafeChangingButton->hide();
|
ui->unsafeChangingButton->hide();
|
||||||
}
|
}
|
||||||
@@ -178,9 +169,6 @@ void MainWindow::slotConnectionState(bool flag)
|
|||||||
{
|
{
|
||||||
palette.setColor(ui->notificationLabel->foregroundRole(),Qt::green);
|
palette.setColor(ui->notificationLabel->foregroundRole(),Qt::green);
|
||||||
ui->notificationLabel->setText(tr("Соединение установлено"));
|
ui->notificationLabel->setText(tr("Соединение установлено"));
|
||||||
|
|
||||||
ui->offlineStartButton->show();
|
|
||||||
ui->offlineStartButton->setGeometry(bottomRightPosition);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -193,11 +181,19 @@ void MainWindow::slotConnectionState(bool flag)
|
|||||||
|
|
||||||
void MainWindow::slotServerDisconnect()
|
void MainWindow::slotServerDisconnect()
|
||||||
{
|
{
|
||||||
|
checkApp();
|
||||||
ui->autostartCheckBox->hide();
|
ui->autostartCheckBox->hide();
|
||||||
ui->inlineTextDebug->setText("");
|
ui->inlineTextDebug->setText("");
|
||||||
slotConnectionState(false);
|
slotConnectionState(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::checkApp()
|
||||||
|
{
|
||||||
|
bool isAvailable = emit sigAppAvailable();
|
||||||
|
if (isAvailable) ui->offlineStartButton->show();
|
||||||
|
else ui->offlineStartButton->hide();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::slotDisableNotify()
|
void MainWindow::slotDisableNotify()
|
||||||
{
|
{
|
||||||
ui->notificationLabel->hide();
|
ui->notificationLabel->hide();
|
||||||
@@ -209,14 +205,6 @@ void MainWindow::slotDisableNotify()
|
|||||||
timer->stop();
|
timer->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::showOfflineButton(bool flag)
|
|
||||||
{
|
|
||||||
if (flag)
|
|
||||||
ui->offlineStartButton->show();
|
|
||||||
else
|
|
||||||
ui->offlineStartButton->hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::on_settingsButton_clicked()
|
void MainWindow::on_settingsButton_clicked()
|
||||||
{
|
{
|
||||||
emit sigShowSettings(true);
|
emit sigShowSettings(true);
|
||||||
@@ -233,14 +221,14 @@ void MainWindow::loadToServer()
|
|||||||
{
|
{
|
||||||
ui->mainFrame->show();
|
ui->mainFrame->show();
|
||||||
ui->inlineTextDebug->setText(tr("Отправка файлов..."));
|
ui->inlineTextDebug->setText(tr("Отправка файлов..."));
|
||||||
ui->offlineStartButton->setEnabled(false);
|
//ui->offlineStartButton->setEnabled(false);
|
||||||
ui->unsafeChangingButton->hide();
|
ui->unsafeChangingButton->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::undoCurrentChanges()
|
void MainWindow::undoCurrentChanges()
|
||||||
{
|
{
|
||||||
ui->mainFrame->show();
|
ui->mainFrame->show();
|
||||||
ui->offlineStartButton->setEnabled(false);
|
//ui->offlineStartButton->setEnabled(false);
|
||||||
ui->unsafeChangingButton->hide();
|
ui->unsafeChangingButton->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,7 +248,8 @@ void MainWindow::on_exitButton_clicked()
|
|||||||
void MainWindow::slotShowUpdateInfo()
|
void MainWindow::slotShowUpdateInfo()
|
||||||
{
|
{
|
||||||
ui->unsafeChangingButton->show();
|
ui->unsafeChangingButton->show();
|
||||||
ui->offlineStartButton->setGeometry(bottomRightPosition);
|
//ui->offlineStartButton->setGeometry(bottomRightPosition);
|
||||||
|
//ui->offlineStartButton->setParent(ui->changeButtonGroup->widget());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setUpUi()
|
void MainWindow::setUpUi()
|
||||||
@@ -268,9 +257,10 @@ void MainWindow::setUpUi()
|
|||||||
ui->notificationLabel->hide();
|
ui->notificationLabel->hide();
|
||||||
ui->unsafeChangingButton->hide();
|
ui->unsafeChangingButton->hide();
|
||||||
|
|
||||||
ui->offlineStartButton->show();
|
//ui->offlineStartButton->show();
|
||||||
ui->offlineStartButton->setEnabled(false);
|
//ui->offlineStartButton->setEnabled(false);
|
||||||
ui->offlineStartButton->setGeometry(bottomRightPosition);
|
//ui->offlineStartButton->setGeometry(bottomRightPosition);
|
||||||
|
//ui->offlineStartButton->setParent(ui->changeButtonGroup->widget());
|
||||||
|
|
||||||
ui->settingsButton->setIcon(*resourceManager->getSettingsIcon());
|
ui->settingsButton->setIcon(*resourceManager->getSettingsIcon());
|
||||||
|
|
||||||
@@ -324,9 +314,14 @@ QHBoxLayout *MainWindow::getDisplayLayout() const
|
|||||||
return ui->displayLayout;
|
return ui->displayLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QPushButton *MainWindow::getStartOfflineButton() const
|
||||||
|
{
|
||||||
|
return ui->offlineStartButton;
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::addWidgetToChangeGroup(CommonButtonGroupWidget *commonWidgetGroup)
|
void MainWindow::addWidgetToChangeGroup(CommonButtonGroupWidget *commonWidgetGroup)
|
||||||
{
|
{
|
||||||
ui->changButtonGroup->addWidget(commonWidgetGroup);
|
ui->changeButtonGroup->addWidget(commonWidgetGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::addWidgetToInteractiveGroup(EntryWidget *entryWidget)
|
void MainWindow::addWidgetToInteractiveGroup(EntryWidget *entryWidget)
|
||||||
|
|||||||
10
mainwindow.h
10
mainwindow.h
@@ -4,6 +4,7 @@
|
|||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
|
#include <QPushButton>
|
||||||
|
|
||||||
#include <Widgets/commonbuttongroupwidget.h>
|
#include <Widgets/commonbuttongroupwidget.h>
|
||||||
#include <Widgets/updatenotifywidget.h>
|
#include <Widgets/updatenotifywidget.h>
|
||||||
@@ -43,14 +44,13 @@ public:
|
|||||||
void setNeedUpdateState(const QString ¬ifyText);
|
void setNeedUpdateState(const QString ¬ifyText);
|
||||||
void setLastVersionState();
|
void setLastVersionState();
|
||||||
void showConnectionEmpty();
|
void showConnectionEmpty();
|
||||||
void showOfflineButton(bool flag);
|
|
||||||
void setStartOfflineButton(bool isAvailable);
|
|
||||||
void setStartState();
|
void setStartState();
|
||||||
void serverNotifyShow(QString text, int durationMS = 3000);
|
void serverNotifyShow(QString text, int durationMS = 3000);
|
||||||
void showError(ErrorsEnum errorNum);
|
void showError(ErrorsEnum errorNum);
|
||||||
|
|
||||||
QHBoxLayout *getDisplayLayout() const;
|
QHBoxLayout *getDisplayLayout() const;
|
||||||
void serverBlockedState();
|
void serverBlockedState();
|
||||||
|
QPushButton *getStartOfflineButton() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void slotShowUpdateInfo();
|
void slotShowUpdateInfo();
|
||||||
void slotConnectionState(bool flag);
|
void slotConnectionState(bool flag);
|
||||||
@@ -66,6 +66,8 @@ signals:
|
|||||||
void sigExit();
|
void sigExit();
|
||||||
void sigTryLogin();
|
void sigTryLogin();
|
||||||
void sigStartOffline();
|
void sigStartOffline();
|
||||||
|
bool sigAppAvailable();
|
||||||
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_settingsButton_clicked();
|
void on_settingsButton_clicked();
|
||||||
@@ -84,11 +86,13 @@ private:
|
|||||||
QPixmap background;
|
QPixmap background;
|
||||||
QRect bottomRightPosition;
|
QRect bottomRightPosition;
|
||||||
QRect offlinePosition;
|
QRect offlinePosition;
|
||||||
|
QPushButton startOfflineButton;
|
||||||
void bindClient();
|
void bindClient();
|
||||||
void bindConnection();
|
void bindConnection();
|
||||||
void setUpUi();
|
void setUpUi();
|
||||||
|
|
||||||
void paintEvent(QPaintEvent *event);
|
void paintEvent(QPaintEvent *event);
|
||||||
|
void checkApp();
|
||||||
protected:
|
protected:
|
||||||
virtual void keyPressEvent(QKeyEvent *event);
|
virtual void keyPressEvent(QKeyEvent *event);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -249,9 +249,9 @@
|
|||||||
<widget class="QWidget" name="versionLayoutWidget" native="true">
|
<widget class="QWidget" name="versionLayoutWidget" native="true">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>529</x>
|
<x>540</x>
|
||||||
<y>450</y>
|
<y>450</y>
|
||||||
<width>250</width>
|
<width>241</width>
|
||||||
<height>60</height>
|
<height>60</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -420,46 +420,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="offlineStartButton">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>530</x>
|
|
||||||
<y>511</y>
|
|
||||||
<width>250</width>
|
|
||||||
<height>40</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>250</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>1500</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Запуск в автономном режиме</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="verticalLayoutWidget_2">
|
<widget class="QWidget" name="verticalLayoutWidget_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
@@ -478,9 +438,9 @@
|
|||||||
<widget class="QWidget" name="verticalLayoutWidget_3">
|
<widget class="QWidget" name="verticalLayoutWidget_3">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>10</x>
|
||||||
<y>440</y>
|
<y>440</y>
|
||||||
<width>511</width>
|
<width>501</width>
|
||||||
<height>61</height>
|
<height>61</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -520,6 +480,46 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QPushButton" name="offlineStartButton">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>240</x>
|
||||||
|
<y>350</y>
|
||||||
|
<width>300</width>
|
||||||
|
<height>40</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>250</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>1500</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Запуск в автономном режиме</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="headerWidget" native="true">
|
<widget class="QWidget" name="headerWidget" native="true">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
@@ -617,13 +617,13 @@
|
|||||||
<widget class="QWidget" name="verticalLayoutWidget">
|
<widget class="QWidget" name="verticalLayoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>20</x>
|
||||||
<y>550</y>
|
<y>550</y>
|
||||||
<width>531</width>
|
<width>761</width>
|
||||||
<height>41</height>
|
<height>42</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="changButtonGroup">
|
<layout class="QHBoxLayout" name="changeButtonGroup">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -129,7 +129,9 @@ void WidgetManager::setConnectionState(bool isConnected)
|
|||||||
mainWindow->slotConnectionState(isConnected);
|
mainWindow->slotConnectionState(isConnected);
|
||||||
if (isConnected)
|
if (isConnected)
|
||||||
{
|
{
|
||||||
|
mainWindow->getStartOfflineButton()->hide();
|
||||||
entryWidget->showLoginWidget(true);
|
entryWidget->showLoginWidget(true);
|
||||||
|
commonButtonGroupWidget->loginState();
|
||||||
}
|
}
|
||||||
waitAnimationWidget->hideWithStop();
|
waitAnimationWidget->hideWithStop();
|
||||||
}
|
}
|
||||||
@@ -169,12 +171,6 @@ void WidgetManager::showMainFrame(bool flag)
|
|||||||
mainWindow->showMainFrame(flag);
|
mainWindow->showMainFrame(flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WidgetManager::setAppAvailable(bool isAvailable)
|
|
||||||
{
|
|
||||||
commonButtonGroupWidget->startButtonActive(isAvailable);
|
|
||||||
mainWindow->setStartOfflineButton(isAvailable);
|
|
||||||
}
|
|
||||||
|
|
||||||
void WidgetManager::showSettings(bool isActive)
|
void WidgetManager::showSettings(bool isActive)
|
||||||
{
|
{
|
||||||
entryWidget->settingsState();
|
entryWidget->settingsState();
|
||||||
|
|||||||
@@ -45,13 +45,14 @@ public:
|
|||||||
|
|
||||||
void setUndoCurrentChangesState();
|
void setUndoCurrentChangesState();
|
||||||
void showMainFrame(bool flag);
|
void showMainFrame(bool flag);
|
||||||
void setAppAvailable(bool isAvailable);
|
|
||||||
void slotInlineDebug(const QString &text);
|
void slotInlineDebug(const QString &text);
|
||||||
public slots:
|
public slots:
|
||||||
void showSettings(bool isActive);
|
void showSettings(bool isActive);
|
||||||
void slotSetLoadSettings(Settings *settings);
|
void slotSetLoadSettings(Settings *settings);
|
||||||
void slotActivateLoadAnimation(bool flag);
|
void slotActivateLoadAnimation(bool flag);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
bool sigAppAvailable();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MainWindow *mainWindow;
|
MainWindow *mainWindow;
|
||||||
|
|||||||
Reference in New Issue
Block a user