App::Application Class Reference

The Application The root of the whole application. More...

#include <Application.h>

Classes

class  TransactionSignaller
 Helper class for App::Document to signal on close/abort transaction. More...
 

Public Member Functions

Application-wide trandaction setting
int setActiveTransaction (const char *name, bool persist=false)
 Setup a pending application-wide active transaction. More...
 
const char * getActiveTransaction (int *tid=nullptr) const
 Return the current active transaction name and ID. More...
 
void closeActiveTransaction (bool abort=false, int id=0)
 Commit/abort current active transactions. More...
 
methods for parameter handling
ParameterManagerGetSystemParameter (void)
 returns the system parameter More...
 
ParameterManagerGetUserParameter (void)
 returns the user parameter More...
 
Base::Reference< ParameterGrpGetParameterGroupByPath (const char *sName)
 Gets a parameter group by a full qualified path It's an easy method to get a group: More...
 
ParameterManagerGetParameterSet (const char *sName) const
 
const std::map< std::string, ParameterManager * > & GetParameterSetList (void) const
 
void AddParameterSet (const char *sName)
 
void RemoveParameterSet (const char *sName)
 
methods for the open handler

With this facility an Application module can register an ending (filetype) which it can handle to open.

The ending and the module name are stored and if the file type is opened the module gets loaded and needs to register an OpenHandler class in the OpenHandlerFactorySingleton. After the module is loaded, an OpenHandler of this type is created and the file gets loaded.

See also
OpenHandler
OpenHandlerFactorySingleton
void addImportType (const char *Type, const char *ModuleName)
 Register an import filetype and a module name. More...
 
void changeImportModule (const char *Type, const char *OldModuleName, const char *NewModuleName)
 Change the module name of a registered filetype. More...
 
std::vector< std::string > getImportModules (const char *Type) const
 Return a list of modules that support the given filetype. More...
 
std::vector< std::string > getImportModules () const
 Return a list of all modules. More...
 
std::vector< std::string > getImportTypes (const char *Module) const
 Return a list of filetypes that are supported by a module. More...
 
std::vector< std::string > getImportTypes (void) const
 Return a list of all filetypes. More...
 
std::map< std::string, std::string > getImportFilters (const char *Type) const
 Return the import filters with modules of a given filetype. More...
 
std::map< std::string, std::string > getImportFilters (void) const
 Return a list of all import filters. More...
 
void addExportType (const char *Type, const char *ModuleName)
 Register an export filetype and a module name. More...
 
void changeExportModule (const char *Type, const char *OldModuleName, const char *NewModuleName)
 Change the module name of a registered filetype. More...
 
std::vector< std::string > getExportModules (const char *Type) const
 Return a list of modules that support the given filetype. More...
 
std::vector< std::string > getExportModules () const
 Return a list of all modules. More...
 
std::vector< std::string > getExportTypes (const char *Module) const
 Return a list of filetypes that are supported by a module. More...
 
std::vector< std::string > getExportTypes (void) const
 Return a list of all filetypes. More...
 
std::map< std::string, std::string > getExportFilters (const char *Type) const
 Return the export filters with modules of a given filetype. More...
 
std::map< std::string, std::string > getExportFilters (void) const
 Return a list of all export filters. More...
 

Static Public Member Functions

Application directories
static std::string getHomePath ()
 
static std::string getExecutableName ()
 
static std::string getTempPath ()
 
static std::string getTempFileName (const char *FileName=nullptr)
 
static std::string getUserCachePath ()
 
static std::string getUserConfigPath ()
 
static std::string getUserAppDataDir ()
 
static std::string getUserMacroDir ()
 
static std::string getResourceDir ()
 
static std::string getLibraryDir ()
 
static std::string getHelpDir ()
 

Public Attributes

Signals of the Application
boost::signals2::signal< void(const Document &, bool)> signalNewDocument
 signal on new Document More...
 
boost::signals2::signal< void(const Document &)> signalDeleteDocument
 signal on document getting deleted More...
 
boost::signals2::signal< void()> signalDeletedDocument
 signal on already deleted Document More...
 
boost::signals2::signal< void(const Document &)> signalRelabelDocument
 signal on relabeling Document (user name) More...
 
boost::signals2::signal< void(const Document &)> signalRenameDocument
 signal on renaming Document (internal name) More...
 
boost::signals2::signal< void(const Document &)> signalActiveDocument
 signal on activating Document More...
 
boost::signals2::signal< void(const Document &)> signalSaveDocument
 signal on saving Document More...
 
boost::signals2::signal< void(const Document &)> signalStartRestoreDocument
 signal on starting to restore Document More...
 
boost::signals2::signal< void(const Document &)> signalFinishRestoreDocument
 signal on restoring Document More...
 
boost::signals2::signal< void(const Document &)> signalPendingReloadDocument
 signal on pending reloading of a partial Document More...
 
boost::signals2::signal< void(const Document &, const std::string &)> signalStartSaveDocument
 signal on starting to save Document More...
 
boost::signals2::signal< void(const Document &, const std::string &)> signalFinishSaveDocument
 signal on saved Document More...
 
boost::signals2::signal< void(const Document &)> signalUndoDocument
 signal on undo in document More...
 
boost::signals2::signal< void()> signalUndo
 signal on application wide undo More...
 
boost::signals2::signal< void(const Document &)> signalRedoDocument
 signal on redo in document More...
 
boost::signals2::signal< void()> signalRedo
 signal on application wide redo More...
 
boost::signals2::signal< void(bool)> signalBeforeCloseTransaction
 signal before close/abort active transaction More...
 
boost::signals2::signal< void(bool)> signalCloseTransaction
 signal after close/abort active transaction More...
 
boost::signals2::signal< void(const Document &)> signalShowHidden
 signal on show hidden items More...
 
boost::signals2::signal< void()> signalStartOpenDocument
 signal on start opening document(s) More...
 
boost::signals2::signal< void()> signalFinishOpenDocument
 signal on finished opening document(s) More...
 
Signals of the document

This signals are an aggregation of all document.

If you only the signal of a special document connect to the document itself

boost::signals2::signal< void(const App::Document &, const App::Property &)> signalBeforeChangeDocument
 signal before change of doc property More...
 
boost::signals2::signal< void(const App::Document &, const App::Property &)> signalChangedDocument
 signal on changed doc property More...
 
boost::signals2::signal< void(const App::DocumentObject &)> signalNewObject
 signal on new Object More...
 
boost::signals2::signal< void(const App::DocumentObject &)> signalDeletedObject
 signal on deleted Object More...
 
boost::signals2::signal< void(const App::DocumentObject &, const App::Property &)> signalBeforeChangeObject
 signal on changed Object More...
 
boost::signals2::signal< void(const App::DocumentObject &, const App::Property &)> signalChangedObject
 signal on changed Object More...
 
boost::signals2::signal< void(const App::DocumentObject &)> signalRelabelObject
 signal on relabeled Object More...
 
boost::signals2::signal< void(const App::DocumentObject &)> signalActivatedObject
 signal on activated Object More...
 
boost::signals2::signal< void(const App::Document &)> signalBeforeRecomputeDocument
 signal before recomputed document More...
 
boost::signals2::signal< void(const App::Document &)> signalRecomputed
 signal on recomputed document More...
 
boost::signals2::signal< void(const App::DocumentObject &)> signalObjectRecomputed
 signal on recomputed document object More...
 
boost::signals2::signal< void(const App::Document &, std::string)> signalOpenTransaction
 
boost::signals2::signal< void(const App::Document &)> signalCommitTransaction
 
boost::signals2::signal< void(const App::Document &)> signalAbortTransaction
 
Signals of property changes

These signals are emitted on property additions or removal.

The changed object can be any sub-class of PropertyContainer.

