| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
Digikam::MapViewModelHelper Class Reference
Inheritance diagram for Digikam::MapViewModelHelper:

## Signals
void | signalFilteredImages (const QList< qlonglong > &idList)
Signals inherited from Digikam::GeoModelHelper
void | signalModelChangedDrastically ()
void | signalThumbnailAvailableForIndex (const QPersistentModelIndex &index, const QPixmap &pixmap)
void | signalVisibilityChanged ()

## Public Member Functions
| MapViewModelHelper (QItemSelectionModel *const selection, DCategorizedSortFilterProxyModel *const filterModel, QObject *const parent, const MapWidgetView::Application application)
| ~MapViewModelHelper () override
| Destructor.
QPersistentModelIndex | bestRepresentativeIndexFromList (const QList< QPersistentModelIndex > &list, const int sortKey) override
| This function finds the best representative marker from a group of markers.
bool | itemCoordinates (const QModelIndex &index, GeoCoordinates *const coordinates) const override
| Gets the coordinates of a marker found at current model index.
QAbstractItemModel * | model () const override
void | onIndicesClicked (const QList< QPersistentModelIndex > &clickedIndices) override
| This functions is called when one clicks on a thumbnail.
QPixmap | pixmapFromRepresentativeIndex (const QPersistentModelIndex &index, const QSize &size) override
| This function retrieves the thumbnail for an index.
QItemSelectionModel * | selectionModel () const override
Public Member Functions inherited from Digikam::GeoModelHelper
| GeoModelHelper (QObject *const parent=nullptr)
virtual PropertyFlags | itemFlags (const QModelIndex &index) const
virtual bool | itemIcon (const QModelIndex &index, QPoint *const offset, QSize *const size, QPixmap *const pixmap, QUrl *const url) const
| these are necessary for ungrouped models
virtual PropertyFlags | modelFlags () const
virtual void | onIndicesMoved (const QList< QPersistentModelIndex > &movedIndices, const GeoCoordinates &targetCoordinates, const QPersistentModelIndex &targetSnapIndex)
virtual void | snapItemsTo (const QModelIndex &targetIndex, const QList< QModelIndex > &snappedIndices)
void | snapItemsTo (const QModelIndex &targetIndex, const QList< QPersistentModelIndex > &snappedIndices)

## Additional Inherited Members
Public Types inherited from Digikam::GeoModelHelper
enum | PropertyFlag { FlagNull = 0 , FlagVisible = 1 , FlagMovable = 2 , FlagSnaps = 4 }
typedef QFlags< PropertyFlag > | PropertyFlags

## Member Function Documentation

## ◆ bestRepresentativeIndexFromList()

QPersistentModelIndex Digikam::MapViewModelHelper::bestRepresentativeIndexFromList | ( | const QList< QPersistentModelIndex > & | list,
|  | const int | sortKey
| ) |  |
| override virtual

This is needed to display a thumbnail for a marker group.

Parameters

  list | A list containing markers.
  sortKey | Determines the sorting options and is actually of type GPSItemInfoSorter::SortOptions

Returns
  Returns the index of the marker.

Reimplemented from Digikam::GeoModelHelper.

## ◆ itemCoordinates()

bool Digikam::MapViewModelHelper::itemCoordinates | ( | const QModelIndex & | index,
|  | GeoCoordinates *const | coordinates
| ) |  | const
| override virtual

Parameters

  index | Current model index.
  coordinates | Here will be returned the coordinates of the current marker.

Returns
  True, if the marker has coordinates.

Implements Digikam::GeoModelHelper.

## ◆ model()

QAbstractItemModel * Digikam::MapViewModelHelper::model | ( |  | ) | const
| override virtual

Returns
  Returns digiKam's filter model.

Implements Digikam::GeoModelHelper.

## ◆ onIndicesClicked()

void Digikam::MapViewModelHelper::onIndicesClicked | ( | const QList< QPersistentModelIndex > & | clickedIndices | ) |
| override virtual

Parameters

  clickedIndices | A list containing the marker indices belonging the group whose thumbnail has been clicked.

Reimplemented from Digikam::GeoModelHelper.

## ◆ pixmapFromRepresentativeIndex()

QPixmap Digikam::MapViewModelHelper::pixmapFromRepresentativeIndex | ( | const QPersistentModelIndex & | index,
|  | const QSize & | size
| ) |  |
| override virtual

Parameters

  index | The marker's index.
  size | The size of the thumbnail.

Returns
  If the thumbnail has been loaded in the ThumbnailLoadThread instance, it is returned. If not, a QPixmap is returned and ThumbnailLoadThread's signal named signalThumbnailLoaded is emitted when the thumbnail becomes available.

Reimplemented from Digikam::GeoModelHelper.

## ◆ selectionModel()

QItemSelectionModel * Digikam::MapViewModelHelper::selectionModel | ( |  | ) | const
| override virtual

Returns
  Returns digiKam's selection model.

Implements Digikam::GeoModelHelper.