2
* Copyright (C) 2011-2014 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
* Jim Nelson <jim@yorba.org>
18
* Lucas Beeler <lucas@yorba.org>
19
* Charles Lindsay <chaz@yorba.org>
20
* Ugo Riboni <ugo.riboni@canonical.com>
27
#include "orientation.h"
33
class PhotoEditCommand;
34
class PhotoEditThread;
37
* \brief The Photo class
39
class PhotoData : public QObject
43
Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged)
44
Q_PROPERTY(int orientation READ orientation NOTIFY orientationChanged)
45
Q_PROPERTY(bool busy READ busy NOTIFY busyChanged)
51
static bool isValid(const QFileInfo& file);
54
void setPath(QString path);
55
QFileInfo file() const;
58
virtual Orientation orientation() const;
60
Q_INVOKABLE void refreshFromDisk();
61
Q_INVOKABLE void rotateRight();
62
Q_INVOKABLE void autoEnhance();
63
Q_INVOKABLE void exposureCompensation(qreal value);
64
Q_INVOKABLE void crop(QVariant vrect);
66
const QString &fileFormat() const;
67
bool fileFormatHasMetadata() const;
68
bool fileFormatHasOrientation() const;
72
void orientationChanged();
82
void asyncEdit(const PhotoEditCommand& state);
85
PhotoEditThread *m_editThread;
89
Orientation m_orientation;
92
#endif // PHOTO_DATA_H_