QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RActionAdapter Class Reference

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

#include <RActionAdapter.h>

Inheritance diagram for RActionAdapter:
RAction DefaultNavigation EAction RNavigationAction Block BlockExamples CommandLineExamples Cross DefaultAction Dimension Draw DrawBasedOnThreeCircles DrawExamples Edit File Help Information IOExamples LanguagePreferences Layer LayerExamples LineBoxJoint LineDove LineRadicalAxis ListenerExamples MathExamples Misc Modify ModifyExamples MyScripts PointPole QtExamples Reset ScMirrored Select SelectByHandle Snap SnapXManual SnapYManual SystemExamples TextPreferences ToolBarPreferences View Widgets Window

List of all members.

Public Member Functions

virtual void beginEvent ()
 Called as soon as the action is created (menu chosen, toolbutton activated, etc).
virtual void commandEvent (RCommandEvent &)
 Called when a command is entered in the command line.
virtual void commandEventPreview (RCommandEvent &)
 Called when a command is being edited in the command line.
virtual void coordinateEvent (RCoordinateEvent &)
 Called for every coordinate event.
virtual void coordinateEventPreview (RCoordinateEvent &)
 Called if the action is in PickCoordinate mode and the mouse is moved around.
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.
virtual void finishEvent ()
 Called just before the action is deleted.
virtual void keyPressEvent (QKeyEvent &)
virtual void keyReleaseEvent (QKeyEvent &)
virtual void mouseDoubleClickEvent (RMouseEvent &)
 Called on mouse double click events.
virtual void mouseMoveEvent (RMouseEvent &)
 Called on mouse move events.
virtual void mousePressEvent (RMouseEvent &)
 Called on mouse press events.
virtual void mouseReleaseEvent (RMouseEvent &)
 Called on mouse release events.
virtual void panGestureEvent (QPanGesture &)
 Called on pan gesture events.
virtual void pinchGestureEvent (QPinchGesture &)
 Called on pinch gesture events.
virtual void propertyChangeEvent (RPropertyEvent &)
 Called when the value of a property is modified while this action is active.
 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).
virtual void setGraphicsView (RGraphicsView *)
 Called if this action is set as a navigation action of a graphics view.
virtual void suspendEvent ()
 Called with the action is Suspended, for example when another action becomes active or the mouse cursor leaves the view.
virtual void swipeGestureEvent (QSwipeGesture &)
 Called on swipe gesture events.
virtual void tabletEvent (RTabletEvent &)
 Called on tablet events.
virtual void wheelEvent (RWheelEvent &)
 Called on mouse wheel events.
- 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-2013 by Andrew Mustun.
void setClickMode (RAction::ClickMode m)
 Sets the current click mode.
void setDocumentInterface (RDocumentInterface *di)
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.
void terminate ()
 Terminates the action.
virtual ~RAction ()

Additional Inherited Members

