File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,166 @@
|
||||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'change_password_dialog.h'
|
||||
**
|
||||
** Created by: The Qt Meta Object Compiler version 68 (Qt 6.5.3)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../src/frontend/change_password_dialog.h"
|
||||
#include <QtGui/qtextcursor.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
|
||||
#if __has_include(<QtCore/qtmochelpers.h>)
|
||||
#include <QtCore/qtmochelpers.h>
|
||||
#else
|
||||
QT_BEGIN_MOC_NAMESPACE
|
||||
#endif
|
||||
|
||||
|
||||
#include <memory>
|
||||
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'change_password_dialog.h' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 68
|
||||
#error "This file was generated using the moc from 6.5.3. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
#ifndef Q_CONSTINIT
|
||||
#define Q_CONSTINIT
|
||||
#endif
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
QT_WARNING_DISABLE_GCC("-Wuseless-cast")
|
||||
namespace {
|
||||
|
||||
#ifdef QT_MOC_HAS_STRINGDATA
|
||||
struct qt_meta_stringdata_CLASSChangePasswordDialogENDCLASS_t {};
|
||||
static constexpr auto qt_meta_stringdata_CLASSChangePasswordDialogENDCLASS = QtMocHelpers::stringData(
|
||||
"ChangePasswordDialog",
|
||||
"onChangePasswordClicked",
|
||||
"",
|
||||
"onCancelClicked",
|
||||
"validatePassword"
|
||||
);
|
||||
#else // !QT_MOC_HAS_STRING_DATA
|
||||
struct qt_meta_stringdata_CLASSChangePasswordDialogENDCLASS_t {
|
||||
uint offsetsAndSizes[10];
|
||||
char stringdata0[21];
|
||||
char stringdata1[24];
|
||||
char stringdata2[1];
|
||||
char stringdata3[16];
|
||||
char stringdata4[17];
|
||||
};
|
||||
#define QT_MOC_LITERAL(ofs, len) \
|
||||
uint(sizeof(qt_meta_stringdata_CLASSChangePasswordDialogENDCLASS_t::offsetsAndSizes) + ofs), len
|
||||
Q_CONSTINIT static const qt_meta_stringdata_CLASSChangePasswordDialogENDCLASS_t qt_meta_stringdata_CLASSChangePasswordDialogENDCLASS = {
|
||||
{
|
||||
QT_MOC_LITERAL(0, 20), // "ChangePasswordDialog"
|
||||
QT_MOC_LITERAL(21, 23), // "onChangePasswordClicked"
|
||||
QT_MOC_LITERAL(45, 0), // ""
|
||||
QT_MOC_LITERAL(46, 15), // "onCancelClicked"
|
||||
QT_MOC_LITERAL(62, 16) // "validatePassword"
|
||||
},
|
||||
"ChangePasswordDialog",
|
||||
"onChangePasswordClicked",
|
||||
"",
|
||||
"onCancelClicked",
|
||||
"validatePassword"
|
||||
};
|
||||
#undef QT_MOC_LITERAL
|
||||
#endif // !QT_MOC_HAS_STRING_DATA
|
||||
} // unnamed namespace
|
||||
|
||||
Q_CONSTINIT static const uint qt_meta_data_CLASSChangePasswordDialogENDCLASS[] = {
|
||||
|
||||
// content:
|
||||
11, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
3, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
0, // flags
|
||||
0, // signalCount
|
||||
|
||||
// slots: name, argc, parameters, tag, flags, initial metatype offsets
|
||||
1, 0, 32, 2, 0x08, 1 /* Private */,
|
||||
3, 0, 33, 2, 0x08, 2 /* Private */,
|
||||
4, 0, 34, 2, 0x08, 3 /* Private */,
|
||||
|
||||
// slots: parameters
|
||||
QMetaType::Void,
|
||||
QMetaType::Void,
|
||||
QMetaType::Void,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
Q_CONSTINIT const QMetaObject ChangePasswordDialog::staticMetaObject = { {
|
||||
QMetaObject::SuperData::link<QDialog::staticMetaObject>(),
|
||||
qt_meta_stringdata_CLASSChangePasswordDialogENDCLASS.offsetsAndSizes,
|
||||
qt_meta_data_CLASSChangePasswordDialogENDCLASS,
|
||||
qt_static_metacall,
|
||||
nullptr,
|
||||
qt_incomplete_metaTypeArray<qt_meta_stringdata_CLASSChangePasswordDialogENDCLASS_t,
|
||||
// Q_OBJECT / Q_GADGET
|
||||
QtPrivate::TypeAndForceComplete<ChangePasswordDialog, std::true_type>,
|
||||
// method 'onChangePasswordClicked'
|
||||
QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
// method 'onCancelClicked'
|
||||
QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
// method 'validatePassword'
|
||||
QtPrivate::TypeAndForceComplete<void, std::false_type>
|
||||
>,
|
||||
nullptr
|
||||
} };
|
||||
|
||||
void ChangePasswordDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
auto *_t = static_cast<ChangePasswordDialog *>(_o);
|
||||
(void)_t;
|
||||
switch (_id) {
|
||||
case 0: _t->onChangePasswordClicked(); break;
|
||||
case 1: _t->onCancelClicked(); break;
|
||||
case 2: _t->validatePassword(); break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
(void)_a;
|
||||
}
|
||||
|
||||
const QMetaObject *ChangePasswordDialog::metaObject() const
|
||||
{
|
||||
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
||||
}
|
||||
|
||||
void *ChangePasswordDialog::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return nullptr;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_CLASSChangePasswordDialogENDCLASS.stringdata0))
|
||||
return static_cast<void*>(this);
|
||||
return QDialog::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int ChangePasswordDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QDialog::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
if (_id < 3)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 3;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
if (_id < 3)
|
||||
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
|
||||
_id -= 3;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
QT_WARNING_POP
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,44 @@
|
||||
#ifndef CHANGEPASSWORDDIALOG_H
|
||||
#define CHANGEPASSWORDDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
#include <QLabel>
|
||||
#include <QFormLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QMessageBox>
|
||||
#include <QRegularExpression>
|
||||
#include "../shared/backend_interface.h"
|
||||
|
||||
class ChangePasswordDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ChangePasswordDialog(exam_system::BackendInterface* backend, QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void onChangePasswordClicked();
|
||||
void onCancelClicked();
|
||||
void validatePassword();
|
||||
|
||||
private:
|
||||
void setupUI();
|
||||
bool validatePasswordFormat(const QString& password);
|
||||
void updatePasswordStrength(const QString& password);
|
||||
|
||||
exam_system::BackendInterface* backend;
|
||||
|
||||
QLineEdit* oldPasswordEdit;
|
||||
QLineEdit* newPasswordEdit;
|
||||
QLineEdit* confirmPasswordEdit;
|
||||
|
||||
QPushButton* changeBtn;
|
||||
QPushButton* cancelBtn;
|
||||
|
||||
QLabel* strengthLabel;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,19 @@
|
||||
1. 21 * 13 + 54 / 98
|
||||
|
||||
2. 44 - 6
|
||||
|
||||
3. 73 + 90 * 73 / 36 - 23
|
||||
|
||||
4. 28 / 39 * 46
|
||||
|
||||
5. 92 * 55
|
||||
|
||||
6. 32 / 50
|
||||
|
||||
7. 73 * 74 + 71 / 73
|
||||
|
||||
8. 90 * 28 + 14 - 78 - 5
|
||||
|
||||
9. 2 / 57
|
||||
|
||||
10. 95 + 99 * 85 / 92 - 33
|
||||
@ -0,0 +1,19 @@
|
||||
1. 68 - 43 / 84 / 9 + 9
|
||||
|
||||
2. 15 / 92 / 46 * 60 * 88
|
||||
|
||||
3. 78 - 62 + 89 / 49
|
||||
|
||||
4. 61 * 93 / 1
|
||||
|
||||
5. 51 * 3 * 18
|
||||
|
||||
6. 57 + 62 - 12 / 82
|
||||
|
||||
7. 2 / 6 + 73 - 25
|
||||
|
||||
8. 99 - 68 / 45 - 10 + 46
|
||||
|
||||
9. 66 + 72 * 92 / 85
|
||||
|
||||
10. 20 / 9 * 35
|
||||
Loading…
Reference in new issue