diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2010-08-03 13:28:54 +1000 |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2010-08-03 13:28:54 +1000 |
commit | bed998e7a788beb4f8ee8ed68815e691f29f486f (patch) | |
tree | ed36677fc6b9aa0d8c1758fe973e4bccc4ea80de | |
parent | 2e834676ce47e03e5e8aad855119c29792b611a1 (diff) |
Remove the Image and Pixmap property definitions.
-rw-r--r-- | examples/documentproperties/documentpropertieswidget.cpp | 3 | ||||
-rw-r--r-- | examples/mediabrowser/albumview.cpp | 1 | ||||
-rw-r--r-- | examples/mediabrowser/photoview.cpp | 1 | ||||
-rw-r--r-- | src/gallery/maemo5/qgallerytrackerlistcolumn.cpp | 5 | ||||
-rw-r--r-- | src/gallery/maemo5/qgallerytrackerlistcolumn_p.h | 2 | ||||
-rw-r--r-- | src/gallery/maemo5/qgallerytrackerschema.cpp | 17 | ||||
-rw-r--r-- | src/gallery/qdocumentgallery.cpp | 66 | ||||
-rw-r--r-- | src/gallery/qdocumentgallery.h | 7 |
8 files changed, 22 insertions, 80 deletions
diff --git a/examples/documentproperties/documentpropertieswidget.cpp b/examples/documentproperties/documentpropertieswidget.cpp index 07a309465c..348139ef91 100644 --- a/examples/documentproperties/documentpropertieswidget.cpp +++ b/examples/documentproperties/documentpropertieswidget.cpp @@ -164,7 +164,6 @@ void DocumentPropertiesWidget::requestDocumentProperties() void DocumentPropertiesWidget::requestImageProperties() { QStringList propertyNames = QStringList() - << QDocumentGallery::previewPixmap << QDocumentGallery::title << QDocumentGallery::width << QDocumentGallery::height @@ -183,14 +182,12 @@ void DocumentPropertiesWidget::requestImageProperties() void DocumentPropertiesWidget::requestVideoProperties() { QStringList propertyNames = QStringList() - << QDocumentGallery::previewPixmap << QDocumentGallery::title << QDocumentGallery::width << QDocumentGallery::height << QDocumentGallery::duration; QStringList labels = QStringList() - << tr("Preview") << tr("Title") << tr("Width") << tr("Height") diff --git a/examples/mediabrowser/albumview.cpp b/examples/mediabrowser/albumview.cpp index 974004ba56..0d5b0bd0c0 100644 --- a/examples/mediabrowser/albumview.cpp +++ b/examples/mediabrowser/albumview.cpp @@ -55,7 +55,6 @@ AlbumView::AlbumView(QAbstractGallery *gallery, QWidget *parent, Qt::WindowFlags QHash<int, QString> properties; properties.insert(Qt::DisplayRole, QDocumentGallery::title); - properties.insert(Qt::DecorationRole, QDocumentGallery::thumbnailImage); properties.insert(AlbumDelegate::Artist, QDocumentGallery::artist); properties.insert(AlbumDelegate::TrackCount, QDocumentGallery::trackCount); model->addColumn(properties); diff --git a/examples/mediabrowser/photoview.cpp b/examples/mediabrowser/photoview.cpp index 4ed3addccb..92c7eeb969 100644 --- a/examples/mediabrowser/photoview.cpp +++ b/examples/mediabrowser/photoview.cpp @@ -55,7 +55,6 @@ PhotoView::PhotoView(QAbstractGallery *gallery, QWidget *parent, Qt::WindowFlags QHash<int, QString> properties; properties.insert(Qt::DisplayRole, QDocumentGallery::fileName); - properties.insert(Qt::DecorationRole, QDocumentGallery::thumbnailPixmap); model->addColumn(properties); model->setSortPropertyNames(QStringList() diff --git a/src/gallery/maemo5/qgallerytrackerlistcolumn.cpp b/src/gallery/maemo5/qgallerytrackerlistcolumn.cpp index 297ec037f1..fd3ac8c071 100644 --- a/src/gallery/maemo5/qgallerytrackerlistcolumn.cpp +++ b/src/gallery/maemo5/qgallerytrackerlistcolumn.cpp @@ -120,6 +120,11 @@ QVariant QGalleryTrackerFileUrlColumn::value(QVector<QVariant>::const_iterator r return QUrl::fromLocalFile((row + m_column)->toString()); } +QGalleryTrackerCompositeColumn *QGalleryTrackerFileUrlColumn::create(const QVector<int> &) +{ + return new QGalleryTrackerFileUrlColumn(0); +} + QVariant QGalleryTrackerFilePathColumn::value(QVector<QVariant>::const_iterator row) const { return *row; diff --git a/src/gallery/maemo5/qgallerytrackerlistcolumn_p.h b/src/gallery/maemo5/qgallerytrackerlistcolumn_p.h index ba0ac57ebb..f5273dac9c 100644 --- a/src/gallery/maemo5/qgallerytrackerlistcolumn_p.h +++ b/src/gallery/maemo5/qgallerytrackerlistcolumn_p.h @@ -184,6 +184,8 @@ public: QVariant value(QVector<QVariant>::const_iterator row) const; + static QGalleryTrackerCompositeColumn *create(const QVector<int> &); + private: const int m_column; }; diff --git a/src/gallery/maemo5/qgallerytrackerschema.cpp b/src/gallery/maemo5/qgallerytrackerschema.cpp index 8aee84beab..99085c9c4e 100644 --- a/src/gallery/maemo5/qgallerytrackerschema.cpp +++ b/src/gallery/maemo5/qgallerytrackerschema.cpp @@ -626,10 +626,8 @@ static const QGalleryItemProperty qt_galleryFilePropertyList[] = }; #define QT_GALLERY_FILE_COMPOSITE_PROPERTIES \ - QT_GALLERY_COMPOSITE_PROPERTY_NO_DEPENDENCIES("filePath", String, QGalleryTrackerFilePathColumn::create) - -#define QT_GALLERY_THUMBNAIL_COMPOSITE_PROPERTIES \ - QT_GALLERY_COMPOSITE_PROPERTY_NO_DEPENDENCIES("thumbnailCacheId", String, QGalleryTrackerThumbnailCacheIdColumn::create) + QT_GALLERY_COMPOSITE_PROPERTY_NO_DEPENDENCIES("filePath", String, QGalleryTrackerFilePathColumn::create), \ + QT_GALLERY_COMPOSITE_PROPERTY_NO_DEPENDENCIES("url", Url, QGalleryTrackerFileUrlColumn::create) static const QGalleryCompositeProperty qt_galleryFileCompositePropertyList[] = { @@ -779,8 +777,7 @@ static const QGalleryItemProperty qt_galleryImagePropertyList[] = static const QGalleryCompositeProperty qt_galleryImageCompositePropertyList[] = { - QT_GALLERY_FILE_COMPOSITE_PROPERTIES, - QT_GALLERY_THUMBNAIL_COMPOSITE_PROPERTIES + QT_GALLERY_FILE_COMPOSITE_PROPERTIES }; //////// @@ -807,8 +804,7 @@ static const QGalleryItemProperty qt_galleryVideoPropertyList[] = static const QGalleryCompositeProperty qt_galleryVideoCompositePropertyList[] = { - QT_GALLERY_FILE_COMPOSITE_PROPERTIES, - QT_GALLERY_THUMBNAIL_COMPOSITE_PROPERTIES + QT_GALLERY_FILE_COMPOSITE_PROPERTIES }; /////////// @@ -831,8 +827,7 @@ static const QGalleryItemProperty qt_galleryDocumentPropertyList[] = static const QGalleryCompositeProperty qt_galleryDocumentCompositePropertyList[] = { - QT_GALLERY_FILE_COMPOSITE_PROPERTIES, - QT_GALLERY_THUMBNAIL_COMPOSITE_PROPERTIES + QT_GALLERY_FILE_COMPOSITE_PROPERTIES }; ///////////// @@ -1408,6 +1403,7 @@ static QVector<QGalleryTrackerValueColumn *> qt_createValueColumns( for (int i = 0, count = types.count(); i < count; ++i) { switch (types.at(i)) { case QVariant::String: + case QVariant::Url: columns.append(new QGalleryTrackerStringColumn); break; case QVariant::StringList: @@ -1609,7 +1605,6 @@ void QGalleryTrackerSchema::populateAggregateArguments( QStringList aggregateNames; QStringList aliasNames; QStringList compositeNames; - QStringList thumbnailNames; QVector<QGalleryProperty::Attributes> identityAttributes; QVector<QGalleryProperty::Attributes> aggregateAttributes; QVector<QGalleryProperty::Attributes> aliasAttributes; diff --git a/src/gallery/qdocumentgallery.cpp b/src/gallery/qdocumentgallery.cpp index 6b72460712..4f1d1cfd2d 100644 --- a/src/gallery/qdocumentgallery.cpp +++ b/src/gallery/qdocumentgallery.cpp @@ -164,6 +164,14 @@ const QGalleryType QDocumentGallery::PhotoAlbum("PhotoAlbum"); // Common /*! + \variable QDocumentGallery::url + + This property contains canonical url of an item in the document gallery. +*/ + +const QGalleryProperty QDocumentGallery::url("url"); + +/*! \variable QDocumentGallery::author This property contains the name of the author of an item in the document gallery. @@ -235,64 +243,6 @@ const QGalleryProperty QDocumentGallery::keywords("keywords"); const QGalleryProperty QDocumentGallery::language("language"); -/*! - \variable QDocumentGallery::iconImage - - This property contains a QImage icon representation of an item in the - document gallery. - - \sa iconPixmap, thumbnailImage, previewImage -*/ - -const QGalleryProperty QDocumentGallery::iconImage("iconImage"); - -/*! - \variable QDocumentGallery::iconPixmap - - This property contains a QPixmap icon representation of an item in the - document gallery. - - \sa iconImage, thumbnailPixmap, previewPixmap -*/ - -const QGalleryProperty QDocumentGallery::iconPixmap("iconPixmap"); - -/*! - \variable QDocumentGallery::thumbnailImage - - This property contains a QImage thumbnail representation of an item in the - document gallery. -*/ - -const QGalleryProperty QDocumentGallery::thumbnailImage("thumbnailImage"); - -/*! - \variable QDocumentGallery::thumbnailPixmap - - This property contains a QPixmap thumbnail representation of an item in the - document gallery. -*/ - -const QGalleryProperty QDocumentGallery::thumbnailPixmap("thumbnailPixmap"); - -/*! - \variable QDocumentGallery::previewImage - - This property contains a QImage preview representation of an item in the - document gallery. -*/ - -const QGalleryProperty QDocumentGallery::previewImage("previewImage"); - -/*! - \variable QDocumentGallery::previewPixmap - - This property contains a QPixmap preview representation of an item in the - document gallery. -*/ - -const QGalleryProperty QDocumentGallery::previewPixmap("previewPixmap"); - // File /*! diff --git a/src/gallery/qdocumentgallery.h b/src/gallery/qdocumentgallery.h index 1630fa90b0..e08f31167e 100644 --- a/src/gallery/qdocumentgallery.h +++ b/src/gallery/qdocumentgallery.h @@ -69,6 +69,7 @@ public: static const QGalleryType PhotoAlbum; // Common + static const QGalleryProperty url; static const QGalleryProperty author; static const QGalleryProperty copyright; static const QGalleryProperty description; @@ -78,12 +79,6 @@ public: static const QGalleryProperty subject; static const QGalleryProperty keywords; static const QGalleryProperty language; - static const QGalleryProperty iconImage; - static const QGalleryProperty iconPixmap; - static const QGalleryProperty thumbnailImage; - static const QGalleryProperty thumbnailPixmap; - static const QGalleryProperty previewImage; - static const QGalleryProperty previewPixmap; // File static const QGalleryProperty path; |