- Public Types inherited from RAction
enum  ClickMode { PickCoordinate, 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.
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:
This class is wrapped for script environments.

Constructor & Destructor Documentation

RActionAdapter::RActionAdapter ( RGuiAction guiAction = NULL)
inline

Member Function Documentation

virtual void RActionAdapter::beginEvent ( )
inlinevirtual

Called as soon as the action is created (menu chosen, toolbutton activated, etc).

Implements RAction.

Reimplemented in EAction, PropertyEditor, Print, PrintPreview, AbstractPreferences, ScMirrored, Select, DefaultNavigation, Stretch, Information, NewFile, Dimension, Projection, SnapIntersectionManual, WindowZoom, DrawPolyline, InfoAngle, BreakOut, SnapDistanceManual, CommandLine, InfoArea, SelectContour, SelectIntersectedEntities, DimDiametric, DimRadial, Image, LibraryBrowser, About, InfoDistanceEP, DefaultAction, Line2PEx, Rotate2, Scale, SelectLayerByEntity, ClipboardOperation, BitmapExport, InfoPosition, Bevel, Modify, Rotate, PanZoom, Leader, CheckForUpdates, InfoDistancePP, Mirror, DeselectAll, InvertSelection, SelectAll, LockRelativeZero, SnapCoordinatePolar, SnapDistance, SnapMiddleManual, SnapXManual, SnapYManual, ToggleStatusBar, CreateBlock, CreateLibraryItem, DeselectBlockReferences, EditBlock, EditMainDrawing, HideAllBlocks, RemoveBlock, SelectBlockReferences, ShowAllBlocks, ToggleBlockVisibility, Text, DrawingPreferences, Esc, RecentFiles, SvgImport, BrowseAddOns, BrowseUserManual, FAQ, Forum, ReportBug, ReportTranslationError, ShowReadme, Website, DeselectLayer, SelectLayer, ShowActiveLayer, ToggleLayerVisibility, ExThreePoints, MolImport, MenusAndToolBars, MyAction, PersistentWidgets, Explode, ToBack, ToFront, RestrictHorizontal, RestrictOff, RestrictOrthogonal, RestrictVertical, SnapAuto, SnapCenter, SnapEnd, SnapFree, SnapGrid, SnapIntersection, SnapMiddle, SnapOnEntity, SnapPerpendicular, SnapReference, AutoZoom, CommandLineFocus, OptionsToolBarFocus, PreviousView, ZoomIn, ZoomOut, ZoomToSelection, CloseAll, NextWindow, PreviousWindow, Hatch, LineRectangleSize, Polyline, EditText, LinetypeMode, InsertBlockItem, Arc2PR, Circle2TR, Paste, Translate, IsometricProjection, Snap, InsertBlock, Arc, Arc2PA, Circle, DimAngular, Ellipse, Line, Point, Spline, ArcTangential, Circle2PR, Line2P, LineAngle, LineOrthogonalTangent, LineParallel, LineTangent2, SplineControlPoints, LineBoxJoint, ModifyCorner, Trim, BlockList, EllipseInscribedQuad, Divide, Lengthen, Circle3T, DrawBasedOnThreeCircles, LineParallelThrough, LineTangent1, LineRadicalAxis, PointPole, EditFromReference, Circle2TP, CircleT2P, LineBisector, LineFreehand, LineRelativeAngle, SelectRectangle, Arc3P, Circle2P, Circle3P, CircleCR, LineRectangle, ExAddBlock, LineDove, IsometricGridTop, ToggleGrid, BlockInsert, InsertScriptItem, ArcCPA, EllipseArcCPPA, LinePolygonCP, LinePolygonPP, ExFixBlockNames, ExDrawBoundingBox, ExDrawColors, ExMathSpiral, SelectByHandle, CircleCP, Delete, Save, ExImportPoints, Cross, Reverse, TrimBoth, LayerList, AddBlock, DimAligned, DimOrdinate, DimRegen, DimRotated, LineHorizontal, LineVertical, Point1P, Redo, Undo, OpenFile, SetRelativeZero, SnapCoordinate, CloseFile, PdfExport, AddLayer, HideAllLayers, ShowAllLayers, ExDumpPolyline, ExTransactionListener, ExResizeWindow, ExDirListing, BlockListExport, Reset, RenameBlock, SaveAs, EditLayer, RemoveLayer, ExText, ExLayerWhiteToBlack, ExChangeArcDirection, ExChangeFontToArial, ExMainWindow, and DraftMode.

virtual void RActionAdapter::commandEvent ( RCommandEvent event)
inlinevirtual

Called when a command is entered in the command line.

Implements RAction.

virtual void RActionAdapter::commandEventPreview ( RCommandEvent event)
inlinevirtual

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

Implements RAction.

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.

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.

virtual void RActionAdapter::entityPickEvent ( REntityPickEvent event)
inlinevirtual

Implements RAction.

virtual void RActionAdapter::entityPickEventPreview ( REntityPickEvent event)
inlinevirtual

Implements RAction.

virtual void RActionAdapter::finishEvent ( )
inlinevirtual
virtual void RActionAdapter::keyPressEvent ( QKeyEvent &  )
inlinevirtual

Implements RAction.

virtual void RActionAdapter::keyReleaseEvent ( QKeyEvent &  )
inlinevirtual

Implements RAction.

virtual void RActionAdapter::mouseDoubleClickEvent ( RMouseEvent event)
inlinevirtual

Called on mouse double click events.

Implements RAction.

virtual void RActionAdapter::mouseMoveEvent ( RMouseEvent event)
inlinevirtual

Called on mouse move events.

Implements RAction.

Reimplemented in RNavigationAction.

virtual void RActionAdapter::mousePressEvent ( RMouseEvent event)
inlinevirtual

Called on mouse press events.

Implements RAction.

Reimplemented in RNavigationAction.

virtual void RActionAdapter::mouseReleaseEvent ( RMouseEvent event)
inlinevirtual

Called on mouse release events.

Implements RAction.

Reimplemented in RNavigationAction.

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

Called on pan gesture events.

Implements RAction.

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

Called on pinch gesture events.

Implements RAction.

virtual void RActionAdapter::propertyChangeEvent ( RPropertyEvent event)
inlinevirtual

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

Implements RAction.

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.

virtual void RActionAdapter::setGraphicsView ( RGraphicsView view)
inlinevirtual

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

Implements RAction.

virtual void RActionAdapter::suspendEvent ( )
inlinevirtual

Called with the action is Suspended, for example when another action becomes active or the mouse cursor leaves the view.

Implements RAction.

Reimplemented in EAction, PrintPreview, and DefaultAction.

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

Called on swipe gesture events.

Implements RAction.

virtual void RActionAdapter::tabletEvent ( RTabletEvent event)
inlinevirtual

Called on tablet events.

Implements RAction.

virtual void RActionAdapter::wheelEvent ( RWheelEvent event)
inlinevirtual

Called on mouse wheel events.

Implements RAction.


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