Gui::Command Class Referenceabstract

The Command class. More...

#include <Command.h>

Classes

class  LogDisabler
 Helper class to disable python console log. More...
 

Public Member Functions

Helper methods to generate help pages
const char * beginCmdHelp (void)
 returns the begin of a online help page More...
 
const char * endCmdHelp (void)
 returns the end of a online help page More...
 
virtual const char * getHelpUrl (void) const
 Get the help URL. More...
 
Helper methods for the Active tests
bool hasActiveDocument (void) const
 true when there is a document More...
 
bool hasObject (const char *Name)
 true when there is a document and a Feature with Name More...
 
checking of internal state
const char * getAppModuleName (void) const
 returns the name to which the command belongs More...
 
void setAppModuleName (const char *)
 
const char * getName () const
 Get the command name. More...
 
const char * getGroupName () const
 Get the name of the grouping of the command. More...
 
void setGroupName (const char *)
 
QString translatedGroupName () const
 
- Public Member Functions inherited from Gui::CommandBase
ActiongetAction () const
 Returns the Action object of this command, or 0 if it doesn't exist. More...
 
virtual const char * getMenuText () const
 
virtual const char * getToolTipText () const
 
virtual const char * getStatusTip () const
 
virtual const char * getWhatsThis () const
 
virtual const char * getPixmap () const
 
virtual const char * getAccel () const
 
void setWhatsThis (const char *)
 
void setMenuText (const char *)
 
void setToolTipText (const char *)
 
void setStatusTip (const char *)
 
void setPixmap (const char *)
 
void setAccel (const char *)
 
virtual const char * className () const =0
 The C++ class name is needed as context for the translation framework. More...
 

Protected Member Functions

 Command (const char *name)
 
virtual ~Command ()
 
Methods to override when creating a new command
virtual void activated (int iMsg)=0
 Methods which gets called when activated, needs to be reimplemented! More...
 
virtual ActioncreateAction (void)
 Creates the used Action. More...
 
void applyCommandData (const char *context, Action *)
 Applies the menu text, tool and status tip to the passed action object. More...
 
const char * keySequenceToAccel (int) const
 
void printConflictingAccelerators () const
 
- Protected Member Functions inherited from Gui::CommandBase
 CommandBase (const char *sMenu, const char *sToolTip=nullptr, const char *sWhat=nullptr, const char *sStatus=nullptr, const char *sPixmap=nullptr, const char *sAccel=nullptr)
 
virtual ~CommandBase ()
 

interface used by the CommandManager and the Action

enum  TriggerSource { TriggerNone , TriggerAction , TriggerChildAction }
 Command trigger source. More...
 
class CommandManager
 CommandManager is a friend. More...
 
virtual bool isActive (void)
 Override this method if your Cmd is not always active. More...
 
void testActive (void)
 Get somtile called to check the state of the command. More...
 
void setEnabled (bool)
 Enables or disables the command. More...
 
void recreateTooltip (const char *context, Action *)
 (Re)Create the text for the tooltip (for example, when the shortcut is changed) More...
 
TriggerSource triggerSource () const
 Return the current command trigger source. More...
 
void invoke (int index, TriggerSource trigger=TriggerNone)
 Called to invoke the command. More...
 
void addTo (QWidget *)
 adds this command to arbitrary widgets More...
 
void addToGroup (ActionGroup *, bool checkable)
 
void addToGroup (ActionGroup *)
 

Helper methods for issuing commands to the Python interpreter

enum  DoCmd_Type { Doc , App , Gui }
 types of application level actions for DoCommand() More...
 
static void blockCommand (bool)
 Blocks all command objects. More...
 
static void printPyCaller ()
 Print to Python console the current Python calling source file and line number. More...
 
static void printCaller (const char *file, int line)
 Print to Python console the current calling source file and line number. More...
 
static void addModule (DoCmd_Type eType, const char *sModuleName)
 import an external (or own) module only once More...
 

arbitrary helper methods

enum  CmdType {
  AlterDoc = 1 , Alter3DView = 2 , AlterSelection = 4 , ForEdit = 8 ,
  NoTransaction = 16
}
 
class LogDisabler
 
void adjustCameraPosition ()
 

Attributes

Set by the inherited constructor to set up the most important properties of the command.

In the Command constructor are set default values! The real values should be set in the constructor of the inhereting class.

const char * sAppModule
 
const char * sGroup
 
const char * sName
 
const char * sHelpUrl
 
int eType
 
bool bCanLog
 Indicate if the command shall log to MacroManager. More...
 

Helper methods to get important classes

Gui::DocumentgetActiveGuiDocument (void) const
 Get pointer to the active gui document. More...
 
App::DocumentgetDocument (const char *Name=nullptr) const
 Get pointer to the named or active App document Returns a pointer to the named document or the active document when no name is given. More...
 
bool isViewOfType (Base::Type t) const
 checks if the active view is of a special type or derived More...
 
App::DocumentObjectgetObject (const char *Name) const
 returns the named feature or the active one from the active document or NULL More...
 
std::string getUniqueObjectName (const char *BaseName, const App::DocumentObject *obj=nullptr) const
 Get unique Feature name from the active document. More...
 
static ApplicationgetGuiApplication (void)
 Get pointer to the Application Window. More...
 
static Gui::SelectionSingletongetSelection (void)
 Get a reference to the selection. More...
 
static std::string getObjectCmd (const char *Name, const App::Document *doc=nullptr, const char *prefix=nullptr, const char *postfix=nullptr, bool gui=false)
 returns a python command string to retrieve an object from a document More...
 
static std::string getObjectCmd (const App::DocumentObject *obj, const char *prefix=nullptr, const char *postfix=nullptr, bool gui=false)
 returns a python command string to retrieve the given object More...
 

Helper methods for the Undo/Redo and Update handling

void languageChange ()
 Translate command. More...
 
void updateAction (int mode)
 Updates the QAction with respect to the passed mode. More...
 
void setupCheckable (int iMsg)
 Setup checkable actions based on current TriggerSource. More...
 
static void openCommand (const char *sName=nullptr)
 Open a new Undo transaction on the active document. More...
 
static void commitCommand (void)
 Commit the Undo transaction on the active document. More...
 
static void abortCommand (void)
 Abort the Undo transaction on the active document. More...
 
static bool hasPendingCommand (void)
 Check if an Undo transaction is open on the active document. More...
 
static void updateActive (void)
 Updates the (active) document (propagate changes) More...
 
static void updateAll (std::list< Gui::Document * > cList)
 Updates the (all or listed) documents (propagate changes) More...
 
static bool isActiveObjectValid (void)
 Checks if the active object of the active document is valid. More...
 

Methods for copying visiual properties

const std::string strToPython (const char *Str)
 translate a string to a python string literal (needed e.g. in file names for windows...) More...
 
const std::string strToPython (const std::string &Str)
 
static std::string getPythonTuple (const std::string &name, const std::vector< std::string > &subnames)
 Get Python tuple from object and sub-elements. More...
 

Additional Inherited Members

- Protected Attributes inherited from Gui::CommandBase
const char * sMenuText
 
const char * sToolTipText
 
