#ifndef MAINWIDGET_H
#define MAINWIDGET_H

#include "BaseWidget.h"
#include "global.h"

namespace Ui
{
    class MainWidget;
}

class GenerateFileThread;

#include <QTimer>

class MainWidget : public BaseWidget<QWidget>
{
    Q_OBJECT
public:
    MainWidget(QWidget *parent = 0, Skin *skin = NULL);
    ~MainWidget();



private:
    void initUI();
    void connects();

    bool conditionalJudgment();

    void msgBox(const QString& title, const QString& txt);

    ConfigParam configParam();
    void setConfigParam(ConfigParam p);

    void fixedPanel();
    void unfixedPanel();

private Q_SLOTS:
    void clickedCellType(QListWidgetItem *item);

    void startGenerateVTKFile();
    void stopGenerate();
    void quitProgram();

    void selectOutputPath();
    void openOutputDir();

    void threadProgress(int val, int sum, const QString& tip);

    void changeBackground();
protected slots:
    void btn_open_bg_image_clicked();

private:
    Ui::MainWidget *ui;
    GenerateFileThread* mThread;

    QTimer mBgTimer;
};




#endif // !MAINWIDGET_H

