Add calculating stats with script

This commit is contained in:
2024-02-04 00:11:14 +01:00
parent 90035f44ed
commit dc2a781d3b
4 changed files with 57 additions and 20 deletions
+3
View File
@@ -31,6 +31,7 @@ public:
Q_INVOKABLE void mark(File *file);
Q_INVOKABLE void unmark(File *file);
Q_INVOKABLE bool isMarked(const File *file) const;
QJSValue newObject();
public slots:
void run();
signals:
@@ -64,6 +65,7 @@ class File : public QObject
QMap<QString, QString> _fitsKeywords;
void loadFitsKeywords();
bool mkpath(const QString &path) const;
QJSValue _stats;
public:
explicit File(const QString &path, ScriptEngine *engine);
Q_INVOKABLE QString fileName() const;
@@ -79,6 +81,7 @@ public:
Q_INVOKABLE bool copy(const QString &newpath) const;
Q_INVOKABLE bool move(const QString &newpath) const;
Q_INVOKABLE bool convertTo(const QString &format);
Q_INVOKABLE QJSValue stats();
};
}