QCAD
Open Source 2D CAD
|
Abstract base class for all action classes. More...
#include <RActionAdapter.h>
Public Member Functions | |
virtual void | applyOperation () |
virtual void | beginEvent () |
Called as soon as the action is created (menu chosen, toolbutton activated, etc). More... | |
virtual void | commandEvent (RCommandEvent &) |
Called when a command is entered in the command line. More... | |
virtual void | commandEventPreview (RCommandEvent &) |
Called when a command is being edited in the command line. More... | |
virtual void | coordinateEvent (RCoordinateEvent &) |
Called for every coordinate event. More... | |
virtual void | coordinateEventPreview (RCoordinateEvent &) |
Called if the action is in PickCoordinate mode and the mouse is moved around. More... | |
virtual void | enterEvent () |
Called when user presses enter (e.g. More... | |
virtual void | entityPickEvent (REntityPickEvent &) |
virtual void | entityPickEventPreview (REntityPickEvent &) |
virtual void | escapeEvent () |
Escape events are triggered if the user clicks the right mouse button or hits the Escape key. More... | |
virtual void | finishEvent () |
Called just before the action is deleted. More... | |
virtual void | keyPressEvent (QKeyEvent &) |
virtual void | keyReleaseEvent (QKeyEvent &) |
virtual void | mouseDoubleClickEvent (RMouseEvent &) |
Called on mouse double click events. More... | |
virtual void | mouseMoveEvent (RMouseEvent &) |
Called on mouse move events. More... | |
virtual void | mousePressEvent (RMouseEvent &) |
Called on mouse press events. More... | |
virtual void | mouseReleaseEvent (RMouseEvent &) |
Called on mouse release events. More... | |
virtual void | panGestureEvent (QPanGesture &) |
Called on pan gesture events. More... | |
virtual void | pinchGestureEvent (QPinchGesture &) |
Called on pinch gesture events. More... | |
virtual void | propertyChangeEvent (RPropertyEvent &) |
Called when the value of a property is modified while this action is active. More... | |
RActionAdapter (RGuiAction *guiAction=NULL) | |
virtual void | resumeEvent () |
Resumes the action (for example when another action became active and then terminated or if the mouse cursor enters the view). More... | |
virtual void | setGraphicsView (RGraphicsView *) |
Called if this action is set as a navigation action of a graphics view. More... | |
virtual void | suspendEvent () |
Called when the action is suspended, for example when another action becomes active or the mouse cursor leaves the view. More... | |
virtual void | swipeGestureEvent (QSwipeGesture &) |
Called on swipe gesture events. More... | |
virtual void | tabletEvent (RTabletEvent &) |
Called on tablet events. More... | |
virtual void | updatePreview () |
virtual void | wheelEvent (RWheelEvent &) |
Called on mouse wheel events. More... | |
virtual void | zoomChangeEvent (RGraphicsView &) |
Called when the zoom factor or offset changed in the given view. More... | |
virtual | ~RActionAdapter () |
Public Member Functions inherited from RAction | |
RAction::ClickMode | getClickMode () |
RDocument * | getDocument () |
RDocumentInterface * | getDocumentInterface () |
QList< RGraphicsScene * > | getGraphicsScenes () |
virtual RGuiAction * | getGuiAction () |
RAction * | getOverrideBase () |
RStorage * | getStorage () |
QString | getUniqueGroup () |
bool | hasNoState () |
bool | isOverride () |
bool | isTerminated () |
RAction (RGuiAction *guiAction=NULL) | |
Copyright (c) 2011-2018 by Andrew Mustun. More... | |
void | setClickMode (RAction::ClickMode m) |
Sets the current click mode. More... | |
void | setDocumentInterface (RDocumentInterface *di) |
void | setGuiAction (RGuiAction *guiAction) |
void | setNoState (bool on=true) |
void | setOverride () |
void | setOverrideBase (RAction *base) |
void | setUniqueGroup (const QString &ug) |
RVector | snap (RMouseEvent &event) |
Uses the currently active snap function to snap to the closest object or grid point. More... | |
void | terminate () |
Terminates the action. More... | |
virtual | ~RAction () |
Additional Inherited Members | |
Public Types inherited from RAction | |
enum | ClickMode { PickCoordinate, PickCoordinateNoSnap, PickEntity, PickingDisabled } |
Current mouse click mode. More... | |
Protected Attributes inherited from RAction | |
RAction::ClickMode | clickMode |
RDocumentInterface * | documentInterface |
RGuiAction * | guiAction |
bool | noState |
Indicates whether this action is stateless (i.e. More... | |
bool | override |
RAction * | overrideBase |
bool | terminated |
QString | uniqueGroup |
Abstract base class for all action classes.
Action classes handle user interaction with a document. A menu, toolbar button or command usually triggers an action.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Implements RAction.
Reimplemented in DrawPolyline, Leader, EAction, ClipboardOperation, Reverse, and Delete.
|
inlinevirtual |
Called as soon as the action is created (menu chosen, toolbutton activated, etc).
Implements RAction.
Reimplemented in EAction, Print, PropertyEditor, BlockList, AbstractPreferences, Dimension, LayerList, Projection, Stretch, InsertBlockItem, Information, InfoArcCircleArea, DefaultNavigation, Leader, ExRegisterFileExporter, ScMirrored, BreakOutManual, BreakOut, Nesting, DimRadial, Line, File, FlexPainter, Select, SnapCoordinate, DevDebug, Counter, CommandLine, Bevel, IsometricGridTop, Explode, FlipHorizontal, Scale, PanZoom, LibraryBrowser, CreateLibraryItem, DrawBasedOnRectanglePP, Image, ClipboardOperation, PolylineBreakSymbol, RestrictAngleLength, SnapDistance, ArcTPR, DimDiametric, DrawBasedOnRectangleSize, Shape, Layer, WindowZoom, CheckForUpdates, ToFront, Block, DefaultAction, LineOrthogonalTangent, DrawingPreferences, Esc, BitmapExport, RecentFiles, SvgImport, BrowseUserManual, FAQ, Forum, ReportBug, ReportTranslationError, ShowReadme, Website, MolImport, MenusAndToolBars, MyAction, PersistentWidgets, ToBack, FlipVertical, Modify, CommandLineFocus, DisplayDistanceAngle, OptionsToolBarFocus, ToolMatrixFocus, AutoZoom, PreviousView, ZoomIn, ZoomOut, ZoomToSelection, CloseAll, NextWindow, PreviousWindow, Arc2PR, DimAngular, DrawBasedOnThreeCircles, HatchFromSelection, Line2P, LineTangent2, LineDove, DrawPolyline, InfoPolylineArea, LineBoxJoint, Translate, SelectContour, SnapIntersectionManual, AntialiasingMode, DraftMode, Arc2PA, Arc2PH, Circle3T, Hatch, ExRegisterFileImporter, LineRadicalAxis, EditText, Offset, Rotate, Trim, Arc, Circle, Point, Polyline, Spline, Text, Edit, About, InfoDistanceEE, Misc, TextAlong, EditHatch, Rotate2, Snap, View, Zoom, Circle2P, Ellipse, EllipseInscribedQuad, Lengthen, Circle3P, Divide, SelectIntersectedEntities, SnapMiddleManual, SnapXManual, EditFromReference, Arc2PL, ArcTangential, Circle2PR, EllipseArcCPPA, LineRelativeAngle, ShapeRectanglePP, ImportFile, EditLayer, ExAddBlock, ExMandelbrot, Mirror, BlockInsert, LineAngle, LineFreehand, ShapePolygonCP, ShapePolygonPP, NewFile, InfoAngle, InfoDistanceEP, ExDrawColors, ExMathSpiral, EcmaScriptShell, PointPole, ArcCPA, Circle2TR, CircleCP, Point1P, ShapePolygonAFPP, InfoArea, InfoDistancePP, InfoPosition, ExXmlImport, BreakOutGap, OffsetThrough, SelectLayerByEntity, SnapDistanceManual, SnapYManual, CreateBlock, InsertBlock, InsertScriptItem, Arc3P, Circle2TP, DimAligned, LineTangent1, ShapePolygonAFCP, AddLayer, SelectLayer, ExLineDove, ExTransactionListener, BlockFixNames, DrawBoundingBox, SelectByColor, SnapCoordinatePolar, ToggleGrid, AddBlock, RenameBlock, LineVertical, SplineControlPoints, ConvertUnit, Delete, Duplicate, Paste, DeselectLayer, HideAllLayers, LockAllLayers, ShowAllLayers, ToggleLayerLock, ToggleLayerVisibility, UnlockAllLayers, ExThreePoints, ExDumpPolyline, ExXmlExport, ExDirListing, ExResizeWindow, Cross, ImportPoints, SelectByHandle, IsometricProjection, DeselectAll, SelectAll, SelectRectangle, LockRelativeZero, SetRelativeZero, DeselectBlockReferences, EditBlock, EditMainDrawing, HideAllBlocks, RemoveBlock, SelectBlockReferences, ShowAllBlocks, ToggleBlockVisibility, CircleT2P, DimOrdinate, DimRegen, DimRotated, LineBisector, LineHorizontal, Redo, Undo, OpenFile, Save, RemoveLayer, ShowActiveLayer, ExDrawFonts, ExText, ExAddLayer, ExLayerCustomProperty, ExMainWindow, ExProcess, ExWidget, BlockListAttributes, BlockListExport, RunScript, ModifyCorner, Reverse, TrimBoth, NestingQuantity, InvertSelection, RestrictHorizontal, RestrictOff, RestrictOrthogonal, RestrictVertical, SnapAuto, SnapCenter, SnapEnd, SnapFree, SnapGrid, SnapIntersection, SnapMiddle, SnapOnEntity, SnapPerpendicular, SnapReference, SnapSelectionCenter, SnapTangential, PrintCurrentView, ExDeleteObject, Reset, CloseFile, PdfExport, SaveAs, ChangeFontToArial, FlushBackLog, ReloadLinetypes, SplineToLine, ScPrepare, StatusBar, LinetypeMode, Batch2Pdf, ExMinimal, and ExMinimal2.
|
inlinevirtual |
Called when a command is entered in the command line.
Implements RAction.
|
inlinevirtual |
Called when a command is being edited in the command line.
Implements RAction.
|
inlinevirtual |
Called for every coordinate event.
Coordinate events can be the result of a mouse click or an entered coordinate from the command line. These events are fired after mouse click events in mode "PickCoordinate".
Implements RAction.
|
inlinevirtual |
Called if the action is in PickCoordinate
mode and the mouse is moved around.
Typically, some sort of preview is shown to the user to indicate what would happen if that coordinate would be picked.
Implements RAction.
|
inlinevirtual |
|
inlinevirtual |
Implements RAction.
|
inlinevirtual |
Implements RAction.
|
inlinevirtual |
Escape events are triggered if the user clicks the right mouse button or hits the Escape key.
The action is expected to go one step back, to the last state or terminate itself.
Implements RAction.
Reimplemented in DefaultAction, EAction, Projection, DrawPolyline, Stretch, Rotate, BreakOut, Mirror, DrawBasedOnThreeCircles, ModifyCorner, Leader, BreakOutManual, Offset, DimDiametric, DimRadial, Translate, Circle2PR, Trim, DrawBasedOnRectanglePP, Arc2PL, Line2P, Rotate2, ArcTPR, CircleT2P, LineTangent1, ShapePolygonCP, LineRadicalAxis, Scale, SelectIntersectedEntities, Arc2PA, DimAngular, LineRelativeAngle, ExLineDove, Divide, Arc3P, ArcTangential, Circle3T, ShapePolygonAFPP, InfoPosition, Nesting, SelectRectangle, Arc2PH, LineTangent2, ShapePolygonPP, InfoArea, EditFromReference, Circle2P, EllipseArcCPPA, ShapePolygonAFCP, SplineControlPoints, InfoDistancePP, OffsetThrough, Circle2TP, Circle3P, EllipseInscribedQuad, LineFreehand, PointPole, PolylineBreakSymbol, Lengthen, LineBisector, LineDove, Arc2PR, Circle2TR, DimAligned, DimOrdinate, DimRotated, LineOrthogonalTangent, ArcCPA, CircleCP, LineBoxJoint, and BreakOutGap.
|
inlinevirtual |
Called just before the action is deleted.
Implements RAction.
Reimplemented in PanZoom, WindowZoom, EAction, PropertyEditor, BlockList, DefaultNavigation, LayerList, InsertBlockItem, DrawBasedOnRectangleSize, CommandLine, Image, LibraryBrowser, IsometricGridTop, Transform, Snap, ImportFile, AntialiasingMode, DraftMode, LineBisector, EcmaScriptShell, InsertScriptItem, SnapIntersectionManual, ToggleGrid, LockRelativeZero, PrintCurrentView, and LinetypeMode.
|
inlinevirtual |
Implements RAction.
|
inlinevirtual |
Implements RAction.
|
inlinevirtual |
Called on mouse double click events.
Implements RAction.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Called on pan gesture events.
Implements RAction.
|
inlinevirtual |
Called on pinch gesture events.
Implements RAction.
|
inlinevirtual |
Called when the value of a property is modified while this action is active.
Implements RAction.
|
inlinevirtual |
Resumes the action (for example when another action became active and then terminated or if the mouse cursor enters the view).
Implements RAction.
Reimplemented in EAction, Information, DefaultAction, and CloseFile.
|
inlinevirtual |
Called if this action is set as a navigation action of a graphics view.
Implements RAction.
|
inlinevirtual |
Called when the action is suspended, for example when another action becomes active or the mouse cursor leaves the view.
Implements RAction.
Reimplemented in EAction, and DefaultAction.
|
inlinevirtual |
Called on swipe gesture events.
Implements RAction.
|
inlinevirtual |
Called on tablet events.
Implements RAction.
|
inlinevirtual |
Implements RAction.
Reimplemented in EAction, and DrawBasedOnRectangleSize.
|
inlinevirtual |
Called on mouse wheel events.
Implements RAction.
|
inlinevirtual |
Called when the zoom factor or offset changed in the given view.
Implements RAction.