initial commit
This commit is contained in:
29
imagemeta.h
Normal file
29
imagemeta.h
Normal file
@ -0,0 +1,29 @@
|
||||
#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
|
Reference in New Issue
Block a user