mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Переименовал Диалог Авторизации
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
#include <QRegExpValidator>
|
||||
#include "dialogauthorizationinstructor.h"
|
||||
#include "ui_dialogauthorizationinstructor.h"
|
||||
|
||||
DialogAuthorizationInstructor::DialogAuthorizationInstructor(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogAuthorizationInstructor)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->editLogin->setProperty("mandatoryField", true);
|
||||
ui->editPassword->setProperty("mandatoryField", true);
|
||||
|
||||
ui->btnViewPassword->setObjectName("btnViewPassword");
|
||||
|
||||
ui->editPassword->setEchoMode(QLineEdit::EchoMode::Password);
|
||||
|
||||
ui->editLogin->setValidator(new QRegExpValidator(QRegExp("[A-Za-z\\d]+"), this));
|
||||
}
|
||||
|
||||
DialogAuthorizationInstructor::~DialogAuthorizationInstructor()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
QString DialogAuthorizationInstructor::getLogin()
|
||||
{
|
||||
return ui->editLogin->text();
|
||||
}
|
||||
|
||||
void DialogAuthorizationInstructor::setLogin(QString login)
|
||||
{
|
||||
ui->editLogin->setText(login);
|
||||
}
|
||||
|
||||
QString DialogAuthorizationInstructor::getPassword()
|
||||
{
|
||||
return ui->editPassword->text();
|
||||
}
|
||||
|
||||
void DialogAuthorizationInstructor::setPassword(QString password)
|
||||
{
|
||||
ui->editPassword->setText(password);
|
||||
}
|
||||
|
||||
void DialogAuthorizationInstructor::on_btnLogIn_clicked()
|
||||
{
|
||||
this->accept();
|
||||
}
|
||||
|
||||
void DialogAuthorizationInstructor::on_btnViewPassword_pressed()
|
||||
{
|
||||
ui->editPassword->setEchoMode(QLineEdit::EchoMode::Normal);
|
||||
}
|
||||
|
||||
void DialogAuthorizationInstructor::on_btnViewPassword_released()
|
||||
{
|
||||
ui->editPassword->setEchoMode(QLineEdit::EchoMode::Password);
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
#ifndef DIALOGAUTHORIZATIONINSTRUCTOR_H
|
||||
#define DIALOGAUTHORIZATIONINSTRUCTOR_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "instructorsAndTrainees_global.h"
|
||||
//#include "ui_dialogauthorizationinstructor.h"
|
||||
|
||||
namespace Ui {
|
||||
class DialogAuthorizationInstructor;
|
||||
}
|
||||
|
||||
class INSTRUCTORSANDTRAINEES_EXPORT DialogAuthorizationInstructor : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogAuthorizationInstructor(QWidget *parent = nullptr);
|
||||
~DialogAuthorizationInstructor();
|
||||
|
||||
public:
|
||||
QString getLogin();
|
||||
void setLogin(QString login);
|
||||
|
||||
QString getPassword();
|
||||
void setPassword(QString password);
|
||||
|
||||
private slots:
|
||||
void on_btnLogIn_clicked();
|
||||
void on_btnViewPassword_pressed();
|
||||
void on_btnViewPassword_released();
|
||||
|
||||
private:
|
||||
Ui::DialogAuthorizationInstructor *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOGAUTHORIZATIONINSTRUCTOR_H
|
||||
@@ -1,142 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogAuthorizationInstructor</class>
|
||||
<widget class="QDialog" name="DialogAuthorizationInstructor">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>300</width>
|
||||
<height>140</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Tahoma</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Instructor authorization</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||
<normaloff>:/resources/icons/lms.png</normaloff>:/resources/icons/lms.png</iconset>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Main">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_LP">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Labels">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Login">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Login</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Password">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Edites">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="editLogin">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Password">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="editPassword">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="btnViewPassword">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../InstructorsAndTrainees.qrc">
|
||||
<normaloff>:/resources/icons/eye.png</normaloff>:/resources/icons/eye.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_Btn">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnLogIn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Log in</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../InstructorsAndTrainees.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user