46 lines
1.1 KiB
Plaintext
46 lines
1.1 KiB
Plaintext
#ifndef MAINPAGEPRESENTOR_H
|
|
#define MAINPAGEPRESENTOR_H
|
|
|
|
#include <QObject>
|
|
#include <QtQuick/QQuickPaintedItem>
|
|
|
|
class MainPageActivity;
|
|
class FormatConverter;
|
|
|
|
class MainPagePresentor : public QObject {
|
|
Q_OBJECT
|
|
Q_PROPERTY(QVariant listFilePath READ listFilePath WRITE setlistFilePath FINAL)
|
|
QML_ELEMENT
|
|
|
|
public:
|
|
explicit MainPagePresentor(MainPageActivity * activity, QObject* parent = nullptr)
|
|
: QObject(parent), model(new MainPagePresentorModel), activity(activity) {
|
|
init();
|
|
}
|
|
|
|
void init();
|
|
QVariant listFilePath() const {return model->m_listFilePath; }
|
|
void setlistFilePath(const QVariant& listFilePath);
|
|
|
|
Q_INVOKABLE void transform();
|
|
|
|
signals:
|
|
void listFilesSet(QVariant);
|
|
private:
|
|
MainPageActivity *activity;
|
|
FormatConverter * formatConverter = 0;
|
|
|
|
class MainPagePresentorModel{
|
|
public:
|
|
QVariant m_listFilePath;
|
|
} *model;
|
|
|
|
private slots:
|
|
void transformFinished();
|
|
void cancelTransform();
|
|
void percentCompeteTrassformChangedHandler(double newValue);
|
|
void transformFinishedWithError(QStringList listErrorFilesPath, QString pathLog);
|
|
};
|
|
|
|
#endif // MAINPAGEPRESENTOR_H
|