The PhotoSaver class provides static methods for saving images.
More...
#include <PhotoSaver.h>
|
| PhotoSaver ()=default |
| def constructor
|
|
| Q_DISABLE_COPY (PhotoSaver) |
| Q_DISABLE_COPY disables copy constructor and assignment operator.
|
|
|
static bool | dirSavable (const QString &dir) |
| dirSavable checks whether the given directory is writable/savable.
|
|
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.
|
|
The PhotoSaver class provides static methods for saving images.
◆ Error
Error enum describes possible error states in saving process.
Enumerator |
---|
SaveSuccess | Save was successful.
|
NullImage | Image is null.
|
DirUnsavable | Directory is not writable or savable.
|
ImageSelfSaveFailed | Image saving failed internally.
|
◆ dirSavable()
bool PhotoSaver::dirSavable |
( |
const QString & |
dir | ) |
|
|
static |
dirSavable checks whether the given directory is writable/savable.
- Parameters
-
dir | The directory path to check. |
- Returns
- True if directory is writable, otherwise false.
◆ saveOnce()
PhotoSaver::Error PhotoSaver::saveOnce |
( |
const QPixmap & |
image, |
|
|
const QString & |
dir, |
|
|
const QString |
prefix = ".jpg" |
|
) |
| |
|
static |
saveOnce saves the image once to the given directory with a filename prefix.
- Parameters
-
image | The image to save. |
dir | The target directory. |
prefix | The filename prefix or suffix (default ".jpg"). |
- Returns
- The result code of the save operation.
The documentation for this class was generated from the following files:
- extern_app/GeneralLocalCamera/Core/PhotoSaver.h
- extern_app/GeneralLocalCamera/Core/PhotoSaver.cpp