boost::signals2::signal< void(const App::Property &)> signalAppendDynamicProperty
 signal on adding a dynamic property More...
 
boost::signals2::signal< void(const App::Property &)> signalRemoveDynamicProperty
 signal on about removing a dynamic property More...
 
boost::signals2::signal< void(const App::Document &, const App::Property &)> signalChangePropertyEditor
 signal on about changing the editor mode of a property More...
 
Signals of extension changes

These signals are emitted on dynamic extension addition.

Dynamic extensions are the ones added by python (c++ ones are part of the class definition, hence not dynamic) The extension in question is provided as parameter.

boost::signals2::signal< void(const App::ExtensionContainer &, std::string extension)> signalBeforeAddingDynamicExtension
 signal before adding the extension More...
 
boost::signals2::signal< void(const App::ExtensionContainer &, std::string extension)> signalAddedDynamicExtension
 signal after the extension was added More...
 

methods for document handling

enum class  PathMatchMode { MatchAbsolute = 0 , MatchCanonical = 1 , MatchCanonicalWarning = 2 }
 Path matching mode for getDocumentByPath() More...
 
App::DocumentnewDocument (const char *Name=nullptr, const char *UserName=nullptr, bool createView=true, bool tempDoc=false)
 Creates a new document The first name is a the identifier and some kind of an internal (english) name. More...
 
bool closeDocument (const char *name)
 Closes the document name and removes it from the application. More...
 
std::string getUniqueDocumentName (const char *Name, bool tempDoc=false) const
 find a unique document name More...
 
App::DocumentopenDocument (const char *FileName=nullptr, bool createView=true)
 Open an existing document from a file. More...
 
std::vector< Document * > openDocuments (const std::vector< std::string > &filenames, const std::vector< std::string > *paths=nullptr, const std::vector< std::string > *labels=nullptr, std::vector< std::string > *errs=nullptr, bool createView=true)
 Open multiple documents. More...
 
App::DocumentgetActiveDocument (void) const
 Retrieve the active document. More...
 
App::DocumentgetDocument (const char *Name) const
 Retrieve a named document. More...
 
App::DocumentgetDocumentByPath (const char *path, PathMatchMode checkCanonical=PathMatchMode::MatchAbsolute) const
 Retrieve a document based on file path. More...
 
const char * getDocumentName (const App::Document *) const
 gets the (internal) name of the document More...
 
std::vector< App::Document * > getDocuments () const
 get a list of all documents in the application More...
 
void setActiveDocument (App::Document *pDoc)
 Set the active document. More...
 
void setActiveDocument (const char *Name)
 
void closeAllDocuments (void)
 close all documents (without saving) More...
 
int addPendingDocument (const char *FileName, const char *objName, bool allowPartial)
 Add pending document to open together with the current opening document. More...
 
bool isRestoring () const
 Indicate whether the application is opening (restoring) some document. More...
 
bool isClosingAll () const
 Indicate the application is closing all document. More...
 

Link handling

class App::Document
 
int checkLinkDepth (int depth, bool no_throw=true)
 Check for link recursion depth. More...
 
std::set< DocumentObject * > getLinksTo (const DocumentObject *, int options, int maxCount=0) const
 Return the links to a given object. More...
 
bool hasLinksTo (const DocumentObject *obj) const
 Check if there is any link to the given object. More...
 
void renameDocument (const char *OldName, const char *NewName)
 get called by the document when the name is changing More...
 

member for parameter

class ApplicationObserver
 

Private Init, Destruct an Access methods

class AutoTransaction
 

Init, Destruct an Access methods

ApplicationGetApplication (void)
 Singleton getter of the Application. More...
 
static void init (int argc, char **argv)
 
static void initTypes (void)
 
static void destruct (void)
 
static void destructObserver (void)
 
static void processCmdLineFiles (void)
 
static std::list< std::string > getCmdLineFiles ()
 
static std::list< std::string > processFiles (const std::list< std::string > &)
 
static void runApplication (void)
 
static std::map< std::string, std::string > & Config (void)
 
static int GetARGC (void)
 
static char ** GetARGV (void)
 

I/O of the document

This slot gets connected to all App::Documents created

void slotBeforeChangeDocument (const App::Document &, const App::Property &)
 
void slotChangedDocument (const App::Document &, const App::Property &)
 
void slotNewObject (const App::DocumentObject &)
 
void slotDeletedObject (const App::DocumentObject &)
 
void slotBeforeChangeObject (const App::DocumentObject &, const App::Property &Prop)
 
void slotChangedObject (const App::DocumentObject &, const App::Property &Prop)
 
void slotRelabelObject (const App::DocumentObject &)
 
void slotActivatedObject (const App::DocumentObject &)
 
void slotUndoDocument (const App::Document &)
 
void slotRedoDocument (const App::Document &)
 
void slotRecomputedObject (const App::DocumentObject &)
 
void slotRecomputed (const App::Document &)
 
void slotBeforeRecompute (const App::Document &)
 
void slotOpenTransaction (const App::Document &, std::string)
 
void slotCommitTransaction (const App::Document &)
 
void slotAbortTransaction (const App::Document &)
 
void slotStartSaveDocument (const App::Document &, const std::string &)
 
void slotFinishSaveDocument (const App::Document &, const std::string &)
 
void slotChangePropertyEditor (const App::Document &, const App::Property &)
 
App::DocumentopenDocumentPrivate (const char *FileName, const char *propFileName, const char *label, bool isMainDoc, bool createView, std::vector< std::string > &&objNames)
 open single document only More...
 

Detailed Description

The Application The root of the whole application.

See also
App::Document

Member Enumeration Documentation

◆ PathMatchMode

Path matching mode for getDocumentByPath()

Enumerator
MatchAbsolute 

Match by resolving to absolute file path.

MatchCanonical 

Match by absolute path first.

If not found then match by resolving to canonical file path where any intermediate '.' '..' and symlinks are resolved.

MatchCanonicalWarning 

Same as MatchCanonical, but if a document is found by canonical path match, which means the document can be resolved using two different absolute path, a warning is printed and the found document is not returned.

This is to allow the caller to intentionally load the same physical file as separate documents.

Member Function Documentation

◆ addExportType()

void Application::addExportType ( const char *  Type,
const char *  ModuleName 
)

Register an export filetype and a module name.

References Config().

◆ addImportType()

void Application::addImportType ( const char *  Type,
const char *  ModuleName 
)

Register an import filetype and a module name.

References Config().

◆ AddParameterSet()

void Application::AddParameterSet ( const char *  sName)

◆ addPendingDocument()

int Application::addPendingDocument ( const char *  FileName,
const char *  objName,
bool  allowPartial 
)

Add pending document to open together with the current opening document.

Referenced by App::DocInfo::attach(), and App::DocInfo::get().

◆ changeExportModule()

void Application::changeExportModule ( const char *  Type,
const char *  OldModuleName,
const char *  NewModuleName 
)

Change the module name of a registered filetype.

◆ changeImportModule()

void Application::changeImportModule ( const char *  Type,
const char *  OldModuleName,
const char *  NewModuleName 
)

Change the module name of a registered filetype.

◆ checkLinkDepth()

int Application::checkLinkDepth ( int  depth,
bool  no_throw = true 
)

Check for link recursion depth.

Parameters
depthcurrent depth
no_throwwhether to throw exception
Returns
Return the maximum remaining depth.

The function uses an internal count of all objects in all documents as the limit of recursion depth.

Referenced by PartDesign::SubShapeBinder::getSubObject().

◆ closeActiveTransaction()

void Application::closeActiveTransaction ( bool  abort = false,
int  id = 0 
)

Commit/abort current active transactions.

Parameters
abortwhether to abort or commit the transactions

