43 lines
890 B
C++
43 lines
890 B
C++
#ifndef RM_POPUP_PW_H
|
|
#define RM_POPUP_PW_H
|
|
#if (USE_PASSWORD_POPUP)
|
|
#include "../rm_include.h"
|
|
#include <QLineEdit>
|
|
#include "rm_popup.h"
|
|
|
|
class RMPopupPW : public RMPopup
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
typedef enum
|
|
{
|
|
PW_CHECK = 0, // IF NOT CREATE
|
|
PW_NEW = 1,
|
|
PW_CHANGE = 2, // "
|
|
} PW_MODE;
|
|
|
|
RMPopupPW(PW_MODE mode, QWidget *parent = 0);
|
|
|
|
PW_MODE currentMode;
|
|
|
|
private:
|
|
RMButton* okButton;
|
|
QLineEdit* editPWCheck;
|
|
QLineEdit* editPWOld;
|
|
QLineEdit* editPWNew;
|
|
QLineEdit* editPWConfirm;
|
|
|
|
QLineEdit* addLine(QVBoxLayout* layout, QWidget* parent, QString label);
|
|
void savePW(QString pw);
|
|
QString readPW();
|
|
|
|
void showMessage(QString message);
|
|
|
|
public slots:
|
|
void onOK();
|
|
void onChangePW();
|
|
void onTextCahnged(const QString& txt);
|
|
};
|
|
#endif (USE_PASSWORD_POPUP)
|
|
#endif // RM_POPUP_PW_H
|