#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 *) |
Public Member Functions inherited from Gui::CommandBase | |
Action * | getAction () 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 Action * | createAction (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 |
Protected Member Functions inherited from Gui::CommandBase | |
CommandBase (const char *sMenu, const char *sToolTip=0, const char *sWhat=0, const char *sStatus=0, const char *sPixmap=0, const char *sAccel=0) | |
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... | |
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 to get important classes | |
Gui::Document * | getActiveGuiDocument (void) const |
Get pointer to the active gui document. More... | |
App::Document * | getDocument (const char *Name=0) 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::DocumentObject * | getObject (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=0) const |
Get unique Feature name from the active document. More... | |
static Application * | getGuiApplication (void) |
Get pointer to the Application Window. More... | |
static Gui::SelectionSingleton & | getSelection (void) |
Get a reference to the selection. More... | |
static std::string | getObjectCmd (const char *Name, const App::Document *doc=0, const char *prefix=0, const char *postfix=0, 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=0, const char *postfix=0, 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=0) |
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... | |
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... | |
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... | |
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... | |
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
Member Enumeration Documentation
◆ CmdType
|
protected |
◆ DoCmd_Type
◆ TriggerSource
Constructor & Destructor Documentation
◆ Command()
|
protected |
References Alter3DView, AlterDoc, AlterSelection, bCanLog, eType, sAppModule, and sGroup.
◆ ~Command()
|
protectedvirtual |
Member Function Documentation
◆ abortCommand()
|
static |
Abort the Undo transaction on the active document.
References App::Application::closeActiveTransaction(), and App::GetApplication().
Referenced by ReenGui::FitBSplineSurfaceWidget::accept(), ReenGui::PoissonWidget::accept(), MeshGui::TaskSmoothing::accept(), CmdSketcherConstrainBlock::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), SpreadsheetGui::PropertiesDialog::apply(), CmdSketcherConstrainBlock::applyConstraint(), CmdSketcherConstrainCoincident::applyConstraint(), CmdSketcherConstrainPointOnObject::applyConstraint(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), PartDesignGui::ViewProvider::doubleClicked(), PartDesignGui::ViewProviderBase::doubleClicked(), SketcherGui::makeTangentToArcOfEllipseviaNewPoint(), SketcherGui::makeTangentToArcOfHyperbolaviaNewPoint(), SketcherGui::makeTangentToArcOfParabolaviaNewPoint(), SketcherGui::makeTangentToEllipseviaNewPoint(), SketcherGui::TaskSketcherConstrains::on_listWidgetConstraints_itemChanged(), DrawSketchHandlerExternal::onSelectionChanged(), DrawSketchHandlerCarbonCopy::onSelectionChanged(), StdCmdExpression::pasteExpressions(), DrawSketchHandlerBSpline::pressButton(), DrawSketchHandlerBSpline::quit(), PartGui::OffsetWidget::reject(), PartGui::ThicknessWidget::reject(), FemGui::TaskDlgCreateNodeSet::reject(), FemGui::TaskDlgMeshShapeNetgen::reject(), TechDrawGui::TaskProjGroup::reject(), FemGui::TaskDlgFemConstraintInitialTemperature::reject(), FemGui::TaskDlgFemConstraintFixed::reject(), SurfaceGui::GeomFillSurface::reject(), FemGui::TaskDlgFemConstraintPlaneRotation::reject(), FemGui::TaskDlgFemConstraintPressure::reject(), FemGui::TaskDlgFemConstraintContact::reject(), FemGui::TaskDlgFemConstraintTemperature::reject(), FemGui::TaskDlgFemConstraintHeatflux::reject(), FemGui::TaskDlgFemConstraintTransform::reject(), FemGui::TaskDlgFemConstraintForce::reject(), PartDesignGui::TaskDlgShapeBinder::reject(), FemGui::TaskDlgFemConstraint::reject(), PartDesignGui::TaskDlgFeatureParameters::reject(), PartDesignGui::TaskDlgBooleanParameters::reject(), FemGui::TaskDlgFemConstraintDisplacement::reject(), SurfaceGui::TaskFilling::reject(), FemGui::TaskDlgFemConstraintFluidBoundary::reject(), PartDesignGui::TaskPrimitiveParameters::reject(), FemGui::TaskDlgPost::reject(), DrawSketchHandlerLine::releaseButton(), DrawSketchHandlerBox::releaseButton(), DrawSketchHandlerLineSet::releaseButton(), DrawSketchHandlerCopy::releaseButton(), DrawSketchHandlerArc::releaseButton(), DrawSketchHandlerRectangularArray::releaseButton(), DrawSketchHandler3PointArc::releaseButton(), DrawSketchHandlerCoincident::releaseButton(), DrawSketchHandlerCircle::releaseButton(), DrawSketchHandlerArcOfEllipse::releaseButton(), DrawSketchHandlerArcOfHyperbola::releaseButton(), DrawSketchHandlerArcOfParabola::releaseButton(), DrawSketchHandlerBSpline::releaseButton(), DrawSketchHandler3PointCircle::releaseButton(), DrawSketchHandlerPoint::releaseButton(), DrawSketchHandlerFillet::releaseButton(), DrawSketchHandlerTrimming::releaseButton(), DrawSketchHandlerExtend::releaseButton(), DrawSketchHandlerSlot::releaseButton(), DrawSketchHandlerRegularPolygon::releaseButton(), and SpreadsheetGui::SheetModel::setData().
◆ activated()
|
protectedpure virtual |
Methods which gets called when activated, needs to be reimplemented!
Implemented in CmdSketcherConstraint, CmdSketcherConstrainSymmetric, CmdSketcherConstrainEqual, CmdSketcherConstrainAngle, CmdSketcherConstrainDiameter, CmdSketcherConstrainRadius, CmdSketcherConstrainTangent, CmdSketcherConstrainPerpendicular, StdCmdSelBoundingBox, CmdSketcherConstrainParallel, StdTreeDrag, StdCmdSelForward, CmdSketcherConstrainDistanceY, StdCmdSelBack, CmdViewMeasureToggleAll, CmdViewMeasureClearAll, StdCmdDemoMode, StdCmdTextureMapping, StdCmdSceneInspector, CmdSketcherConstrainDistanceX, StdCmdMeasureDistance, StdCmdTreeSelectAllInstances, StdCmdTreeExpand, StdCmdTreeCollapse, StdTreeSelection, StdBoxElementSelection, CmdSketcherConstrainPointOnObject, StdBoxSelection, StdViewBoxZoom, StdViewZoomOut, StdViewZoomIn, StdCmdViewIvIssueCamPos, CmdSketcherConstrainDistance, StdCmdViewIvStereoInterleavedColumns, StdCmdViewIvStereoInterleavedRows, StdCmdViewIvStereoQuadBuff, StdCmdViewIvStereoRedGreen, StdCmdViewIvStereoOff, StdCmdViewExample3, CmdSketcherConstrainCoincident, StdCmdViewExample2, StdCmdViewExample1, StdCmdAxisCross, StdCmdToggleNavigation, StdCmdViewCreate, CmdSketcherConstrainBlock, StdViewScreenShot, StdCmdViewVR, CmdSketcherConstrainLock, StdViewDockUndockFullscreen, StdCmdExpression, StdViewFullscreen, StdMainFullscreen, StdCmdEdit, CmdSketcherMove, StdViewUndock, CmdSketcherClone, StdViewDock, StdCmdAlignment, ViewZoomToFitCmd, StdCmdViewFitSelection, CmdSketcherCopy, ViewPerspectiveCmd, StdCmdTransformManip, StdCmdViewFitAll, ViewOrthographicCmd, StdCmdPlacement, StdCmdViewRotateRight, ViewIsometricCmd, StdCmdTransform, StdCmdViewRotateLeft, CmdSketcherConstrainVertical, StdCmdViewTrimetric, StdCmdViewDimetric, StdCmdRefresh, StdCmdViewIsometric, StdCmdViewTop, StdCmdViewRight, StdCmdViewRear, StdCmdViewLeft, StdCmdViewFront, StdCmdViewBottom, StdCmdDelete, StdCmdSetAppearance, CmdSketcherConstrainHorizontal, StdCmdSelectAll, StdCmdHideObjects, StdCmdShowObjects, StdCmdDuplicateSelection, StdCmdToggleObjects, StdCmdPaste, StdCmdSelectVisibleObjects, StdCmdCopy, StdCmdHideSelection, StdCmdCut, StdCmdShowSelection, StdCmdRedo, StdCmdToggleSelectability, StdCmdLinkSelectAllLinks, StdCmdUndo, StdCmdToggleVisibility, Gui::MacroCommand, StdCmdQuit, StdCmdLinkSelectLinkedFinal, StdCmdPrintPdf, StdCmdUnitsCalculator, Gui::PythonGroupCommand, StdCmdPrintPreview, CmdTestConsoleOutput, StdCmdTextDocument, CmdTestMDI3, StdCmdPrint, Gui::PythonCommand, CmdTestMDI2, StdCmdProjectUtil, StdCmdMeasurementSimple, Gui::GroupCommand, StdCmdLinkSelectLinked, CmdTestMDI1, StdCmdPythonWebsite, StdCmdProjectInfo, StdCmdLinkImportAll, StdCmdFreeCADFAQ, StdCmdRevert, StdCmdDrawStyle, StdCmdFreeCADForum, StdCmdSaveAll, CmdSandboxMeshLoader, CmdTestProgress5, StdCmdLinkImport, StdCmdFreeCADPowerUserHub, StdCmdSaveCopy, StdCmdLinkUnlink, StdCmdFreeCADUserHub, CmdSandboxEventLoop, StdCmdToggleClipPlane, CmdTestProgress4, StdCmdLinkReplace, StdCmdFreeCADWebsite, StdCmdSaveAs, StdCmdOnlineHelpWebsite, StdCmdSave, StdCmdWindowsMenu, StdCmdOnlineHelp, CmdTestProgress3, StdCmdNew, StdCmdStatusBar, CmdTestProgress2, StdCmdCommandLine, StdCmdDependencyGraph, StdCmdDlgCustomize, CmdTestProgress1, StdCmdToolBarMenu, StdCmdMergeProjects, StdCmdDlgPreferences, StdCmdDlgParameter, StdCmdDockViewMenu, StdCmdToggleBreakpoint, CmdTestCmdFuncs, StdCmdWhatsThis, StdCmdUserInterface, StdCmdLinkMakeRelative, StdCmdMacroStepInto, FCCmdTest6, StdCmdExport, StdCmdAboutQt, StdCmdWindows, StdCmdMacroStepOver, FCCmdTest5, StdCmdActivatePrevWindow, StdCmdFreezeViews, StdCmdMacroStopDebug, StdCmdLinkMake, FCCmdTest4, StdCmdActivateNextWindow, StdCmdMacroStartDebug, StdCmdAbout, FCCmdTest3, StdCmdImport, StdCmdCloseAllWindows, StdCmdMacroAttachDebugger, StdPerspectiveCamera, FCCmdTest2, StdCmdRecentFiles, StdCmdCloseActiveWindow, StdCmdDlgMacroExecuteDirect, FCCmdTest1, Gui::StdCmdPythonHelp, Gui::StdCmdDownloadOnlineHelp, StdCmdCascadeWindows, StdCmdDlgMacroExecute, StdOrthographicCamera, Std_TestReloadQM, Gui::StdCmdDescription, StdCmdOpen, StdCmdGroup, StdCmdTileWindows, StdCmdWorkbench, StdCmdMacroStopRecord, StdCmdLinkMakeGroup, Std_TestQM, StdCmdArrangeIcons, StdCmdPart, and StdCmdDlgMacroRecord.
Referenced by invoke().
◆ addModule()
|
static |
import an external (or own) module only once
References Gui::MacroManager::addLine(), Gui::MacroManager::App, eType, Gui::MacroManager::Gui, Gui::Application::Instance, Base::Interpreter(), Gui::Application::macroManager(), and Base::InterpreterSingleton::runString().
Referenced by DrawingGui::TaskProjection::accept(), ReenGui::FitBSplineSurfaceWidget::accept(), ReenGui::PoissonWidget::accept(), FemGui::ViewProviderFemAnalysis::doubleClicked(), Gui::Application::sAddModule(), and SketcherGui::ViewProviderSketch::setEdit().
◆ addTo()
void Command::addTo | ( | QWidget * | pcWidget | ) |
adds this command to arbitrary widgets
References createAction(), and testActive().
Referenced by Gui::CommandManager::addTo(), Gui::MDITabbar::contextMenuEvent(), NaviCubeImplementation::createContextMenu(), Gui::MainWindow::createPopupMenu(), Mod.PartDesign.WizardShaft.Shaft.Shaft::equilibrium(), Gui::TaskView::TaskWatcherCommands::TaskWatcherCommands(), and Gui::TaskView::TaskWatcherPython::TaskWatcherPython().
◆ addToGroup() [1/2]
void Command::addToGroup | ( | ActionGroup * | group | ) |
References createAction(), and testActive().
◆ addToGroup() [2/2]
void Command::addToGroup | ( | ActionGroup * | group, |
bool | checkable | ||
) |
Referenced by StdViewDockUndockFullscreen::createAction().
◆ adjustCameraPosition()
void Command::adjustCameraPosition | ( | ) |
◆ applyCommandData()
|
protected |
Applies the menu text, tool and status tip to the passed action object.
References Gui::CommandBase::getMenuText(), Gui::CommandBase::getStatusTip(), Gui::CommandBase::getToolTipText(), Gui::CommandBase::getWhatsThis(), and Gui::CommandBase::sStatusTip.
Referenced by StdCmdLinkMakeGroup::createAction(), StdCmdFreezeViews::createAction(), createAction(), StdCmdDrawStyle::createAction(), Gui::PythonCommand::createAction(), Gui::PythonGroupCommand::createAction(), StdCmdUndo::createAction(), StdCmdRedo::createAction(), StdCmdExpression::createAction(), languageChange(), Gui::PythonCommand::languageChange(), and Gui::PythonGroupCommand::languageChange().
◆ beginCmdHelp()
const char * Command::beginCmdHelp | ( | void | ) |
returns the begin of a online help page
◆ blockCommand()
|
static |
Blocks all command objects.
◆ commitCommand()
|
static |
Commit the Undo transaction on the active document.
References App::Application::closeActiveTransaction(), and App::GetApplication().
Referenced by PartGui::OffsetWidget::accept(), PartGui::ThicknessWidget::accept(), DrawingGui::TaskProjection::accept(), FemGui::TaskDlgMeshShapeNetgen::accept(), TechDrawGui::TaskActiveView::accept(), FemGui::TaskDlgFemConstraintInitialTemperature::accept(), SurfaceGui::GeomFillSurface::accept(), ReenGui::FitBSplineSurfaceWidget::accept(), ReenGui::PoissonWidget::accept(), MeshGui::TaskDecimating::accept(), PartDesignGui::TaskDlgShapeBinder::accept(), FemGui::TaskDlgFemConstraint::accept(), PartDesignGui::TaskDlgFeatureParameters::accept(), PartDesignGui::TaskDlgBooleanParameters::accept(), MeshGui::TaskSmoothing::accept(), SurfaceGui::TaskFilling::accept(), TechDrawGui::TaskWeldingSymbol::accept(), PartDesignGui::TaskDlgPipeParameters::accept(), CmdSketcherConstrainHorizontal::activated(), StdCmdDelete::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainBlock::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainSymmetric::activated(), 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(), CmdSketcherConstrainEqual::applyConstraint(), CmdSketcherConstrainSymmetric::applyConstraint(), TechDrawGui::QGIViewBalloon::balloonLabelDragged(), TechDrawGui::TaskRichAnno::createAnnoFeature(), SketcherGui::DrawSketchHandler::createAutoConstraints(), TechDrawGui::TaskCenterLine::createCenterLine(), TechDrawGui::TaskDetail::createDetail(), TechDrawGui::TaskLeaderLine::createLeaderFeature(), TechDrawGui::TaskSectionView::createSectionView(), TechDrawGui::QGIViewDimension::datumLabelDragFinished(), SpreadsheetGui::SheetTableView::deleteSelection(), SpreadsheetGui::SheetTableView::insertColumns(), SpreadsheetGui::SheetTableView::insertRows(), SketcherGui::makeTangentToArcOfEllipseviaNewPoint(), SketcherGui::makeTangentToArcOfHyperbolaviaNewPoint(), SketcherGui::makeTangentToArcOfParabolaviaNewPoint(), SketcherGui::makeTangentToEllipseviaNewPoint(), TechDrawGui::QGVPage::mouseReleaseEvent(), SketcherGui::TaskSketcherConstrains::on_listWidgetConstraints_itemChanged(), SpreadsheetGui::SheetView::onMsg(), DrawSketchHandlerExternal::onSelectionChanged(), DrawSketchHandlerCarbonCopy::onSelectionChanged(), StdCmdExpression::pasteExpressions(), DrawSketchHandlerLine::releaseButton(), DrawSketchHandlerBox::releaseButton(), DrawSketchHandlerLineSet::releaseButton(), DrawSketchHandlerCopy::releaseButton(), DrawSketchHandlerArc::releaseButton(), DrawSketchHandlerRectangularArray::releaseButton(), DrawSketchHandler3PointArc::releaseButton(), DrawSketchHandlerCoincident::releaseButton(), DrawSketchHandlerCircle::releaseButton(), DrawSketchHandlerArcOfEllipse::releaseButton(), DrawSketchHandlerArcOfHyperbola::releaseButton(), DrawSketchHandlerArcOfParabola::releaseButton(), DrawSketchHandlerBSpline::releaseButton(), DrawSketchHandler3PointCircle::releaseButton(), DrawSketchHandlerPoint::releaseButton(), DrawSketchHandlerFillet::releaseButton(), DrawSketchHandlerTrimming::releaseButton(), DrawSketchHandlerExtend::releaseButton(), DrawSketchHandlerSlot::releaseButton(), DrawSketchHandlerRegularPolygon::releaseButton(), SpreadsheetGui::SheetTableView::removeColumns(), SpreadsheetGui::SheetTableView::removeRows(), TechDrawGui::MDIViewPage::saveDXF(), SpreadsheetGui::WorkbenchHelper::setBackgroundColor(), SpreadsheetGui::SheetModel::setData(), SpreadsheetGui::WorkbenchHelper::setForegroundColor(), SketcherGui::ConstraintView::swapNamedOfSelectedItems(), TechDrawGui::TaskRichAnno::updateAnnoFeature(), TechDrawGui::TaskCenterLine::updateCenterLine(), TechDrawGui::TaskDetail::updateDetail(), and TechDrawGui::TaskLeaderLine::updateLeaderFeature().
◆ createAction()
|
protectedvirtual |
Creates the used Action.
Reimplemented from Gui::CommandBase.
Reimplemented in StdCmdSelBoundingBox, StdCmdExpression, StdViewDockUndockFullscreen, StdCmdRedo, StdCmdUndo, Gui::MacroCommand, Gui::PythonGroupCommand, Gui::PythonCommand, Gui::GroupCommand, StdCmdDrawStyle, StdCmdToggleClipPlane, StdCmdWindowsMenu, StdCmdStatusBar, StdCmdToolBarMenu, StdCmdDlgPreferences, StdCmdDockViewMenu, StdCmdFreezeViews, StdCmdAbout, StdPerspectiveCamera, StdCmdRecentFiles, StdOrthographicCamera, Gui::StdCmdDescription, StdCmdWorkbench, StdCmdLinkMakeGroup, and Gui::StdCmdDownloadOnlineHelp.
References applyCommandData(), Gui::BitmapFactory(), Gui::CommandBase::className(), Gui::getMainWindow(), Gui::CommandBase::sAccel, Gui::Action::setIcon(), Gui::Action::setShortcut(), and Gui::CommandBase::sPixmap.
Referenced by addTo(), addToGroup(), Gui::StdCmdDescription::createAction(), StdOrthographicCamera::createAction(), StdPerspectiveCamera::createAction(), StdCmdDlgPreferences::createAction(), and StdCmdStatusBar::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(), StdCmdDrawStyle::activated(), StdCmdProjectInfo::activated(), CmdSketcherConstrainHorizontal::activated(), StdCmdRefresh::activated(), CmdSketcherConstrainVertical::activated(), StdCmdTransformManip::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainBlock::activated(), StdCmdViewCreate::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainSymmetric::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(), 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(), CmdSketcherCopy::isActive(), CmdSketcherClone::isActive(), CmdSketcherMove::isActive(), and StdCmdViewCreate::isActive().
◆ getAppModuleName()
const char* Gui::Command::getAppModuleName | ( | void | ) | const |
returns the name to which the command belongs
◆ getDocument()
App::Document * Command::getDocument | ( | const char * | Name = 0 | ) | 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.
NULL is returned when the name does not exist or no document is active!
References Gui::Application::activeDocument(), App::GetApplication(), App::Application::getDocument(), Gui::Document::getDocument(), and getGuiApplication().
Referenced by StdCmdImport::activated(), StdCmdExport::activated(), StdCmdProjectInfo::activated(), TechDrawGui::DrawGuiUtil::findPage(), getObject(), hasObject(), StdCmdRefresh::isActive(), TechDrawGui::DrawGuiUtil::needPage(), and TechDrawGui::DrawGuiUtil::needView().
◆ getGroupName()
const char* Gui::Command::getGroupName | ( | ) | const |
Get the name of the grouping of the command.
Referenced by Gui::Dialog::CommandModel::data().
◆ getGuiApplication()
|
static |
Get pointer to the Application Window.
References Gui::Application::Instance.
Referenced by StdCmdOpen::activated(), StdCmdImport::activated(), StdCmdFreezeViews::activated(), StdCmdExport::activated(), StdCmdUndo::activated(), StdCmdRedo::activated(), StdCmdCut::activated(), StdCmdCopy::activated(), StdCmdPaste::activated(), StdCmdDelete::activated(), StdCmdViewIvIssueCamPos::activated(), getActiveGuiDocument(), getDocument(), invoke(), StdCmdSave::isActive(), StdCmdSaveAs::isActive(), StdCmdPrint::isActive(), StdCmdPrintPreview::isActive(), StdCmdPrintPdf::isActive(), StdCmdUndo::isActive(), StdCmdRedo::isActive(), StdCmdCut::isActive(), StdCmdCopy::isActive(), StdCmdPaste::isActive(), StdCmdViewFitAll::isActive(), StdCmdViewFitSelection::isActive(), StdCmdViewVR::isActive(), StdCmdViewExample1::isActive(), StdCmdViewExample2::isActive(), StdCmdViewExample3::isActive(), StdCmdViewIvStereoOff::isActive(), StdCmdViewIvStereoRedGreen::isActive(), StdCmdViewIvStereoQuadBuff::isActive(), StdCmdViewIvStereoInterleavedRows::isActive(), StdCmdViewIvStereoInterleavedColumns::isActive(), StdCmdViewIvIssueCamPos::isActive(), isViewOfType(), and StdCmdDrawStyle::StdCmdDrawStyle().
◆ getHelpUrl()
|
virtual |
Get the help URL.
Reimplemented in Gui::PythonGroupCommand, and Gui::PythonCommand.
◆ getName()
const char* Gui::Command::getName | ( | ) | const |
Get the command name.
Referenced by StdCmdImport::activated(), StdCmdExport::activated(), StdCmdDelete::activated(), Gui::CommandManager::addCommand(), Gui::PythonCommand::createAction(), Gui::PythonGroupCommand::createAction(), Gui::Dialog::CommandModel::data(), Gui::PythonCommand::getWhatsThis(), Gui::PythonGroupCommand::getWhatsThis(), invoke(), Gui::PythonCommand::languageChange(), Gui::PythonGroupCommand::languageChange(), Gui::Dialog::DlgCustomKeyboardImp::on_editShortcut_textChanged(), Gui::CommandManager::removeCommand(), Gui::MacroCommand::save(), Gui::Dialog::DlgCustomKeyboardImp::setShortcutOfCurrentAction(), and Gui::GroupCommand::setup().
◆ getObject()
App::DocumentObject * Command::getObject | ( | const char * | Name | ) | const |
returns the named feature or the active one from the active document or NULL
References getDocument(), and App::Document::getObject().
Referenced by CmdSketcherConstrainHorizontal::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainEqual::activated(), and CmdSketcherConstrainSymmetric::activated().
◆ getObjectCmd() [1/2]
|
static |
returns a python command string to retrieve the given object
References getObjectCmd(), and Draft::gui.
◆ getObjectCmd() [2/2]
|
static |
returns a python command string to retrieve an object from a document
References App::Application::getActiveDocument(), App::GetApplication(), and Draft::gui.
Referenced by PartDesignGui::TaskDlgBooleanParameters::accept(), PartDesignGui::TaskDlgDressUpParameters::accept(), PartDesignGui::TaskDlgMultiTransformParameters::accept(), StdCmdLinkMakeRelative::activated(), Gui::ExpressionBinding::apply(), PartDesignGui::buildLinkListPythonStr(), PartDesignGui::buildLinkSingleSubPythonStr(), PartDesignGui::buildLinkSubListPythonStr(), PartDesignGui::ViewProviderDatum::doubleClicked(), PartDesignGui::ViewProviderBody::doubleClicked(), Gui::TreeWidget::dropEvent(), PartDesignGui::fixSketchSupport(), Gui::SelectionObject::getAsPropertyLinkSubString(), PartDesignGui::getBody(), getObjectCmd(), Gui::TreeWidget::mouseDoubleClickEvent(), PartDesignGui::ViewProvider::onDelete(), DrawSketchHandlerBox::releaseButton(), DrawSketchHandlerBSpline::releaseButton(), DrawSketchHandlerSlot::releaseButton(), DrawSketchHandlerRegularPolygon::releaseButton(), PartDesignGui::relinkToBody(), PartDesignGui::setEdit(), SketcherGui::ViewProviderSketch::setEdit(), PartDesignGui::TaskBoxPrimitives::setPrimitive(), and PartDesignGui::TaskPrimitiveParameters::TaskPrimitiveParameters().
◆ getPythonTuple()
|
static |
Get Python tuple from object and sub-elements.
◆ getSelection()
|
static |
Get a reference to the selection.
References Gui::Selection().
Referenced by SketcherCopy::activate(), 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(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainSymmetric::activated(), CmdSketcherConstrainPerpendicular::applyConstraint(), CmdSketcherConstrainTangent::applyConstraint(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), CmdSketcherConstrainSymmetric::applyConstraint(), TechDrawGui::DrawGuiUtil::findPage(), and femguiutils.selection_widgets._Selector::setHelpText().
◆ getUniqueObjectName()
std::string Command::getUniqueObjectName | ( | const char * | BaseName, |
const App::DocumentObject * | obj = 0 |
||
) | const |
Get unique Feature name from the active document.
- Parameters
-
BaseName the base name obj if not zero, then request the unique name in the document of the given object.
References App::Application::getActiveDocument(), and App::GetApplication().
◆ hasActiveDocument()
bool Command::hasActiveDocument | ( | void | ) | const |
true when there is a document
References getActiveGuiDocument().
Referenced by StdCmdMergeProjects::isActive(), CmdSandboxMeshLoader::isActive(), TechDrawGui::DrawGuiUtil::needPage(), and TechDrawGui::DrawGuiUtil::needView().
◆ 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()
|
static |
Check if an Undo transaction is open on the active document.
References App::Application::getActiveTransaction(), and App::GetApplication().
Referenced by SurfaceGui::FillingUnboundPanel::checkOpenCommand(), SurfaceGui::FillingVertexPanel::checkOpenCommand(), SurfaceGui::GeomFillSurface::checkOpenCommand(), SurfaceGui::FillingPanel::checkOpenCommand(), FemGui::TaskDlgMeshShapeNetgen::open(), FemGui::TaskDlgFemConstraintInitialTemperature::open(), FemGui::TaskDlgFemConstraintFixed::open(), FemGui::TaskDlgFemConstraintPlaneRotation::open(), FemGui::TaskDlgFemConstraintPressure::open(), FemGui::TaskDlgFemConstraintContact::open(), FemGui::TaskDlgFemConstraintTemperature::open(), FemGui::TaskDlgFemConstraintHeatflux::open(), FemGui::TaskDlgFemConstraintTransform::open(), FemGui::TaskDlgFemConstraintForce::open(), FemGui::TaskDlgFemConstraintPulley::open(), FemGui::TaskDlgFemConstraintDisplacement::open(), FemGui::TaskDlgFemConstraintFluidBoundary::open(), TechDrawGui::TaskProjGroup::reject(), TechDrawGui::TaskRichAnno::removeFeature(), and TechDrawGui::TaskLeaderLine::removeFeature().
◆ invoke()
void Command::invoke | ( | int | index, |
TriggerSource | trigger = TriggerNone |
||
) |
Called to invoke the command.
- Parameters
-
index in case of group command, this is the index of the child command. For checkable command, this indicates the checkable state. trigger indicate the command triggering source, see TriggerSource.
References activated(), AlterDoc, Gui::MacroManager::App, bCanLog, PendingLine::cancel(), Gui::MacroManager::Cmt, Base::Console(), Gui::CommandBase::displayText, Gui::Application::editDocument(), Base::ConsoleSingleton::Error(), eType, getGuiApplication(), Gui::getMainWindow(), Gui::CommandBase::getMenuText(), getName(), Gui::MacroManager::Gui, isActive(), Base::ConsoleSingleton::Log(), Gui::Application::macroManager(), NoTransaction, sAppModule, App::AutoTransaction::setEnable(), Gui::MacroManager::setModule(), sName, and Gui::MainWindow::updateActions().
Referenced by Gui::PythonGroupCommand::activated(), Gui::Dialog::DemoMode::on_fullscreen_toggled(), Gui::CommandManager::runCommandByName(), and Gui::Application::sRunCommand().
◆ isActive()
|
virtual |
Override this method if your Cmd is not always active.
Reimplemented in StdCmdSelBoundingBox, StdCmdSelForward, StdCmdSelBack, StdCmdTextureMapping, StdCmdSceneInspector, StdCmdMeasureDistance, StdCmdTreeSelectAllInstances, StdBoxElementSelection, StdBoxSelection, StdViewBoxZoom, StdViewZoomOut, StdViewZoomIn, StdCmdViewIvIssueCamPos, StdCmdViewIvStereoInterleavedColumns, StdCmdViewIvStereoInterleavedRows, StdCmdViewIvStereoQuadBuff, StdCmdViewIvStereoRedGreen, StdCmdViewIvStereoOff, StdCmdViewExample3, StdCmdViewExample2, StdCmdViewExample1, StdCmdAxisCross, StdCmdToggleNavigation, StdCmdViewCreate, StdViewScreenShot, StdCmdViewVR, StdViewDockUndockFullscreen, StdViewFullscreen, StdCmdEdit, CmdSketcherMove, StdViewUndock, CmdSketcherClone, StdViewDock, StdCmdAlignment, ViewZoomToFitCmd, StdCmdViewFitSelection, CmdSketcherCopy, ViewPerspectiveCmd, StdCmdTransformManip, StdCmdViewFitAll, ViewOrthographicCmd, StdCmdPlacement, StdCmdViewRotateRight, ViewIsometricCmd, StdCmdTransform, StdCmdViewRotateLeft, StdCmdViewTrimetric, StdCmdViewDimetric, StdCmdRefresh, StdCmdViewIsometric, StdCmdViewTop, StdCmdViewRight, StdCmdViewRear, StdCmdViewLeft, StdCmdViewFront, StdCmdViewBottom, StdCmdDelete, StdCmdSetAppearance, StdCmdSelectAll, StdCmdHideObjects, StdCmdShowObjects, StdCmdDuplicateSelection, StdCmdToggleObjects, StdCmdPaste, StdCmdSelectVisibleObjects, StdCmdCopy, StdCmdHideSelection, StdCmdCut, StdCmdShowSelection, StdCmdRedo, StdCmdToggleSelectability, CmdSketcherConstraint, StdCmdLinkSelectAllLinks, StdCmdUndo, StdCmdToggleVisibility, StdCmdLinkSelectLinkedFinal, StdCmdPrintPdf, Gui::PythonGroupCommand, StdCmdPrintPreview, StdCmdTextDocument, CmdTestMDI3, StdCmdPrint, Gui::PythonCommand, CmdTestMDI2, StdCmdProjectUtil, StdCmdLinkSelectLinked, CmdTestMDI1, StdCmdProjectInfo, StdCmdLinkImportAll, StdCmdRevert, StdCmdDrawStyle, StdCmdSaveAll, CmdSandboxMeshLoader, CmdTestProgress5, StdCmdLinkImport, StdCmdSaveCopy, StdCmdLinkUnlink, CmdSandboxEventLoop, StdCmdToggleClipPlane, CmdTestProgress4, StdCmdLinkReplace, StdCmdSaveAs, StdCmdSave, StdCmdWindowsMenu, CmdTestProgress3, StdCmdStatusBar, CmdTestProgress2, StdCmdDependencyGraph, CmdTestProgress1, StdCmdToolBarMenu, StdCmdMergeProjects, StdCmdDockViewMenu, StdCmdToggleBreakpoint, CmdTestCmdFuncs, StdCmdLinkMakeRelative, StdCmdMacroStepInto, FCCmdTest6, StdCmdExport, StdCmdMacroStepOver, FCCmdTest5, StdCmdActivatePrevWindow, StdCmdFreezeViews, StdCmdMacroStopDebug, StdCmdLinkMake, FCCmdTest4, StdCmdActivateNextWindow, StdCmdMacroStartDebug, StdCmdAbout, FCCmdTest3, StdCmdImport, StdCmdCloseAllWindows, StdCmdMacroAttachDebugger, StdPerspectiveCamera, FCCmdTest2, StdCmdCloseActiveWindow, StdCmdDlgMacroExecuteDirect, FCCmdTest1, StdCmdCascadeWindows, StdCmdDlgMacroExecute, StdOrthographicCamera, StdCmdGroup, StdCmdTileWindows, StdCmdWorkbench, StdCmdLinkMakeGroup, StdCmdMacroStopRecord, StdCmdArrangeIcons, StdCmdPart, StdCmdDlgMacroRecord, and StdCmdExpression.
Referenced by Gui::Workbench::createLinkMenu(), invoke(), Gui::Application::sIsCommandActive(), and testActive().
◆ isActiveObjectValid()
|
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()
|
protected |
◆ languageChange()
|
virtual |
Translate command.
Implements Gui::CommandBase.
Reimplemented in Gui::MacroCommand, Gui::PythonGroupCommand, Gui::PythonCommand, Gui::GroupCommand, StdCmdDrawStyle, StdCmdFreezeViews, StdCmdAbout, Gui::StdCmdDownloadOnlineHelp, and StdCmdLinkMakeGroup.
References applyCommandData(), and Gui::CommandBase::className().
◆ openCommand()
|
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(), TechDrawGui::TaskActiveView::accept(), ReenGui::FitBSplineSurfaceWidget::accept(), ReenGui::PoissonWidget::accept(), MeshGui::TaskDecimating::accept(), MeshGui::TaskSmoothing::accept(), TechDrawGui::TaskWeldingSymbol::accept(), CmdSketcherConstrainHorizontal::activated(), StdCmdDelete::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(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainSymmetric::activated(), SpreadsheetGui::PropertiesDialog::apply(), TechDrawGui::TaskSectionView::applyAligned(), 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(), CmdSketcherConstrainAngle::applyConstraint(), CmdSketcherConstrainEqual::applyConstraint(), CmdSketcherConstrainSymmetric::applyConstraint(), TechDrawGui::TaskSectionView::applyQuick(), TechDrawGui::QGIViewBalloon::balloonLabelDragged(), SurfaceGui::FillingUnboundPanel::checkOpenCommand(), SurfaceGui::FillingVertexPanel::checkOpenCommand(), SurfaceGui::GeomFillSurface::checkOpenCommand(), SurfaceGui::FillingPanel::checkOpenCommand(), TechDrawGui::TaskRichAnno::createAnnoFeature(), SketcherGui::DrawSketchHandler::createAutoConstraints(), TechDrawGui::TaskCenterLine::createCenterLine(), TechDrawGui::TaskDetail::createDetail(), TechDrawGui::TaskLeaderLine::createLeaderFeature(), TechDrawGui::TaskSectionView::createSectionView(), TechDrawGui::QGIViewDimension::datumLabelDragFinished(), SpreadsheetGui::SheetTableView::deleteSelection(), PartGui::ViewProviderPart::doubleClicked(), PartDesignGui::ViewProviderDatum::doubleClicked(), PartDesignGui::ViewProvider::doubleClicked(), PartDesignGui::ViewProviderBase::doubleClicked(), SketcherGui::ViewProviderSketch::editDoubleClicked(), SpreadsheetGui::SheetTableView::insertColumns(), SpreadsheetGui::SheetTableView::insertRows(), TechDrawGui::QGVPage::mouseReleaseEvent(), SketcherGui::TaskSketcherConstrains::on_listWidgetConstraints_itemChanged(), SpreadsheetGui::SheetView::onMsg(), DrawSketchHandlerExternal::onSelectionChanged(), DrawSketchHandlerCarbonCopy::onSelectionChanged(), FemGui::TaskDlgMeshShapeNetgen::open(), FemGui::TaskDlgFemConstraintInitialTemperature::open(), FemGui::TaskDlgFemConstraintFixed::open(), FemGui::TaskDlgFemConstraintPlaneRotation::open(), FemGui::TaskDlgFemConstraintPressure::open(), FemGui::TaskDlgFemConstraintContact::open(), FemGui::TaskDlgFemConstraintTemperature::open(), FemGui::TaskDlgFemConstraintHeatflux::open(), FemGui::TaskDlgFemConstraintTransform::open(), FemGui::TaskDlgFemConstraintForce::open(), FemGui::TaskDlgFemConstraintPulley::open(), FemGui::TaskDlgFemConstraintDisplacement::open(), FemGui::TaskDlgFemConstraintFluidBoundary::open(), FemGui::TaskDlgPost::open(), StdCmdExpression::pasteExpressions(), DrawSketchHandlerBSpline::pressButton(), DrawSketchHandlerLine::releaseButton(), DrawSketchHandlerBox::releaseButton(), DrawSketchHandlerLineSet::releaseButton(), DrawSketchHandlerCopy::releaseButton(), DrawSketchHandlerArc::releaseButton(), DrawSketchHandlerRectangularArray::releaseButton(), DrawSketchHandler3PointArc::releaseButton(), DrawSketchHandlerCoincident::releaseButton(), DrawSketchHandlerCircle::releaseButton(), DrawSketchHandlerArcOfEllipse::releaseButton(), DrawSketchHandlerArcOfHyperbola::releaseButton(), DrawSketchHandlerArcOfParabola::releaseButton(), DrawSketchHandler3PointCircle::releaseButton(), DrawSketchHandlerPoint::releaseButton(), DrawSketchHandlerFillet::releaseButton(), DrawSketchHandlerTrimming::releaseButton(), DrawSketchHandlerExtend::releaseButton(), DrawSketchHandlerSlot::releaseButton(), DrawSketchHandlerRegularPolygon::releaseButton(), SpreadsheetGui::SheetTableView::removeColumns(), SpreadsheetGui::SheetTableView::removeRows(), TechDrawGui::MDIViewPage::saveDXF(), SpreadsheetGui::WorkbenchHelper::setBackgroundColor(), SpreadsheetGui::SheetModel::setData(), SpreadsheetGui::WorkbenchHelper::setForegroundColor(), SketcherGui::ConstraintView::swapNamedOfSelectedItems(), TechDrawGui::TaskRichAnno::updateAnnoFeature(), TechDrawGui::TaskCenterLine::updateCenterLine(), TechDrawGui::TaskDetail::updateDetail(), and TechDrawGui::TaskLeaderLine::updateLeaderFeature().
◆ printCaller()
|
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().
◆ 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().
◆ setAppModuleName()
void Command::setAppModuleName | ( | const char * | s | ) |
References sAppModule.
Referenced by Gui::Application::sAddCommand().
◆ setEnabled()
void Command::setEnabled | ( | bool | on | ) |
Enables or disables the command.
Referenced by Gui::TaskCSysDragger::open(), PathScripts.PathDressupTagGui.HoldingTagMarker::setSelected(), and Gui::TaskCSysDragger::~TaskCSysDragger().
◆ setGroupName()
void Command::setGroupName | ( | const char * | s | ) |
References sGroup.
Referenced by Gui::Application::sAddCommand().
◆ 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()
void Command::testActive | ( | void | ) |
Get somtile called to check the state of the command.
References Gui::ActionGroup::actions(), Alter3DView, AlterDoc, AlterSelection, Gui::Application::commandManager(), Gui::Control(), eType, ForEdit, Gui::CommandManager::getCommandByName(), Gui::Application::Instance, and isActive().
Referenced by addTo(), addToGroup(), and Gui::MainWindow::updateEditorActions().
◆ triggerSource()
TriggerSource Gui::Command::triggerSource | ( | ) | const |
Return the current command trigger source.
Referenced by Gui::GroupCommand::activated(), and setupCheckable().
◆ updateAction()
|
virtual |
Updates the QAction with respect to the passed mode.
Implements Gui::CommandBase.
Reimplemented in CmdSketcherConstrainAngle, CmdSketcherConstrainDiameter, CmdSketcherConstrainRadius, CmdSketcherConstrainDistanceY, CmdSketcherConstrainDistanceX, CmdSketcherConstrainDistance, and CmdSketcherConstrainLock.
Referenced by Gui::CommandManager::updateCommands().
◆ updateActive()
|
static |
Updates the (active) document (propagate changes)
Referenced by DrawingGui::TaskProjection::accept(), TechDrawGui::TaskActiveView::accept(), SurfaceGui::GeomFillSurface::accept(), ReenGui::FitBSplineSurfaceWidget::accept(), ReenGui::PoissonWidget::accept(), SurfaceGui::TaskFilling::accept(), TechDrawGui::TaskWeldingSymbol::accept(), PartGui::DlgExtrusion::apply(), CmdSketcherConstrainLock::applyConstraint(), TechDrawGui::TaskRichAnno::createAnnoFeature(), TechDrawGui::TaskCenterLine::createCenterLine(), TechDrawGui::TaskDetail::createDetail(), TechDrawGui::TaskLeaderLine::createLeaderFeature(), TechDrawGui::TaskSectionView::createSectionView(), SketcherGui::ViewProviderSketch::onDelete(), TechDrawGui::MDIViewPage::onMsg(), PartGui::OffsetWidget::reject(), PartGui::ThicknessWidget::reject(), FemGui::TaskDlgFemConstraintInitialTemperature::reject(), FemGui::TaskDlgFemConstraintFixed::reject(), SurfaceGui::GeomFillSurface::reject(), FemGui::TaskDlgFemConstraintPlaneRotation::reject(), FemGui::TaskDlgFemConstraintPressure::reject(), FemGui::TaskDlgFemConstraintContact::reject(), FemGui::TaskDlgFemConstraintTemperature::reject(), FemGui::TaskDlgFemConstraintHeatflux::reject(), FemGui::TaskDlgFemConstraintTransform::reject(), FemGui::TaskDlgFemConstraintForce::reject(), FemGui::TaskDlgFemConstraintDisplacement::reject(), SurfaceGui::TaskFilling::reject(), FemGui::TaskDlgFemConstraintFluidBoundary::reject(), DrawSketchHandlerExtend::releaseButton(), SketcherGui::tryAutoRecompute(), SketcherGui::ViewProviderSketch::unsetEdit(), TechDrawGui::TaskCenterLine::updateCenterLine(), TechDrawGui::TaskDetail::updateDetail(), and TechDrawGui::TaskLeaderLine::updateLeaderFeature().
◆ updateAll()
|
static |
Updates the (all or listed) documents (propagate changes)
References Gui::Application::Instance, and Gui::Application::onUpdate().
Friends And Related Function Documentation
◆ CommandManager
|
friend |
CommandManager is a friend.
◆ LogDisabler
|
friend |
Member Data Documentation
◆ bCanLog
|
protected |
Indicate if the command shall log to MacroManager.
Referenced by Command(), invoke(), StdCmdLinkActions::StdCmdLinkActions(), StdCmdLinkSelectActions::StdCmdLinkSelectActions(), and StdCmdTreeViewActions::StdCmdTreeViewActions().
◆ 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(), CmdSketcherConstrainRadius::CmdSketcherConstrainRadius(), CmdSketcherConstrainSymmetric::CmdSketcherConstrainSymmetric(), CmdSketcherConstrainTangent::CmdSketcherConstrainTangent(), CmdSketcherConstrainVertical::CmdSketcherConstrainVertical(), CmdSketcherCopy::CmdSketcherCopy(), CmdSketcherMove::CmdSketcherMove(), Command(), invoke(), Gui::PythonGroupCommand::PythonGroupCommand(), StdCmdDrawStyle::StdCmdDrawStyle(), StdCmdExpression::StdCmdExpression(), StdCmdFreezeViews::StdCmdFreezeViews(), StdCmdLinkActions::StdCmdLinkActions(), StdCmdLinkMakeGroup::StdCmdLinkMakeGroup(), StdCmdLinkSelectActions::StdCmdLinkSelectActions(), StdCmdTreeViewActions::StdCmdTreeViewActions(), and testActive().
◆ sAppModule
|
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(), CmdSketcherConstrainRadius::CmdSketcherConstrainRadius(), CmdSketcherConstrainSymmetric::CmdSketcherConstrainSymmetric(), CmdSketcherConstrainTangent::CmdSketcherConstrainTangent(), CmdSketcherConstrainVertical::CmdSketcherConstrainVertical(), CmdSketcherCopy::CmdSketcherCopy(), CmdSketcherMove::CmdSketcherMove(), Command(), invoke(), and setAppModuleName().
◆ 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(), CmdSketcherConstrainRadius::CmdSketcherConstrainRadius(), CmdSketcherConstrainSymmetric::CmdSketcherConstrainSymmetric(), CmdSketcherConstrainTangent::CmdSketcherConstrainTangent(), CmdSketcherConstrainVertical::CmdSketcherConstrainVertical(), CmdSketcherCopy::CmdSketcherCopy(), CmdSketcherMove::CmdSketcherMove(), Command(), Gui::PythonGroupCommand::PythonGroupCommand(), setGroupName(), Gui::StdCmdDescription::StdCmdDescription(), Gui::StdCmdDownloadOnlineHelp::StdCmdDownloadOnlineHelp(), StdCmdDrawStyle::StdCmdDrawStyle(), StdCmdExpression::StdCmdExpression(), StdCmdFreezeViews::StdCmdFreezeViews(), StdCmdLinkActions::StdCmdLinkActions(), StdCmdLinkMakeGroup::StdCmdLinkMakeGroup(), StdCmdLinkSelectActions::StdCmdLinkSelectActions(), Gui::StdCmdPythonHelp::StdCmdPythonHelp(), and StdCmdTreeViewActions::StdCmdTreeViewActions().
◆ sHelpUrl
|
protected |
◆ sName
|
protected |
Referenced by Gui::PythonCommand::activated(), Gui::PythonGroupCommand::activated(), Gui::CommandManager::addCommandMode(), Gui::PythonGroupCommand::createAction(), Gui::CommandManager::getCommandByName(), Gui::PythonCommand::getResource(), Gui::PythonGroupCommand::getResource(), invoke(), Gui::CommandManager::runCommandByName(), Gui::MacroCommand::~MacroCommand(), Gui::PythonCommand::~PythonCommand(), and Gui::PythonGroupCommand::~PythonGroupCommand().
The documentation for this class was generated from the following files:
- src/Gui/Command.h
- src/Gui/Command.cpp