const char * sWhatsThis
 
const char * sStatusTip
 
const char * sPixmap
 
const char * sAccel
 
std::string displayText
 

Detailed Description

The Command class.

This class is mostly used for commands implemented directly in C++ (see PythonCommand). It contains also a lot of helper methods to make implementing commands for FreeCAD as easy as possible.

Note
This class is intended to handle the GUI interaction like:
  • starting a dialog
  • doing view and window stuff
  • anything else, especially altering the document must be done on application level. See doCommand() for details.
See also
CommandManager
Author
J├╝rgen Riegel

Member Enumeration Documentation

◆ CmdType

enum Gui::Command::CmdType
protected
Enumerator
AlterDoc 

Command change the Document.

Alter3DView 

Command change the Gui.

AlterSelection 

Command change the Selection.

ForEdit 

Command is in a special edit mode active.

NoTransaction 

Do not setup auto transaction.

◆ DoCmd_Type

types of application level actions for DoCommand()

Enumerator
Doc 

Action alters the document.

App 

Action alters only the application.

Gui 

Action alters only the Gui.

◆ TriggerSource

Command trigger source.

Enumerator
TriggerNone 

No external trigger, e.g. invoked through Python.

TriggerAction 

Command triggered by an action.

TriggerChildAction 

Command triggered by a child action inside an action group.

Constructor & Destructor Documentation

◆ Command()

Command::Command ( const char *  name)
protected

◆ ~Command()

Command::~Command ( )
protectedvirtual

Member Function Documentation

◆ abortCommand()

void Command::abortCommand ( void  )
static

Abort the Undo transaction on the active document.

References App::Application::closeActiveTransaction(), and App::GetApplication().

Referenced by MeshGui::TaskSmoothing::accept(), ReenGui::FitBSplineSurfaceWidget::accept(), ReenGui::PoissonWidget::accept(), SpreadsheetGui::DlgBindSheet::accept(), SpreadsheetGui::DlgSheetConf::accept(), CmdSketcherConstrainBlock::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), SpreadsheetGui::PropertiesDialog::apply(), CmdSketcherConstrainBlock::applyConstraint(), CmdSketcherConstrainCoincident::applyConstraint(), CmdSketcherConstrainPointOnObject::applyConstraint(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), TechDrawGui::TaskCenterLine::createCenterLine(), PartDesignGui::ViewProviderBase::doubleClicked(), PartDesignGui::ViewProvider::doubleClicked(), SketcherGui::makeTangentToArcOfEllipseviaNewPoint(), SketcherGui::makeTangentToArcOfHyperbolaviaNewPoint(), SketcherGui::makeTangentToArcOfParabolaviaNewPoint(), SketcherGui::makeTangentToEllipseviaNewPoint(), SketcherGui::TaskSketcherConstraints::on_listWidgetConstraints_itemChanged(), SpreadsheetGui::DlgBindSheet::onDiscard(), SpreadsheetGui::DlgSheetConf::onDiscard(), SketcherGui::DrawSketchHandlerCarbonCopy::onSelectionChanged(), SketcherGui::DrawSketchHandlerExternal::onSelectionChanged(), StdCmdExpression::pasteExpressions(), SketcherGui::DrawSketchHandlerBSpline::pressButton(), SketcherGui::DrawSketchHandlerBSpline::quit(), SketcherGui::DrawSketchHandlerBSpline::registerPressedKey(), FemGui::TaskDlgCreateNodeSet::reject(), FemGui::TaskDlgMeshShapeNetgen::reject(), FemGui::TaskDlgFemConstraint::reject(), FemGui::TaskDlgFemConstraintContact::reject(), FemGui::TaskDlgFemConstraintDisplacement::reject(), FemGui::TaskDlgFemConstraintFixed::reject(), FemGui::TaskDlgFemConstraintFluidBoundary::reject(), FemGui::TaskDlgFemConstraintForce::reject(), FemGui::TaskDlgFemConstraintHeatflux::reject(), FemGui::TaskDlgFemConstraintInitialTemperature::reject(), FemGui::TaskDlgFemConstraintPlaneRotation::reject(), FemGui::TaskDlgFemConstraintPressure::reject(), FemGui::TaskDlgFemConstraintSpring::reject(), FemGui::TaskDlgFemConstraintTemperature::reject(), FemGui::TaskDlgFemConstraintTransform::reject(), FemGui::TaskDlgPost::reject(), PartGui::OffsetWidget::reject(), PartGui::ThicknessWidget::reject(), PartDesignGui::TaskDlgBooleanParameters::reject(), PartDesignGui::TaskDlgFeatureParameters::reject(), PartDesignGui::TaskPrimitiveParameters::reject(), PartDesignGui::TaskDlgShapeBinder::reject(), SurfaceGui::TaskFilling::reject(), SurfaceGui::GeomFillSurface::reject(), SurfaceGui::TaskSections::reject(), TechDrawGui::TaskProjGroup::reject(), DrawSketchHandlerCoincident::releaseButton(), DrawSketchHandlerBSplineInsertKnot::releaseButton(), DrawSketchHandlerCopy::releaseButton(), DrawSketchHandlerRectangularArray::releaseButton(), SketcherGui::DrawSketchHandlerArc::releaseButton(), SketcherGui::DrawSketchHandler3PointArc::releaseButton(), SketcherGui::DrawSketchHandlerArcOfEllipse::releaseButton(), SketcherGui::DrawSketchHandlerCircle::releaseButton(), SketcherGui::DrawSketchHandler3PointCircle::releaseButton(), SketcherGui::DrawSketchHandlerExtend::releaseButton(), SketcherGui::DrawSketchHandlerFillet::releaseButton(), SketcherGui::DrawSketchHandlerLine::releaseButton(), SketcherGui::DrawSketchHandlerLineSet::releaseButton(), SketcherGui::DrawSketchHandlerPoint::releaseButton(), SketcherGui::DrawSketchHandlerRegularPolygon::releaseButton(), SketcherGui::DrawSketchHandlerBox::releaseButton(), SketcherGui::DrawSketchHandlerOblong::releaseButton(), SketcherGui::DrawSketchHandlerSlot::releaseButton(), SketcherGui::DrawSketchHandlerSplitting::releaseButton(), SketcherGui::DrawSketchHandlerTrimming::releaseButton(), SketcherGui::DrawSketchHandlerArcOfHyperbola::releaseButton(), and SketcherGui::DrawSketchHandlerArcOfParabola::releaseButton().

◆ activated()

virtual void Gui::Command::activated ( int  iMsg)
protectedpure virtual

Methods which gets called when activated, needs to be reimplemented!

