|
void | setSortKey (const int sortKey) |
|
void | setThumnailSize (const int newThumbnailSize) |
|
void | setThumbnailGroupingRadius (const int newGroupingRadius) |
|
void | setMarkerGroupingRadius (const int newGroupingRadius) |
|
int | getThumbnailSize () const |
|
int | getUndecoratedThumbnailSize () const |
|
void | setShowThumbnails (const bool state) |
|
QString | convertZoomToBackendZoom (const QString &someZoom, const QString &targetBackend) const |
|
void | getColorInfos (const int clusterIndex, QColor *fillColor, QColor *strokeColor, Qt::PenStyle *strokeStyle, QString *labelText, QColor *labelColor, const GeoGroupState *const overrideSelection=nullptr, const int *const overrideCount=nullptr) const |
| Return color and style information for rendering the cluster.
|
|
void | getColorInfos (const GeoGroupState groupState, const int nMarkers, QColor *fillColor, QColor *strokeColor, Qt::PenStyle *strokeStyle, QString *labelText, QColor *labelColor) const |
|
void | slotShowThumbnailsChanged () |
|
void | slotZoomIn () |
|
void | slotZoomOut () |
|
void | slotDecreaseThumbnailSize () |
|
void | slotIncreaseThumbnailSize () |
|
void | stopThumbnailTimer () |
|
void | signalRemoveCurrentFilter () |
|
void | signalStickyModeChanged () |
|
|
QStringList | availableBackends () const |
|
bool | setBackend (const QString &backendName) |
|
QList< MapBackend * > | backends () const |
|
GeoCoordinates | getCenter () const |
|
void | setCenter (const GeoCoordinates &coordinate) |
|
void | setZoom (const QString &newZoom) |
|
QString | getZoom () |
|
void | adjustBoundariesToGroupedMarkers (const bool useSaneZoomLevel=true) |
| Adjusts the visible map area such that all grouped markers are visible.
|
|
void | refreshMap () |
|
void | setRegionSelection (const GeoCoordinates::Pair ®ion) |
|
GeoCoordinates::Pair | getRegionSelection () |
|
void | clearRegionSelection () |
|
void | updateMarkers () |
|
void | updateClusters () |
|
void | markClustersAsDirty () |
|
QPixmap | getDecoratedPixmapForCluster (const int clusterId, const GeoGroupState *const selectedStateOverride, const int *const countOverride, QPoint *const centerPoint) |
|
QVariant | getClusterRepresentativeMarker (const int clusterIndex, const int sortKey) |
|
void | slotBackendReadyChanged (const QString &backendName) |
|
void | slotChangeBackend (QAction *action) |
|
void | slotBackendZoomChanged (const QString &newZoom) |
|
void | slotClustersMoved (const QIntList &clusterIndices, const QPair< int, QModelIndex > &snapTarget) |
|
void | slotClustersClicked (const QIntList &clusterIndices) |
|
void | slotLazyReclusteringRequestCallBack () |
| Helper function to buffer reclustering.
|
|
void | slotRequestLazyReclustering () |
| Request reclustering, repeated calls should generate only one actual update of the clusters.
|
|
void | slotRemoveCurrentRegionSelection () |
|
void | slotNewSelectionFromMap (const Digikam::GeoCoordinates::Pair &sel) |
|
bool | currentBackendReady () const |
|
void | applyCacheToBackend () |
|
void | saveBackendToCache () |
|
void | setShowPlaceholderWidget (const bool state) |
|
void | setMapWidgetInFrame (QWidget *const widgetForFrame) |
| Set widgetForFrame as the widget in the frame, but does not show it.
|
|
void | removeMapWidgetFromFrame () |
|
void | slotClustersNeedUpdating () |
|
void | signalRegionSelectionChanged () |
|
|
QAction * | getControlAction (const QString &actionName) |
|
QWidget * | getControlWidget () |
| Returns the control widget instance.
|
|
void | addWidgetToControlWidget (QWidget *const newWidget) |
|
void | setSortOptionsMenu (QMenu *const sortMenu) |
|
void | setMouseMode (const GeoMouseModes mouseMode) |
|
void | setAvailableMouseModes (const GeoMouseModes mouseModes) |
|
void | setVisibleMouseModes (const GeoMouseModes mouseModes) |
|
void | setAllowModifications (const bool state) |
|
void | setActive (const bool state) |
|
bool | getActiveState () |
|
bool | getStickyModeState () const |
|
void | setStickyModeState (const bool state) |
|
void | setVisibleExtraActions (const GeoExtraActions actions) |
|
void | setEnabledExtraActions (const GeoExtraActions actions) |
|
void | slotMouseModeChanged (QAction *triggeredAction) |
|
void | rebuildConfigurationMenu () |
|
void | createActions () |
|
void | createActionsForBackendSelection () |
|
void | dropEvent (QDropEvent *event) override |
|
void | dragMoveEvent (QDragMoveEvent *event) override |
|
void | dragEnterEvent (QDragEnterEvent *event) override |
|
void | dragLeaveEvent (QDragLeaveEvent *event) override |
|
void | slotUpdateActionsEnabled () |
|
void | slotStickyModeChanged () |
|
void | signalMouseModeChanged (const Digikam::GeoMouseModes ¤tMouseMode) |
|
The MapWidget class is the central widget of geolocation interface. It provides a widget which can display maps using either the Marble or Google Maps backend. Using a model, items can be displayed on the map. For models containing only a small number of items, the items can be shown directly, but for models with a larger number of items, the items can also be grouped. Currently, any number of ungrouped models can be shown, but only one grouped model. Item selection models can also be used along with the models, to interact with the selection states of the items on the map. In order to use a model with geolocation interface, however, a model helper has to be implemented, which extracts data from the model that is not provided by the Qt part of a model's API.
Now, a brief introduction on how to get geolocation interface working is provided:
- First, an instance of
MapWidget
has to be created.
- Next,
GeoModelHelper
has to be subclassed and at least the pure virtual functions have to be implemented.
- To show the model's data ungrouped, the model helper has to be added to
MapWidget
instance using addUngroupedModel.
- To show the model's data grouped, an instance of
AbstractMarkerTiler
has to be created and the model helper has to be set to it using setMarkerGeoModelHelper. The AbstractMarkerTiler
has then to be given to MapWidget using setGroupedModel. If the items to be displayed do not reside in a model, a subclass of AbstractMarkerTiler
can be created which returns just the number of items in a particular area, and picks representative items for thumbnails.
- To handle dropping of items from the host applications UI onto the map,
DragDropHandler
has to be subclassed as well and added to the model using setDragDropHandler.
- Finally, setActive() has to be called to tell the widget that it should start displaying things.