4 * This file is part of CameraPlus.
6 * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 #include "qtcammetadata.h"
31 class MetaData : public QObject {
34 Q_PROPERTY(Camera* camera READ camera WRITE setCamera NOTIFY cameraChanged);
35 Q_PROPERTY(QString manufacturer READ manufacturer WRITE setManufacturer NOTIFY manufacturerChanged);
36 Q_PROPERTY(QString model READ model WRITE setModel NOTIFY modelChanged);
37 Q_PROPERTY(QString country READ country WRITE setCountry NOTIFY countryChanged);
38 Q_PROPERTY(QString city READ city WRITE setCity NOTIFY cityChanged);
39 Q_PROPERTY(QString suburb READ suburb WRITE setSuburb NOTIFY suburbChanged);
40 Q_PROPERTY(double longitude READ longitude WRITE setLongitude NOTIFY longitudeChanged);
41 Q_PROPERTY(bool longitudeValid READ isLongitudeValid WRITE setLongitudeValid NOTIFY longitudeValidChanged);
42 Q_PROPERTY(double latitude READ latitude WRITE setLatitude NOTIFY latitudeChanged);
43 Q_PROPERTY(bool latitudeValid READ isLatitudeValid WRITE setLatitudeValid NOTIFY latitudeValidChanged);
44 Q_PROPERTY(double elevation READ elevation WRITE setElevation NOTIFY elevationChanged);
45 Q_PROPERTY(bool elevationValid READ isElevationValid WRITE setElevationValid NOTIFY elevationValidChanged);
46 Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged);
47 Q_PROPERTY(QString artist READ artist WRITE setArtist NOTIFY artistChanged);
48 Q_PROPERTY(int captureDirection READ captureDirection WRITE setCaptureDirection NOTIFY captureDirectionChanged);
49 Q_PROPERTY(bool captureDirectionValid READ isCaptureDirectionValid WRITE setCaptureDirectionValid NOTIFY captureDirectionValidChanged);
50 Q_PROPERTY(double horizontalError READ horizontalError WRITE setHorizontalError NOTIFY horizontalErrorChanged);
51 Q_PROPERTY(bool horizontalErrorValid READ isHorizontalErrorValid WRITE setHorizontalErrorValid NOTIFY horizontalErrorValidChanged);
52 Q_PROPERTY(bool dateTimeEnabled READ isDateTimeEnabled WRITE setDateTimeEnabled NOTIFY dateTimeEnabledChanged);
58 Landscape = QtCamMetaData::Landscape,
59 Portrait = QtCamMetaData::Portrait,
60 InvertedLandscape = QtCamMetaData::InvertedLandscape,
61 InvertedPortrait = QtCamMetaData::InvertedPortrait
64 MetaData(QObject *parent = 0);
67 Camera *camera() const;
68 void setCamera(Camera *camera);
70 QString manufacturer() const;
71 void setManufacturer(const QString& manufacturer);
73 QString model() const;
74 void setModel(const QString& model);
76 QString country() const;
77 void setCountry(const QString& country);
80 void setCity(const QString& city);
82 QString suburb() const;
83 void setSuburb(const QString& suburb);
85 double longitude() const;
86 void setLongitude(double longitude);
88 double latitude() const;
89 void setLatitude(double latitude);
91 double elevation() const;
92 void setElevation(double elevation);
94 Orientation orientation() const;
95 void setOrientation(const Orientation& orientation);
97 QString artist() const;
98 void setArtist(const QString& artist);
100 int captureDirection() const;
101 void setCaptureDirection(int captureDirection);
103 double horizontalError() const;
104 void setHorizontalError(double horizontalError);
106 bool isLongitudeValid() const;
107 void setLongitudeValid(bool valid);
109 bool isLatitudeValid() const;
110 void setLatitudeValid(bool valid);
112 bool isElevationValid() const;
113 void setElevationValid(bool valid);
115 bool isCaptureDirectionValid() const;
116 void setCaptureDirectionValid(bool valid);
118 bool isHorizontalErrorValid() const;
119 void setHorizontalErrorValid(bool valid);
121 bool isDateTimeEnabled() const;
122 void setDateTimeEnabled(bool enabled);
128 void cameraChanged();
129 void manufacturerChanged();
131 void countryChanged();
133 void suburbChanged();
134 void longitudeChanged();
135 void latitudeChanged();
136 void elevationChanged();
137 void orientationChanged();
138 void artistChanged();
139 void dateTimeChanged();
140 void captureDirectionChanged();
141 void horizontalErrorChanged();
142 void longitudeValidChanged();
143 void latitudeValidChanged();
144 void elevationValidChanged();
145 void captureDirectionValidChanged();
146 void horizontalErrorValidChanged();
147 void dateTimeEnabledChanged();
150 void deviceChanged();
153 QtCamMetaData *m_data;
155 QString m_manufacturer;
163 Orientation m_orientation;
165 int m_captureDirection;
166 double m_horizontalError;
167 bool m_longitudeValid;
168 bool m_latitudeValid;
169 bool m_elevationValid;
170 bool m_captureDirectionValid;
171 bool m_horizontalErrorValid;
172 bool m_dateTimeEnabled;
175 #endif /* META_DATA_H */