Авторизация Кнопка Login in

This commit is contained in:
2025-09-15 12:45:53 +03:00
parent 762437a908
commit 8c3e636d27
4 changed files with 36 additions and 47 deletions

View File

@@ -17,3 +17,8 @@ DialogAuthorizationInstructor::~DialogAuthorizationInstructor()
{ {
delete ui; delete ui;
} }
void DialogAuthorizationInstructor::on_btnOK_clicked()
{
this->accept();
}

View File

@@ -16,6 +16,7 @@ public:
explicit DialogAuthorizationInstructor(QWidget *parent = nullptr); explicit DialogAuthorizationInstructor(QWidget *parent = nullptr);
~DialogAuthorizationInstructor(); ~DialogAuthorizationInstructor();
public:
QString getLogin() QString getLogin()
{ {
return ui->editLogin->text(); return ui->editLogin->text();
@@ -26,6 +27,9 @@ public:
return ui->editPassword->text(); return ui->editPassword->text();
} }
private slots:
void on_btnOK_clicked();
private: private:
Ui::DialogAuthorizationInstructor *ui; Ui::DialogAuthorizationInstructor *ui;
}; };

View File

@@ -87,22 +87,34 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <spacer name="verticalSpacer">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="standardButtons"> <property name="sizeHint" stdset="0">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> <size>
<width>20</width>
<height>40</height>
</size>
</property> </property>
</widget> </spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="btnOK">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Login in</string>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</item> </item>
@@ -111,38 +123,5 @@
<resources> <resources>
<include location="../resources.qrc"/> <include location="../resources.qrc"/>
</resources> </resources>
<connections> <connections/>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>DialogAuthorizationInstructor</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DialogAuthorizationInstructor</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui> </ui>

View File

@@ -289,6 +289,7 @@ bool InstructorsAndTraineesWidget::authorizationInstructorDialog(QWidget* parent
DialogAuthorizationInstructor dlg(parent); DialogAuthorizationInstructor dlg(parent);
dlg.setWindowTitle(tr("Instructor authorization")); dlg.setWindowTitle(tr("Instructor authorization"));
dlg.setWindowFlags(dlg.windowFlags() & ~Qt::WindowContextHelpButtonHint); dlg.setWindowFlags(dlg.windowFlags() & ~Qt::WindowContextHelpButtonHint);
dlg.setStyleSheet(this->styleSheet());
do do
{ {