30 lines
645 B
C++
30 lines
645 B
C++
#ifndef IMAGEMETA_H
|
|
#define IMAGEMETA_H
|
|
|
|
#include <filesystem>
|
|
#include <QString>
|
|
#include <QJsonObject>
|
|
#include <QException>
|
|
|
|
class ParseException : public QException
|
|
{
|
|
QString msg;
|
|
public:
|
|
ParseException(const QString& msg): msg{msg} {}
|
|
QString getMesg() {return msg;};
|
|
void raise() const override { throw *this; }
|
|
ParseException *clone() const override { return new ParseException(*this); }
|
|
};
|
|
|
|
class ImageMeta
|
|
{
|
|
public:
|
|
std::filesystem::path path;
|
|
QString text;
|
|
|
|
ImageMeta(const std::filesystem::path& path, const QString& text = "");
|
|
ImageMeta(const QJsonObject& json, const std::filesystem::path& dir);
|
|
};
|
|
|
|
#endif // IMAGEMETA_H
|