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 | |
ParameterManager & | GetSystemParameter (void) |
returns the system parameter More... | |
ParameterManager & | GetUserParameter (void) |
returns the user parameter More... | |
Base::Reference< ParameterGrp > | GetParameterGroupByPath (const char *sName) |
Gets a parameter group by a full qualified path It's an easy method to get a group: More... | |
ParameterManager * | GetParameterSet (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.
| |
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::Document * | 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. 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::Document * | openDocument (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::Document * | getActiveDocument (void) const |
Retrieve the active document. More... | |
App::Document * | getDocument (const char *Name) const |
Retrieve a named document. More... | |
App::Document * | getDocumentByPath (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 | |
Application & | GetApplication (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) |
The Application The root of the whole application.
|
strong |
Path matching mode for getDocumentByPath()
void Application::addExportType | ( | const char * | Type, |
const char * | ModuleName | ||
) |
Register an export filetype and a module name.
References Config().
void Application::addImportType | ( | const char * | Type, |
const char * | ModuleName | ||
) |
Register an import filetype and a module name.
References Config().
void Application::AddParameterSet | ( | const char * | sName | ) |
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().
void Application::changeExportModule | ( | const char * | Type, |
const char * | OldModuleName, | ||
const char * | NewModuleName | ||
) |
Change the module name of a registered filetype.
void Application::changeImportModule | ( | const char * | Type, |
const char * | OldModuleName, | ||
const char * | NewModuleName | ||
) |
Change the module name of a registered filetype.
Check for link recursion depth.
depth | current depth |
no_throw | whether to throw exception |
The function uses an internal count of all objects in all documents as the limit of recursion depth.
Referenced by PartDesign::SubShapeBinder::getSubObject().
Commit/abort current active transactions.
abort | whether 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().
void Application::closeAllDocuments | ( | void | ) |
close all documents (without saving)
References closeDocument().
Referenced by Gui::MainWindow::closeAllDocuments(), Gui::GUIApplication::commitData(), and Gui::Application::tryClose().
bool Application::closeDocument | ( | const char * | name | ) |
Closes the document name and removes it from the application.
References Base::FileInfo::filePath(), setActiveDocument(), signalDeletedDocument, and signalDeleteDocument.
Referenced by Gui::Dialog::DocumentRecovery::accept(), closeAllDocuments(), openDocumentPrivate(), and openDocuments().
|
static |
Referenced by Gui::MainWindow::aboutImage(), StdViewScreenShot::activated(), addExportType(), addImportType(), Gui::RecentFilesAction::appendFile(), Gui::RecentMacrosAction::appendFile(), Gui::Application::Application(), Gui::SoFCOffscreenRenderer::createMIBA(), App::Document::exportObjects(), Gui::BitmapFactoryInst::instance(), Gui::Dialog::DlgGeneralImp::loadSettings(), Gui::Dialog::DlgSettingsLazyLoadedImp::loadSettings(), StartGui::DlgStartPreferencesImp::loadSettings(), Gui::MainWindow::loadWindowSettings(), Gui::MainWindow::MainWindow(), Gui::Dialog::AboutDialog::on_copyButton_clicked(), Gui::Dialog::ApplicationCache::periodicCheckOfSize(), processCmdLineFiles(), Gui::FileDialog::restoreLocation(), Gui::Application::runApplication(), App::Metadata::satisfies(), App::Document::Save(), Gui::Thumbnail::SaveDocFile(), Gui::MainWindow::saveWindowSettings(), Gui::Dialog::AboutDialog::setupLabels(), Gui::MainWindow::splashImage(), Gui::SplashObserver::SplashObserver(), Gui::MainWindow::startSplasher(), App::Metadata::supportsCurrentFreeCAD(), Gui::Dialog::TextureMapping::TextureMapping(), Gui::Application::workbenches(), and CDxfWrite::writeHeaderSection().
|
static |
|
static |
References Base::Console(), and Base::ConsoleSingleton::DetachObserver().
Referenced by destruct(), init(), Gui::Application::initApplication(), and Gui::Application::runApplication().
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().
const char * Application::getActiveTransaction | ( | int * | tid = nullptr | ) | const |
Return the current active transaction name and ID.
References App::Transaction::getLastID().
Referenced by App::Document::addOrRemovePropertyOfObject(), Gui::ExpressionBinding::apply(), Gui::Command::hasPendingCommand(), setActiveTransaction(), Gui::ExpressionBinding::setExpression(), PartDesignGui::TaskDressUpParameters::setupTransaction(), PartDesignGui::TaskTransformedParameters::setupTransaction(), PartDesignGui::TaskDressUpParameters::TaskDressUpParameters(), and PartDesignGui::TaskTransformedParameters::TaskTransformedParameters().
|
static |
Referenced by Gui::Application::runApplication().
|
static |
Referenced by Gui::Application::runApplication().
|
static |
Referenced by processCmdLineFiles(), and Gui::Application::runApplication().
App::Document * Application::getDocument | ( | const char * | Name | ) | const |
Retrieve a named document.
Referenced by DrawingGui::TaskDlgOrthoViews::accept(), PartGui::Mirroring::accept(), SpreadsheetGui::DlgBindSheet::accept(), PartGui::DlgExtrusion::apply(), PartDesignGui::TaskFeaturePick::buildFeatures(), Gui::SoFCUnifiedSelection::doAction(), Gui::TreeWidget::dropEvent(), App::PropertyLinkBase::exportSubName(), Gui::Application::exportTo(), App::DocumentT::getDocument(), App::DocumentObjectT::getDocument(), Gui::Application::getDocument(), Gui::Command::getDocument(), Gui::SelectionSingleton::getDocument(), App::ObjectIdentifier::getDocument(), Gui::SelectionObject::getObject(), PartGui::getShapeFromStrings(), PartGui::DlgExtrusion::getShapesToExtrude(), App::PropertyXLink::Paste(), StdCmdExpression::pasteExpressions(), DrawingGui::TaskDlgOrthoViews::reject(), Gui::AutoSaver::saveDocument(), Gui::QuantitySpinBox::setBoundToByName(), Gui::SelectionSingleton::setVisible(), and Gui::Application::sInsert().
Document * Application::getDocumentByPath | ( | const char * | path, |
PathMatchMode | checkCanonical = PathMatchMode::MatchAbsolute |
||
) | const |
Retrieve a document based on file path.
path | file path |
checkCanonical | file path matching mode, |
References Base::FileInfo::filePath(), MatchAbsolute, and MatchCanonical.
Referenced by openDocumentPrivate(), and openDocuments().
const char * Application::getDocumentName | ( | const App::Document * | doc | ) | const |
gets the (internal) name of the document
Referenced by MeshGui::DlgEvaluateMeshImp::on_repairAllTogether_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairDegeneratedButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairDuplicatedFacesButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairDuplicatedPointsButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairFoldsButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairIndicesButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairNonmanifoldsButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairOrientationButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairSelfIntersectionButton_clicked(), Gui::Document::saveAs(), and Gui::Document::saveCopy().
std::vector< App::Document * > Application::getDocuments | ( | ) | const |
get a list of all documents in the application
Referenced by StdCmdToggleSelectability::activated(), Gui::MainWindow::closeAllDocuments(), Gui::TreeWidget::contextMenuEvent(), App::ObjectIdentifier::getDocument(), Gui::Dialog::DlgPropertyLink::init(), StdCmdCloseAllWindows::isActive(), Cloud::Module::LinkXSetValue(), Gui::Document::saveAll(), PartGui::DlgSettings3DViewPart::saveSettings(), and Attacher::AttachEngine::verifyReferencesAreSafe().
|
static |
Referenced by Gui::Dialog::DocumentRecoveryHandler::checkForPreviousCrashes(), Gui::StdCmdDownloadOnlineHelp::createAction(), Gui::SoFCOffscreenRenderer::createMIBA(), App::Document::getTransientDirectoryName(), Gui::StdCmdDownloadOnlineHelp::languageChange(), Gui::Dialog::AboutDialog::on_copyButton_clicked(), Gui::Dialog::ApplicationCache::periodicCheckOfSize(), Gui::GUISingleApplication::Private::Private(), Gui::Application::runApplication(), and Gui::SoFCOffscreenRenderer::writeToImageFile().
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().
std::map< std::string, std::string > Application::getExportFilters | ( | void | ) | const |
Return a list of all export filters.
std::vector< std::string > Application::getExportModules | ( | ) | const |
Return a list of all modules.
std::vector< std::string > Application::getExportModules | ( | const char * | Type | ) | const |
Return a list of modules that support the given filetype.
Referenced by processCmdLineFiles().
std::vector< std::string > Application::getExportTypes | ( | const char * | Module | ) | const |
Return a list of filetypes that are supported by a module.
std::vector< std::string > Application::getExportTypes | ( | void | ) | const |
Return a list of all filetypes.
|
static |
|
static |
Referenced by Gui::MainWindow::aboutImage(), Gui::Dialog::DlgMacroExecuteImp::accept(), Gui::MacroCommand::activated(), Gui::StdCmdDownloadOnlineHelp::activated(), Gui::Dialog::DlgCustomActionsImp::DlgCustomActionsImp(), Gui::Dialog::DlgMacroExecuteImp::fillUpList(), Gui::BitmapFactoryInst::instance(), Gui::PyResource::load(), Gui::Dialog::DlgMacroExecuteImp::on_editButton_clicked(), Gui::Application::runApplication(), Gui::Application::sAddIconPath(), Gui::Application::sAddLangPath(), Gui::Application::sAddResPath(), and Gui::MainWindow::splashImage().
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().
std::map< std::string, std::string > Application::getImportFilters | ( | void | ) | const |
Return a list of all import filters.
std::vector< std::string > Application::getImportModules | ( | ) | const |
Return a list of all modules.
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().
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().
std::vector< std::string > Application::getImportTypes | ( | void | ) | const |
Return a list of all filetypes.
|
static |
std::set< DocumentObject * > Application::getLinksTo | ( | const DocumentObject * | obj, |
int | options, | ||
int | maxCount = 0 |
||
) | const |
Return the links to a given object.
obj | the linked object. If NULL, then all links are returned. |
option |
maxCount | limit the number of links returned, 0 means no limit |
Referenced by hasLinksTo().
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:
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().
ParameterManager * Application::GetParameterSet | ( | const char * | sName | ) | const |
const std::map< std::string, ParameterManager * > & Application::GetParameterSetList | ( | void | ) | const |
Referenced by Gui::Dialog::DlgParameterImp::DlgParameterImp().
|
static |
Referenced by RobotGui::Workbench::activated(), TechDraw::Preferences::bitmapFill(), TechDraw::Preferences::defaultTemplate(), TechDraw::Preferences::defaultTemplateDir(), Drawing::FeaturePage::execute(), TechDraw::DrawSVGTemplate::execute(), TechDraw::DrawSVGTemplate::getEditableTextsFromTemplate(), Drawing::FeaturePage::getEditableTextsFromTemplate(), TechDraw::Preferences::lineGroupFile(), Drawing::FeaturePage::onDocumentRestored(), Raytracing::LuxProject::onDocumentRestored(), Raytracing::RayProject::onDocumentRestored(), TechDraw::Preferences::patFile(), Gui::PreferencePackManager::PreferencePackManager(), TechDraw::DrawTileWeld::prefSymbol(), Gui::Application::runApplication(), RaytracingGui::ViewProviderLux::setEdit(), RaytracingGui::ViewProviderPovray::setEdit(), Import::ImpExpDxfWrite::setOptions(), TechDrawGui::SymbolChooser::setUiPrimary(), Gui::Dialog::DlgPreferencePackManagementImp::showEvent(), TechDraw::Preferences::svgFile(), Gui::PreferencePackManager::templateFiles(), and TechDrawGui::PreferencesGui::weldingDirectory().
ParameterManager & Application::GetSystemParameter | ( | void | ) |
returns the system parameter
|
static |
References Base::FileInfo::getTempFileName(), and getTempPath().
Referenced by StdCmdDuplicateSelection::activated(), App::Document::copyObject(), Gui::MainWindow::createMimeDataFromSelection(), App::Document::importLinks(), MeshPartGui::Mesh2ShapeGmsh::Mesh2ShapeGmsh(), MeshGui::RemeshGmsh::RemeshGmsh(), Fem::FemMesh::RestoreDocFile(), Fem::PropertyPostDataObject::RestoreDocFile(), Fem::FemMesh::SaveDocFile(), and Fem::PropertyPostDataObject::SaveDocFile().
|
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().
std::string Application::getUniqueDocumentName | ( | const char * | Name, |
bool | tempDoc = false |
||
) | const |
find a unique document name
References Base::Tools::getIdentifier(), Base::Tools::getUniqueName(), and App::Document::TempDoc.
Referenced by Cloud::Module::LinkXSetValue(), and newDocument().
|
static |
Referenced by Gui::PreferencePack::apply(), WebGui::BrowserView::BrowserView(), Gui::PreferencePackManager::configBackups(), Gui::PreferencePackManager::deleteUserPack(), WebGui::FcCookieJar::FcCookieJar(), Gui::BitmapFactoryInst::instance(), Gui::Dialog::AboutDialog::on_copyButton_clicked(), Drawing::FeaturePage::onDocumentRestored(), Raytracing::LuxProject::onDocumentRestored(), Raytracing::RayProject::onDocumentRestored(), Gui::PreferencePackManager::PreferencePackManager(), Gui::PythonConsoleP::PythonConsoleP(), Gui::Application::runApplication(), Gui::PreferencePackManager::save(), RaytracingGui::ViewProviderLux::setEdit(), RaytracingGui::ViewProviderPovray::setEdit(), Gui::Dialog::DlgPreferencePackManagementImp::showEvent(), and Gui::PreferencePackManager::templateFiles().
|
static |
Referenced by Gui::Dialog::DocumentRecoveryHandler::checkForPreviousCrashes(), Gui::Dialog::DlgSettingsCacheDirectory::DlgSettingsCacheDirectory(), Gui::Dialog::DlgEditFileIncludePropertyExternal::Do(), App::Document::getTransientDirectoryName(), Gui::Dialog::DocumentRecovery::onDeleteSection(), Gui::Dialog::ApplicationCache::performAction(), Gui::Application::runApplication(), and Gui::Dialog::ApplicationCache::size().
|
static |
|
static |
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().
bool Application::hasLinksTo | ( | const DocumentObject * | obj | ) | const |
Check if there is any link to the given object.
References getLinksTo().
Referenced by StdCmdLinkSelectAllLinks::isActive().
|
static |
References destructObserver(), and initTypes().
Referenced by DocumentObject.DocumentObject::onChanged().
|
static |
References Base::Persistence::getClassTypeId(), Base::BaseClass::init(), Base::Type::init(), Base::Exception::init(), and Base::Persistence::init().
Referenced by init().
bool Application::isClosingAll | ( | ) | const |
Indicate the application is closing all document.
bool Application::isRestoring | ( | ) | const |
Indicate whether the application is opening (restoring) some document.
References App::Document::isAnyRestoring().
Referenced by App::PropertyXLink::setAllowPartial().
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().
Open an existing document from a file.
References openDocuments().
Referenced by processFiles(), Gui::Application::reopen(), and App::PropertyXLink::setAllowPartial().
|
protected |
open single document only
References closeDocument(), Base::FileInfo::exists(), App::Document::FileName, Base::FileInfo::fileNamePure(), Base::FileInfo::filePath(), getDocumentByPath(), App::Document::getName(), App::PropertyString::getValue(), MatchCanonicalWarning, draftfunctions.move::move(), newDocument(), App::Document::PartialDoc, App::PartialObject, App::Document::PartialRestore, App::Document::restore(), and App::PropertyString::setValue().
Referenced by 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.
filenames | input file names |
paths | optional input file path in case it is different from filenames (mainly used during recovery). |
labels | optional label assign to document (mainly used during recovery). |
errs | optional 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. |
createView | whether to signal Gui module to create view on restore. |
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().
|
static |
References Config(), Base::Console(), Base::ConsoleSingleton::Error(), Base::Tools::escapeEncodeFilename(), Base::FileInfo::extension(), App::GetApplication(), getCmdLineFiles(), getExportModules(), Base::Interpreter(), Base::InterpreterSingleton::loadModule(), processFiles(), Base::InterpreterSingleton::runString(), Base::InterpreterSingleton::runStringArg(), and Base::ConsoleSingleton::Warning().
Referenced by runApplication().
|
static |
References Base::InterpreterSingleton::addPythonPath(), Base::Console(), Base::ConsoleSingleton::Error(), Base::Tools::escapedUnicodeFromUtf8(), Base::Tools::escapeEncodeFilename(), App::GetApplication(), getImportModules(), Base::Interpreter(), Base::InterpreterSingleton::loadModule(), Base::ConsoleSingleton::Log(), openDocument(), Base::InterpreterSingleton::runFile(), Base::InterpreterSingleton::runStringArg(), and Base::ConsoleSingleton::Warning().
Referenced by processCmdLineFiles().
void Application::RemoveParameterSet | ( | const char * | sName | ) |
|
protected |
get called by the document when the name is changing
References signalRenameDocument.
|
static |
void Application::setActiveDocument | ( | App::Document * | pDoc | ) |
Set the active document.
References App::Document::getPyObject(), and signalActiveDocument.
Referenced by closeDocument(), Gui::TreeWidget::contextMenuEvent(), Cloud::Module::LinkXSetValue(), newDocument(), Gui::TreeWidget::onReloadDoc(), openDocuments(), App::Document::restore(), and setActiveDocument().
void Application::setActiveDocument | ( | const char * | Name | ) |
References setActiveDocument().
Setup a pending application-wide active transaction.
name | new transaction name |
persist | by 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 |
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().
|
protected |
References signalAbortTransaction.
Referenced by newDocument().
|
protected |
References signalActivatedObject.
Referenced by newDocument().
|
protected |
References signalBeforeChangeDocument.
Referenced by newDocument().
|
protected |
References signalBeforeChangeObject.
Referenced by newDocument().
|
protected |
References signalBeforeRecomputeDocument.
Referenced by newDocument().
|
protected |
References signalChangedDocument.
Referenced by newDocument().
|
protected |
References signalChangedObject.
Referenced by newDocument().
|
protected |
References signalChangePropertyEditor.
Referenced by newDocument().
|
protected |
References signalCommitTransaction.
Referenced by newDocument().
|
protected |
References signalDeletedObject.
Referenced by newDocument().
|
protected |
References signalFinishSaveDocument.
Referenced by newDocument().
|
protected |
References signalNewObject.
Referenced by newDocument().
|
protected |
References signalOpenTransaction.
Referenced by newDocument().
|
protected |
References signalRecomputed.
Referenced by newDocument().
|
protected |
References signalObjectRecomputed.
Referenced by newDocument().
|
protected |
References signalRedoDocument.
Referenced by newDocument().
|
protected |
References signalRelabelObject.
Referenced by newDocument().
|
protected |
References signalStartSaveDocument.
Referenced by newDocument().
|
protected |
References signalUndoDocument.
Referenced by newDocument().
|
friend |
|
friend |
|
friend |
|
friend |
Singleton getter of the Application.
Referenced by App::Application::TransactionSignaller::TransactionSignaller(), and App::Application::TransactionSignaller::~TransactionSignaller().
boost::signals2::signal<void (const App::Document&)> App::Application::signalAbortTransaction |
Referenced by slotAbortTransaction().
boost::signals2::signal<void (const App::DocumentObject&)> App::Application::signalActivatedObject |
signal on activated Object
Referenced by slotActivatedObject().
boost::signals2::signal<void (const Document&)> App::Application::signalActiveDocument |
signal on activating Document
Referenced by Gui::Application::Application(), App::DocumentObserver::DocumentObserver(), setActiveDocument(), and Gui::TaskView::TaskView::TaskView().
boost::signals2::signal<void (const App::ExtensionContainer&, std::string extension)> App::Application::signalAddedDynamicExtension |
signal after the extension was added
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().
boost::signals2::signal<void (const App::ExtensionContainer&, std::string extension)> App::Application::signalBeforeAddingDynamicExtension |
signal before adding the extension
boost::signals2::signal<void (const App::Document&, const App::Property&)> App::Application::signalBeforeChangeDocument |
signal before change of doc property
Referenced by slotBeforeChangeDocument().
boost::signals2::signal<void (const App::DocumentObject&, const App::Property&)> App::Application::signalBeforeChangeObject |
signal on changed Object
Referenced by slotBeforeChangeObject().
boost::signals2::signal<void (bool)> App::Application::signalBeforeCloseTransaction |
signal before close/abort active transaction
boost::signals2::signal<void (const App::Document&)> App::Application::signalBeforeRecomputeDocument |
signal before recomputed document
Referenced by slotBeforeRecompute().
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().
boost::signals2::signal<void (const App::DocumentObject&, const App::Property&)> App::Application::signalChangedObject |
signal on changed Object
Referenced by PartGui::DlgBooleanOperation::DlgBooleanOperation(), ShapeCache::init(), Gui::PropertyView::PropertyView(), slotChangedObject(), and MeshGui::MeshFillHole::startEditing().
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().
boost::signals2::signal<void (bool)> App::Application::signalCloseTransaction |
signal after close/abort active transaction
boost::signals2::signal<void (const App::Document&)> App::Application::signalCommitTransaction |
Referenced by slotCommitTransaction().
boost::signals2::signal<void ()> App::Application::signalDeletedDocument |
signal on already deleted Document
Referenced by closeDocument(), and Gui::TaskView::TaskView::TaskView().
boost::signals2::signal<void (const App::DocumentObject&)> App::Application::signalDeletedObject |
signal on deleted Object
Referenced by PartGui::DlgFilletEdges::DlgFilletEdges(), ShapeCache::init(), Gui::PropertyView::PropertyView(), Gui::SelectionSingleton::SelectionSingleton(), and slotDeletedObject().
boost::signals2::signal<void (const Document&)> App::Application::signalDeleteDocument |
signal on document getting deleted
Referenced by PartDesignGui::Workbench::activated(), Gui::Application::Application(), App::Document::clearDocument(), closeDocument(), PartGui::DlgFilletEdges::DlgFilletEdges(), App::DocumentObserver::DocumentObserver(), ShapeCache::init(), MeasureInfo::MeasureInfo(), DrawingGui::OrthoViews::OrthoViews(), Gui::DocumentWeakPtrT::Private::Private(), App::Document::restore(), and App::DocumentObjectWeakPtrT::Private::set().
boost::signals2::signal<void ()> App::Application::signalFinishOpenDocument |
signal on finished opening document(s)
Referenced by openDocuments().
boost::signals2::signal<void (const Document&)> App::Application::signalFinishRestoreDocument |
signal on restoring Document
Referenced by PartDesignGui::Workbench::activated(), App::Document::afterRestore(), Cloud::Module::cloudRestore(), and Gui::Document::Document().
boost::signals2::signal<void (const Document&, const std::string&)> App::Application::signalFinishSaveDocument |
signal on saved Document
Referenced by slotFinishSaveDocument().
boost::signals2::signal<void (const App::DocumentObject&)> App::Application::signalNewObject |
signal on new Object
Referenced by PartGui::DlgBooleanOperation::DlgBooleanOperation(), and slotNewObject().
boost::signals2::signal<void (const App::DocumentObject&)> App::Application::signalObjectRecomputed |
signal on recomputed document object
Referenced by slotRecomputedObject().
boost::signals2::signal<void (const App::Document&, std::string)> App::Application::signalOpenTransaction |
Referenced by slotOpenTransaction().
boost::signals2::signal<void (const Document&)> App::Application::signalPendingReloadDocument |
signal on pending reloading of a partial Document
Referenced by App::Document::afterRestore().
boost::signals2::signal<void (const App::Document&)> App::Application::signalRecomputed |
signal on recomputed document
Referenced by slotRecomputed().
boost::signals2::signal<void ()> App::Application::signalRedo |
signal on application wide redo
Referenced by Gui::Document::redo().
boost::signals2::signal<void (const Document&)> App::Application::signalRedoDocument |
signal on redo in document
Referenced by Gui::PropertyView::PropertyView(), slotRedoDocument(), and Gui::TaskView::TaskView::TaskView().
boost::signals2::signal<void (const Document&)> App::Application::signalRelabelDocument |
signal on relabeling Document (user name)
Referenced by Gui::Application::Application(), App::Document::onChanged(), and App::PropertyExpressionContainer::PropertyExpressionContainer().
boost::signals2::signal<void (const App::DocumentObject&)> App::Application::signalRelabelObject |
signal on relabeled Object
Referenced by slotRelabelObject().
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().
boost::signals2::signal<void (const Document&)> App::Application::signalRenameDocument |
signal on renaming Document (internal name)
Referenced by Gui::Application::Application(), and renameDocument().
boost::signals2::signal<void (const Document&)> App::Application::signalSaveDocument |
signal on saving Document
Referenced by App::Document::saveToFile().
boost::signals2::signal<void (const Document&)> App::Application::signalShowHidden |
signal on show hidden items
Referenced by Gui::Application::Application(), Gui::Document::Document(), and App::Document::onChanged().
boost::signals2::signal<void ()> App::Application::signalStartOpenDocument |
signal on start opening document(s)
Referenced by openDocuments().
boost::signals2::signal<void (const Document&)> App::Application::signalStartRestoreDocument |
signal on starting to restore Document
Referenced by Cloud::Module::cloudRestore(), Gui::Document::Document(), and App::Document::restore().
boost::signals2::signal<void (const Document&, const std::string&)> App::Application::signalStartSaveDocument |
signal on starting to save Document
Referenced by slotStartSaveDocument().
boost::signals2::signal<void ()> App::Application::signalUndo |
signal on application wide undo
Referenced by Gui::Document::undo().
boost::signals2::signal<void (const Document&)> App::Application::signalUndoDocument |
signal on undo in document
Referenced by Gui::PropertyView::PropertyView(), slotUndoDocument(), and Gui::TaskView::TaskView::TaskView().