Refactor InputObject(EventFilter and VirtualKeyboard).
This commit is contained in:
@@ -5,23 +5,24 @@
|
||||
#ifndef GUI_ACCOUNTFORMDIALOG_H
|
||||
#define GUI_ACCOUNTFORMDIALOG_H
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class ULineEdit;
|
||||
class QToolButton;
|
||||
class QSqlTableModel;
|
||||
|
||||
#include <QtWidgets/QVBoxLayout>
|
||||
#include "GUIFormBaseDialog.h"
|
||||
|
||||
enum AccountEditMode{
|
||||
enum AccountEditMode {
|
||||
Self, Admin, New
|
||||
};
|
||||
class AccountFormDialog:public GUIFormBaseDialog{
|
||||
class AccountFormDialog :public GUIFormBaseDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AccountFormDialog(QWidget *parent = nullptr,AccountEditMode mode = Self,Qt::WindowFlags f = Qt::WindowFlags());
|
||||
explicit AccountFormDialog(QWidget* parent = nullptr, AccountEditMode mode = Self, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
~AccountFormDialog() override = default;
|
||||
void setAccountInformation(const QMap<QString,QVariant>& values);
|
||||
void setReferenceModel(QSqlTableModel* model){
|
||||
void setAccountInformation(const QMap<QString, QVariant>& values);
|
||||
void setReferenceModel(QSqlTableModel* model)
|
||||
{
|
||||
mRefModel = model;
|
||||
}
|
||||
protected:
|
||||
@@ -29,15 +30,15 @@ protected:
|
||||
void warn(const QString& msg);
|
||||
void hideWarn();
|
||||
private:
|
||||
void addEndLine(QVBoxLayout *layout);
|
||||
void addNewModeUI(QVBoxLayout *layout);
|
||||
void addSelfModeUI(QHBoxLayout *layout);
|
||||
void addTitleLabel(QVBoxLayout *layout);
|
||||
void initUserCodeUI(QVBoxLayout *layout);
|
||||
void initUserNameUI(QVBoxLayout *layout);
|
||||
void addCommentLabel(QVBoxLayout *layout);
|
||||
void addWarnLabel(QVBoxLayout *layout);
|
||||
void addButtonPwd(QHBoxLayout *layout);
|
||||
void addEndLine(QVBoxLayout* layout);
|
||||
void addNewModeUI(QVBoxLayout* layout);
|
||||
void addSelfModeUI(QHBoxLayout* layout);
|
||||
void addTitleLabel(QVBoxLayout* layout);
|
||||
void initUserCodeUI(QVBoxLayout* layout);
|
||||
void initUserNameUI(QVBoxLayout* layout);
|
||||
void addCommentLabel(QVBoxLayout* layout);
|
||||
void addWarnLabel(QVBoxLayout* layout);
|
||||
void addButtonPwd(QHBoxLayout* layout);
|
||||
void changeSelfPassword();
|
||||
void resetUserPassword();
|
||||
QString mUserID;
|
||||
@@ -48,10 +49,10 @@ private:
|
||||
bool mCommentChanged;
|
||||
bool mRoleChanged;
|
||||
AccountEditMode mMode;
|
||||
QLineEdit* mLeUserCode;
|
||||
QLineEdit* mLeUserName;
|
||||
QLineEdit* mLeComment;
|
||||
QLineEdit* mLePwd;
|
||||
ULineEdit* mLeUserCode;
|
||||
ULineEdit* mLeUserName;
|
||||
ULineEdit* mLeComment;
|
||||
ULineEdit* mLePwd;
|
||||
QToolButton* mBtnPwd;
|
||||
|
||||
QLabel* mLblError;
|
||||
|
||||
Reference in New Issue
Block a user