Bsides calling this function directly, it will be called by automatically if 1) any new transaction is created with a different ID, or 2) any transaction with the current active transaction ID is either committed or aborted

Referenced by Gui::Command::abortCommand(), App::Document::abortTransaction(), Gui::ElementColors::Private::accept(), PartDesignGui::DlgActiveBody::accept(), App::TransactionLocker::activate(), Gui::ExpressionBinding::apply(), App::AutoTransaction::close(), Gui::Command::commitCommand(), App::Document::commitTransaction(), TechDrawGui::QGIRichAnno::mouseDoubleClickEvent(), TechDrawGui::QGIViewAnnotation::mouseDoubleClickEvent(), Gui::ElementColors::Private::reset(), Gui::ExpressionBinding::setExpression(), and App::PropertyString::setValue().

◆ closeAllDocuments()

void Application::closeAllDocuments ( void  )

close all documents (without saving)

References closeDocument().

Referenced by Gui::MainWindow::closeAllDocuments(), Gui::GUIApplication::commitData(), and Gui::Application::tryClose().

◆ closeDocument()

bool Application::closeDocument ( const char *  name)

◆ Config()

◆ destruct()

◆ destructObserver()

void Application::destructObserver ( void  )
static

◆ getActiveDocument()

Document * Application::getActiveDocument ( void  ) const

Retrieve the active document.

Referenced by MeshGui::Segmentation::accept(), MeshGui::SegmentationBestFit::accept(), MeshPartGui::Tessellation::accept(), PartGui::DlgBooleanOperation::accept(), PartGui::DlgFilletEdges::accept(), PartGui::DlgRevolution::accept(), ReverseEngineeringGui::Segmentation::accept(), StdCmdOpen::activated(), StdCmdMergeProjects::activated(), StdCmdDependencyGraph::activated(), StdCmdDuplicateSelection::activated(), StdCmdSelectAll::activated(), StdCmdExpression::activated(), StdCmdLinkMakeGroup::activated(), StdCmdLinkMake::activated(), StdCmdLinkMakeRelative::activated(), StdCmdLinkImportAll::activated(), CmdSandboxMeshLoader::activated(), PartGui::TaskMeasureLinear::buildDimension(), PartGui::TaskMeasureAngular::buildDimension(), Cloud::Module::cloudRestore(), Cloud::Module::cloudSave(), Gui::TreeWidget::contextMenuEvent(), Fem::createObjectByType(), PartGui::DlgPrimitives::createPrimitive(), SketcherGui::ConstraintView::deleteSelectedItems(), SketcherGui::ElementView::deleteSelectedItems(), PartGui::DlgProjectionOnSurface::DlgProjectionOnSurface(), PartGui::evaluateAngularPreSelection(), PartGui::evaluateLinearPreSelection(), PartGui::DlgExtrusion::findShapes(), PartGui::DlgFilletEdges::findShapes(), PartGui::DlgExtrusion::getAxisLink(), PartGui::DlgRevolution::getAxisLink(), Gui::SelectionSingleton::getDocument(), Fem::getObjectByType(), Gui::Command::getObjectCmd(), MeshGui::MeshSelection::getObjects(), PartGui::DlgRevolution::getShapesToRevolve(), Gui::Command::getUniqueObjectName(), Gui::MainWindow::insertFromMimeData(), StdCmdSelectAll::isActive(), StdCmdLinkMakeGroup::isActive(), StdCmdLinkMake::isActive(), StdCmdLinkImportAll::isActive(), StdCmdSelectVisibleObjects::isActive(), StdCmdToggleObjects::isActive(), StdCmdShowObjects::isActive(), StdCmdHideObjects::isActive(), StdCmdMeasureDistance::isActive(), Cloud::Module::LinkXSetValue(), PartDesignGui::TaskFeaturePick::makeCopy(), MeshGui::DlgRegularSolidImp::on_createSolidButton_clicked(), Gui::Application::open(), SpreadsheetGui::SheetTableView::pasteClipboard(), Gui::Dialog::Placement::Placement(), Fem::FemVTKTools::readResult(), PartGui::refreshDimensions(), App::Document::restore(), Sandbox::DocumentThread::run(), Sandbox::DocumentTestThread::run(), Gui::TreeWidget::selectLinkedObject(), Gui::QuantitySpinBox::setBoundToByName(), PartDesignGui::TaskBoxPrimitives::setPrimitive(), Gui::TaskView::TaskWatcherCommandsEmptyDoc::shouldShow(), Path::Area::showShape(), Gui::Application::sInsert(), Gui::Document::slotSkipRecompute(), MeshGui::ViewProviderMesh::splitMesh(), DrawingGui::TaskOrthoViews::TaskOrthoViews(), InspectionGui::VisualInspection::VisualInspection(), and Fem::FemVTKTools::writeResult().

◆ getActiveTransaction()

◆ GetARGC()

static int App::Application::GetARGC ( void  )
static

◆ GetARGV()

static char ** App::Application::GetARGV ( void  )
static

◆ getCmdLineFiles()

std::list< std::string > Application::getCmdLineFiles ( )
static

◆ getDocument()

◆ getDocumentByPath()

Document * Application::getDocumentByPath ( const char *  path,
PathMatchMode  checkCanonical = PathMatchMode::MatchAbsolute 
) const

Retrieve a document based on file path.

Parameters
pathfile path
checkCanonicalfile path matching mode,
See also
PathMatchMode.
Returns
Return the document found by matching with the given path

References Base::FileInfo::filePath(), MatchAbsolute, and MatchCanonical.

Referenced by openDocumentPrivate(), and openDocuments().

◆ getDocumentName()

◆ getDocuments()

◆ getExecutableName()

◆ getExportFilters() [1/2]

std::map< std::string, std::string > Application::getExportFilters ( const char *  Type) const

Return the export filters with modules of a given filetype.

Referenced by StdCmdExport::activated(), and Gui::SelectModule::exportHandler().

◆ getExportFilters() [2/2]

std::map< std::string, std::string > Application::getExportFilters ( void  ) const

Return a list of all export filters.

◆ getExportModules() [1/2]

std::vector< std::string > Application::getExportModules ( ) const

Return a list of all modules.

◆ getExportModules() [2/2]

std::vector< std::string > Application::getExportModules ( const char *  Type) const

Return a list of modules that support the given filetype.

Referenced by processCmdLineFiles().

◆ getExportTypes() [1/2]

std::vector< std::string > Application::getExportTypes ( const char *  Module) const

Return a list of filetypes that are supported by a module.

◆ getExportTypes() [2/2]

std::vector< std::string > Application::getExportTypes ( void  ) const

Return a list of all filetypes.

◆ getHelpDir()

◆ getHomePath()

◆ getImportFilters() [1/2]

std::map< std::string, std::string > Application::getImportFilters ( const char *  Type) const

Return the import filters with modules of a given filetype.

Referenced by StdCmdOpen::activated(), StdCmdImport::activated(), Gui::Application::exportTo(), and Gui::SelectModule::importHandler().

◆ getImportFilters() [2/2]

std::map< std::string, std::string > Application::getImportFilters ( void  ) const

Return a list of all import filters.

◆ getImportModules() [1/2]

std::vector< std::string > Application::getImportModules ( ) const

Return a list of all modules.

◆ getImportModules() [2/2]

std::vector< std::string > Application::getImportModules ( const char *  Type) const

Return a list of modules that support the given filetype.

Referenced by Gui::MainWindow::loadUrls(), processFiles(), and Gui::Application::sLoadFile().

◆ getImportTypes() [1/2]

std::vector< std::string > Application::getImportTypes ( const char *  Module) const

Return a list of filetypes that are supported by a module.

Referenced by StdCmdOpen::activated(), and StdCmdImport::activated().

