![]() |
Mapper
0.9.0
API documentation
|
MainWindowController for editing a map. More...
#include <map_editor.h>
Public Types | |
enum | OperatingMode { MapEditor = 0, SymbolEditor = 1 } |
See MapEditorController constructor. More... | |
Public Slots | |
void | exportVector () |
Lets the user export the map as geospatial vector data. More... | |
void | printClicked (int task) |
Makes the print/export dock widget visible, and configures it for the given task (which is of type PrintWidget::TaskFlags). More... | |
void | undo () |
Undoes the last object edit step. More... | |
void | redo () |
Redoes the last object edit step. More... | |
void | cut () |
Cuts the selected object(s). More... | |
void | copy () |
Copies the selected object(s). More... | |
void | paste () |
Pastes the object(s) from the clipboard. More... | |
void | clearUndoRedoHistory () |
Empties the undo / redo history to save space. More... | |
void | showGrid () |
Toggles visivbility of the map grid. More... | |
void | configureGrid () |
Shows the map grid configuration dialog. More... | |
void | pan () |
Activates the pan tool. More... | |
void | moveToGpsPos () |
Moves view to GPS position. More... | |
void | zoomIn () |
Zooms in in the current map widget. More... | |
void | zoomOut () |
Zooms out in the current map widget. More... | |
void | setCustomZoomFactorClicked () |
Shows the dialog to set a custom zoom factor in the current map widget. More... | |
void | hatchAreas (bool checked) |
Sets the hatch areas view option. More... | |
void | baselineView (bool checked) |
Sets the baseline view option. More... | |
void | hideAllTemplates (bool checked) |
Sets the "hide all templates" view option. More... | |
void | overprintingSimulation (bool checked) |
Sets the overprinting simulation view option. More... | |
void | coordsDisplayChanged () |
Adjusts the coordinates display of the map widget to the selected option. More... | |
void | copyDisplayedCoords () |
Copies the displayed coordinates to the clipboard. More... | |
void | showSymbolWindow (bool show) |
Shows or hides the symbol pane. More... | |
void | showColorWindow (bool show) |
Shows or hides the color dock widget. More... | |
void | symbolSetIdClicked () |
Shows a dialog for changing the symbol set ID. More... | |
void | loadSymbolsFromClicked () |
Shows the "load symbols from" dialog. More... | |
void | loadCrtClicked () |
Loads a CRT file and shows the symbol replacement dialog. More... | |
void | loadColorsFromClicked () |
TODO: not implemented yet. More... | |
void | scaleAllSymbolsClicked () |
Shows the "scale all symbols" dialog. More... | |
void | scaleMapClicked () |
Shows the ScaleMapDialog. More... | |
void | rotateMapClicked () |
Shows the RotateMapDialog. More... | |
void | mapNotesClicked () |
Shows the dialog to enter map notes. More... | |
void | showTemplateWindow (bool show) |
Shows or hides the template setup dock widget. More... | |
void | openTemplateClicked () |
Shows a file selector to open a template. More... | |
void | reopenTemplateClicked () |
Shows the ReopenTemplateDialog. More... | |
void | templateAvailabilityChanged () |
Adjusts action availability based on the presence of templates. More... | |
void | closedTemplateAvailabilityChanged () |
Adjusts action availability based on the presence of closed templates. More... | |
void | showTagsWindow (bool show) |
Shows or hides the tags editor dock widget. More... | |
void | editGeoreferencing () |
Shows the GeoreferencingDialog. More... | |
void | selectedSymbolsChanged () |
Makes the editor aware of a change of the selected symbols. More... | |
void | objectSelectionChanged () |
Makes the editor aware of a change of the selected object. More... | |
void | undoStepAvailabilityChanged () |
Adjusts the enabled state of the undo / redo actions. More... | |
void | clipboardChanged (QClipboard::Mode mode) |
Adjusts the enabled state of the paste action (specific signature required). More... | |
void | updatePasteAvailability () |
Adjusts the enabled state of the paste action. More... | |
void | spotColorPresenceChanged (bool has_spot_colors) |
Checks the presence of spot colors, and to disables overprinting simulation if there are no spot colors. More... | |
void | showWholeMap () |
Adjusts the view in the current map widget to show the whole map. More... | |
void | editToolClicked () |
Activates the point edit tool. More... | |
void | editLineToolClicked () |
Activates the line edit tool. More... | |
void | drawPointClicked () |
Activates the draw point tool. More... | |
void | drawPathClicked () |
Activates the draw path tool. More... | |
void | drawCircleClicked () |
Activates the draw circle tool. More... | |
void | drawRectangleClicked () |
Activates the draw rectangle tool. More... | |
void | drawFreehandClicked () |
Activates the draw freehand tool. More... | |
void | drawFillClicked () |
Activates the draw fill tool. More... | |
void | drawTextClicked () |
Activates the draw text tool. More... | |
void | deleteClicked () |
Deletes the selected object(s) More... | |
void | duplicateClicked () |
Duplicates the selected object(s) More... | |
void | switchSymbolClicked () |
Switches the symbol of the selected object(s) to the selected symbol. More... | |
void | fillBorderClicked () |
Creates duplicates of the selected object(s) and assigns them the selected symbol. More... | |
void | selectObjectsClicked (bool select_exclusively) |
Selects all objects with the selected symbol(s) More... | |
void | deselectObjectsClicked () |
Deselects all objects with the selected symbol(s) More... | |
void | selectAll () |
Selects all objects in the current map part. More... | |
void | selectNothing () |
Clears the object selection. More... | |
void | invertSelection () |
Inverts in the object selection in the current map part. More... | |
void | selectByCurrentSymbols () |
Selects all objects having the current selected symbols. More... | |
void | switchDashesClicked () |
Reverses the selected object(s) direcction(s), thus switching dash directions for lines. More... | |
void | connectPathsClicked () |
Connects close endpoints of selected lines. More... | |
void | cutClicked () |
Activates the cut tool. More... | |
void | cutHoleClicked () |
Activates the cut hole tool. More... | |
void | cutHoleCircleClicked () |
Activates the cut circular hole tool. More... | |
void | cutHoleRectangleClicked () |
Activates the cut rectangular hole tool. More... | |
void | rotateClicked () |
Activates the rotate tool. More... | |
void | rotatePatternClicked () |
Activates the rotate pattern tool. More... | |
void | scaleClicked () |
Activates the scale tool. More... | |
void | measureClicked (bool checked) |
Shows or hides the MeasureWidget. More... | |
void | booleanUnionClicked () |
Calculates the union of selected same-symbol area objects. More... | |
void | booleanIntersectionClicked () |
Calculates the intersection of selected same-symbol area objects. More... | |
void | booleanDifferenceClicked () |
Calculates the difference of selected area objects from the first selected area object. More... | |
void | booleanXOrClicked () |
Calculates the boolean XOr of selected same-symbol area objects. More... | |
void | booleanMergeHolesClicked () |
Merges holes of the (single) selected area object. More... | |
void | convertToCurvesClicked () |
Converts selected polygonal paths to curves. More... | |
void | simplifyPathClicked () |
Tries to remove points of selected paths while retaining their shape. More... | |
void | cutoutPhysicalClicked () |
Activates the physical cutout tool. More... | |
void | cutawayPhysicalClicked () |
Activates the physical cutout tool (inversed) More... | |
void | distributePointsClicked () |
Executes the "distribute points along path" action. More... | |
void | paintOnTemplateClicked (bool checked) |
Shows or hides the paint-on-template widget. More... | |
void | paintOnTemplateSelectClicked () |
Shows the template selection dialog for for the paint-on-template functionality. More... | |
void | enableGPSDisplay (bool enable) |
Enables or disables GPS display. More... | |
void | enableGPSDistanceRings (bool enable) |
Enables or disables showing distance rings when GPS display is active. More... | |
void | updateDrawPointGPSAvailability () |
Updates availability of the GPS point drawing tool. More... | |
void | drawPointGPSClicked () |
Switches to the GPS point drawing tool. More... | |
void | gpsTemporaryPointClicked () |
Sets a temporary marker at the GPS position. More... | |
void | gpsTemporaryPathClicked (bool enable) |
Draws a temporary path at the GPS position. More... | |
void | gpsTemporaryClearClicked () |
Clears temporary GPS markers. More... | |
void | enableCompassDisplay (bool enable) |
Enables or disables digital compass display. More... | |
void | alignMapWithNorth (bool enable) |
Enables or disables map auto-rotation according to compass. More... | |
void | alignMapWithNorthUpdate () |
Called regularly after enabled with alignMapWithNorth() to update the map rotation. More... | |
void | hideTopActionBar () |
For mobile UI: hides the top action bar. More... | |
void | showTopActionBar () |
For mobile UI: shows the top action bar again after hiding it. More... | |
void | mobileSymbolSelectorClicked () |
For mobile UI: shows the symbol selection screen. More... | |
void | mobileSymbolSelectorFinished () |
Counterpart to mobileSymbolSelectorClicked(). More... | |
void | addMapPart () |
Creates and adds a new map part. More... | |
void | removeMapPart () |
Removes the current map part. More... | |
void | renameMapPart () |
Renames the current map part. More... | |
void | reassignObjectsToMapPart (int target) |
Moves all selected objects to a different map part. More... | |
void | mergeCurrentMapPartTo (int target) |
Merges the current map part with another one. More... | |
void | mergeAllMapParts () |
Merges all map parts into the current one. More... | |
void | templateAdded (int pos, const OpenOrienteering::Template *temp) |
Updates action enabled states after a template has been added. More... | |
void | templateDeleted (int pos, const OpenOrienteering::Template *temp) |
Updates action enabled states after a template has been deleted. More... | |
void | importClicked () |
Shows the import file selector and imports the selected file, if any. More... | |
void | setViewOptionsEnabled (bool enabled=true) |
Sets the enabled state of actions which change how the map is rendered, such as with grid, with templates, with overprinting simulation. More... | |
void | setWindowStateChanged () |
Indicates a change of the current toolbar and dock widget positions, and schedules saving. More... | |
Signals | |
void | activeSymbolChanged (const OpenOrienteering::Symbol *symbol) |
Indicates a change of the active symbol. More... | |
void | templatePositionDockWidgetClosed (OpenOrienteering::Template *temp) |
Public Member Functions | |
MapEditorController (OperatingMode mode, Map *map=nullptr, MapView *map_view=nullptr) | |
Constructs a new MapEditorController for a map. More... | |
~MapEditorController () override | |
Destroys the MapEditorController. More... | |
bool | menuBarVisible () override |
In SymbolEditor mode, this controller doesn't want a menu bar. More... | |
bool | isInMobileMode () const |
Returns if the editor is in mobile mode. More... | |
void | setTool (MapEditorTool *new_tool) |
Changes to new_tool as the new active tool. More... | |
void | setEditTool () |
Shortcut to change to the point edit tool as new active tool. More... | |
void | setOverrideTool (MapEditorTool *new_override_tool) |
Sets new_override_tool as the new active override tool. More... | |
MapEditorTool * | getTool () const |
Returns the current tool. More... | |
MapEditorTool * | getDefaultDrawToolForSymbol (const Symbol *symbol) |
Returns the default drawing tool for a given symbol. More... | |
Symbol * | activeSymbol () const |
Returns the active symbol, or nullptr. More... | |
void | setEditingInProgress (bool value) |
If this is set to true (usually by the current tool), undo/redo and saving the map is deactivated. More... | |
bool | isEditingInProgress () const override |
Returns true when editing is in progress. More... | |
void | addFloatingDockWidget (QDockWidget *dock_widget) |
Adds a a floating dock widget to the main window. More... | |
void | setEditorActivity (MapEditorActivity *new_activity) |
Sets the current editor activity. More... | |
MapEditorActivity * | getEditorActivity () const |
Returns the current editor activity. More... | |
Map * | getMap () const |
Returns the map on which this controller operates. More... | |
MapWidget * | getMainWidget () const |
Returns the main map widget (which is currently the only map widget). More... | |
SymbolWidget * | getSymbolWidget () const |
Returns this controller's symbol widget, where the symbol selection happens. More... | |
bool | existsTemplatePositionDockWidget (Template *temp) const |
Returns if a template position dock widget exists for a template. More... | |
TemplatePositionDockWidget * | getTemplatePositionDockWidget (Template *temp) const |
Returns the template position dock widget for a template. More... | |
void | addTemplatePositionDockWidget (Template *temp) |
Adds a template position dock widget for the given template. More... | |
void | removeTemplatePositionDockWidget (Template *temp) |
Removes the template position dock widget for the template. More... | |
void | showPopupWidget (QWidget *child_widget, const QString &title) |
Shows the given widget in a popup window with specified title. More... | |
void | deletePopupWidget (QWidget *child_widget) |
Deletes the given popup widget, which was previously shown with showPopupWidget(). More... | |
QAction * | getAction (const char *id) |
Returns the action identified by id if it exists, or nullptr. More... | |
bool | saveTo (const QString &path, const FileFormat &format) override |
Override from MainWindowController. More... | |
bool | exportTo (const QString &path, const FileFormat &format) override |
Override from MainWindowController. More... | |
bool | loadFrom (const QString &path, const FileFormat &format, QWidget *dialog_parent=nullptr) override |
Override from MainWindowController. More... | |
void | attach (MainWindow *window) override |
Override from MainWindowController. More... | |
void | detach () override |
Override from MainWindowController. More... | |
bool | keyPressEventFilter (QKeyEvent *event) override |
Receives key press events from the main window. This implementation passes the event to MapWidget::keyPressEventFilter. More... | |
bool | keyReleaseEventFilter (QKeyEvent *event) override |
Receives key release events from the main window. This implementation passes the event to MapWidget::keyReleaseEventFilter. More... | |
QHash< const Symbol *, Symbol * > | importMap (Map &other, Map::ImportMode mode, QWidget *dialog_parent, std::vector< bool > *filter=nullptr, int symbol_insert_pos=-1, bool merge_duplicate_symbols=true) |
Imports another map into this map. More... | |
bool | importGpxFile (const QString &filename) |
Imports a track file (GPX) into the map. More... | |
bool | importMapFile (const QString &filename, bool show_errors) |
Imports a map file into the loaded map. More... | |
![]() | |
~MainWindowController () override | |
virtual bool | statusBarVisible () |
Returns true when the controller wants a status bar to be shown. More... | |
bool | exportTo (const QString &path) |
Export to a file, but don't change modified state with regard to the original file. More... | |
MainWindow * | getWindow () const |
Get the main window this controller is attached to. More... | |
![]() | |
virtual const QMetaObject * | metaObject () const const |
QObject (QObject *parent) | |
virtual | ~QObject () |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
QString | objectName () const const |
void | setObjectName (const QString &name) |
bool | isWidgetType () const const |
bool | isWindowType () const const |
bool | signalsBlocked () const const |
bool | blockSignals (bool block) |
QThread * | thread () const const |
void | moveToThread (QThread *targetThread) |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType) |
void | killTimer (int id) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
const QObjectList & | children () const const |
void | setParent (QObject *parent) |
void | installEventFilter (QObject *filterObj) |
void | removeEventFilter (QObject *obj) |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
bool | disconnect (const QObject *receiver, const char *method) const const |
void | dumpObjectTree () |
void | dumpObjectInfo () |
void | dumpObjectTree () const const |
void | dumpObjectInfo () const const |
bool | setProperty (const char *name, const QVariant &value) |
QVariant | property (const char *name) const const |
QList< QByteArray > | dynamicPropertyNames () const const |
void | destroyed (QObject *obj) |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
bool | inherits (const char *className) const const |
void | deleteLater () |
Q_DISABLE_COPY (Class) | |
Q_DISABLE_MOVE (Class) | |
Q_DISABLE_COPY_MOVE (Class) | |
T | qobject_cast (QObject *object) |
T | qobject_cast (const QObject *object) |
T | qFindChild (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QRegExp ®Exp) |
Q_CLASSINFO (Name, Value) | |
Q_INTERFACES (...) | |
Q_PROPERTY (...) | |
Q_ENUMS (...) | |
Q_FLAGS (...) | |
Q_ENUM (...) | |
Q_FLAG (...) | |
Q_ENUM_NS (...) | |
Q_FLAG_NS (...) | |
Q_OBJECT Q_OBJECT | |
Q_GADGET Q_GADGET | |
Q_NAMESPACE Q_NAMESPACE | |
Q_SIGNALS Q_SIGNALS | |
Q_SIGNAL Q_SIGNAL | |
Q_SLOTS Q_SLOTS | |
Q_SLOT Q_SLOT | |
Q_EMIT Q_EMIT | |
Q_INVOKABLE Q_INVOKABLE | |
Q_REVISION Q_REVISION | |
Q_SET_OBJECT_NAME (Object) | |
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
Protected Slots | |
void | projectionChanged () |
void | georeferencingDialogFinished () |
void | changeMapPart (int index) |
Sets the map's current part. More... | |
void | updateMapPartsUI () |
Updates all UI components related to map parts. More... | |
Protected Member Functions | |
void | updateSymbolDependentActions () |
Adjusts the enabled state of various actions after the selected symbol(s) have changed. More... | |
void | updateObjectDependentActions () |
Adjusts the enabled state of various actions after the selected object(s) have changed. More... | |
void | updateSymbolAndObjectDependentActions () |
Adjusts the enabled state of various actions after the selected symbol(s) or object(s) have changed. More... | |
![]() | |
QObject * | sender () const const |
int | senderSignalIndex () const const |
int | receivers (const char *signal) const const |
bool | isSignalConnected (const QMetaMethod &signal) const const |
virtual void | timerEvent (QTimerEvent *event) |
virtual void | childEvent (QChildEvent *event) |
virtual void | customEvent (QEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
Friends | |
class | Map |
Additional Inherited Members | |
![]() | |
static MainWindowController * | controllerForFile (const QString &filename) |
Get a controller suitable for a particular file. More... | |
![]() | |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
![]() | |
typedef | QObjectList |
![]() | |
MainWindow * | window |
![]() | |
objectName | |
MainWindowController for editing a map.
Creates menus and toolbars, manages editing tools, dock widgets, and much more.
See MapEditorController constructor.
Enumerator | |
---|---|
MapEditor | |
SymbolEditor |
OpenOrienteering::MapEditorController::MapEditorController | ( | OperatingMode | mode, |
Map * | map = nullptr , |
||
MapView * | map_view = nullptr |
||
) |
Constructs a new MapEditorController for a map.
mode | Normally, MapEditor should be used. However, as a HACK the MapEditorController is also used in the symbol editor for the preview. In this case, SymbolEditor is passed to disable showing the menus, toolbars, etc. |
map | A Map which is to be edited by the controller. |
map_view | A MapView for the given map. |
Review/remove mode hack.
Document and fix ownership of map and map_view. Double deletes waiting...
|
override |
Destroys the MapEditorController.
|
inline |
Returns the active symbol, or nullptr.
The active symbol is the single symbol which is to be used by drawing tools and actions.
It there is no active symbol, this function returns nullptr.
|
signal |
Indicates a change of the active symbol.
symbol | The new active symbol, or nullptr. |
void OpenOrienteering::MapEditorController::addFloatingDockWidget | ( | QDockWidget * | dock_widget | ) |
Adds a a floating dock widget to the main window.
Adjusts some geometric properties.
|
slot |
Creates and adds a new map part.
void OpenOrienteering::MapEditorController::addTemplatePositionDockWidget | ( | Template * | temp | ) |
Adds a template position dock widget for the given template.
|
slot |
Enables or disables map auto-rotation according to compass.
|
slot |
Called regularly after enabled with alignMapWithNorth() to update the map rotation.
|
overridevirtual |
Override from MainWindowController.
Implements OpenOrienteering::MainWindowController.
|
slot |
Sets the baseline view option.
|
slot |
Calculates the difference of selected area objects from the first selected area object.
|
slot |
Calculates the intersection of selected same-symbol area objects.
|
slot |
Merges holes of the (single) selected area object.
|
slot |
Calculates the union of selected same-symbol area objects.
|
slot |
Calculates the boolean XOr of selected same-symbol area objects.
|
protectedslot |
Sets the map's current part.
|
slot |
Empties the undo / redo history to save space.
|
slot |
Adjusts the enabled state of the paste action (specific signature required).
|
slot |
Adjusts action availability based on the presence of closed templates.
|
slot |
Shows the map grid configuration dialog.
|
slot |
Connects close endpoints of selected lines.
|
slot |
Converts selected polygonal paths to curves.
|
slot |
Adjusts the coordinates display of the map widget to the selected option.
|
slot |
Copies the selected object(s).
|
slot |
Copies the displayed coordinates to the clipboard.
|
slot |
Cuts the selected object(s).
|
slot |
Activates the physical cutout tool (inversed)
|
slot |
Activates the cut tool.
|
slot |
Activates the cut circular hole tool.
|
slot |
Activates the cut hole tool.
|
slot |
Activates the cut rectangular hole tool.
|
slot |
Activates the physical cutout tool.
|
slot |
Deletes the selected object(s)
void OpenOrienteering::MapEditorController::deletePopupWidget | ( | QWidget * | child_widget | ) |
Deletes the given popup widget, which was previously shown with showPopupWidget().
|
slot |
Deselects all objects with the selected symbol(s)
|
overridevirtual |
Override from MainWindowController.
Reimplemented from OpenOrienteering::MainWindowController.
|
slot |
Executes the "distribute points along path" action.
The prerequisites for using the tool must be given.
|
slot |
Activates the draw circle tool.
|
slot |
Activates the draw fill tool.
|
slot |
Activates the draw freehand tool.
|
slot |
Activates the draw path tool.
|
slot |
Activates the draw point tool.
|
slot |
Switches to the GPS point drawing tool.
|
slot |
Activates the draw rectangle tool.
|
slot |
Activates the draw text tool.
|
slot |
Duplicates the selected object(s)
|
slot |
Shows the GeoreferencingDialog.
|
slot |
Activates the line edit tool.
|
slot |
Activates the point edit tool.
|
slot |
Enables or disables digital compass display.
|
slot |
Enables or disables GPS display.
|
slot |
Enables or disables showing distance rings when GPS display is active.
|
inline |
Returns if a template position dock widget exists for a template.
|
overridevirtual |
Override from MainWindowController.
Reimplemented from OpenOrienteering::MainWindowController.
|
slot |
Lets the user export the map as geospatial vector data.
|
slot |
Creates duplicates of the selected object(s) and assigns them the selected symbol.
|
protectedslot |
QAction * OpenOrienteering::MapEditorController::getAction | ( | const char * | id | ) |
Returns the action identified by id if it exists, or nullptr.
This allows the reuse of the controller's actions in dock widgets etc.
MapEditorTool * OpenOrienteering::MapEditorController::getDefaultDrawToolForSymbol | ( | const Symbol * | symbol | ) |
Returns the default drawing tool for a given symbol.
|
inline |
Returns the current editor activity.
|
inline |
Returns the main map widget (which is currently the only map widget).
|
inline |
Returns the map on which this controller operates.
|
inline |
Returns this controller's symbol widget, where the symbol selection happens.
|
inline |
Returns the template position dock widget for a template.
|
inline |
Returns the current tool.
|
slot |
Clears temporary GPS markers.
|
slot |
Draws a temporary path at the GPS position.
|
slot |
Sets a temporary marker at the GPS position.
|
slot |
Sets the hatch areas view option.
|
slot |
Sets the "hide all templates" view option.
|
slot |
For mobile UI: hides the top action bar.
|
slot |
Shows the import file selector and imports the selected file, if any.
Imports a track file (GPX) into the map.
QHash< const Symbol *, Symbol * > OpenOrienteering::MapEditorController::importMap | ( | Map & | other, |
Map::ImportMode | mode, | ||
QWidget * | dialog_parent, | ||
std::vector< bool > * | filter = nullptr , |
||
int | symbol_insert_pos = -1 , |
||
bool | merge_duplicate_symbols = true |
||
) |
Imports another map into this map.
This method changes the given 'other' map if the maps' scales differ. This is an optimization for the use cases where temporary maps are created just for this kind of import.
bool OpenOrienteering::MapEditorController::importMapFile | ( | const QString & | filename, |
bool | show_errors | ||
) |
Imports a map file into the loaded map.
|
slot |
Inverts in the object selection in the current map part.
|
overridevirtual |
Returns true when editing is in progress.
Reimplemented from OpenOrienteering::MainWindowController.
bool OpenOrienteering::MapEditorController::isInMobileMode | ( | ) | const |
Returns if the editor is in mobile mode.
|
overridevirtual |
Receives key press events from the main window. This implementation passes the event to MapWidget::keyPressEventFilter.
Reimplemented from OpenOrienteering::MainWindowController.
|
overridevirtual |
Receives key release events from the main window. This implementation passes the event to MapWidget::keyReleaseEventFilter.
Reimplemented from OpenOrienteering::MainWindowController.
|
slot |
TODO: not implemented yet.
|
slot |
Loads a CRT file and shows the symbol replacement dialog.
|
overridevirtual |
Override from MainWindowController.
Reimplemented from OpenOrienteering::MainWindowController.
|
slot |
Shows the "load symbols from" dialog.
|
slot |
Shows the dialog to enter map notes.
|
slot |
Shows or hides the MeasureWidget.
|
overridevirtual |
In SymbolEditor mode, this controller doesn't want a menu bar.
Reimplemented from OpenOrienteering::MainWindowController.
|
slot |
Merges all map parts into the current one.
|
slot |
Merges the current map part with another one.
|
slot |
For mobile UI: shows the symbol selection screen.
|
slot |
Counterpart to mobileSymbolSelectorClicked().
|
slot |
Moves view to GPS position.
|
slot |
Makes the editor aware of a change of the selected object.
|
slot |
Shows a file selector to open a template.
|
slot |
Sets the overprinting simulation view option.
|
slot |
Shows or hides the paint-on-template widget.
|
slot |
Shows the template selection dialog for for the paint-on-template functionality.
|
slot |
Activates the pan tool.
|
slot |
Pastes the object(s) from the clipboard.
|
slot |
Makes the print/export dock widget visible, and configures it for the given task (which is of type PrintWidget::TaskFlags).
|
protectedslot |
|
slot |
Moves all selected objects to a different map part.
|
slot |
Redoes the last object edit step.
|
slot |
Removes the current map part.
void OpenOrienteering::MapEditorController::removeTemplatePositionDockWidget | ( | Template * | temp | ) |
Removes the template position dock widget for the template.
Should be called by the dock widget if it is closed or the template deleted; deletes the dock widget.
|
slot |
Renames the current map part.
|
slot |
Shows the ReopenTemplateDialog.
|
slot |
Activates the rotate tool.
|
slot |
Shows the RotateMapDialog.
|
slot |
Activates the rotate pattern tool.
|
overridevirtual |
Override from MainWindowController.
Reimplemented from OpenOrienteering::MainWindowController.
|
slot |
Shows the "scale all symbols" dialog.
|
slot |
Activates the scale tool.
|
slot |
Shows the ScaleMapDialog.
|
slot |
Selects all objects in the current map part.
|
slot |
Selects all objects having the current selected symbols.
|
slot |
Makes the editor aware of a change of the selected symbols.
|
slot |
Clears the object selection.
|
slot |
Selects all objects with the selected symbol(s)
|
slot |
Shows the dialog to set a custom zoom factor in the current map widget.
void OpenOrienteering::MapEditorController::setEditingInProgress | ( | bool | value | ) |
If this is set to true (usually by the current tool), undo/redo and saving the map is deactivated.
This is important if the map is in an "unstable" state temporarily.
void OpenOrienteering::MapEditorController::setEditorActivity | ( | MapEditorActivity * | new_activity | ) |
Sets the current editor activity.
new_activity may be nullptr to disable the current editor activity.
void OpenOrienteering::MapEditorController::setEditTool | ( | ) |
Shortcut to change to the point edit tool as new active tool.
See setTool().
void OpenOrienteering::MapEditorController::setOverrideTool | ( | MapEditorTool * | new_override_tool | ) |
void OpenOrienteering::MapEditorController::setTool | ( | MapEditorTool * | new_tool | ) |
Changes to new_tool as the new active tool.
If there is a current tool before, calls deleteLater() on it. new_tool may be nullptr, but it is unusual to have no active tool, so consider setEditTool() instead.
|
slot |
Sets the enabled state of actions which change how the map is rendered, such as with grid, with templates, with overprinting simulation.
|
slot |
Indicates a change of the current toolbar and dock widget positions, and schedules saving.
|
slot |
Shows or hides the color dock widget.
|
slot |
Toggles visivbility of the map grid.
void OpenOrienteering::MapEditorController::showPopupWidget | ( | QWidget * | child_widget, |
const QString & | title | ||
) |
Shows the given widget in a popup window with specified title.
In the desktop version, the widget is shown inside a dock widget. In the mobile version, the widget is shown as a popup over the map, ignoring the title.
Make sure that the child widget has a reasonable size hint.
|
slot |
Shows or hides the symbol pane.
|
slot |
Shows or hides the tags editor dock widget.
|
slot |
Shows or hides the template setup dock widget.
|
slot |
For mobile UI: shows the top action bar again after hiding it.
|
slot |
Adjusts the view in the current map widget to show the whole map.
|
slot |
Tries to remove points of selected paths while retaining their shape.
|
slot |
Checks the presence of spot colors, and to disables overprinting simulation if there are no spot colors.
|
slot |
Reverses the selected object(s) direcction(s), thus switching dash directions for lines.
|
slot |
Switches the symbol of the selected object(s) to the selected symbol.
|
slot |
Shows a dialog for changing the symbol set ID.
|
slot |
Updates action enabled states after a template has been added.
|
slot |
Adjusts action availability based on the presence of templates.
|
slot |
Updates action enabled states after a template has been deleted.
|
signal |
|
slot |
Undoes the last object edit step.
|
slot |
Adjusts the enabled state of the undo / redo actions.
|
slot |
Updates availability of the GPS point drawing tool.
|
protectedslot |
Updates all UI components related to map parts.
|
protected |
Adjusts the enabled state of various actions after the selected object(s) have changed.
In addition, it disables actions as long as some editing is in progress.
The caller shall also call updateSymbolAndObjectDependentActions().
|
slot |
Adjusts the enabled state of the paste action.
|
protected |
Adjusts the enabled state of various actions after the selected symbol(s) or object(s) have changed.
In addition, it disables actions as long as some editing is in progress.
|
protected |
Adjusts the enabled state of various actions after the selected symbol(s) have changed.
In addition, it disables actions as long as some editing is in progress.
The caller shall also call updateSymbolAndObjectDependentActions().
|
slot |
Zooms in in the current map widget.
|
slot |
Zooms out in the current map widget.
|
friend |