Implemented in Gui::GroupCommand, Gui::PythonCommand, Gui::PythonGroupCommand, Gui::MacroCommand, StdCmdOpen, StdCmdImport, StdCmdExport, StdCmdMergeProjects, StdCmdDependencyGraph, StdCmdNew, StdCmdSave, StdCmdSaveAs, StdCmdSaveCopy, StdCmdSaveAll, StdCmdRevert, StdCmdProjectInfo, StdCmdProjectUtil, StdCmdPrint, StdCmdPrintPreview, StdCmdPrintPdf, StdCmdQuit, StdCmdUndo, StdCmdRedo, StdCmdCut, StdCmdCopy, StdCmdPaste, StdCmdDuplicateSelection, StdCmdSelectAll, StdCmdDelete, StdCmdRefresh, StdCmdTransform, StdCmdPlacement, StdCmdTransformManip, StdCmdAlignment, StdCmdEdit, StdCmdExpression, StdCmdLinkMakeGroup, StdCmdLinkMake, StdCmdLinkMakeRelative, StdCmdLinkReplace, StdCmdLinkUnlink, StdCmdLinkImport, StdCmdLinkImportAll, StdCmdLinkSelectLinked, StdCmdLinkSelectLinkedFinal, StdCmdLinkSelectAllLinks, StdCmdDlgMacroRecord, StdCmdMacroStopRecord, StdCmdDlgMacroExecute, StdCmdDlgMacroExecuteDirect, StdCmdMacroAttachDebugger, StdCmdMacroStartDebug, StdCmdMacroStopDebug, StdCmdMacroStepOver, StdCmdMacroStepInto, StdCmdToggleBreakpoint, StdCmdWorkbench, StdCmdRecentFiles, StdCmdRecentMacros, StdCmdAbout, StdCmdAboutQt, StdCmdWhatsThis, StdCmdDlgParameter, StdCmdDlgPreferences, StdCmdDlgCustomize, StdCmdCommandLine, StdCmdOnlineHelp, StdCmdOnlineHelpWebsite, StdCmdFreeCADDonation, StdCmdFreeCADWebsite, StdCmdFreeCADUserHub, StdCmdFreeCADPowerUserHub, StdCmdFreeCADForum, StdCmdFreeCADFAQ, StdCmdPythonWebsite, StdCmdReportBug, StdCmdMeasurementSimple, StdCmdTextDocument, StdCmdUnitsCalculator, StdCmdUserEditMode, StdCmdPart, StdCmdGroup, Std_TestQM, Std_TestReloadQM, FCCmdTest1, FCCmdTest2, FCCmdTest3, FCCmdTest4, FCCmdTest5, FCCmdTest6, CmdTestCmdFuncs, CmdTestProgress1, CmdTestProgress2, CmdTestProgress3, CmdTestProgress4, CmdTestProgress5, CmdTestMDI1, CmdTestMDI2, CmdTestMDI3, CmdTestConsoleOutput, StdOrthographicCamera, StdPerspectiveCamera, StdCmdViewSaveCamera, StdCmdViewRestoreCamera, StdCmdFreezeViews, StdCmdToggleClipPlane, StdCmdDrawStyle, StdCmdToggleVisibility, StdCmdToggleSelectability, StdCmdShowSelection, StdCmdHideSelection, StdCmdSelectVisibleObjects, StdCmdToggleObjects, StdCmdShowObjects, StdCmdHideObjects, StdCmdSetAppearance, StdCmdViewHome, StdCmdViewBottom, StdCmdViewFront, StdCmdViewLeft, StdCmdViewRear, StdCmdViewRight, StdCmdViewTop, StdCmdViewIsometric, StdCmdViewDimetric, StdCmdViewTrimetric, StdCmdViewRotateLeft, StdCmdViewRotateRight, StdCmdViewFitAll, StdCmdViewFitSelection, StdViewDock, StdViewUndock, StdMainFullscreen, StdViewFullscreen, StdViewDockUndockFullscreen, StdCmdViewVR, StdViewScreenShot, StdCmdViewCreate, StdCmdToggleNavigation, StdCmdAxisCross, StdCmdViewExample1, StdCmdViewExample2, StdCmdViewExample3, StdCmdViewIvStereoOff, StdCmdViewIvStereoRedGreen, StdCmdViewIvStereoQuadBuff, StdCmdViewIvStereoInterleavedRows, StdCmdViewIvStereoInterleavedColumns, StdCmdViewIvIssueCamPos, StdViewZoomIn, StdViewZoomOut, StdViewBoxZoom, StdBoxSelection, StdBoxElementSelection, StdTreeSelection, StdCmdTreeCollapse, StdCmdTreeExpand, StdCmdTreeSelectAllInstances, StdCmdMeasureDistance, StdCmdSceneInspector, StdCmdTextureMapping, StdCmdDemoMode, CmdViewMeasureClearAll, CmdViewMeasureToggleAll, StdCmdSelBack, StdCmdSelForward, StdTreeDrag, StdCmdSelBoundingBox, StdCmdArrangeIcons, StdCmdTileWindows, StdCmdCascadeWindows, StdCmdCloseActiveWindow, StdCmdCloseAllWindows, StdCmdActivateNextWindow, StdCmdActivatePrevWindow, StdCmdWindows, StdCmdUserInterface, StdCmdDockViewMenu, StdCmdToolBarMenu, StdCmdStatusBar, StdCmdWindowsMenu, ViewIsometricCmd, ViewOrthographicCmd, ViewPerspectiveCmd, ViewZoomToFitCmd, Gui::StdCmdDownloadOnlineHelp, Gui::StdCmdPythonHelp, Gui::StdCmdDescription, CmdSandboxEventLoop, CmdSandboxMeshLoader, CmdSketcherConstrainHorizontal, CmdSketcherConstrainVertical, CmdSketcherConstrainLock, CmdSketcherConstrainBlock, CmdSketcherConstrainCoincident, CmdSketcherConstrainDistance, CmdSketcherConstrainPointOnObject, CmdSketcherConstrainDistanceX, CmdSketcherConstrainDistanceY, CmdSketcherConstrainParallel, CmdSketcherConstrainPerpendicular, CmdSketcherConstrainTangent, CmdSketcherConstrainRadius, CmdSketcherConstrainDiameter, CmdSketcherConstrainRadiam, CmdSketcherConstrainAngle, CmdSketcherConstrainEqual, CmdSketcherConstrainSymmetric, CmdSketcherCopy, CmdSketcherClone, CmdSketcherMove, and CmdSketcherConstraint.

◆ addModule()

◆ addTo()

◆ addToGroup() [1/2]

void Command::addToGroup ( ActionGroup group)

References createAction(), and testActive().

◆ addToGroup() [2/2]

void Command::addToGroup ( ActionGroup group,
bool  checkable 
)

◆ adjustCameraPosition()

void Command::adjustCameraPosition ( )

◆ applyCommandData()

◆ beginCmdHelp()

const char * Command::beginCmdHelp ( void  )

returns the begin of a online help page

◆ blockCommand()

void Command::blockCommand ( bool  block)
static

Blocks all command objects.

◆ commitCommand()

void Command::commitCommand ( void  )
static

Commit the Undo transaction on the active document.

References App::Application::closeActiveTransaction(), and App::GetApplication().