◆ getImportTypes() [2/2]

std::vector< std::string > Application::getImportTypes ( void  ) const

Return a list of all filetypes.

◆ getLibraryDir()

std::string Application::getLibraryDir ( )
static

◆ getLinksTo()

std::set< DocumentObject * > Application::getLinksTo ( const DocumentObject obj,
int  options,
int  maxCount = 0 
) const

Return the links to a given object.

Parameters
objthe linked object. If NULL, then all links are returned.
option
See also
App::GetLinkOption
Parameters
maxCountlimit the number of links returned, 0 means no limit

Referenced by hasLinksTo().

◆ GetParameterGroupByPath()

Base::Reference< ParameterGrp > Application::GetParameterGroupByPath ( const char *  sName)

Gets a parameter group by a full qualified path It's an easy method to get a group:

// getting standard parameter
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Raytracing");
std::string cDir = hGrp->GetASCII("ProjectPath", "");
std::string cCameraName = hGrp->GetASCII("CameraName", "TempCamera.inc");

Referenced by Gui::Dialog::DlgCheckableMessageBox::accept(), Gui::Dialog::DlgAddProperty::accept(), Gui::TaskCSysDragger::accept(), Gui::MacroCommand::activated(), StdCmdNew::activated(), StdCmdOnlineHelpWebsite::activated(), StdCmdFreeCADDonation::activated(), StdCmdFreeCADWebsite::activated(), StdCmdFreeCADUserHub::activated(), StdCmdFreeCADPowerUserHub::activated(), StdCmdFreeCADForum::activated(), StdCmdFreeCADFAQ::activated(), StdCmdReportBug::activated(), StdCmdUserEditMode::activated(), StdCmdViewHome::activated(), StdViewScreenShot::activated(), Gui::StdCmdDownloadOnlineHelp::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(), Gui::Application::activateWorkbench(), Gui::MainWindow::activateWorkbench(), App::DynamicProperty::addDynamicProperty(), Gui::RecentFilesAction::appendFile(), Gui::RecentMacrosAction::appendFile(), Gui::Application::Application(), CmdSketcherConstrainLock::applyConstraint(), Gui::NS::AwaitingMoveState::AwaitingMoveState(), Cloud::Module::cloudSave(), StdCmdUserEditMode::createAction(), PartGui::ViewProvider2DObjectGrid::createGrid(), Gui::CreateViewStdCommands(), SketcherGui::CurveConverter::CurveConverter(), Gui::View3DInventor::customEvent(), ConstraintItem::data(), Gui::ViewProviderOrigin::defaultSize(), Gui::Dialog::DlgAddProperty::DlgAddProperty(), MeshGui::DlgEvaluateMeshImp::DlgEvaluateMeshImp(), Gui::Dialog::DlgExpressionInput::DlgExpressionInput(), PartGui::DlgSettings3DViewPart::DlgSettings3DViewPart(), Gui::Document::Document(), App::Document::Document(), FemGui::ViewProviderFemPostObject::doubleClicked(), DraftUtils::DraftDxfRead::DraftDxfRead(), DrawingGui::DrawingView::DrawingView(), NaviCubeImplementation::drawNaviCube(), Gui::ElementColors::ElementColors(), Gui::GraphvizView::exportGraph(), App::Document::exportGraphviz(), Import::ExportOCAF2::ExportOCAF2(), Gui::Application::exportTo(), MeshGui::ViewProviderMesh::faceInfoCallback(), FemGui::FemSettings::FemSettings(), Gui::GestureNavigationStyle::GestureNavigationStyle(), Gui::NS::GestureState::GestureState(), Gui::ViewProviderGeometryObject::getBoundColor(), PathGui::ViewProviderPath::getBoundColor(), Spreadsheet::Sheet::getCharsFromPrefs(), SketcherGui::DrawSketchHandler::getCrosshairColor(), Path::Toolpath::getCycleTime(), Gui::View3DInventorViewer::getInternalTextureFormat(), TechDrawGui::QGVPage::getNavStyleParameter(), Gui::View3DInventorViewer::getNumSamples(), Part::Feature::getSubObject(), Gui::GraphicsView3D::GraphicsView3D(), Gui::GraphvizView::GraphvizView(), ImageGui::ImageView::ImageView(), Gui::Application::importFrom(), Import::ImportOCAF2::ImportOCAF2(), Gui::NavigationStyle::initialize(), TechDrawGui::QGVNavStyle::initialize(), Inspection::InspectActualShape::InspectActualShape(), Gui::ExpressionParameter::isCaseSensitive(), Gui::ExpressionParameter::isExactMatch(), Gui::PreferencePackManager::isVisible(), Gui::MacroCommand::load(), Gui::Dialog::DlgWorkbenchesImp::load_disabled_workbenches(), Gui::Dialog::DlgWorkbenchesImp::load_enabled_workbenches(), SketcherGui::SketcherGeneralWidget::loadOrderingOrder(), PartGui::ViewProviderPartExt::loadParameter(), Gui::Dialog::DlgGeneralImp::loadSettings(), Gui::Dialog::DlgSettings3DViewImp::loadSettings(), Gui::Dialog::DlgSettingsLazyLoadedImp::loadSettings(), Gui::Dialog::DlgSettingsNavigation::loadSettings(), Gui::Dialog::DlgSettingsSelection::loadSettings(), Gui::Dialog::DlgSettingsUnitsImp::loadSettings(), FemGui::DlgSettingsFemCcxImp::loadSettings(), FemGui::DlgSettingsFemExportAbaqusImp::loadSettings(), FemGui::DlgSettingsFemInOutVtkImp::loadSettings(), FemGui::DlgSettingsFemZ88Imp::loadSettings(), InspectionGui::VisualInspection::loadSettings(), MeshGui::DlgSettingsImportExport::loadSettings(), SketcherGui::SketcherSettingsDisplay::loadSettings(), SpreadsheetGui::DlgSettingsImp::loadSettings(), StartGui::DlgStartPreferencesImp::loadSettings(), Gui::MacroManager::MacroManager(), NaviCubeImplementation::NaviCubeImplementation(), Gui::Dialog::DlgMacroExecuteImp::on_createButton_clicked(), Gui::Dialog::DlgMacroExecuteImp::on_duplicateButton_clicked(), Gui::Dialog::DlgMacroExecuteImp::on_renameButton_clicked(), Gui::Dialog::DlgMacroExecuteImp::on_toolbarButton_clicked(), SketcherGui::TaskSketcherConstraints::on_visibilityButton_trackingaction_changed(), PathGui::ViewProviderPath::onChanged(), PartDesignGui::ViewProviderSubShapeBinder::onChanged(), Gui::GestureNavigationStyle::onRollGesture(), Gui::TaskCSysDragger::open(), Gui::Application::open(), openDocuments(), SketcherGui::DrawSketchHandlerLineSet::pressButton(), TechDrawGui::QGVPage::Private::Private(), Gui::RecentFilesAction::Private::Private(), SketcherGui::DrawSketchHandlerBSpline::quit(), SketcherGui::DrawSketchHandlerLineSet::quit(), App::Document::recompute(), Gui::Dialog::DlgCheckableMessageBox::reject(), SketcherGui::TaskDlgEditSketch::reject(), DrawSketchHandlerBSplineInsertKnot::releaseButton(), SketcherGui::DrawSketchHandlerArc::releaseButton(), SketcherGui::DrawSketchHandler3PointArc::releaseButton(), SketcherGui::DrawSketchHandlerArcOfEllipse::releaseButton(), SketcherGui::DrawSketchHandlerCircle::releaseButton(), SketcherGui::DrawSketchHandler3PointCircle::releaseButton(), SketcherGui::DrawSketchHandlerEllipse::releaseButton(), SketcherGui::DrawSketchHandlerExtend::releaseButton(), SketcherGui::DrawSketchHandlerLine::releaseButton(), SketcherGui::DrawSketchHandlerLineSet::releaseButton(), SketcherGui::DrawSketchHandlerPoint::releaseButton(), SketcherGui::DrawSketchHandlerRegularPolygon::releaseButton(), SketcherGui::DrawSketchHandlerBox::releaseButton(), SketcherGui::DrawSketchHandlerOblong::releaseButton(), SketcherGui::DrawSketchHandlerSlot::releaseButton(), SketcherGui::DrawSketchHandlerArcOfHyperbola::releaseButton(), SketcherGui::DrawSketchHandlerArcOfParabola::releaseButton(), Part::PropertyPartShape::RestoreDocFile(), Gui::MDIView::restorePrinterSettings(), Gui::GraphvizWorker::run(), Gui::Application::runApplication(), Gui::MacroCommand::save(), Gui::Document::Save(), App::Document::save(), Part::PropertyPartShape::SaveDocFile(), Gui::AutoSaver::saveDocument(), SketcherGui::SketcherGeneralWidget::saveOrderingOrder(), MeshPartGui::Tessellation::saveParameters(), Gui::View3DInventorViewer::savePicture(), Gui::MDIView::savePrinterSettings(), Gui::Dialog::DlgGeneralImp::saveSettings(), Gui::Dialog::DlgSettings3DViewImp::saveSettings(), Gui::Dialog::DlgSettingsLazyLoadedImp::saveSettings(), Gui::Dialog::DlgSettingsNavigation::saveSettings(), Gui::Dialog::DlgSettingsSelection::saveSettings(), Gui::Dialog::DlgSettingsUnitsImp::saveSettings(), FemGui::DlgSettingsFemCcxImp::saveSettings(), FemGui::DlgSettingsFemExportAbaqusImp::saveSettings(), FemGui::DlgSettingsFemInOutVtkImp::saveSettings(), FemGui::DlgSettingsFemZ88Imp::saveSettings(), InspectionGui::VisualInspection::saveSettings(), MeshGui::DlgSettingsImportExport::saveSettings(), SketcherGui::SketcherSettingsDisplay::saveSettings(), SpreadsheetGui::DlgSettingsImp::saveSettings(), StartGui::DlgStartPreferencesImp::saveSettings(), App::Document::saveToFile(), Gui::SelectionSingleton::selStackPush(), Gui::WindowParameter::setGroupName(), Gui::DocumentObjectItem::setHighlight(), Import::ImpExpDxfRead::setOptions(), Import::ImpExpDxfWrite::setOptions(), Gui::StatefulLabel::setParameterGroup(), Gui::InputField::setParamGrpPath(), Gui::Dialog::DlgCheckableMessageBox::setPrefEntry(), Gui::Dialog::DlgCustomKeyboardImp::setShortcutOfCurrentAction(), Gui::AbstractSplitView::setupSettings(), Gui::Application::sGetMarkerIndex(), SpreadsheetGui::SheetModel::SheetModel(), Gui::Dialog::DlgPreferencePackManagementImp::showAddonManager(), Gui::MainWindow::showDocumentation(), Gui::Dialog::DlgCheckableMessageBox::showMessage(), PartDesignGui::TaskHelixParameters::showPreview(), Gui::DocumentItem::slotInEdit(), Gui::SplitView3DInventor::SplitView3DInventor(), Gui::StatefulLabel::StatefulLabel(), StdCmdRefresh::StdCmdRefresh(), SketcherGui::TaskDlgEditSketch::TaskDlgEditSketch(), SketcherGui::TaskSketcherElements::TaskSketcherElements(), MeshPartGui::Tessellation::Tessellation(), Gui::PreferencePackManager::toggleVisibility(), Gui::TreeParams::TreeParams(), SketcherGui::tryAutoRecompute(), InspectionGui::ViewProviderInspection::updateData(), SketcherGui::TaskSketcherSolverAdvanced::updateDefaultMethodParameters(), SketcherGui::TaskSketcherSolverAdvanced::updateRedundantMethodParameters(), Gui::View3DInventor::View3DInventor(), Gui::View3DInventorPy::viewDefaultOrientation(), Gui::ViewParams::ViewParams(), Gui::ViewProviderAnnotation::ViewProviderAnnotation(), PartDesignGui::ViewProviderDatum::ViewProviderDatum(), PartDesignGui::ViewProviderDatumCoordinateSystem::ViewProviderDatumCoordinateSystem(), Gui::ViewProviderGeometryObject::ViewProviderGeometryObject(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), PathGui::ViewProviderPath::ViewProviderPath(), PartDesignGui::ViewProviderShapeBinder::ViewProviderShapeBinder(), Path::PathSegmentWalker::walk(), SandboxGui::Workbench::Workbench(), Fem::FemMesh::write(), SketcherGui::CurveConverter::~CurveConverter(), MeshGui::DlgEvaluateMeshImp::~DlgEvaluateMeshImp(), NaviCubeImplementation::~NaviCubeImplementation(), and SketcherGui::TaskSketcherElements::~TaskSketcherElements().

