|
QCAD Application Framework
CAD Application Development and Automation.
|
Abstract base class for all action classes. More...
#include <RAction.h>
Public Types | |
| enum | ClickMode { PickCoordinate, PickEntity, PickingDisabled } |
| Current mouse click mode. More... | |
Public Member Functions | |
| virtual void | beginEvent ()=0 |
| Called as soon as the action is created (menu chosen, toolbutton activated, etc). | |
| virtual void | commandEvent (RCommandEvent &event)=0 |
| Called when a command is entered in the command line. | |
| virtual void | commandEventPreview (RCommandEvent &event)=0 |
| Called when a command is being edited in the command line. | |
| virtual void | coordinateEvent (RCoordinateEvent &event)=0 |
| Called for every coordinate event. | |
| virtual void | coordinateEventPreview (RCoordinateEvent &event)=0 |
Called if the action is in PickCoordinate mode and the mouse is moved around. | |
| virtual void | entityPickEvent (REntityPickEvent &event)=0 |
| | |
| virtual void | entityPickEventPreview (REntityPickEvent &event)=0 |
| | |
| virtual void | escapeEvent ()=0 |
| Escape events are triggered if the user clicks the right mouse button or hits the Escape key. | |
| virtual void | finishEvent ()=0 |
| Called just before the action is deleted. | |
| 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 () |
| virtual void | keyPressEvent (QKeyEvent &event)=0 |
| virtual void | keyReleaseEvent (QKeyEvent &event)=0 |
| virtual void | mouseDoubleClickEvent (RMouseEvent &event)=0 |
| Called on mouse double click events. | |
| virtual void | mouseMoveEvent (RMouseEvent &event)=0 |
| Called on mouse move events. | |
| virtual void | mousePressEvent (RMouseEvent &event)=0 |
| Called on mouse press events. | |
| virtual void | mouseReleaseEvent (RMouseEvent &event)=0 |
| Called on mouse release events. | |
| virtual void | panGestureEvent (QPanGesture &gesture)=0 |
| Called on pan gesture events. | |
| virtual void | pinchGestureEvent (QPinchGesture &gesture)=0 |
| Called on pinch gesture events. | |
| virtual void | propertyChangeEvent (RPropertyEvent &event)=0 |
| Called when the value of a property is modified while this action is active. | |
| RAction (RGuiAction *guiAction=NULL) | |
| virtual void | resumeEvent ()=0 |
| Resumes the action (for example when another action became active and then terminated or if the mouse cursor enters the view). | |
| void | setClickMode (RAction::ClickMode m) |
| Sets the current click mode. | |
| void | setDocumentInterface (RDocumentInterface *di) |
| virtual void | setGraphicsView (RGraphicsView *view)=0 |
| Called if this action is set as a navigation action of a graphics view. | |
| void | setGuiAction (RGuiAction *guiAction) |
| void | setNoState () |
| 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. | |
| virtual void | suspendEvent ()=0 |
| Called with the action is Suspended, for example when another action becomes active or the mouse cursor leaves the view. | |
| virtual void | swipeGestureEvent (QSwipeGesture &gesture)=0 |
| Called on swipe gesture events. | |
| virtual void | tabletEvent (RTabletEvent &event)=0 |
| Called on tablet events. | |
| void | terminate () |
| Terminates the action. | |
| virtual void | wheelEvent (RWheelEvent &event)=0 |
| Called on mouse wheel events. | |
| virtual | ~RAction () |
Protected Attributes | |
| RAction::ClickMode | clickMode |
| RDocumentInterface * | documentInterface |
| RGuiAction * | guiAction |
| bool | noState |
| Indicates whether this action is stateless (i.e. | |
| 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.
| enum RAction::ClickMode |
Current mouse click mode.
| PickCoordinate |
Mouse click will pick a coordinate and trigger coordinateEvent. This is the default mode. |
| PickEntity |
Mouse click will pick an entity and trigger entityPickEvent. |
| PickingDisabled |
Mouse click will not trigger any events except for mousePressEvent and mouseReleaseEvent. |
| RAction::RAction | ( | RGuiAction * | guiAction = NULL | ) |
|
virtual |
|
pure virtual |
Called as soon as the action is created (menu chosen, toolbutton activated, etc).
Implemented in EAction, PropertyEditor, PrintPreview, Print, Select, Information, CamSimulation, AbstractPreferences, RActionAdapter, DrawPolyline, DefaultNavigation, Rotate2, Scale, ClipboardOperation, Rotate, Leader, Mirror, Modify, SnapCoordinatePolar, SnapDistance, Dimension, Text, LibraryBrowser, PolylineInsertNode, Hatch, LineRectangleSize, PolylineTrim, Image, Polyline, PolylineDeleteNodesBetween, PolylineEquidistant, EditText, Arc2PR, Paste, DefaultAction, Arc, Arc2PA, Circle, DimAngular, Ellipse, Line, Point, Spline, InsertBlockItem, Align, Stretch, Translate, ArcTangential, Circle2PR, Line2P, LineAngle, LineParallel, LineRelativeAngle, LineTangent2, SplineControlPoints, ModifyCorner, Trim, BlockList, PolylineDeleteNode, PolylineFromSegments, SplineFitPoints, Divide, Lengthen, SelectPolygon, InsertBlock, LineParallelThrough, LineTangent1, PointMN, PolylineAppendNode, ExImportPoints, NewFile, EditFromInsert, LineBisector, LineFreehand, AdvancedSelection, SelectRectangle, CircleCR, ExAddBlock, ExMathSpiral, ExDirListing, SnapIntersectionManual, ToggleGrid, WindowZoom, ArcCPA, Circle3P, EllipseArcCPPA, LinePolygonCP, LinePolygonPP, PointNP, InsertScriptItem, SearchReplace, ExDrawBoundingBox, ExDrawColors, ExChangeFontToArial, InfoAngle, Duplicates, Circle2P, CircleCP, Delete, Save, Reverse, SplitIntoEqualParts, TrimBoth, LayerList, ViewList, AddBlock, Arc3P, DimAligned, DimOrdinate, DimRegen, DimRotated, LineHorizontal, LineRectangle, LineVertical, Point1P, Redo, Undo, OpenFile, InfoArea, ZeroLengthDetection, SelectContour, SelectIntersectedEntities, SetRelativeZero, SnapCoordinate, DimDiametric, DimRadial, CloseFile, InfoTotalLength, AddLayer, HideAllLayers, ShowAllLayers, BreakOut, Reset, ClipboardDisplay, CommandLine, RenameBlock, ExLayerWhiteToBlack, PdfExport, SaveAs, InfoDistanceEP, EditLayer, RemoveLayer, IsoProject, SelectLayer, CamExport, BitmapExport, Compare, SvgExport, Bevel, PanZoom, NewFromTemplate, About, InfoDistancePP, DeselectAll, InvertSelection, SelectAll, LockRelativeZero, Snap, SnapMiddleManual, DraftMode, ToggleStatusBar, FullScreen, CreateBlock, CreateLibraryItem, EditBlock, EditMainDrawing, HideAllBlocks, RemoveBlock, ShowAllBlocks, ToggleBlockVisibility, DrawingPreferences, Esc, ExThreePoints, MenusAndToolBars, MyAction, PersistentWidgets, RecentFiles, SvgExportAs, SvgImport, CheckForUpdates, FAQ, Forum, HelpContents, Purchase, ReportBug, ReportTranslationError, ShowReadme, Website, ShowActiveLayer, ToggleLayerVisibility, Explode, ExplodeText, ToBack, ToFront, RestrictHorizontal, RestrictOff, RestrictOrthogonal, RestrictVertical, SnapAuto, SnapCenter, SnapEnd, SnapFree, SnapGrid, SnapIntersection, SnapMiddle, SnapOnEntity, SnapPerpendicular, SnapReference, AddView, AutoZoom, CommandLineFocus, EditView, OptionsToolBarFocus, PickView, PreviousView, RemoveView, ZoomIn, ZoomOut, ZoomToSelection, CascadeWindows, CloseAll, NextWindow, PreviousWindow, and TileWindows.
|
pure virtual |
Called when a command is entered in the command line.
Implemented in RActionAdapter.
|
pure virtual |
Called when a command is being edited in the command line.
Implemented in RActionAdapter.
|
pure virtual |
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".
Implemented in RActionAdapter.
|
pure virtual |
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.
Implemented in RActionAdapter.
|
pure virtual |
Implemented in RActionAdapter.
|
pure virtual |
Implemented in RActionAdapter.
|
pure virtual |
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.
Implemented in EAction, DrawPolyline, RActionAdapter, Align, Scale, Rotate2, IsoProject, Rotate, Leader, Mirror, PolylineEquidistant, PolylineInsertNode, PolylineTrim, Arc2PA, Arc2PR, LineBisector, LineRelativeAngle, DimAngular, Stretch, ArcTangential, Circle2PR, LineParallel, PolylineDeleteNodesBetween, Divide, Translate, Trim, LineTangent1, LineTangent2, SplineControlPoints, Lengthen, DefaultAction, Line2P, PointMN, PolylineDeleteNode, SplineFitPoints, ModifyCorner, DimRotated, EllipseArcCPPA, LineParallelThrough, PolylineFromSegments, SelectPolygon, ArcCPA, LineFreehand, PolylineAppendNode, CircleCR, LinePolygonCP, LinePolygonPP, LineRectangle, SelectRectangle, EditFromInsert, Circle2P, Circle3P, DimDiametric, DimRadial, Arc3P, CircleCP, DimAligned, DimOrdinate, PointNP, BreakOut, InfoArea, SelectIntersectedEntities, and InfoDistancePP.
|
pure virtual |
Called just before the action is deleted.
Implemented in EAction, PropertyEditor, PrintPreview, CamSimulation, RActionAdapter, LibraryBrowser, DefaultNavigation, InsertBlockItem, ToggleGrid, BlockList, LineBisector, InsertScriptItem, Align, SnapIntersectionManual, WindowZoom, LayerList, ViewList, PanZoom, LockRelativeZero, Snap, DraftMode, ToggleStatusBar, ClipboardDisplay, CommandLine, and FullScreen.
|
inline |
| RDocument * RAction::getDocument | ( | ) |
| RDocumentInterface * RAction::getDocumentInterface | ( | ) |
Reimplemented in EAction.
| QList< RGraphicsScene * > RAction::getGraphicsScenes | ( | ) |
|
virtual |
| RAction * RAction::getOverrideBase | ( | ) |
| RStorage * RAction::getStorage | ( | ) |
| QString RAction::getUniqueGroup | ( | ) |
| bool RAction::hasNoState | ( | ) |
| bool RAction::isOverride | ( | ) |
| bool RAction::isTerminated | ( | ) |
|
pure virtual |
Implemented in RActionAdapter.
|
pure virtual |
Implemented in RActionAdapter.
|
pure virtual |
Called on mouse double click events.
Implemented in RActionAdapter.
|
pure virtual |
Called on mouse move events.
Implemented in RActionAdapter, and RNavigationAction.
|
pure virtual |
Called on mouse press events.
Implemented in RActionAdapter, and RNavigationAction.
|
pure virtual |
Called on mouse release events.
Implemented in RActionAdapter, and RNavigationAction.
|
pure virtual |
Called on pan gesture events.
Implemented in RActionAdapter.
|
pure virtual |
Called on pinch gesture events.
Implemented in RActionAdapter.
|
pure virtual |
Called when the value of a property is modified while this action is active.
Implemented in RActionAdapter.
|
pure virtual |
Resumes the action (for example when another action became active and then terminated or if the mouse cursor enters the view).
Implemented in EAction, RActionAdapter, Information, DefaultAction, and CloseFile.
|
inline |
Sets the current click mode.
|
inline |
|
pure virtual |
Called if this action is set as a navigation action of a graphics view.
Implemented in RActionAdapter.
| void RAction::setGuiAction | ( | RGuiAction * | guiAction | ) |
| void RAction::setNoState | ( | ) |
| void RAction::setOverride | ( | ) |
| void RAction::setOverrideBase | ( | RAction * | base | ) |
| void RAction::setUniqueGroup | ( | const QString & | ug | ) |
| RVector RAction::snap | ( | RMouseEvent & | event | ) |
Uses the currently active snap function to snap to the closest object or grid point.
|
pure virtual |
Called with the action is Suspended, for example when another action becomes active or the mouse cursor leaves the view.
Implemented in EAction, PrintPreview, RActionAdapter, and DefaultAction.
|
pure virtual |
Called on swipe gesture events.
Implemented in RActionAdapter.
|
pure virtual |
Called on tablet events.
Implemented in RActionAdapter.
| void RAction::terminate | ( | ) |
Terminates the action.
The action object will be deleted after calling this method.
|
pure virtual |
Called on mouse wheel events.
Implemented in RActionAdapter.
|
protected |
|
protected |
|
protected |
Reimplemented in EAction.
|
protected |
Indicates whether this action is stateless (i.e.
terminates in beginEvent).
|
protected |
|
protected |
|
protected |
|
protected |