Referenced by DrawingGui::TaskProjection::accept(), FemGui::TaskDlgMeshShapeNetgen::accept(), FemGui::TaskDlgFemConstraint::accept(), FemGui::TaskDlgFemConstraintInitialTemperature::accept(), MeshGui::TaskDecimating::accept(), MeshGui::TaskSmoothing::accept(), PartGui::OffsetWidget::accept(), PartGui::ThicknessWidget::accept(), PartDesignGui::TaskDlgBooleanParameters::accept(), PartDesignGui::TaskDlgFeatureParameters::accept(), PartDesignGui::TaskPipeParameters::accept(), PartDesignGui::TaskDlgShapeBinder::accept(), ReenGui::FitBSplineSurfaceWidget::accept(), ReenGui::PoissonWidget::accept(), SpreadsheetGui::DlgBindSheet::accept(), SpreadsheetGui::DlgSheetConf::accept(), SurfaceGui::TaskFilling::accept(), SurfaceGui::GeomFillSurface::accept(), SurfaceGui::TaskSections::accept(), TechDrawGui::TaskActiveView::accept(), TechDrawGui::TaskCenterLine::accept(), TechDrawGui::TaskCosmeticLine::accept(), TechDrawGui::TaskCustomizeFormat::accept(), TechDrawGui::TaskProjection::accept(), TechDrawGui::TaskWeldingSymbol::accept(), StdCmdDelete::activated(), StdCmdMeasurementSimple::activated(), StdCmdTextDocument::activated(), StdCmdGroup::activated(), CmdSketcherConstrainHorizontal::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainBlock::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainRadiam::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainSymmetric::activated(), TechDrawGui::TaskCosVertex::addCosVertex(), SpreadsheetGui::PropertiesDialog::apply(), CmdSketcherConstrainHorizontal::applyConstraint(), CmdSketcherConstrainVertical::applyConstraint(), CmdSketcherConstrainLock::applyConstraint(), CmdSketcherConstrainBlock::applyConstraint(), CmdSketcherConstrainCoincident::applyConstraint(), CmdSketcherConstrainPointOnObject::applyConstraint(), CmdSketcherConstrainParallel::applyConstraint(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), CmdSketcherConstrainRadiam::applyConstraint(), CmdSketcherConstrainEqual::applyConstraint(), CmdSketcherConstrainSymmetric::applyConstraint(), TechDrawGui::QGIViewBalloon::balloonLabelDragFinished(), TechDrawGui::TaskRichAnno::createAnnoFeature(), SketcherGui::DrawSketchHandler::createAutoConstraints(), TechDrawGui::QGSPage::createBalloon(), TechDrawGui::TaskCenterLine::createCenterLine(), TechDrawGui::TaskCosmeticLine::createCosmeticLine(), TechDrawGui::TaskDetail::createDetail(), TechDrawGui::TaskLeaderLine::createLeaderFeature(), TechDrawGui::TaskSectionView::createSectionView(), TechDrawGui::QGIViewDimension::datumLabelDragFinished(), SpreadsheetGui::SheetTableView::deleteSelection(), TechDrawGui::execHoleCircle(), SpreadsheetGui::SheetTableView::insertColumns(), SpreadsheetGui::SheetTableView::insertColumnsAfter(), SpreadsheetGui::SheetTableView::insertRows(), SpreadsheetGui::SheetTableView::insertRowsAfter(), SketcherGui::makeTangentToArcOfEllipseviaNewPoint(), SketcherGui::makeTangentToArcOfHyperbolaviaNewPoint(), SketcherGui::makeTangentToArcOfParabolaviaNewPoint(), SketcherGui::makeTangentToEllipseviaNewPoint(), SketcherGui::TaskSketcherConstraints::on_listWidgetConstraints_itemChanged(), SpreadsheetGui::DlgBindSheet::onDiscard(), SpreadsheetGui::DlgSheetConf::onDiscard(), SpreadsheetGui::SheetView::onMsg(), SpreadsheetGui::SheetTableView::onRecompute(), SketcherGui::DrawSketchHandlerCarbonCopy::onSelectionChanged(), SketcherGui::DrawSketchHandlerExternal::onSelectionChanged(), StdCmdExpression::pasteExpressions(), DrawSketchHandlerCoincident::releaseButton(), DrawSketchHandlerBSplineInsertKnot::releaseButton(), DrawSketchHandlerCopy::releaseButton(), DrawSketchHandlerRectangularArray::releaseButton(), SketcherGui::DrawSketchHandlerArc::releaseButton(), SketcherGui::DrawSketchHandler3PointArc::releaseButton(), SketcherGui::DrawSketchHandlerArcOfEllipse::releaseButton(), SketcherGui::DrawSketchHandlerCircle::releaseButton(), SketcherGui::DrawSketchHandler3PointCircle::releaseButton(), SketcherGui::DrawSketchHandlerExtend::releaseButton(), SketcherGui::DrawSketchHandlerFillet::releaseButton(), SketcherGui::DrawSketchHandlerLine::releaseButton(), SketcherGui::DrawSketchHandlerLineSet::releaseButton(), SketcherGui::DrawSketchHandlerPoint::releaseButton(), SketcherGui::DrawSketchHandlerRegularPolygon::releaseButton(), SketcherGui::DrawSketchHandlerBox::releaseButton(), SketcherGui::DrawSketchHandlerOblong::releaseButton(), SketcherGui::DrawSketchHandlerSlot::releaseButton(), SketcherGui::DrawSketchHandlerSplitting::releaseButton(), SketcherGui::DrawSketchHandlerTrimming::releaseButton(), SketcherGui::DrawSketchHandlerArcOfHyperbola::releaseButton(), SketcherGui::DrawSketchHandlerArcOfParabola::releaseButton(), SpreadsheetGui::SheetTableView::removeColumns(), SpreadsheetGui::SheetTableView::removeRows(), TechDrawGui::MDIViewPage::saveDXF(), SpreadsheetGui::WorkbenchHelper::setBackgroundColor(), SpreadsheetGui::WorkbenchHelper::setForegroundColor(), CmdSketcherConstrainTangent::substituteConstraintCombinations(), CmdSketcherConstrainCoincident::substituteConstraintCombinations(), SketcherGui::ConstraintView::swapNamedOfSelectedItems(), TechDrawGui::TaskRichAnno::updateAnnoFeature(), TechDrawGui::TaskDetail::updateDetail(), TechDrawGui::TaskLeaderLine::updateLeaderFeature(), and TechDrawGui::TaskSectionView::updateSectionView().

◆ createAction()

◆ endCmdHelp()

const char * Command::endCmdHelp ( void  )

returns the end of a online help page

◆ getActiveGuiDocument()

Gui::Document * Command::getActiveGuiDocument ( void  ) const

Get pointer to the active gui document.

References Gui::Application::activeDocument(), and getGuiApplication().