◆ GetParameterSet()

◆ GetParameterSetList()

const std::map< std::string, ParameterManager * > & Application::GetParameterSetList ( void  ) const

◆ getResourceDir()

◆ GetSystemParameter()

ParameterManager & Application::GetSystemParameter ( void  )

returns the system parameter

◆ getTempFileName()

◆ getTempPath()

std::string Application::getTempPath ( )
static

Returns the temporary directory. By default, this is set to the system's temporary directory but can be customized by the user.

Referenced by getTempFileName().

◆ getUniqueDocumentName()

std::string Application::getUniqueDocumentName ( const char *  Name,
bool  tempDoc = false 
) const

◆ getUserAppDataDir()

◆ getUserCachePath()

◆ getUserConfigPath()

std::string Application::getUserConfigPath ( )
static

◆ getUserMacroDir()

◆ GetUserParameter()

ParameterManager & Application::GetUserParameter ( void  )

returns the user parameter

Referenced by Gui::Dialog::DlgRevertToBackupConfigImp::accept(), StdCmdImport::activated(), StdCmdExport::activated(), StdViewScreenShot::activated(), CmdViewMeasureToggleAll::activated(), Gui::StdCmdDownloadOnlineHelp::activated(), PartGui::addLinearDimensions(), TechDraw::DrawPage::AllowPageOverride(), TechDraw::Preferences::altDecimals(), Gui::Application::Application(), PartGui::DlgExtrusion::apply(), Gui::PreferencePack::apply(), TechDraw::Preferences::ASMEGap(), TechDraw::Preferences::balloonArrow(), TechDraw::Preferences::bitmapFill(), Part::Boolean::Boolean(), PartDesign::Boolean::Boolean(), TechDrawGui::PreferencesGui::centerColor(), Gui::Dialog::DlgParameterImp::closeEvent(), Gui::MainWindow::confirmSave(), TechDrawGui::QGISVGTemplate::createClickHandles(), TechDraw::DrawViewDetail::debugDetail(), TechDraw::DrawViewSection::debugSection(), TechDraw::Preferences::defaultTemplate(), TechDraw::Preferences::defaultTemplateDir(), TechDrawGui::PreferencesGui::dimArrowSize(), TechDrawGui::PreferencesGui::dimArrowStyle(), TechDrawGui::PreferencesGui::dimColor(), TechDraw::Preferences::dimFontSizeMM(), Gui::DialogOptions::dontUseNativeColorDialog(), Gui::DialogOptions::dontUseNativeFileDialog(), TechDraw::DrawPage::DrawPage(), TechDraw::DrawProjGroup::DrawProjGroup(), TechDrawGui::QGIViewPart::drawViewPart(), TechDrawGui::PreferencesGui::edgeFuzz(), PartGui::ensure3dDimensionVisible(), PartGui::ensureSomeDimensionVisible(), Gui::MainWindow::event(), Part::Boolean::execute(), Part::MultiCommon::execute(), Part::MultiFuse::execute(), PartDesign::FeatureAddSub::FeatureAddSub(), TechDraw::Preferences::formatSpec(), TechDrawGui::QGSPage::getBackgroundColor(), TechDrawGui::QGVPage::getBackgroundColor(), TechDrawGui::QGICenterLine::getCenterStyle(), TechDrawGui::TaskCenterLine::getCenterStyle(), TechDrawGui::QGICMark::getCMarkColor(), Gui::WindowParameter::getDefaultParameter(), TechDraw::DrawLeaderLine::getDefAuto(), TechDraw::LineFormat::getDefEdgeStyle(), TechDrawGui::TaskCenterLine::getExtendBy(), TechDrawGui::QGIEdge::getHiddenColor(), TechDrawGui::QGIEdge::getHiddenStyle(), TechDrawGui::QGICMark::getMarkFuzz(), TechDrawGui::Rez::getParameter(), TechDraw::DrawViewSection::getParameters(), TechDrawGui::QGIFace::getParameters(), TechDrawGui::ViewProviderViewSection::getParameters(), TechDrawGui::QGCustomText::getParmGroup(), TechDrawGui::QGIPrimPath::getParmGroup(), TechDrawGui::QGIView::getParmGroupCol(), TechDrawGui::QGIDatumLabel::getPrecision(), TechDraw::DrawViewDimension::getPrefix(), TechDrawGui::QGISectionLine::getPrefSectionStandard(), TechDrawGui::QGITile::getSymbolFactor(), TechDrawGui::QGITile::getSymbolHeight(), TechDrawGui::QGITile::getSymbolWidth(), TechDrawGui::QGITile::getTileColor(), TechDrawGui::QGIDatumLabel::getTolAdjust(), TechDrawGui::QGTracker::getTrackerColor(), TechDrawGui::QGTracker::getTrackerWeight(), TechDraw::DrawPage::GlobalUpdateDrawings(), PartGui::TaskCheckGeometryResults::goCheck(), PartGui::goDimensionAngularNoTask(), TechDrawGui::PreferencesGui::gridColor(), TechDrawGui::PreferencesGui::gridSpacing(), TechDraw::DrawViewPart::handleFaces(), TechDrawGui::QGVPage::Private::init(), TechDrawGui::QGVNavStyle::initialize(), TechDraw::DrawUtil::isCrazy(), TechDraw::Preferences::ISOGap(), PartDesignGui::TaskFeaturePick::isSingleSelectionEnabled(), TechDraw::Preferences::keepPagesUpToDate(), TechDraw::Preferences::labelFont(), TechDraw::Preferences::labelFontSizeMM(), TechDrawGui::PreferencesGui::leaderColor(), TechDraw::Preferences::lineGroup(), PartGui::DlgImportExportIges::loadSettings(), PartGui::DlgImportExportStep::loadSettings(), Gui::DockWindowManager::loadState(), Gui::MainWindow::MainWindow(), TechDraw::Preferences::mattingStyle(), Gui::DAG::Model::Model(), Part::MultiCommon::MultiCommon(), Part::MultiFuse::MultiFuse(), TechDraw::Preferences::normalColor(), Gui::Dialog::DlgParameterImp::onChangeParameterSet(), TechDraw::Preferences::patFile(), TechDraw::ShapeExtractor::prefAdd2d(), TechDrawGui::QGIPrimPath::prefCapStyle(), TechDraw::DrawViewSection::prefCutSurface(), TechDrawGui::QGIViewPart::prefFaceEdges(), TechDraw::DrawGeomHatch::prefGeomHatchColor(), TechDraw::DrawGeomHatch::prefGeomHatchName(), TechDraw::DrawViewPart::prefHardHid(), TechDraw::DrawViewPart::prefHardViz(), TechDrawGui::ViewProviderViewPart::prefHighlightColor(), TechDrawGui::ViewProviderViewPart::prefHighlightStyle(), TechDraw::DrawViewPart::prefIsoCount(), TechDraw::DrawViewPart::prefIsoHid(), TechDraw::DrawViewPart::prefIsoViz(), TechDraw::DrawViewBalloon::prefKinkLength(), TechDrawGui::QGIViewBalloon::prefOrthoPyramid(), TechDrawGui::QGIViewPart::prefPrintCenters(), TechDraw::DrawView::prefScale(), TechDraw::DrawView::prefScaleType(), TechDraw::DrawViewPart::prefSeamHid(), TechDraw::DrawViewPart::prefSeamViz(), TechDraw::DrawViewBalloon::prefShape(), TechDraw::DrawViewPart::prefSmoothHid(), TechDraw::DrawViewPart::prefSmoothViz(), TechDrawGui::ViewProviderDimension::prefStandardAndStyle(), TechDraw::DrawHatch::prefSvgHatchColor(), TechDrawGui::ViewProviderWeld::prefTileTextAdjust(), TechDraw::Preferences::preselectColor(), TechDraw::Preferences::projectionAngle(), TechDraw::CosmeticVertex::restoreCosmetic(), Gui::FileDialog::restoreLocation(), Gui::ToolBarManager::restoreState(), Gui::MacroManager::run(), Gui::FileDialog::saveLocation(), PartGui::DlgImportExportIges::saveSettings(), PartGui::DlgImportExportStep::saveSettings(), Gui::DockWindowManager::saveState(), Gui::ToolBarManager::saveState(), TechDrawGui::PreferencesGui::sectionLineColor(), TechDrawGui::PreferencesGui::sectionLineStyle(), TechDraw::Preferences::selectColor(), Gui::DockWindowManager::setup(), Gui::ToolBarManager::setup(), Gui::StdWorkbench::setupDockWindows(), PartDesign::SubShapeBinder::setupObject(), App::PropertyString::setValue(), Gui::Dialog::DlgParameterImp::showEvent(), TechDrawGui::PreferencesGui::showGrid(), TechDraw::DrawViewSection::showSectionEdges(), TechDraw::DrawViewDimension::showUnits(), Gui::MainWindow::startSplasher(), TechDraw::Preferences::svgFile(), PartGui::TaskCheckGeometryDialog::TaskCheckGeometryDialog(), PartGui::toggle3d(), PartGui::toggleDelta(), PartDesign::Transformed::Transformed(), TechDraw::Preferences::vertexColor(), TechDraw::Preferences::vertexScale(), TechDrawGui::ViewProviderViewPart::ViewProviderViewPart(), and TechDrawGui::PreferencesGui::weldingDirectory().

