digiKam
Digikam::GPSBookmarkModelHelper Class Reference
+ Inheritance diagram for Digikam::GPSBookmarkModelHelper:

Public Types

enum  Constants { CoordinatesRole = Qt::UserRole + 1 }
 
enum  PropertyFlag { FlagNull = 0 , FlagVisible = 1 , FlagMovable = 2 , FlagSnaps = 4 }
 

Signals

void signalModelChangedDrastically ()
 
void signalThumbnailAvailableForIndex (const QPersistentModelIndex &index, const QPixmap &pixmap)
 
void signalUndoCommand (GPSUndoCommand *undoCommand)
 
void signalVisibilityChanged ()
 

Public Member Functions

virtual QPersistentModelIndex bestRepresentativeIndexFromList (const QList< QPersistentModelIndex > &list, const int sortKey)
 
 GPSBookmarkModelHelper (BookmarksManager *const bookmarkManager, GPSItemModel *const imageModel, QObject *const parent=nullptr)
 
bool itemCoordinates (const QModelIndex &index, GeoCoordinates *const coordinates) const override
 
PropertyFlags itemFlags (const QModelIndex &index) const override
 
bool itemIcon (const QModelIndex &index, QPoint *const offset, QSize *const size, QPixmap *const pixmap, QUrl *const url) const override
 these are necessary for ungrouped models More...
 
QAbstractItemModel * model () const override
 these are necessary for grouped and ungrouped models More...
 
PropertyFlags modelFlags () const override
 
virtual void onIndicesClicked (const QList< QPersistentModelIndex > &clickedIndices)
 
virtual void onIndicesMoved (const QList< QPersistentModelIndex > &movedIndices, const GeoCoordinates &targetCoordinates, const QPersistentModelIndex &targetSnapIndex)
 
virtual QPixmap pixmapFromRepresentativeIndex (const QPersistentModelIndex &index, const QSize &size)
 these are used by MarkerModel for grouped models More...
 
QItemSelectionModel * selectionModel () const override
 
void setVisible (const bool state)
 
void snapItemsTo (const QModelIndex &targetIndex, const QList< QModelIndex > &snappedIndices) override
 
void snapItemsTo (const QModelIndex &targetIndex, const QList< QPersistentModelIndex > &snappedIndices)
 
 ~GPSBookmarkModelHelper () override
 

Member Enumeration Documentation

◆ Constants

Enumerator
CoordinatesRole 

◆ PropertyFlag

Enumerator
FlagNull 
FlagVisible 
FlagMovable 
FlagSnaps 

Constructor & Destructor Documentation

◆ GPSBookmarkModelHelper()

Digikam::GPSBookmarkModelHelper::GPSBookmarkModelHelper ( BookmarksManager *const  bookmarkManager,
GPSItemModel *const  imageModel,
QObject *const  parent = nullptr 
)

◆ ~GPSBookmarkModelHelper()

Digikam::GPSBookmarkModelHelper::~GPSBookmarkModelHelper ( )
override

Member Function Documentation

◆ bestRepresentativeIndexFromList()

QPersistentModelIndex Digikam::GeoModelHelper::bestRepresentativeIndexFromList ( const QList< QPersistentModelIndex > &  list,
const int  sortKey 
)
virtualinherited

◆ itemCoordinates()

bool Digikam::GPSBookmarkModelHelper::itemCoordinates ( const QModelIndex &  index,
GeoCoordinates *const  coordinates 
) const
overridevirtual

Implements Digikam::GeoModelHelper.

References CoordinatesRole.

Referenced by snapItemsTo().

◆ itemFlags()

GeoModelHelper::PropertyFlags Digikam::GPSBookmarkModelHelper::itemFlags ( const QModelIndex &  index) const
overridevirtual

◆ itemIcon()

bool Digikam::GPSBookmarkModelHelper::itemIcon ( const QModelIndex &  index,
QPoint *const  offset,
QSize *const  size,
QPixmap *const  pixmap,
QUrl *const  url 
) const
overridevirtual

these are necessary for ungrouped models

Returns the icon for an ungrouped marker.

The icon can either be returned as a URL to an image, or as a QPixmap. If the caller can handle URLs (for example, to display them in HTML), he can provide the URL parameter. However, the GeoModelHelper may still choose to return a QPixmap instead, if no URL is available.

Parameters
indexModelindex of the marker.
offsetOffset of the zero point in the icon, given from the top-left.
sizethe size of the icon, only populated if a URL is returned.
pixmapHolder for the pixmap of the icon.
urlURL of the icon if available.

Reimplemented from Digikam::GeoModelHelper.

◆ model()

QAbstractItemModel * Digikam::GPSBookmarkModelHelper::model ( ) const
overridevirtual

these are necessary for grouped and ungrouped models

Implements Digikam::GeoModelHelper.

◆ modelFlags()

GeoModelHelper::PropertyFlags Digikam::GPSBookmarkModelHelper::modelFlags ( ) const
overridevirtual

◆ onIndicesClicked()

void Digikam::GeoModelHelper::onIndicesClicked ( const QList< QPersistentModelIndex > &  clickedIndices)
virtualinherited

Reimplemented in Digikam::MapViewModelHelper.

◆ onIndicesMoved()

void Digikam::GeoModelHelper::onIndicesMoved ( const QList< QPersistentModelIndex > &  movedIndices,
const GeoCoordinates targetCoordinates,
const QPersistentModelIndex &  targetSnapIndex 
)
virtualinherited

◆ pixmapFromRepresentativeIndex()

QPixmap Digikam::GeoModelHelper::pixmapFromRepresentativeIndex ( const QPersistentModelIndex &  index,
const QSize &  size 
)
virtualinherited

these are used by MarkerModel for grouped models

Reimplemented in Digikam::GPSGeoIfaceModelHelper, Digikam::ItemGPSModelHelper, and Digikam::MapViewModelHelper.

◆ selectionModel()

QItemSelectionModel * Digikam::GPSBookmarkModelHelper::selectionModel ( ) const
overridevirtual

◆ setVisible()

void Digikam::GPSBookmarkModelHelper::setVisible ( const bool  state)

◆ signalModelChangedDrastically

void Digikam::GeoModelHelper::signalModelChangedDrastically ( )
signalinherited

◆ signalThumbnailAvailableForIndex

void Digikam::GeoModelHelper::signalThumbnailAvailableForIndex ( const QPersistentModelIndex &  index,
const QPixmap &  pixmap 
)
signalinherited

◆ signalUndoCommand

void Digikam::GPSBookmarkModelHelper::signalUndoCommand ( GPSUndoCommand undoCommand)
signal

Referenced by snapItemsTo().

◆ signalVisibilityChanged

void Digikam::GeoModelHelper::signalVisibilityChanged ( )
signalinherited

◆ snapItemsTo() [1/2]

void Digikam::GPSBookmarkModelHelper::snapItemsTo ( const QModelIndex &  targetIndex,
const QList< QModelIndex > &  snappedIndices 
)
overridevirtual

◆ snapItemsTo() [2/2]

void Digikam::GeoModelHelper::snapItemsTo ( const QModelIndex &  targetIndex,
const QList< QPersistentModelIndex > &  snappedIndices 
)
inherited

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