6#include <QtClassHelperMacros>
47 static Error saveOnce(
const QPixmap& image,
const QString& dir,
const QString prefix =
".jpg");
The PhotoSaver class provides static methods for saving images.
Definition PhotoSaver.h:11
Error
Error enum describes possible error states in saving process.
Definition PhotoSaver.h:26
@ DirUnsavable
Directory is not writable or savable.
@ NullImage
Image is null.
@ SaveSuccess
Save was successful.
@ ImageSelfSaveFailed
Image saving failed internally.
Q_DISABLE_COPY(PhotoSaver)
Q_DISABLE_COPY disables copy constructor and assignment operator.
PhotoSaver()=default
def constructor
static bool dirSavable(const QString &dir)
dirSavable checks whether the given directory is writable/savable.
Definition PhotoSaver.cpp:19
static Error saveOnce(const QPixmap &image, const QString &dir, const QString prefix=".jpg")
saveOnce saves the image once to the given directory with a filename prefix.
Definition PhotoSaver.cpp:5