◆ hasLinksTo()

bool Application::hasLinksTo ( const DocumentObject obj) const

Check if there is any link to the given object.

References getLinksTo().

Referenced by StdCmdLinkSelectAllLinks::isActive().

◆ init()

void Application::init ( int  argc,
char **  argv 
)
static

◆ initTypes()

void Application::initTypes ( void  )
static

◆ isClosingAll()

bool Application::isClosingAll ( ) const

Indicate the application is closing all document.

◆ isRestoring()

bool Application::isRestoring ( ) const

Indicate whether the application is opening (restoring) some document.

References App::Document::isAnyRestoring().

Referenced by App::PropertyXLink::setAllowPartial().

◆ newDocument()

Document * Application::newDocument ( const char *  Name = nullptr,
const char *  UserName = nullptr,
bool  createView = true,
bool  tempDoc = false 
)

Creates a new document The first name is a the identifier and some kind of an internal (english) name.

It has to be like an identifier in a programming language, with no spaces and not starting with a number. This name gets also forced to be unique in this Application. You can avoid the renaming by using getUniqueDocumentName() to get a unique name before calling newDoucument(). The second name is a UTF8 name of any kind. It's that name normally shown to the user and stored in the App::Document::Name property.

References draftgeoutils.faces::bind(), getUniqueDocumentName(), Base::Tools::getUniqueName(), setActiveDocument(), signalNewDocument, slotAbortTransaction(), slotActivatedObject(), slotBeforeChangeDocument(), slotBeforeChangeObject(), slotBeforeRecompute(), slotChangedDocument(), slotChangedObject(), slotChangePropertyEditor(), slotCommitTransaction(), slotDeletedObject(), slotFinishSaveDocument(), slotNewObject(), slotOpenTransaction(), slotRecomputed(), slotRecomputedObject(), slotRedoDocument(), slotRelabelObject(), slotStartSaveDocument(), slotUndoDocument(), and App::Document::TempDoc.