Referenced by SketcherCopy::activate(), StdCmdImport::activated(), StdCmdExport::activated(), StdCmdSave::activated(), StdCmdSaveAs::activated(), StdCmdSaveCopy::activated(), StdCmdProjectInfo::activated(), StdCmdRefresh::activated(), StdCmdTransformManip::activated(), StdCmdDrawStyle::activated(), StdCmdViewCreate::activated(), CmdSketcherConstrainHorizontal::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainBlock::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainRadiam::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainSymmetric::activated(), CmdSketcherConstraint::activated(), CmdSketcherConstrainHorizontal::applyConstraint(), CmdSketcherConstrainVertical::applyConstraint(), CmdSketcherConstrainLock::applyConstraint(), CmdSketcherConstrainBlock::applyConstraint(), CmdSketcherConstrainCoincident::applyConstraint(), CmdSketcherConstrainDistance::applyConstraint(), CmdSketcherConstrainPointOnObject::applyConstraint(), CmdSketcherConstrainDistanceX::applyConstraint(), CmdSketcherConstrainDistanceY::applyConstraint(), CmdSketcherConstrainParallel::applyConstraint(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), CmdSketcherConstrainRadiam::applyConstraint(), CmdSketcherConstrainAngle::applyConstraint(), CmdSketcherConstrainEqual::applyConstraint(), CmdSketcherConstrainSymmetric::applyConstraint(), hasActiveDocument(), StdCmdImport::isActive(), StdCmdExport::isActive(), StdCmdDependencyGraph::isActive(), StdCmdSave::isActive(), StdCmdSaveAs::isActive(), StdCmdSaveCopy::isActive(), StdCmdSaveAll::isActive(), StdCmdRevert::isActive(), StdCmdProjectInfo::isActive(), StdCmdViewCreate::isActive(), CmdSketcherConstraint::isActive(), CmdSketcherCopy::isActive(), CmdSketcherClone::isActive(), and CmdSketcherMove::isActive().

◆ getAppModuleName()

const char * Gui::Command::getAppModuleName ( void  ) const

returns the name to which the command belongs

◆ getDocument()

◆ getGroupName()

const char * Gui::Command::getGroupName ( ) const

Get the name of the grouping of the command.

Referenced by Gui::Dialog::CommandModel::data(), and translatedGroupName().

◆ getGuiApplication()

Application * Command::getGuiApplication ( void  )
static

◆ getHelpUrl()

virtual const char * Gui::Command::getHelpUrl ( void  ) const
virtual

Get the help URL.

Reimplemented in Gui::PythonCommand, and Gui::PythonGroupCommand.

◆ getName()

◆ getObject()

◆ getObjectCmd() [1/2]

std::string Command::getObjectCmd ( const App::DocumentObject obj,
const char *  prefix = nullptr,
const char *  postfix = nullptr,
bool  gui = false 
)
static

returns a python command string to retrieve the given object

References getObjectCmd(), and Draft::gui.

◆ getObjectCmd() [2/2]

◆ getPythonTuple()

std::string Command::getPythonTuple ( const std::string &  name,
const std::vector< std::string > &  subnames 
)
static

Get Python tuple from object and sub-elements.

◆ getSelection()

Gui::SelectionSingleton & Command::getSelection ( void  )
static

Get a reference to the selection.

References Gui::Selection().

Referenced by SketcherCopy::activate(), StdCmdMeasurementSimple::activated(), CmdSketcherConstrainHorizontal::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainBlock::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainRadiam::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainSymmetric::activated(), CmdSketcherConstraint::activated(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), CmdSketcherConstrainRadiam::applyConstraint(), CmdSketcherConstrainSymmetric::applyConstraint(), TechDrawGui::execHoleCircle(), TechDrawGui::DrawGuiUtil::findPage(), femguiutils.selection_widgets._Selector::setHelpText(), CmdSketcherConstrainTangent::substituteConstraintCombinations(), CmdSketcherConstrainPointOnObject::substituteConstraintCombinations(), and CmdSketcherConstrainCoincident::substituteConstraintCombinations().

◆ getUniqueObjectName()

std::string Command::getUniqueObjectName ( const char *  BaseName,
const App::DocumentObject obj = nullptr 
) const

Get unique Feature name from the active document.

Parameters
BaseNamethe base name
objif not zero, then request the unique name in the document of the given object.

References App::Application::getActiveDocument(), and App::GetApplication().

Referenced by StdCmdPart::activated(), and StdCmdGroup::activated().

◆ hasActiveDocument()

◆ hasObject()

bool Command::hasObject ( const char *  Name)

true when there is a document and a Feature with Name

References getDocument(), and App::Document::getObject().

◆ hasPendingCommand()

◆ invoke()

void Command::invoke ( int  index,
TriggerSource  trigger = TriggerNone 
)

Called to invoke the command.

Parameters
indexin case of group command, this is the index of the child command. For checkable command, this indicates the checkable state.
triggerindicate the command triggering source, see TriggerSource.

References bCanLog, Base::Console(), Gui::CommandBase::displayText, Gui::CommandBase::getMenuText(), getName(), Base::ConsoleSingleton::Log(), and sName.

Referenced by Gui::PythonGroupCommand::activated(), Gui::Dialog::DemoMode::on_fullscreen_toggled(), Gui::CommandManager::runCommandByName(), and Gui::Application::sRunCommand().

◆ isActive()

virtual bool Gui::Command::isActive ( void  )
virtual

Override this method if your Cmd is not always active.

