#ifndef SAVEPATHWIDGET_H
#define SAVEPATHWIDGET_H

#include <QMainWindow>

#include "VsMacros.h"

class QHBoxLayout;
class QVBoxLayout;
class QLabel;
class QLineEdit;
class QPushButton;

class TitleBar;
class QWaitProgressBar;

class SavePathWidget : public QMainWindow
{
    Q_OBJECT

public:
    SavePathWidget(QWidget *parent = nullptr);
    ~SavePathWidget();

    QString fbxFilePath();
    void setFbxFilePath(const QString& path);

    void setFieldPath(const QString& path);

signals:
    void convertCompleted();

private:
    void initUI();

    void connects();

    bool conditionJudge();

private slots:
    void selectFbxSavePath();
    void openFbxFileDir();

    void startConvertFbx();

    void cancel();

    void convertCompletedTip();
private:
    TitleBar* mTitleBar;

    QWidget* mCentralWidget;
    QVBoxLayout* mMainVLayout;

    QHBoxLayout* mHLayoutFbxPath;
    QLabel* mLabelFbxPath;
    QLineEdit* mLineEditFbxPath;
    QPushButton* mButtonSelectFbxSavePath;
    QPushButton* mButtonOpenFbxFileDir;

    QHBoxLayout* mHLayoutFunc;
    QPushButton* mButtonConvertFbx;
    QPushButton* mButtonCancelConvert;
    QPushButton* mButtonClose;

    QWaitProgressBar* mWaitProgressBar;

    QString mFieldPath;
};

#endif // SAVEPATHWIDGET_H
