projects
/
harmattan
/
cameraplus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add count property to ImageResolutionModel and VideoResolutionModel
[harmattan/cameraplus]
/
declarative
/
imageresolutionmodel.h
diff --git
a/declarative/imageresolutionmodel.h
b/declarative/imageresolutionmodel.h
index
294c89f
..
4db3c94
100644
(file)
--- a/
declarative/imageresolutionmodel.h
+++ b/
declarative/imageresolutionmodel.h
@@
-32,6
+32,7
@@
class ImageResolutionModel : public QAbstractListModel {
Q_OBJECT
Q_PROPERTY(QString aspectRatio READ aspectRatio WRITE setAspectRatio NOTIFY aspectRatioChanged);
Q_OBJECT
Q_PROPERTY(QString aspectRatio READ aspectRatio WRITE setAspectRatio NOTIFY aspectRatioChanged);
+ Q_PROPERTY(int count READ count NOTIFY countChanged);
public:
public:
@@
-56,10
+57,11
@@
public:
QString aspectRatio() const;
void setAspectRatio(const QString& aspectRatio);
QString aspectRatio() const;
void setAspectRatio(const QString& aspectRatio);
-
QHash<int, QByteArray> roleNames
() const;
+
int count
() const;
signals:
void aspectRatioChanged();
signals:
void aspectRatioChanged();
+ void countChanged();
private:
QString m_aspectRatio;
private:
QString m_aspectRatio;
@@
-68,7
+70,11
@@
private:
QList<QtCamImageResolution> m_resolutions;
QList<QtCamImageResolution> m_resolutions;
+#if defined(QT5)
+ QHash<int, QByteArray> roleNames() const;
+ void setRoleNames(const QHash<int, QByteArray>& roles);
QHash<int, QByteArray> m_roles;
QHash<int, QByteArray> m_roles;
+#endif
};
#endif /* IMAGE_RESOLUTION_MODEL_H */
};
#endif /* IMAGE_RESOLUTION_MODEL_H */