digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::GPSMarkerTiler Class Reference

Marker model for storing data needed to display markers on the map. More...

+ Inheritance diagram for Digikam::GPSMarkerTiler:

Public Slots

void slotNewModelData (const QList< ItemInfo > &infoList)
 Receives notifications from the album model about new items.
 

Signals

void signalModelFilteredImages (const QList< qlonglong > &imagesId)
 
- Signals inherited from Digikam::AbstractMarkerTiler
void signalThumbnailAvailableForIndex (const QVariant &index, const QPixmap &pixmap)
 
void signalTilesOrSelectionChanged ()
 

Public Member Functions

 GPSMarkerTiler (QObject *const parent, ItemFilterModel *const imageFilterModel, QItemSelectionModel *const selectionModel)
 Constructor.
 
 ~GPSMarkerTiler () override
 Destructor.
 
QVariant bestRepresentativeIndexFromList (const QList< QVariant > &indices, const int sortKey) override
 This function finds the best representative marker from a group of markers.
 
GeoGroupState getGlobalGroupState () override
 
AbstractMarkerTiler::TilegetTile (const TileIndex &tileIndex, const bool stopIfEmpty) override
 Returns a pointer to a tile.
 
GeoGroupState getTileGroupState (const TileIndex &tileIndex) override
 
int getTileMarkerCount (const TileIndex &tileIndex) override
 
QVariant getTileRepresentativeMarker (const TileIndex &tileIndex, const int sortKey) override
 This function finds the best representative marker from a tile of markers.
 
int getTileSelectedCount (const TileIndex &tileIndex) override
 
bool indicesEqual (const QVariant &a, const QVariant &b) const override
 This function compares two marker indices.
 
void onIndicesClicked (const ClickInfo &clickInfo) override
 These can be implemented if you want to react to actions in geolocation interface.
 
QPixmap pixmapFromRepresentativeIndex (const QVariant &index, const QSize &size) override
 This function retrieves the thumbnail for an index.
 
void prepareTiles (const GeoCoordinates &upperLeft, const GeoCoordinates &lowerRight, int level) override
 Requests all images inside a given rectangle from the database.
 
void regenerateTiles () override
 
void removeCurrentRegionSelection ()
 
void setActive (const bool state) override
 Sets the map active/inactive.
 
void setPositiveFilterIsActive (const bool state)
 
void setRegionSelection (const GeoCoordinates::Pair &sel)
 
TiletileNew () override
 
- Public Member Functions inherited from Digikam::AbstractMarkerTiler
 AbstractMarkerTiler (QObject *const parent=nullptr)
 
bool indicesEqual (const QIntList &a, const QIntList &b, const int upToLevel) const
 
bool isDirty () const
 
virtual void onIndicesMoved (const TileIndex::List &tileIndicesList, const GeoCoordinates &targetCoordinates, const QPersistentModelIndex &targetSnapIndex)
 
void resetRootTile ()
 
TilerootTile ()
 
void setDirty (const bool state=true)
 
virtual TilerFlags tilerFlags () const
 These have to be implemented.
 

Additional Inherited Members

- Public Types inherited from Digikam::AbstractMarkerTiler
enum  TilerFlag { FlagNull = 0 , FlagMovable = 1 }
 
typedef QFlags< TilerFlag > TilerFlags
 

Detailed Description

The data is retrieved from Digikam's database.

Constructor & Destructor Documentation

◆ GPSMarkerTiler()

Digikam::GPSMarkerTiler::GPSMarkerTiler ( QObject *const  parent,
ItemFilterModel *const  imageFilterModel,
QItemSelectionModel *const  selectionModel 
)
explicit
Parameters
parentThe parent object
imageFilterModelThe image filter instance
selectionModelThe selection model instance

Member Function Documentation

◆ bestRepresentativeIndexFromList()

QVariant Digikam::GPSMarkerTiler::bestRepresentativeIndexFromList ( const QList< QVariant > &  indices,
const int  sortKey 
)
overridevirtual

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

Parameters
indicesA list containing markers, obtained by getTileRepresentativeMarker.
sortKeySets the criteria for selecting the representative thumbnail, a combination of the SortOptions bits.
Returns
Returns the internally used index of the marker.

Implements Digikam::AbstractMarkerTiler.

◆ getGlobalGroupState()

GeoGroupState Digikam::GPSMarkerTiler::getGlobalGroupState ( )
overridevirtual

◆ getTile()

AbstractMarkerTiler::Tile * Digikam::GPSMarkerTiler::getTile ( const TileIndex tileIndex,
const bool  stopIfEmpty 
)
overridevirtual
Parameters
tileIndexThe index of a tile.
stopIfEmptyDetermines whether child tiles are also created for empty tiles.

Implements Digikam::AbstractMarkerTiler.

◆ getTileGroupState()

GeoGroupState Digikam::GPSMarkerTiler::getTileGroupState ( const TileIndex tileIndex)
overridevirtual

◆ getTileMarkerCount()

int Digikam::GPSMarkerTiler::getTileMarkerCount ( const TileIndex tileIndex)
overridevirtual

◆ getTileRepresentativeMarker()

QVariant Digikam::GPSMarkerTiler::getTileRepresentativeMarker ( const TileIndex tileIndex,
const int  sortKey 
)
overridevirtual
Parameters
tileIndexIndex of the tile from which the best marker should be found.
sortKeySets the criteria for selecting the representative thumbnail, a combination of the SortOptions bits.
Returns
Returns the internally used index of the marker.

Implements Digikam::AbstractMarkerTiler.

◆ getTileSelectedCount()

int Digikam::GPSMarkerTiler::getTileSelectedCount ( const TileIndex tileIndex)
overridevirtual

◆ indicesEqual()

bool Digikam::GPSMarkerTiler::indicesEqual ( const QVariant &  a,
const QVariant &  b 
) const
overridevirtual

◆ onIndicesClicked()

void Digikam::GPSMarkerTiler::onIndicesClicked ( const ClickInfo clickInfo)
overridevirtual

Reimplemented from Digikam::AbstractMarkerTiler.

◆ pixmapFromRepresentativeIndex()

QPixmap Digikam::GPSMarkerTiler::pixmapFromRepresentativeIndex ( const QVariant &  index,
const QSize &  size 
)
overridevirtual
Parameters
indexThe marker's index.
sizeThe 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.

Implements Digikam::AbstractMarkerTiler.

◆ prepareTiles()

void Digikam::GPSMarkerTiler::prepareTiles ( const GeoCoordinates upperLeft,
const GeoCoordinates lowerRight,
int  level 
)
overridevirtual

This function calls the database for the images found inside a rectangle defined by upperLeft and lowerRight points. The images are returned from the database in batches.

Parameters
upperLeftThe North-West point.
lowerRightThe South-East point.
levelThe requested tiling level.

Implements Digikam::AbstractMarkerTiler.

◆ regenerateTiles()

void Digikam::GPSMarkerTiler::regenerateTiles ( )
overridevirtual

◆ setActive()

void Digikam::GPSMarkerTiler::setActive ( const bool  state)
overridevirtual
Parameters
stateNew state of the map, true means active.

Implements Digikam::AbstractMarkerTiler.

◆ setPositiveFilterIsActive()

void Digikam::GPSMarkerTiler::setPositiveFilterIsActive ( const bool  state)

◆ slotNewModelData

void Digikam::GPSMarkerTiler::slotNewModelData ( const QList< ItemInfo > &  infoList)
slot

◆ tileNew()

AbstractMarkerTiler::Tile * Digikam::GPSMarkerTiler::tileNew ( )
overridevirtual