QCAD
Open Source 2D CAD
RActionAdapter Class Reference

Abstract base class for all action classes. More...

#include <RActionAdapter.h>

Inheritance diagram for RActionAdapter:
RAction DefaultNavigation EAction RNavigationAction Batch2Pdf Block BlockExamples ChangeFontToArial CommandLine CommandLineExamples ConvertUnit Counter Cross DefaultAction DevDebug Dimension Draw DrawBasedOnRectanglePP DrawBasedOnRectangleSize DrawBasedOnThreeCircles DrawBoundingBox DrawExamples EcmaScriptShell Edit ExDirListing ExExportListener ExLineDove ExMandelbrot ExMinimal ExMinimal2 ExThreePoints ExWidget ExXmlExport ExXmlImport File FlipHorizontal FlipVertical FlushBackLog HatchFromSelection Help ImportPoints Information InputPreferences IOExamples LanguagePreferences Layer LayerCompatibility LayerExamples LayerList LineBoxJoint LineDove LineRadicalAxis ListenerExamples MathExamples MenusAndToolBars Misc MiscModify Modify ModifyExamples MyScripts Nesting NestingQuantity Offset PointPole PolylineBreakSymbol PropertyEditor QtExamples ReloadLinetypes Reset RunScript ScMirrored ScPrepare Select SelectByColor SelectByHandle ShowToolDialog Snap SnapXManual SnapYManual StatusBar TextPreferences ThemePreferences ToolBarPreferences UiPreferences View Widgets Window Zoom

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 ()
 
RDocumentgetDocument ()
 
RDocumentInterfacegetDocumentInterface ()
 
QList< RGraphicsScene * > getGraphicsScenes ()
 
virtual RGuiActiongetGuiAction ()
 
RActiongetOverrideBase ()
 
RStoragegetStorage ()
 
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
 
RDocumentInterfacedocumentInterface
 
RGuiActionguiAction
 
bool noState
 Indicates whether this action is stateless (i.e. More...
 
bool override
 
RActionoverrideBase
 
bool terminated
 
QString uniqueGroup
 

Detailed Description

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.

Scriptable:\nThis class is available in script environments.\n
\generateScriptShell

Constructor & Destructor Documentation

◆ RActionAdapter()

RActionAdapter::RActionAdapter ( RGuiAction guiAction = NULL)
inline

◆ ~RActionAdapter()

virtual RActionAdapter::~RActionAdapter ( )
inlinevirtual

Member Function Documentation

◆ applyOperation()

virtual void RActionAdapter::applyOperation ( )
inlinevirtual

Implements RAction.

Reimplemented in DrawPolyline, Leader, EAction, ClipboardOperation, Reverse, and Delete.

◆ beginEvent()

virtual void RActionAdapter::beginEvent ( )
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.

◆ commandEvent()

virtual void RActionAdapter::commandEvent ( RCommandEvent event)
inlinevirtual

Called when a command is entered in the command line.

Implements RAction.

◆ commandEventPreview()

virtual void RActionAdapter::commandEventPreview ( RCommandEvent event)
inlinevirtual

Called when a command is being edited in the command line.

Implements RAction.

◆ coordinateEvent()

virtual void RActionAdapter::coordinateEvent ( RCoordinateEvent event)
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.

◆ coordinateEventPreview()

virtual void RActionAdapter::coordinateEventPreview ( RCoordinateEvent event)
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.

◆ enterEvent()

virtual void RActionAdapter::enterEvent ( )
inlinevirtual

Called when user presses enter (e.g.

to show action dialog with options).

Implements RAction.

Reimplemented in EAction, and Nesting.

◆ entityPickEvent()

virtual void RActionAdapter::entityPickEvent ( REntityPickEvent )
inlinevirtual

Implements RAction.

◆ entityPickEventPreview()

virtual void RActionAdapter::entityPickEventPreview ( REntityPickEvent )
inlinevirtual

Implements RAction.

◆ escapeEvent()

◆ finishEvent()

◆ keyPressEvent()

virtual void RActionAdapter::keyPressEvent ( QKeyEvent &  )
inlinevirtual

Implements RAction.

◆ keyReleaseEvent()

virtual void RActionAdapter::keyReleaseEvent ( QKeyEvent &  )
inlinevirtual

Implements RAction.

◆ mouseDoubleClickEvent()

virtual void RActionAdapter::mouseDoubleClickEvent ( RMouseEvent event)
inlinevirtual

Called on mouse double click events.

Implements RAction.

◆ mouseMoveEvent()

virtual void RActionAdapter::mouseMoveEvent ( RMouseEvent event)
inlinevirtual

Called on mouse move events.

Implements RAction.

Reimplemented in RNavigationAction.

◆ mousePressEvent()

virtual void RActionAdapter::mousePressEvent ( RMouseEvent event)
inlinevirtual

Called on mouse press events.

Implements RAction.

Reimplemented in RNavigationAction.

◆ mouseReleaseEvent()

virtual void RActionAdapter::mouseReleaseEvent ( RMouseEvent event)
inlinevirtual

Called on mouse release events.

Implements RAction.

Reimplemented in RNavigationAction.

◆ panGestureEvent()

virtual void RActionAdapter::panGestureEvent ( QPanGesture &  gesture)
inlinevirtual

Called on pan gesture events.

Implements RAction.

◆ pinchGestureEvent()

virtual void RActionAdapter::pinchGestureEvent ( QPinchGesture &  gesture)
inlinevirtual

Called on pinch gesture events.

Implements RAction.

◆ propertyChangeEvent()

virtual void RActionAdapter::propertyChangeEvent ( RPropertyEvent event)
inlinevirtual

Called when the value of a property is modified while this action is active.

Implements RAction.

◆ resumeEvent()

virtual void RActionAdapter::resumeEvent ( )
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.

◆ setGraphicsView()

virtual void RActionAdapter::setGraphicsView ( RGraphicsView view)
inlinevirtual

Called if this action is set as a navigation action of a graphics view.

Implements RAction.

◆ suspendEvent()

virtual void RActionAdapter::suspendEvent ( )
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.

◆ swipeGestureEvent()

virtual void RActionAdapter::swipeGestureEvent ( QSwipeGesture &  gesture)
inlinevirtual

Called on swipe gesture events.

Implements RAction.

◆ tabletEvent()

virtual void RActionAdapter::tabletEvent ( RTabletEvent event)
inlinevirtual

Called on tablet events.

Implements RAction.

◆ updatePreview()

virtual void RActionAdapter::updatePreview ( )
inlinevirtual

Implements RAction.

Reimplemented in EAction, and DrawBasedOnRectangleSize.

◆ wheelEvent()

virtual void RActionAdapter::wheelEvent ( RWheelEvent event)
inlinevirtual

Called on mouse wheel events.

Implements RAction.

◆ zoomChangeEvent()

virtual void RActionAdapter::zoomChangeEvent ( RGraphicsView view)
inlinevirtual

Called when the zoom factor or offset changed in the given view.

Implements RAction.


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