Reimplemented in StdCmdExpression, Gui::PythonCommand, Gui::PythonGroupCommand, StdCmdImport, StdCmdExport, StdCmdMergeProjects, StdCmdDependencyGraph, StdCmdSave, StdCmdSaveAs, StdCmdSaveCopy, StdCmdSaveAll, StdCmdRevert, StdCmdProjectInfo, StdCmdProjectUtil, StdCmdPrint, StdCmdPrintPreview, StdCmdPrintPdf, StdCmdUndo, StdCmdRedo, StdCmdCut, StdCmdCopy, StdCmdPaste, StdCmdDuplicateSelection, StdCmdSelectAll, StdCmdDelete, StdCmdRefresh, StdCmdTransform, StdCmdPlacement, StdCmdTransformManip, StdCmdAlignment, StdCmdEdit, StdCmdLinkMakeGroup, StdCmdLinkMake, StdCmdLinkMakeRelative, StdCmdLinkReplace, StdCmdLinkUnlink, StdCmdLinkImport, StdCmdLinkImportAll, StdCmdLinkSelectLinked, StdCmdLinkSelectLinkedFinal, StdCmdLinkSelectAllLinks, StdCmdDlgMacroRecord, StdCmdMacroStopRecord, StdCmdDlgMacroExecute, StdCmdDlgMacroExecuteDirect, StdCmdMacroAttachDebugger, StdCmdMacroStartDebug, StdCmdMacroStopDebug, StdCmdMacroStepOver, StdCmdMacroStepInto, StdCmdToggleBreakpoint, StdCmdWorkbench, StdCmdAbout, StdCmdTextDocument, StdCmdUserEditMode, StdCmdPart, StdCmdGroup, FCCmdTest1, FCCmdTest2, FCCmdTest3, FCCmdTest4, FCCmdTest5, FCCmdTest6, CmdTestCmdFuncs, CmdTestProgress1, CmdTestProgress2, CmdTestProgress3, CmdTestProgress4, CmdTestProgress5, CmdTestMDI1, CmdTestMDI2, CmdTestMDI3, StdOrthographicCamera, StdPerspectiveCamera, StdCmdViewSaveCamera, StdCmdViewRestoreCamera, StdCmdFreezeViews, StdCmdToggleClipPlane, StdCmdDrawStyle, StdCmdToggleVisibility, StdCmdToggleSelectability, StdCmdShowSelection, StdCmdHideSelection, StdCmdSelectVisibleObjects, StdCmdToggleObjects, StdCmdShowObjects, StdCmdHideObjects, StdCmdSetAppearance, StdCmdViewHome, StdCmdViewBottom, StdCmdViewFront, StdCmdViewLeft, StdCmdViewRear, StdCmdViewRight, StdCmdViewTop, StdCmdViewIsometric, StdCmdViewDimetric, StdCmdViewTrimetric, StdCmdViewRotateLeft, StdCmdViewRotateRight, StdCmdViewFitAll, StdCmdViewFitSelection, StdViewDock, StdViewUndock, StdViewFullscreen, StdViewDockUndockFullscreen, StdCmdViewVR, StdViewScreenShot, StdCmdViewCreate, StdCmdToggleNavigation, StdCmdAxisCross, StdCmdViewExample1, StdCmdViewExample2, StdCmdViewExample3, StdCmdViewIvStereoOff, StdCmdViewIvStereoRedGreen, StdCmdViewIvStereoQuadBuff, StdCmdViewIvStereoInterleavedRows, StdCmdViewIvStereoInterleavedColumns, StdCmdViewIvIssueCamPos, StdViewZoomIn, StdViewZoomOut, StdViewBoxZoom, StdBoxSelection, StdBoxElementSelection, StdCmdTreeSelectAllInstances, StdCmdMeasureDistance, StdCmdSceneInspector, StdCmdTextureMapping, StdCmdSelBack, StdCmdSelForward, StdCmdSelBoundingBox, StdCmdArrangeIcons, StdCmdTileWindows, StdCmdCascadeWindows, StdCmdCloseActiveWindow, StdCmdCloseAllWindows, StdCmdActivateNextWindow, StdCmdActivatePrevWindow, StdCmdDockViewMenu, StdCmdToolBarMenu, StdCmdStatusBar, StdCmdWindowsMenu, ViewIsometricCmd, ViewOrthographicCmd, ViewPerspectiveCmd, ViewZoomToFitCmd, CmdSandboxEventLoop, CmdSandboxMeshLoader, CmdSketcherConstraint, CmdSketcherCopy, CmdSketcherClone, and CmdSketcherMove.

Referenced by Gui::Workbench::createLinkMenu(), and testActive().

◆ isActiveObjectValid()

bool Command::isActiveObjectValid ( void  )
static

Checks if the active object of the active document is valid.

References Gui::Application::activeDocument(), App::Document::getActiveObject(), Gui::Document::getDocument(), and Gui::Application::Instance.

◆ isViewOfType()

bool Command::isViewOfType ( Base::Type  t) const

checks if the active view is of a special type or derived

References Gui::Application::activeDocument(), Gui::Document::getActiveView(), and getGuiApplication().

Referenced by StdViewScreenShot::isActive().

◆ keySequenceToAccel()

const char * Command::keySequenceToAccel ( int  sk) const
protected

◆ languageChange()

◆ openCommand()

void Command::openCommand ( const char *  sCmdName = nullptr)
static

Open a new Undo transaction on the active document.

Open a new Undo transaction on the active document This method opens a new UNDO transaction on the active document.

This transaction will later appear in the UNDO REDO dialog with the name of the command. If the user recall the transaction everything changed on the document between OpenCommand() and CommitCommand will be undone (or redone). You can use an alternative name for the operation default is the Command name.

See also
CommitCommand(),AbortCommand()

References App::GetApplication(), and App::Application::setActiveTransaction().

