digiKam
Digikam::GPSMarkerTiler Class Reference

Marker model for storing data needed to display markers on the map. The data is retrieved from Digikam's database. More...

+ Inheritance diagram for Digikam::GPSMarkerTiler:

Public Types

enum  TilerFlag { FlagNull = 0 , FlagMovable = 1 }
 

Public Slots

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

Signals

void signalModelFilteredImages (const QList< qlonglong > &imagesId)
 
void signalThumbnailAvailableForIndex (const QVariant &index, const QPixmap &pixmap)
 
void signalTilesOrSelectionChanged ()
 

Public Member Functions

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

Detailed Description

Marker model for storing data needed to display markers on the map. The data is retrieved from Digikam's database.

Member Enumeration Documentation

◆ TilerFlag

Enumerator
FlagNull 
FlagMovable 

Constructor & Destructor Documentation

◆ GPSMarkerTiler()

Digikam::GPSMarkerTiler::GPSMarkerTiler ( QObject *const  parent,
ItemFilterModel *const  imageFilterModel,
QItemSelectionModel *const  selectionModel 
)
explicit

Constructor.

Parameters
parentthe parent object

References Digikam::CoreDbAccess::databaseWatch(), Digikam::AbstractMarkerTiler::resetRootTile(), and slotNewModelData().

◆ ~GPSMarkerTiler()

Digikam::GPSMarkerTiler::~GPSMarkerTiler ( )
override

Destructor.

Member Function Documentation

◆ bestRepresentativeIndexFromList()

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

This function finds the best representative marker from a group of markers. 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.

References Digikam::GPSItemInfoSorter::fitsBetter(), and getGlobalGroupState().

◆ getGlobalGroupState()

GeoGroupState Digikam::GPSMarkerTiler::getGlobalGroupState ( )
overridevirtual

◆ getTile()

AbstractMarkerTiler::Tile * Digikam::GPSMarkerTiler::getTile ( const TileIndex tileIndex,
const bool  stopIfEmpty 
)
overridevirtual

◆ getTileGroupState()

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

◆ getTileMarkerCount()

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

Implements Digikam::AbstractMarkerTiler.

References getTile().

◆ getTileRepresentativeMarker()

QVariant Digikam::GPSMarkerTiler::getTileRepresentativeMarker ( const TileIndex tileIndex,
const int  sortKey 
)
overridevirtual

This function finds the best representative marker from a tile of markers.

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.

References Digikam::GPSItemInfoSorter::fitsBetter(), getGlobalGroupState(), getTile(), and Digikam::GPSItemInfo::id.

◆ getTileSelectedCount()

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

◆ indicesEqual() [1/2]

bool Digikam::AbstractMarkerTiler::indicesEqual ( const QIntList a,
const QIntList b,
const int  upToLevel 
) const
inherited

◆ indicesEqual() [2/2]

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

This function compares two marker indices.

Implements Digikam::AbstractMarkerTiler.

◆ isDirty()

◆ onIndicesClicked()

◆ onIndicesMoved()

void Digikam::AbstractMarkerTiler::onIndicesMoved ( const TileIndex::List tileIndicesList,
const GeoCoordinates targetCoordinates,
const QPersistentModelIndex &  targetSnapIndex 
)
virtualinherited

Reimplemented in Digikam::ItemMarkerTiler.

◆ pixmapFromRepresentativeIndex()

QPixmap Digikam::GPSMarkerTiler::pixmapFromRepresentativeIndex ( const QVariant &  index,
const QSize &  size 
)
overridevirtual

This function retrieves the thumbnail for an index.

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.

References Digikam::ItemInfo::id(), and Digikam::ItemInfo::thumbnailIdentifier().

◆ prepareTiles()

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

Requests all images inside a given rectangle from the database.

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.

References Digikam::DBJobsManager::instance(), Digikam::GeoCoordinates::lat(), Digikam::GeoCoordinates::lon(), Digikam::GPSDBJobInfo::setLat1(), Digikam::GPSDBJobInfo::setLat2(), Digikam::GPSDBJobInfo::setLng1(), Digikam::GPSDBJobInfo::setLng2(), and Digikam::DBJobsManager::startGPSJobThread().

◆ regenerateTiles()

void Digikam::GPSMarkerTiler::regenerateTiles ( )
overridevirtual

◆ removeCurrentRegionSelection()

void Digikam::GPSMarkerTiler::removeCurrentRegionSelection ( )

◆ resetRootTile()

void Digikam::AbstractMarkerTiler::resetRootTile ( )
inherited

◆ rootTile()

◆ setActive()

void Digikam::GPSMarkerTiler::setActive ( const bool  state)
overridevirtual

Sets the map active/inactive.

Parameters
stateNew state of the map, true means active.

Implements Digikam::AbstractMarkerTiler.

◆ setDirty()

void Digikam::AbstractMarkerTiler::setDirty ( const bool  state = true)
inherited

◆ setPositiveFilterIsActive()

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

◆ setRegionSelection()

void Digikam::GPSMarkerTiler::setRegionSelection ( const GeoCoordinates::Pair sel)

◆ signalModelFilteredImages

void Digikam::GPSMarkerTiler::signalModelFilteredImages ( const QList< qlonglong > &  imagesId)
signal

Referenced by onIndicesClicked().

◆ signalThumbnailAvailableForIndex

void Digikam::AbstractMarkerTiler::signalThumbnailAvailableForIndex ( const QVariant &  index,
const QPixmap &  pixmap 
)
signalinherited

◆ signalTilesOrSelectionChanged

void Digikam::AbstractMarkerTiler::signalTilesOrSelectionChanged ( )
signalinherited

◆ slotNewModelData

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

Receives notifications from the album model about new items.

References Digikam::AbstractMarkerTiler::signalTilesOrSelectionChanged().

Referenced by GPSMarkerTiler().

◆ tileNew()

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

Implements Digikam::AbstractMarkerTiler.

Referenced by getTile().

◆ tilerFlags()

AbstractMarkerTiler::TilerFlags Digikam::AbstractMarkerTiler::tilerFlags ( ) const
virtualinherited

these have to be implemented

Reimplemented in Digikam::ItemMarkerTiler.

References Digikam::AbstractMarkerTiler::FlagNull.


The documentation for this class was generated from the following files: