minor tweaks
[harmattan/cameraplus] / declarative / videoresolutionmodel.h
index c461210..96d7596 100644 (file)
@@ -3,7 +3,7 @@
 /*!
  * This file is part of CameraPlus.
  *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -32,6 +32,7 @@ class VideoResolutionModel : public QAbstractListModel {
   Q_OBJECT
 
   Q_PROPERTY(QString aspectRatio READ aspectRatio WRITE setAspectRatio NOTIFY aspectRatioChanged);
+  Q_PROPERTY(int count READ count NOTIFY countChanged);
 
 public:
 
@@ -56,8 +57,11 @@ public:
   QString aspectRatio() const;
   void setAspectRatio(const QString& aspectRatio);
 
+  int count() const;
+
 signals:
   void aspectRatioChanged();
+  void countChanged();
 
 private:
   QString m_aspectRatio;
@@ -65,6 +69,12 @@ private:
   QtCamVideoSettings *m_settings;
 
   QList<QtCamVideoResolution> m_resolutions;
+
+#if defined(QT5)
+  QHash<int, QByteArray> roleNames() const;
+  void setRoleNames(const QHash<int, QByteArray>& roles);
+  QHash<int, QByteArray> m_roles;
+#endif
 };
 
 #endif /* VIDEO_RESOLUTION_MODEL_H */