21#include <QCoreApplication>
35 void appendSystemInfo();
41 Q_DECLARE_TR_FUNCTIONS(
Status)
55 ERROR_FILE_CANNOT_OPEN,
56 ERROR_INVALID_XML_FILE,
57 ERROR_INVALID_PENCIL_FILE,
61 ERROR_INVALID_LAYER_TYPE,
62 ERROR_INVALID_FRAME_NUMBER,
63 ERROR_LOAD_IMAGE_FAIL,
66 ERROR_LOAD_SOUND_FILE,
69 ERROR_FFMPEG_NOT_FOUND,
72 ERROR_NEED_AT_LEAST_ONE_CAMERA_LAYER
75 Status(
const ErrorCode code);
80 ErrorCode code()
const {
return mCode; }
81 bool ok()
const {
return (mCode == OK) || (mCode == SAFE); }
83 QString title()
const {
return !mTitle.
isEmpty() ? mTitle : msg(); }
84 QString description()
const {
return mDescription; }
87 void setTitle(
QString title) { mTitle = title; }
88 void setDescription(
QString description) { mDescription = description; }
91 bool operator==(ErrorCode code)
const;
92 bool operator!=(ErrorCode code)
const;
102#define STATUS_CHECK( x )\
103 { Status st = (x); if (!st.ok()) { return st; } }
107#define STATUS_FAILED(stcode) ((int)stcode >= (int)Status::FAIL)
bool isEmpty() const const