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

Public Types

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

void addUngroupedModelHelper (GeoModelHelper *const newModelHelper)
 
QPersistentModelIndex bestRepresentativeIndexFromList (const QList< QPersistentModelIndex > &list, const int sortKey) override
 
 GPSGeoIfaceModelHelper (GPSItemModel *const model, QItemSelectionModel *const selectionModel, QObject *const parent=nullptr)
 
bool itemCoordinates (const QModelIndex &index, GeoCoordinates *const coordinates) const override
 
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 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)
 
void onIndicesMoved (const QList< QPersistentModelIndex > &movedMarkers, const GeoCoordinates &targetCoordinates, const QPersistentModelIndex &targetSnapIndex) override
 
QPixmap pixmapFromRepresentativeIndex (const QPersistentModelIndex &index, const QSize &size) override
 these are used by MarkerModel for grouped models More...
 
QItemSelectionModel * selectionModel () const override
 
virtual void snapItemsTo (const QModelIndex &targetIndex, const QList< QModelIndex > &snappedIndices)
 
void snapItemsTo (const QModelIndex &targetIndex, const QList< QPersistentModelIndex > &snappedIndices)
 
 ~GPSGeoIfaceModelHelper () override
 

Member Enumeration Documentation

◆ PropertyFlag

Enumerator
FlagNull 
FlagVisible 
FlagMovable 
FlagSnaps 

Constructor & Destructor Documentation

◆ GPSGeoIfaceModelHelper()

Digikam::GPSGeoIfaceModelHelper::GPSGeoIfaceModelHelper ( GPSItemModel *const  model,
QItemSelectionModel *const  selectionModel,
QObject *const  parent = nullptr 
)
explicit

◆ ~GPSGeoIfaceModelHelper()

Digikam::GPSGeoIfaceModelHelper::~GPSGeoIfaceModelHelper ( )
override

Member Function Documentation

◆ addUngroupedModelHelper()

void Digikam::GPSGeoIfaceModelHelper::addUngroupedModelHelper ( GeoModelHelper *const  newModelHelper)

◆ bestRepresentativeIndexFromList()

QPersistentModelIndex Digikam::GPSGeoIfaceModelHelper::bestRepresentativeIndexFromList ( const QList< QPersistentModelIndex > &  list,
const int  sortKey 
)
overridevirtual

◆ itemCoordinates()

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

◆ itemFlags()

GeoModelHelper::PropertyFlags Digikam::GeoModelHelper::itemFlags ( const QModelIndex &  index) const
virtualinherited

◆ itemIcon()

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

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 in Digikam::GPSBookmarkModelHelper, and DigikamGenericGeolocationEditPlugin::SearchResultModelHelper.

Referenced by Digikam::BackendMarble::marbleCustomPaint(), and Digikam::BackendGoogleMaps::slotUngroupedModelChanged().

◆ model()

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

these are necessary for grouped and ungrouped models

Implements Digikam::GeoModelHelper.

Referenced by GPSGeoIfaceModelHelper().

◆ modelFlags()

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

◆ onIndicesClicked()

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

Reimplemented in Digikam::MapViewModelHelper.

◆ onIndicesMoved()

void Digikam::GPSGeoIfaceModelHelper::onIndicesMoved ( const QList< QPersistentModelIndex > &  movedMarkers,
const GeoCoordinates targetCoordinates,
const QPersistentModelIndex &  targetSnapIndex 
)
overridevirtual

◆ pixmapFromRepresentativeIndex()

QPixmap Digikam::GPSGeoIfaceModelHelper::pixmapFromRepresentativeIndex ( const QPersistentModelIndex &  index,
const QSize &  size 
)
overridevirtual

these are used by MarkerModel for grouped models

Reimplemented from Digikam::GeoModelHelper.

◆ selectionModel()

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

◆ signalModelChangedDrastically

void Digikam::GeoModelHelper::signalModelChangedDrastically ( )
signalinherited

◆ signalThumbnailAvailableForIndex

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

◆ signalUndoCommand

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

Referenced by onIndicesMoved().

◆ signalVisibilityChanged

void Digikam::GeoModelHelper::signalVisibilityChanged ( )
signalinherited

◆ snapItemsTo() [1/2]

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

◆ snapItemsTo() [2/2]

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

Referenced by onIndicesMoved().


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