#ifndef USERFRAME_H
#define USERFRAME_H

#include <QWidget>
#include <../PluginService/ui_unit/middleframemanager.h>
#include <QStackedWidget>
#include <conferquestionframe.h>
#include <userregisterframe.h>
#include <modeselectframe.h>



namespace KInstaller {

class UserFrame : public MiddleFrameManager
{
    Q_OBJECT
public:
    explicit UserFrame(QWidget *parent = nullptr);
    ~UserFrame();
    void writeSettingIni(quint8 flag);
    QString SourcePath;
    void setBtnValue();
    void setButtonNext();
    void setButtonStart();
signals:
    void signalConfirmPasswd();
    void savRegisterDateSignal();
    void savconferDateSignal();
    void translateStrSignal();
    void currentwidgetchange(QWidget* p);


public slots:
    void clickNextButton();
    void clickPrevButton(QWidget *p) override;
    void getmessage(QWidget *p,QString str);
    void enableNextButtonSlot(bool value);
    void changeNextButtonSlot();
    void modeselslots(int index);
private:
    void changeEvent(QEvent *event);
    void keyPressEvent(QKeyEvent *event);

    userregisterwidiget* usregister; //2,“创建用户”子界面，当在“创建账户”子界面中点击“立刻创建”时(并点击下一步按钮后)，才会出现本界面
    conferquestion* confer;
    modeselect* modesel; //1,“创建账户”子界面，是第一个显示的界面
    QStackedWidget* stack;
    quint8 curIndex=0;
};
}
#endif // USERFRAME_H
