mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
refact
This commit is contained in:
@@ -23,6 +23,7 @@ target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../
|
|||||||
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/connectorToServer)
|
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/connectorToServer)
|
||||||
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/connectorToServer/Core)
|
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/connectorToServer/Core)
|
||||||
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/messanger)
|
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/messanger)
|
||||||
|
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/widgets)
|
||||||
if(PROJECT_TYPE_DEBUG)
|
if(PROJECT_TYPE_DEBUG)
|
||||||
target_link_directories(GUIdataBaseLMS PUBLIC ${REPO_PATH}/BUILDS/Debug64/InstructorsAndTrainees)
|
target_link_directories(GUIdataBaseLMS PUBLIC ${REPO_PATH}/BUILDS/Debug64/InstructorsAndTrainees)
|
||||||
else()
|
else()
|
||||||
|
|||||||
@@ -132,9 +132,9 @@ add_library(InstructorsAndTrainees SHARED
|
|||||||
tasks/subprocitemwidget.h
|
tasks/subprocitemwidget.h
|
||||||
tasks/subprocitemwidget.ui
|
tasks/subprocitemwidget.ui
|
||||||
|
|
||||||
widgets/newversionwidget.cpp
|
widgets/dialognewversion.cpp
|
||||||
widgets/newversionwidget.h
|
widgets/dialognewversion.h
|
||||||
widgets/newversionwidget.ui
|
widgets/dialognewversion.ui
|
||||||
widgets/versionselectwidget.cpp
|
widgets/versionselectwidget.cpp
|
||||||
widgets/versionselectwidget.h
|
widgets/versionselectwidget.h
|
||||||
widgets/versionselectwidget.ui
|
widgets/versionselectwidget.ui
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include <QRegExpValidator>
|
#include <QRegExpValidator>
|
||||||
|
#include <QToolTip>
|
||||||
#include "dialogauthorization.h"
|
#include "dialogauthorization.h"
|
||||||
#include "ui_dialogauthorization.h"
|
#include "ui_dialogauthorization.h"
|
||||||
|
|
||||||
@@ -57,3 +58,8 @@ void DialogAuthorization::on_btnViewPassword_released()
|
|||||||
{
|
{
|
||||||
ui->editPassword->setEchoMode(QLineEdit::EchoMode::Password);
|
ui->editPassword->setEchoMode(QLineEdit::EchoMode::Password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DialogAuthorization::on_editLogin_inputRejected()
|
||||||
|
{
|
||||||
|
QToolTip::showText(QCursor::pos(),tr("Only Latin letters and numbers"));
|
||||||
|
}
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ private slots:
|
|||||||
void on_btnViewPassword_pressed();
|
void on_btnViewPassword_pressed();
|
||||||
void on_btnViewPassword_released();
|
void on_btnViewPassword_released();
|
||||||
|
|
||||||
|
void on_editLogin_inputRejected();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::DialogAuthorization *ui;
|
Ui::DialogAuthorization *ui;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "hashtools.h"
|
#include "hashtools.h"
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QRegExpValidator>
|
#include <QRegExpValidator>
|
||||||
|
#include <QToolTip>
|
||||||
|
|
||||||
DialogEditInstructor::DialogEditInstructor(bool adminMode, QWidget *parent) :
|
DialogEditInstructor::DialogEditInstructor(bool adminMode, QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
@@ -144,3 +145,8 @@ void DialogEditInstructor::on_btnChangePassword_clicked()
|
|||||||
|
|
||||||
ui->editPassword->setFocus();
|
ui->editPassword->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DialogEditInstructor::on_editLogin_inputRejected()
|
||||||
|
{
|
||||||
|
QToolTip::showText(QCursor::pos(),tr("Only Latin letters and numbers"));
|
||||||
|
}
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ private slots:
|
|||||||
|
|
||||||
void on_btnChangePassword_clicked();
|
void on_btnChangePassword_clicked();
|
||||||
|
|
||||||
|
void on_editLogin_inputRejected();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void verify();
|
void verify();
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "hashtools.h"
|
#include "hashtools.h"
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QRegExpValidator>
|
#include <QRegExpValidator>
|
||||||
|
#include <QToolTip>
|
||||||
|
|
||||||
DialogEditTrainee::DialogEditTrainee(bool adminMode, QWidget *parent) :
|
DialogEditTrainee::DialogEditTrainee(bool adminMode, QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
@@ -137,3 +138,8 @@ void DialogEditTrainee::on_btnChangePassword_clicked()
|
|||||||
|
|
||||||
ui->editPassword->setFocus();
|
ui->editPassword->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DialogEditTrainee::on_editLogin_inputRejected()
|
||||||
|
{
|
||||||
|
QToolTip::showText(QCursor::pos(),tr("Only Latin letters and numbers"));
|
||||||
|
}
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ private slots:
|
|||||||
|
|
||||||
void on_btnChangePassword_clicked();
|
void on_btnChangePassword_clicked();
|
||||||
|
|
||||||
|
void on_editLogin_inputRejected();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void verify();
|
void verify();
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +1,34 @@
|
|||||||
#include "newversionwidget.h"
|
#include "dialognewversion.h"
|
||||||
#include "ui_newversionwidget.h"
|
#include "ui_dialognewversion.h"
|
||||||
|
|
||||||
NewVersionWidget::NewVersionWidget(QWidget *parent) :
|
DialogNewVersion::DialogNewVersion(QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
ui(new Ui::NewVersionWidget),
|
ui(new Ui::DialogNewVersion),
|
||||||
versionSelectWidget(nullptr),
|
versionSelectWidget(nullptr),
|
||||||
validator(nullptr)
|
validator(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
validator = new QRegExpValidator(QRegExp("^[A-Za-z0-9]{20}$"));
|
||||||
|
ui->lineEdit->setValidator(validator);
|
||||||
|
|
||||||
setMinimumSize(200, 100);
|
setMinimumSize(200, 100);
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
setWindowTitle(tr("New version"));
|
setWindowTitle(tr("New version"));
|
||||||
}
|
}
|
||||||
|
|
||||||
NewVersionWidget::~NewVersionWidget()
|
DialogNewVersion::~DialogNewVersion()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NewVersionWidget::initialize(VersionSelectWidget *versionSelectWidget, QString prevName)
|
void DialogNewVersion::initialize(VersionSelectWidget *versionSelectWidget, QString prevName)
|
||||||
{
|
{
|
||||||
this->versionSelectWidget = versionSelectWidget;
|
this->versionSelectWidget = versionSelectWidget;
|
||||||
ui->prevVerValue->setText(prevName);
|
ui->prevVerValue->setText(prevName);
|
||||||
validator = new QRegExpValidator(QRegExp("^[A-Za-z0-9]{20}$"));
|
|
||||||
ui->lineEdit->setValidator(validator);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NewVersionWidget::on_createButton_clicked()
|
void DialogNewVersion::on_createButton_clicked()
|
||||||
{
|
{
|
||||||
if(ui->lineEdit->text() != "")
|
if(ui->lineEdit->text() != "")
|
||||||
{
|
{
|
||||||
@@ -36,12 +37,12 @@ void NewVersionWidget::on_createButton_clicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NewVersionWidget::on_cancelButton_clicked()
|
void DialogNewVersion::on_cancelButton_clicked()
|
||||||
{
|
{
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NewVersionWidget::on_lineEdit_inputRejected()
|
void DialogNewVersion::on_lineEdit_inputRejected()
|
||||||
{
|
{
|
||||||
QToolTip::showText(QCursor::pos(),tr("Only Latin letters and numbers"));
|
QToolTip::showText(QCursor::pos(),tr("Only Latin letters and numbers"));
|
||||||
}
|
}
|
||||||
@@ -1,24 +1,25 @@
|
|||||||
#ifndef NEWVERSIONWIDGET_H
|
#ifndef DIALOGNEWVERSION_H
|
||||||
#define NEWVERSIONWIDGET_H
|
#define DIALOGNEWVERSION_H
|
||||||
|
|
||||||
#include <Widgets/versionselectwidget.h>
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
#include <QToolTip>
|
#include <QToolTip>
|
||||||
|
|
||||||
|
#include "versionselectwidget.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class NewVersionWidget;
|
class DialogNewVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
class VersionSelectWidget;
|
class VersionSelectWidget;
|
||||||
|
|
||||||
class NewVersionWidget : public QDialog
|
class DialogNewVersion : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit NewVersionWidget(QWidget *parent = nullptr);
|
explicit DialogNewVersion(QWidget *parent = nullptr);
|
||||||
~NewVersionWidget();
|
~DialogNewVersion();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void initialize(VersionSelectWidget *versionSelectWidget, QString prevName);
|
void initialize(VersionSelectWidget *versionSelectWidget, QString prevName);
|
||||||
@@ -29,11 +30,11 @@ private slots:
|
|||||||
void on_lineEdit_inputRejected();
|
void on_lineEdit_inputRejected();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::NewVersionWidget *ui;
|
Ui::DialogNewVersion *ui;
|
||||||
VersionSelectWidget *versionSelectWidget;
|
VersionSelectWidget *versionSelectWidget;
|
||||||
QRegExpValidator *validator;
|
QRegExpValidator *validator;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // NEWVERSIONWIDGET_H
|
#endif // DIALOGNEWVERSION_H
|
||||||
|
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>NewVersionWidget</class>
|
<class>DialogNewVersion</class>
|
||||||
<widget class="QWidget" name="NewVersionWidget">
|
<widget class="QDialog" name="DialogNewVersion">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
@@ -83,10 +83,10 @@ void VersionSelectWidget::on_createDuplicateButton_clicked()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NewVersionWidget *newVersionWidget = new NewVersionWidget(this);
|
DialogNewVersion *dlgNewVersion = new DialogNewVersion(this);
|
||||||
newVersionWidget->initialize(this,selectedVersion->getViewName());
|
dlgNewVersion->initialize(this,selectedVersion->getViewName());
|
||||||
newVersionWidget->exec();
|
dlgNewVersion->exec();
|
||||||
delete newVersionWidget;
|
delete dlgNewVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VersionSelectWidget::sendCopyEmit(QString newName)
|
void VersionSelectWidget::sendCopyEmit(QString newName)
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
#include <Core/versioncontainer.h>
|
#include <Core/versioncontainer.h>
|
||||||
#include <Core/notifycontroller.h>
|
#include <Core/notifycontroller.h>
|
||||||
#include <streamingversiondata.h>
|
#include <streamingversiondata.h>
|
||||||
#include <Widgets/newversionwidget.h>
|
#include <dialognewversion.h>
|
||||||
#include <widgets/waitanimationwidget.h>
|
#include <waitanimationwidget.h>
|
||||||
|
|
||||||
#include "recognizesystem.h"
|
#include "recognizesystem.h"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user