Referenced by DrawingGui::TaskProjection::accept(), MeshGui::TaskDecimating::accept(), MeshGui::TaskSmoothing::accept(), ReenGui::FitBSplineSurfaceWidget::accept(), ReenGui::PoissonWidget::accept(), SpreadsheetGui::DlgBindSheet::accept(), TechDrawGui::TaskActiveView::accept(), TechDrawGui::TaskCosmeticLine::accept(), TechDrawGui::TaskCustomizeFormat::accept(), TechDrawGui::TaskProjection::accept(), TechDrawGui::TaskWeldingSymbol::accept(), StdCmdDelete::activated(), StdCmdMeasurementSimple::activated(), StdCmdTextDocument::activated(), StdCmdPart::activated(), StdCmdGroup::activated(), CmdSketcherConstrainHorizontal::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainBlock::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainRadiam::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainSymmetric::activated(), TechDrawGui::TaskCosVertex::addCosVertex(), SpreadsheetGui::PropertiesDialog::apply(), CmdSketcherConstrainHorizontal::applyConstraint(), CmdSketcherConstrainVertical::applyConstraint(), CmdSketcherConstrainLock::applyConstraint(), CmdSketcherConstrainBlock::applyConstraint(), CmdSketcherConstrainCoincident::applyConstraint(), CmdSketcherConstrainDistance::applyConstraint(), CmdSketcherConstrainPointOnObject::applyConstraint(), CmdSketcherConstrainDistanceX::applyConstraint(), CmdSketcherConstrainDistanceY::applyConstraint(), CmdSketcherConstrainParallel::applyConstraint(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), CmdSketcherConstrainRadiam::applyConstraint(), CmdSketcherConstrainAngle::applyConstraint(), CmdSketcherConstrainEqual::applyConstraint(), CmdSketcherConstrainSymmetric::applyConstraint(), TechDrawGui::QGIViewBalloon::balloonLabelDragFinished(), SurfaceGui::FillingPanel::checkOpenCommand(), SurfaceGui::FillingEdgePanel::checkOpenCommand(), SurfaceGui::FillingVertexPanel::checkOpenCommand(), SurfaceGui::GeomFillSurface::checkOpenCommand(), SurfaceGui::SectionsPanel::checkOpenCommand(), TechDrawGui::TaskRichAnno::createAnnoFeature(), SketcherGui::DrawSketchHandler::createAutoConstraints(), TechDrawGui::QGSPage::createBalloon(), TechDrawGui::TaskCenterLine::createCenterLine(), TechDrawGui::TaskCosmeticLine::createCosmeticLine(), TechDrawGui::TaskDetail::createDetail(), TechDrawGui::TaskLeaderLine::createLeaderFeature(), TechDrawGui::TaskSectionView::createSectionView(), TechDrawGui::QGIViewDimension::datumLabelDragFinished(), SpreadsheetGui::SheetTableView::deleteSelection(), PartGui::ViewProviderPart::doubleClicked(), PartDesignGui::ViewProviderBase::doubleClicked(), PartDesignGui::ViewProvider::doubleClicked(), PartDesignGui::ViewProviderDatum::doubleClicked(), SketcherGui::ViewProviderSketch::editDoubleClicked(), TechDrawGui::execHoleCircle(), SpreadsheetGui::SheetTableView::insertColumns(), SpreadsheetGui::SheetTableView::insertColumnsAfter(), SpreadsheetGui::SheetTableView::insertRows(), SpreadsheetGui::SheetTableView::insertRowsAfter(), SketcherGui::TaskSketcherConstraints::on_listWidgetConstraints_itemChanged(), SpreadsheetGui::DlgBindSheet::onDiscard(), SpreadsheetGui::SheetView::onMsg(), SpreadsheetGui::SheetTableView::onRecompute(), SketcherGui::DrawSketchHandlerCarbonCopy::onSelectionChanged(), SketcherGui::DrawSketchHandlerExternal::onSelectionChanged(), FemGui::TaskDlgMeshShapeNetgen::open(), FemGui::TaskDlgFemConstraintContact::open(), FemGui::TaskDlgFemConstraintDisplacement::open(), FemGui::TaskDlgFemConstraintFixed::open(), FemGui::TaskDlgFemConstraintFluidBoundary::open(), FemGui::TaskDlgFemConstraintForce::open(), FemGui::TaskDlgFemConstraintHeatflux::open(), FemGui::TaskDlgFemConstraintInitialTemperature::open(), FemGui::TaskDlgFemConstraintPlaneRotation::open(), FemGui::TaskDlgFemConstraintPressure::open(), FemGui::TaskDlgFemConstraintPulley::open(), FemGui::TaskDlgFemConstraintSpring::open(), FemGui::TaskDlgFemConstraintTemperature::open(), FemGui::TaskDlgFemConstraintTransform::open(), FemGui::TaskDlgPost::open(), StdCmdExpression::pasteExpressions(), SketcherGui::DrawSketchHandlerBSpline::pressButton(), DrawSketchHandlerCoincident::releaseButton(), DrawSketchHandlerBSplineInsertKnot::releaseButton(), DrawSketchHandlerCopy::releaseButton(), DrawSketchHandlerRectangularArray::releaseButton(), SketcherGui::DrawSketchHandlerArc::releaseButton(), SketcherGui::DrawSketchHandler3PointArc::releaseButton(), SketcherGui::DrawSketchHandlerArcOfEllipse::releaseButton(), SketcherGui::DrawSketchHandlerCircle::releaseButton(), SketcherGui::DrawSketchHandler3PointCircle::releaseButton(), SketcherGui::DrawSketchHandlerExtend::releaseButton(), SketcherGui::DrawSketchHandlerFillet::releaseButton(), SketcherGui::DrawSketchHandlerLine::releaseButton(), SketcherGui::DrawSketchHandlerLineSet::releaseButton(), SketcherGui::DrawSketchHandlerPoint::releaseButton(), SketcherGui::DrawSketchHandlerRegularPolygon::releaseButton(), SketcherGui::DrawSketchHandlerBox::releaseButton(), SketcherGui::DrawSketchHandlerOblong::releaseButton(), SketcherGui::DrawSketchHandlerSlot::releaseButton(), SketcherGui::DrawSketchHandlerSplitting::releaseButton(), SketcherGui::DrawSketchHandlerTrimming::releaseButton(), SketcherGui::DrawSketchHandlerArcOfHyperbola::releaseButton(), SketcherGui::DrawSketchHandlerArcOfParabola::releaseButton(), SpreadsheetGui::SheetTableView::removeColumns(), SpreadsheetGui::SheetTableView::removeRows(), TechDrawGui::MDIViewPage::saveDXF(), SpreadsheetGui::WorkbenchHelper::setBackgroundColor(), SpreadsheetGui::WorkbenchHelper::setForegroundColor(), PartDesignGui::ViewProviderShapeBinder::setupContextMenu(), Gui::ViewProviderDocumentObject::startDefaultEditMode(), CmdSketcherConstrainTangent::substituteConstraintCombinations(), CmdSketcherConstrainCoincident::substituteConstraintCombinations(), SketcherGui::ConstraintView::swapNamedOfSelectedItems(), TechDrawGui::TaskRichAnno::updateAnnoFeature(), TechDrawGui::TaskDetail::updateDetail(), TechDrawGui::TaskLeaderLine::updateLeaderFeature(), and TechDrawGui::TaskSectionView::updateSectionView().

◆ printCaller()

void Command::printCaller ( const char *  file,
int  line 
)
static

Print to Python console the current calling source file and line number.

References Gui::MacroManager::addLine(), Gui::MacroManager::Cmt, Gui::Application::Instance, and Gui::Application::macroManager().

Referenced by printPyCaller().

◆ printConflictingAccelerators()

◆ printPyCaller()

void Command::printPyCaller ( )
static

Print to Python console the current Python calling source file and line number.

References printCaller().

Referenced by Gui::Application::sDoCommand(), and Gui::Application::sDoCommandGui().

◆ recreateTooltip()

◆ setAppModuleName()

void Command::setAppModuleName ( const char *  s)

◆ setEnabled()

void Command::setEnabled ( bool  on)

◆ setGroupName()

void Command::setGroupName ( const char *  s)

◆ setupCheckable()

void Command::setupCheckable ( int  iMsg)

Setup checkable actions based on current TriggerSource.

References Gui::ActionGroup::actions(), TriggerAction, TriggerChildAction, TriggerNone, and triggerSource().

Referenced by Gui::PythonGroupCommand::activated().

◆ strToPython() [1/2]

const std::string Command::strToPython ( const char *  Str)

translate a string to a python string literal (needed e.g. in file names for windows...)

References Base::InterpreterSingleton::strToPython().

◆ strToPython() [2/2]

const std::string Gui::Command::strToPython ( const std::string &  Str)

◆ testActive()

◆ translatedGroupName()

QString Command::translatedGroupName ( ) const

◆ triggerSource()

TriggerSource Gui::Command::triggerSource ( ) const

Return the current command trigger source.

Referenced by Gui::GroupCommand::activated(), and setupCheckable().

◆ updateAction()

◆ updateActive()

void Command::updateActive ( void  )
static

Updates the (active) document (propagate changes)

Referenced by DrawingGui::TaskProjection::accept(), ReenGui::FitBSplineSurfaceWidget::accept(), ReenGui::PoissonWidget::accept(), SurfaceGui::TaskFilling::accept(), SurfaceGui::GeomFillSurface::accept(), SurfaceGui::TaskSections::accept(), TechDrawGui::TaskActiveView::accept(), TechDrawGui::TaskCenterLine::accept(), TechDrawGui::TaskCosmeticLine::accept(), TechDrawGui::TaskProjection::accept(), TechDrawGui::TaskSectionView::accept(), TechDrawGui::TaskWeldingSymbol::accept(), StdCmdMeasurementSimple::activated(), StdCmdTextDocument::activated(), StdCmdPart::activated(), PartGui::DlgExtrusion::apply(), CmdSketcherConstrainLock::applyConstraint(), TechDrawGui::TaskRichAnno::createAnnoFeature(), TechDrawGui::TaskCenterLine::createCenterLine(), TechDrawGui::TaskDetail::createDetail(), TechDrawGui::TaskLeaderLine::createLeaderFeature(), SketcherGui::ViewProviderSketch::forceUpdateData(), SketcherGui::ViewProviderSketch::onDelete(), TechDrawGui::MDIViewPage::onMsg(), FemGui::TaskDlgFemConstraintContact::reject(), FemGui::TaskDlgFemConstraintDisplacement::reject(), FemGui::TaskDlgFemConstraintFixed::reject(), FemGui::TaskDlgFemConstraintFluidBoundary::reject(), FemGui::TaskDlgFemConstraintForce::reject(), FemGui::TaskDlgFemConstraintHeatflux::reject(), FemGui::TaskDlgFemConstraintInitialTemperature::reject(), FemGui::TaskDlgFemConstraintPlaneRotation::reject(), FemGui::TaskDlgFemConstraintPressure::reject(), FemGui::TaskDlgFemConstraintSpring::reject(), FemGui::TaskDlgFemConstraintTemperature::reject(), FemGui::TaskDlgFemConstraintTransform::reject(), PartGui::OffsetWidget::reject(), PartGui::ThicknessWidget::reject(), SurfaceGui::TaskFilling::reject(), SurfaceGui::GeomFillSurface::reject(), SurfaceGui::TaskSections::reject(), TechDrawGui::TaskSectionView::reject(), SketcherGui::DrawSketchHandlerExtend::releaseButton(), Gui::ViewProviderLink::setupContextMenu(), SketcherGui::tryAutoRecompute(), SketcherGui::ViewProviderSketch::unsetEdit(), TechDrawGui::TaskDetail::updateDetail(), and TechDrawGui::TaskLeaderLine::updateLeaderFeature().

