45
44
Photo::Photo(const QFileInfo& file)
46
45
: MediaSource(file),
50
m_originalOrientation(TOP_LEFT_ORIGIN),
47
m_originalOrientation(TOP_LEFT_ORIGIN)
53
49
photoDummyFileInfo = file;
62
58
return MediaSource::Photo;
65
QImage Photo::image(bool respectOrientation, const QSize &scaleSize)
70
61
Orientation Photo::orientation() const
72
63
return m_originalOrientation;
75
QUrl Photo::galleryPath() const
77
QUrl url = MediaSource::galleryPath();
81
QUrl Photo::galleryPreviewPath() const
83
QUrl url = MediaSource::galleryPreviewPath();
87
QUrl Photo::galleryThumbnailPath() const
89
QUrl url = MediaSource::galleryThumbnailPath();
93
const QFileInfo &Photo::pristineFile() const
95
return photoDummyFileInfo;
98
void Photo::revertToOriginal()
110
bool Photo::canUndo() const
115
bool Photo::canRedo() const
120
bool Photo::isOriginal() const
66
bool Photo::canBeEdited() const
125
void Photo::rotateRight()
129
void Photo::autoEnhance()
133
void Photo::exposureCompensation(qreal value)
137
void Photo::colorBalance(qreal brightness, qreal contrast, qreal saturation, qreal hue)
141
QVariant Photo::prepareForCropping()
146
void Photo::cancelCropping()
150
void Photo::crop(QVariant vrect)
154
71
void Photo::destroySource(bool destroyBacking, bool asOrphan)