Referenced by Fem::createObjectByType(), Fem::getObjectByType(), Gui::MainWindow::insertFromMimeData(), Cloud::Module::LinkXSetValue(), openDocumentPrivate(), Fem::FemVTKTools::readResult(), Path::Area::showShape(), Gui::Application::sInsert(), Gui::Application::sOpen(), and PartDesign::SubShapeBinder::update().

◆ openDocument()

Document * Application::openDocument ( const char *  FileName = nullptr,
bool  createView = true 
)

Open an existing document from a file.

References openDocuments().

Referenced by processFiles(), Gui::Application::reopen(), and App::PropertyXLink::setAllowPartial().

◆ openDocumentPrivate()

Document * Application::openDocumentPrivate ( const char *  FileName,
const char *  propFileName,
const char *  label,
bool  isMainDoc,
bool  createView,
std::vector< std::string > &&  objNames 
)
protected

◆ openDocuments()

std::vector< Document * > Application::openDocuments ( const std::vector< std::string > &  filenames,
const std::vector< std::string > *  paths = nullptr,
const std::vector< std::string > *  labels = nullptr,
std::vector< std::string > *  errs = nullptr,
bool  createView = true 
)

Open multiple documents.

Parameters
filenamesinput file names
pathsoptional input file path in case it is different from filenames (mainly used during recovery).
labelsoptional label assign to document (mainly used during recovery).
errsoptional output error message corresponding to each input file name. If errs is given, this function will catch all Base::Exception and save the error message inside. Otherwise, it will throw on exception when opening the input files.
createViewwhether to signal Gui module to create view on restore.
Returns
Return opened document object corresponding to each input file name, which maybe NULL if failed.

This function will also open any external referenced files.

References closeDocument(), Base::Console(), Base::ConsoleSingleton::Error(), ParameterGrp::GetBool(), App::Document::getDependentDocuments(), getDocumentByPath(), GetParameterGroupByPath(), draftfunctions.move::move(), Base::SequencerLauncher::next(), openDocumentPrivate(), App::PropertyXLink::restoreDocument(), setActiveDocument(), signalFinishOpenDocument, and signalStartOpenDocument.

Referenced by Gui::Dialog::DocumentRecovery::accept(), and openDocument().

◆ processCmdLineFiles()

◆ processFiles()

◆ RemoveParameterSet()

void Application::RemoveParameterSet ( const char *  sName)

◆ renameDocument()

void Application::renameDocument ( const char *  OldName,
const char *  NewName 
)
protected

get called by the document when the name is changing

References signalRenameDocument.

◆ runApplication()

◆ setActiveDocument() [1/2]

◆ setActiveDocument() [2/2]

void Application::setActiveDocument ( const char *  Name)

References setActiveDocument().

◆ setActiveTransaction()

int Application::setActiveTransaction ( const char *  name,
bool  persist = false 
)

Setup a pending application-wide active transaction.

Parameters
namenew transaction name
persistby default, if the calling code is inside any invocation of a command, it will be auto closed once all command within the current stack exists. To disable auto closing, set persist=true
Returns
The new transaction ID.

Call this function to setup an application-wide transaction. All current pending transactions of opening documents will be committed first. However, no new transaction is created by this call. Any subsequent changes in any current opening document will auto create a transaction with the given name and ID. If more than one document is changed, the transactions will share the same ID, and will be undo/redo together.

References getActiveTransaction(), App::Transaction::getNewID(), and App::AutoTransaction::setEnable().

Referenced by PartDesignGui::DlgActiveBody::accept(), Gui::ElementColors::Private::apply(), Gui::ExpressionBinding::apply(), Gui::TreeWidgetEditDelegate::createEditor(), TechDrawGui::QGIRichAnno::mouseDoubleClickEvent(), TechDrawGui::QGIViewAnnotation::mouseDoubleClickEvent(), TechDrawGui::TaskDlgProjGroup::open(), Gui::Command::openCommand(), App::Document::openTransaction(), Gui::ExpressionBinding::setExpression(), PartDesignGui::TaskDressUpParameters::setupTransaction(), PartDesignGui::TaskTransformedParameters::setupTransaction(), and App::PropertyString::setValue().

◆ slotAbortTransaction()

void Application::slotAbortTransaction ( const App::Document d)
protected

References signalAbortTransaction.

Referenced by newDocument().

◆ slotActivatedObject()

void Application::slotActivatedObject ( const App::DocumentObject O)
protected

References signalActivatedObject.

Referenced by newDocument().

◆ slotBeforeChangeDocument()

void Application::slotBeforeChangeDocument ( const App::Document doc,
const App::Property prop 
)
protected

References signalBeforeChangeDocument.

Referenced by newDocument().

◆ slotBeforeChangeObject()

void Application::slotBeforeChangeObject ( const App::DocumentObject O,
const App::Property Prop 
)
protected

References signalBeforeChangeObject.

Referenced by newDocument().

◆ slotBeforeRecompute()

void Application::slotBeforeRecompute ( const App::Document doc)
protected

References signalBeforeRecomputeDocument.

Referenced by newDocument().

◆ slotChangedDocument()

void Application::slotChangedDocument ( const App::Document doc,
const App::Property prop 
)
protected

References signalChangedDocument.

Referenced by newDocument().

◆ slotChangedObject()

void Application::slotChangedObject ( const App::DocumentObject O,
const App::Property Prop 
)
protected

References signalChangedObject.

Referenced by newDocument().

◆ slotChangePropertyEditor()

void Application::slotChangePropertyEditor ( const App::Document doc,
const App::Property prop 
)
protected

References signalChangePropertyEditor.

Referenced by newDocument().

◆ slotCommitTransaction()

void Application::slotCommitTransaction ( const App::Document d)
protected

References signalCommitTransaction.

Referenced by newDocument().

◆ slotDeletedObject()

void Application::slotDeletedObject ( const App::DocumentObject O)
protected

References signalDeletedObject.

Referenced by newDocument().

◆ slotFinishSaveDocument()

void Application::slotFinishSaveDocument ( const App::Document doc,
const std::string &  filename 
)
protected

References signalFinishSaveDocument.

Referenced by newDocument().

◆ slotNewObject()

void Application::slotNewObject ( const App::DocumentObject O)
protected

References signalNewObject.

Referenced by newDocument().

◆ slotOpenTransaction()

void Application::slotOpenTransaction ( const App::Document d,
std::string  s 
)
protected

References signalOpenTransaction.

Referenced by newDocument().

◆ slotRecomputed()

void Application::slotRecomputed ( const App::Document doc)
protected

References signalRecomputed.

Referenced by newDocument().

◆ slotRecomputedObject()

void Application::slotRecomputedObject ( const App::DocumentObject obj)
protected

References signalObjectRecomputed.

Referenced by newDocument().

◆ slotRedoDocument()