◆ updateAll()

void Command::updateAll ( std::list< Gui::Document * >  cList)
static

Updates the (all or listed) documents (propagate changes)

References Gui::Application::Instance, and Gui::Application::onUpdate().

Friends And Related Function Documentation

◆ CommandManager

friend class CommandManager
friend

CommandManager is a friend.

◆ LogDisabler

friend class LogDisabler
friend

Member Data Documentation

◆ bCanLog

◆ eType

int Gui::Command::eType
protected

Referenced by StdCmdRefresh::activated(), addModule(), CmdSketcherClone::CmdSketcherClone(), CmdSketcherConstrainAngle::CmdSketcherConstrainAngle(), CmdSketcherConstrainBlock::CmdSketcherConstrainBlock(), CmdSketcherConstrainCoincident::CmdSketcherConstrainCoincident(), CmdSketcherConstrainDiameter::CmdSketcherConstrainDiameter(), CmdSketcherConstrainDistance::CmdSketcherConstrainDistance(), CmdSketcherConstrainDistanceX::CmdSketcherConstrainDistanceX(), CmdSketcherConstrainDistanceY::CmdSketcherConstrainDistanceY(), CmdSketcherConstrainEqual::CmdSketcherConstrainEqual(), CmdSketcherConstrainHorizontal::CmdSketcherConstrainHorizontal(), CmdSketcherConstrainLock::CmdSketcherConstrainLock(), CmdSketcherConstrainParallel::CmdSketcherConstrainParallel(), CmdSketcherConstrainPerpendicular::CmdSketcherConstrainPerpendicular(), CmdSketcherConstrainPointOnObject::CmdSketcherConstrainPointOnObject(), CmdSketcherConstrainRadiam::CmdSketcherConstrainRadiam(), CmdSketcherConstrainRadius::CmdSketcherConstrainRadius(), CmdSketcherConstrainSymmetric::CmdSketcherConstrainSymmetric(), CmdSketcherConstrainTangent::CmdSketcherConstrainTangent(), CmdSketcherConstrainVertical::CmdSketcherConstrainVertical(), CmdSketcherCopy::CmdSketcherCopy(), CmdSketcherMove::CmdSketcherMove(), Command(), Gui::MacroCommand::MacroCommand(), Gui::PythonCommand::PythonCommand(), Gui::PythonGroupCommand::PythonGroupCommand(), StdBoxSelection::StdBoxSelection(), StdCmdDrawStyle::StdCmdDrawStyle(), StdCmdExpression::StdCmdExpression(), StdCmdFreezeViews::StdCmdFreezeViews(), StdCmdLinkActions::StdCmdLinkActions(), StdCmdLinkMakeGroup::StdCmdLinkMakeGroup(), StdCmdLinkSelectActions::StdCmdLinkSelectActions(), StdCmdTreeViewActions::StdCmdTreeViewActions(), StdCmdUserEditMode::StdCmdUserEditMode(), and testActive().

◆ sAppModule

◆ sGroup

const char* Gui::Command::sGroup
protected

Referenced by CmdSandboxEventLoop::CmdSandboxEventLoop(), CmdSandboxMeshLoader::CmdSandboxMeshLoader(), CmdSketcherClone::CmdSketcherClone(), CmdSketcherConstrainAngle::CmdSketcherConstrainAngle(), CmdSketcherConstrainBlock::CmdSketcherConstrainBlock(), CmdSketcherConstrainCoincident::CmdSketcherConstrainCoincident(), CmdSketcherConstrainDiameter::CmdSketcherConstrainDiameter(), CmdSketcherConstrainDistance::CmdSketcherConstrainDistance(), CmdSketcherConstrainDistanceX::CmdSketcherConstrainDistanceX(), CmdSketcherConstrainDistanceY::CmdSketcherConstrainDistanceY(), CmdSketcherConstrainEqual::CmdSketcherConstrainEqual(), CmdSketcherConstrainHorizontal::CmdSketcherConstrainHorizontal(), CmdSketcherConstrainLock::CmdSketcherConstrainLock(), CmdSketcherConstrainParallel::CmdSketcherConstrainParallel(), CmdSketcherConstrainPerpendicular::CmdSketcherConstrainPerpendicular(), CmdSketcherConstrainPointOnObject::CmdSketcherConstrainPointOnObject(), CmdSketcherConstrainRadiam::CmdSketcherConstrainRadiam(), CmdSketcherConstrainRadius::CmdSketcherConstrainRadius(), CmdSketcherConstrainSymmetric::CmdSketcherConstrainSymmetric(), CmdSketcherConstrainTangent::CmdSketcherConstrainTangent(), CmdSketcherConstrainVertical::CmdSketcherConstrainVertical(), CmdSketcherCopy::CmdSketcherCopy(), CmdSketcherMove::CmdSketcherMove(), Command(), Gui::MacroCommand::MacroCommand(), Gui::PythonCommand::PythonCommand(), Gui::PythonGroupCommand::PythonGroupCommand(), setGroupName(), StdBoxSelection::StdBoxSelection(), Gui::StdCmdDescription::StdCmdDescription(), Gui::StdCmdDownloadOnlineHelp::StdCmdDownloadOnlineHelp(), StdCmdDrawStyle::StdCmdDrawStyle(), StdCmdExpression::StdCmdExpression(), StdCmdFreezeViews::StdCmdFreezeViews(), StdCmdLinkActions::StdCmdLinkActions(), StdCmdLinkMakeGroup::StdCmdLinkMakeGroup(), StdCmdLinkSelectActions::StdCmdLinkSelectActions(), Gui::StdCmdPythonHelp::StdCmdPythonHelp(), StdCmdTreeViewActions::StdCmdTreeViewActions(), and StdCmdUserEditMode::StdCmdUserEditMode().

◆ sHelpUrl

const char* Gui::Command::sHelpUrl
protected

◆ sName


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