summaryrefslogtreecommitdiff
path: root/src/location/places/qplaceimage.h
diff options
context:
space:
mode:
authorabcd <qt-info@nokia.com>2011-08-22 14:39:26 +1000
committerabcd <qt_abcd1@ovi.com>2011-08-22 10:22:36 +0200
commit69d4a69261da1758b1a21c28a09fdd5006c51890 (patch)
treedaaac27f39281bd5ff98915f3753dae1aec93453 /src/location/places/qplaceimage.h
parent2c829671005e6572ae6e048aa337bb8b3ca639f9 (diff)
downloadqtlocation-69d4a69261da1758b1a21c28a09fdd5006c51890.tar.gz
Introduce Content class and rename PlaceMediaObject to PlaceImage
Paging is now implemented in terms of content objects, things like images, reviews etc should inherit off the QPlaceContent class. The main advantage of this change in C++ is that the paging code will not be duplicated for different content types, also we have less symbols which is good for plugin loading times. For now, in QML we still retain separate specialized models. In future it might be possible to just have a single model class to hold different content types. There will still however need to be separate model instances for say reviews and images. PlaceMediaObject has been renamed to PlaceImage because currently all we provide are images. It is anticipated that if there are new media types like video we would introduce QPlaceVideo and have it inherit off QPlaceContent. It is suboptimal to try define a generic media object right now when we do not have a clear idea about the use cases of each possible media type. A future change will have QPlaceReview inherit off QPlaceContent. Change-Id: Ia6cf5092e246374ed639694d7653e30429c94cc2 Reviewed-on: http://codereview.qt.nokia.com/3284 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com> Reviewed-by: abcd <qt_abcd1@ovi.com>
Diffstat (limited to 'src/location/places/qplaceimage.h')
-rw-r--r--src/location/places/qplaceimage.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/src/location/places/qplaceimage.h b/src/location/places/qplaceimage.h
new file mode 100644
index 00000000..f5a9f717
--- /dev/null
+++ b/src/location/places/qplaceimage.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLACEIMAGE_H
+#define QPLACEIMAGE_H
+
+#include <QSharedDataPointer>
+#include <QString>
+#include <qlatin1constant.h>
+#include "qmobilityglobal.h"
+#include "qplacesupplier.h"
+#include "qplacecontent.h"
+
+QT_BEGIN_NAMESPACE
+
+class QPlaceImagePrivate;
+class QUrl;
+
+class Q_LOCATION_EXPORT QPlaceImage : public QPlaceContent
+{
+public:
+ QPlaceImage();
+ Q_DECLARE_CONTENT_COPY_CTOR(QPlaceImage)
+
+ virtual ~QPlaceImage();
+
+ QUrl url() const;
+ void setUrl(const QUrl &url);
+ QUrl thumbnailUrl() const;
+ void setThumbnailUrl(const QUrl &url);
+ QString id() const;
+ void setId(const QString &data);
+ QString metaInfo() const;
+ void setMetaInfo(const QString &data);
+ QString mimeType() const;
+ void setMimeType(const QString &data);
+ QPlaceSupplier supplier() const;
+ void setSupplier(const QPlaceSupplier &data);
+
+private:
+ Q_DECLARE_CONTENT_D_FUNC(QPlaceImage)
+};
+
+QT_END_NAMESPACE
+
+#endif