void Application::slotRedoDocument ( const App::Document d)
protected

References signalRedoDocument.

Referenced by newDocument().

◆ slotRelabelObject()

void Application::slotRelabelObject ( const App::DocumentObject O)
protected

References signalRelabelObject.

Referenced by newDocument().

◆ slotStartSaveDocument()

void Application::slotStartSaveDocument ( const App::Document doc,
const std::string &  filename 
)
protected

References signalStartSaveDocument.

Referenced by newDocument().

◆ slotUndoDocument()

void Application::slotUndoDocument ( const App::Document d)
protected

References signalUndoDocument.

Referenced by newDocument().

Friends And Related Function Documentation

◆ App::Document

friend class App::Document
friend

◆ ApplicationObserver

friend class ApplicationObserver
friend

◆ AutoTransaction

friend class AutoTransaction
friend

◆ GetApplication

Member Data Documentation

◆ signalAbortTransaction

boost::signals2::signal<void (const App::Document&)> App::Application::signalAbortTransaction

Referenced by slotAbortTransaction().

◆ signalActivatedObject

boost::signals2::signal<void (const App::DocumentObject&)> App::Application::signalActivatedObject

signal on activated Object

Referenced by slotActivatedObject().

◆ signalActiveDocument

boost::signals2::signal<void (const Document&)> App::Application::signalActiveDocument

◆ signalAddedDynamicExtension

boost::signals2::signal<void (const App::ExtensionContainer&, std::string extension)> App::Application::signalAddedDynamicExtension

signal after the extension was added

◆ signalAppendDynamicProperty

boost::signals2::signal<void (const App::Property&)> App::Application::signalAppendDynamicProperty

signal on adding a dynamic property

Referenced by App::DynamicProperty::addDynamicProperty(), and Gui::PropertyView::PropertyView().

◆ signalBeforeAddingDynamicExtension

boost::signals2::signal<void (const App::ExtensionContainer&, std::string extension)> App::Application::signalBeforeAddingDynamicExtension

signal before adding the extension

◆ signalBeforeChangeDocument

boost::signals2::signal<void (const App::Document&, const App::Property&)> App::Application::signalBeforeChangeDocument

signal before change of doc property

Referenced by slotBeforeChangeDocument().

◆ signalBeforeChangeObject

boost::signals2::signal<void (const App::DocumentObject&, const App::Property&)> App::Application::signalBeforeChangeObject

signal on changed Object

Referenced by slotBeforeChangeObject().

◆ signalBeforeCloseTransaction

boost::signals2::signal<void (bool)> App::Application::signalBeforeCloseTransaction

signal before close/abort active transaction

◆ signalBeforeRecomputeDocument

boost::signals2::signal<void (const App::Document&)> App::Application::signalBeforeRecomputeDocument

signal before recomputed document

Referenced by slotBeforeRecompute().

◆ signalChangedDocument

boost::signals2::signal<void (const App::Document&, const App::Property&)> App::Application::signalChangedDocument

signal on changed doc property

Referenced by Gui::PropertyView::PropertyView(), and slotChangedDocument().

◆ signalChangedObject

boost::signals2::signal<void (const App::DocumentObject&, const App::Property&)> App::Application::signalChangedObject

◆ signalChangePropertyEditor

boost::signals2::signal<void (const App::Document&, const App::Property&)> App::Application::signalChangePropertyEditor

signal on about changing the editor mode of a property

Referenced by Gui::PropertyView::PropertyView(), slotChangePropertyEditor(), and PartDesignGui::TaskHoleParameters::TaskHoleParameters().

◆ signalCloseTransaction

boost::signals2::signal<void (bool)> App::Application::signalCloseTransaction

signal after close/abort active transaction

◆ signalCommitTransaction

boost::signals2::signal<void (const App::Document&)> App::Application::signalCommitTransaction

Referenced by slotCommitTransaction().

◆ signalDeletedDocument

boost::signals2::signal<void ()> App::Application::signalDeletedDocument

signal on already deleted Document

Referenced by closeDocument(), and Gui::TaskView::TaskView::TaskView().

◆ signalDeletedObject

boost::signals2::signal<void (const App::DocumentObject&)> App::Application::signalDeletedObject

◆ signalDeleteDocument

◆ signalFinishOpenDocument

boost::signals2::signal<void ()> App::Application::signalFinishOpenDocument

signal on finished opening document(s)

Referenced by openDocuments().

◆ signalFinishRestoreDocument

boost::signals2::signal<void (const Document&)> App::Application::signalFinishRestoreDocument

◆ signalFinishSaveDocument

boost::signals2::signal<void (const Document&, const std::string&)> App::Application::signalFinishSaveDocument

signal on saved Document

Referenced by slotFinishSaveDocument().

◆ signalNewDocument

◆ signalNewObject

boost::signals2::signal<void (const App::DocumentObject&)> App::Application::signalNewObject

signal on new Object

Referenced by PartGui::DlgBooleanOperation::DlgBooleanOperation(), and slotNewObject().

◆ signalObjectRecomputed

boost::signals2::signal<void (const App::DocumentObject&)> App::Application::signalObjectRecomputed

signal on recomputed document object

Referenced by slotRecomputedObject().

◆ signalOpenTransaction

boost::signals2::signal<void (const App::Document&, std::string)> App::Application::signalOpenTransaction

Referenced by slotOpenTransaction().

◆ signalPendingReloadDocument

boost::signals2::signal<void (const Document&)> App::Application::signalPendingReloadDocument

signal on pending reloading of a partial Document

Referenced by App::Document::afterRestore().

◆ signalRecomputed

boost::signals2::signal<void (const App::Document&)> App::Application::signalRecomputed

signal on recomputed document

Referenced by slotRecomputed().

◆ signalRedo

boost::signals2::signal<void ()> App::Application::signalRedo

signal on application wide redo

Referenced by Gui::Document::redo().

◆ signalRedoDocument

boost::signals2::signal<void (const Document&)> App::Application::signalRedoDocument

◆ signalRelabelDocument

boost::signals2::signal<void (const Document&)> App::Application::signalRelabelDocument

◆ signalRelabelObject

boost::signals2::signal<void (const App::DocumentObject&)> App::Application::signalRelabelObject

signal on relabeled Object

Referenced by slotRelabelObject().

◆ signalRemoveDynamicProperty

boost::signals2::signal<void (const App::Property&)> App::Application::signalRemoveDynamicProperty

signal on about removing a dynamic property

Referenced by Gui::PropertyView::PropertyView(), and App::DynamicProperty::removeDynamicProperty().

◆ signalRenameDocument

boost::signals2::signal<void (const Document&)> App::Application::signalRenameDocument

signal on renaming Document (internal name)

Referenced by Gui::Application::Application(), and renameDocument().

◆ signalSaveDocument

boost::signals2::signal<void (const Document&)> App::Application::signalSaveDocument

signal on saving Document

Referenced by App::Document::saveToFile().

◆ signalShowHidden

boost::signals2::signal<void (const Document&)> App::Application::signalShowHidden

◆ signalStartOpenDocument

boost::signals2::signal<void ()> App::Application::signalStartOpenDocument

signal on start opening document(s)

Referenced by openDocuments().

◆ signalStartRestoreDocument

boost::signals2::signal<void (const Document&)> App::Application::signalStartRestoreDocument

◆ signalStartSaveDocument

boost::signals2::signal<void (const Document&, const std::string&)> App::Application::signalStartSaveDocument

signal on starting to save Document

Referenced by slotStartSaveDocument().

◆ signalUndo

boost::signals2::signal<void ()> App::Application::signalUndo

signal on application wide undo

Referenced by Gui::Document::undo().

◆ signalUndoDocument

boost::signals2::signal<void (const Document&)> App::Application::signalUndoDocument

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