summaryrefslogtreecommitdiffstats
path: root/plugins/declarative/location/qdeclarativelandmarkmodel_p.h
diff options
context:
space:
mode:
authorjuhvu <qt-info@nokia.com>2010-08-31 17:07:50 +1000
committerjuhvu <qt-info@nokia.com>2010-08-31 17:07:50 +1000
commit326787fda53fd95dfb585ff307ecf4cabd4df11b (patch)
tree2b6ac04ad4d30103761564beb3de0a6751638c66 /plugins/declarative/location/qdeclarativelandmarkmodel_p.h
parent7025e563588454652925dfcb28024794694cd55a (diff)
Added declarative landmark listening to db changes.
Diffstat (limited to 'plugins/declarative/location/qdeclarativelandmarkmodel_p.h')
-rw-r--r--plugins/declarative/location/qdeclarativelandmarkmodel_p.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/plugins/declarative/location/qdeclarativelandmarkmodel_p.h b/plugins/declarative/location/qdeclarativelandmarkmodel_p.h
index d4b7fdc28a..6c5fb4bb76 100644
--- a/plugins/declarative/location/qdeclarativelandmarkmodel_p.h
+++ b/plugins/declarative/location/qdeclarativelandmarkmodel_p.h
@@ -27,7 +27,7 @@ class QDeclarativeLandmarkAbstractModel : public QAbstractListModel, public QDec
public:
explicit QDeclarativeLandmarkAbstractModel(QObject* parent = 0);
- ~QDeclarativeLandmarkAbstractModel();
+ virtual ~QDeclarativeLandmarkAbstractModel();
// From QDeclarativeParserStatus
void classBegin() {}
@@ -53,10 +53,20 @@ signals:
void autoUpdateChanged();
void limitChanged();
void offsetChanged();
+ void modelChanged();
public slots:
void update();
+private slots:
+ void categoriesChanged(const QList<QLandmarkCategoryId> &);
+ void landmarksChanged(const QList<QLandmarkId> &);
+ void dataChanged();
+ virtual void cancelUpdate() = 0;
+
+private:
+ void connectManager();
+
protected:
QLandmarkManager* m_manager;
bool m_componentCompleted;
@@ -66,7 +76,6 @@ protected:
QString m_dbFileName;
int m_limit;
int m_offset;
-
};
class QDeclarativeLandmarkModel: public QDeclarativeLandmarkAbstractModel
@@ -81,7 +90,7 @@ class QDeclarativeLandmarkModel: public QDeclarativeLandmarkAbstractModel
public:
explicit QDeclarativeLandmarkModel(QObject* parent = 0);
- ~QDeclarativeLandmarkModel();
+ virtual ~QDeclarativeLandmarkModel();
// From QAbstractListModel
int rowCount(const QModelIndex &parent) const;
@@ -115,6 +124,7 @@ public:
QDeclarativeLandmarkFilterBase* filter();
void setFilter(QDeclarativeLandmarkFilterBase* filter);
Q_INVOKABLE QList<QDeclarativeLandmark*> landmarks() const;
+ Q_INVOKABLE void startUpdate();
signals:
void countChanged();
@@ -127,7 +137,6 @@ private slots:
void fetchRequestStateChanged(QLandmarkAbstractRequest::State);
private:
- Q_INVOKABLE void startUpdate();
void convertLandmarksToDeclarative();
void setFetchRange();
void setFetchOrder();