|
FreeCAD C++
|
#include <Gui/Application.h>
The Application main class This is the central class of the GUI
Public Member Functions | |
| Application (bool GUIenabled) | |
| construction | |
| ~Application () | |
| destruction | |
| bool | isClosing (void) |
| true when the application shutting down | |
methods for support of files | |
| void | open (const char *FileName, const char *Module) |
| open a file | |
| void | importFrom (const char *FileName, const char *DocName, const char *Module) |
| import a file into the document DocName | |
| void | exportTo (const char *FileName, const char *DocName, const char *Module) |
| Export objects from the document DocName to a single file. | |
methods for View handling | |
| bool | sendMsgToActiveView (const char *pMsg, const char **ppReturn=0) |
| send Messages to the active view | |
| bool | sendHasMsgToActiveView (const char *pMsg) |
| send Messages test to the active view | |
| void | attachView (Gui::BaseView *pcView) |
| Attach a view (get called by the FCView constructor) | |
| void | detachView (Gui::BaseView *pcView) |
| Detach a view (get called by the FCView destructor) | |
| void | viewActivated (Gui::MDIView *pcView) |
| get called if a view gets activated, this manage the whole activation scheme | |
| void | onUpdate (void) |
| call update to all documents and all views (costly!) | |
| void | updateActive (void) |
| call update to all views of the active document | |
workbench handling | |
| bool | activateWorkbench (const char *name) |
| Activate a named workbench. | |
| QPixmap | workbenchIcon (const QString &) const |
| QString | workbenchToolTip (const QString &) const |
| QString | workbenchMenuText (const QString &) const |
| QStringList | workbenches (void) const |
| void | setupContextMenu (const char *recipient, MenuItem *) const |
User Commands | |
| Gui::MacroManager * | macroManager (void) |
| Get macro manager. | |
| Gui::CommandManager & | commandManager (void) |
| Reference to the command manager. | |
| void | createStandardOperations () |
| helper which create the commands | |
Public Attributes | |
Signals of the Application | |
| boost::signals2::signal< void(const Gui::Document &)> | signalNewDocument |
| signal on new Document | |
| boost::signals2::signal< void(const Gui::Document &)> | signalDeleteDocument |
| signal on deleted Document | |
| boost::signals2::signal< void(const Gui::Document &)> | signalRelabelDocument |
| signal on relabeling Document | |
| boost::signals2::signal< void(const Gui::Document &)> | signalRenameDocument |
| signal on renaming Document | |
| boost::signals2::signal< void(const Gui::Document &)> | signalActiveDocument |
| signal on activating Document | |
| boost::signals2::signal< void(const Gui::ViewProvider &)> | signalNewObject |
| signal on new Object | |
| boost::signals2::signal< void(const Gui::ViewProvider &)> | signalDeletedObject |
| signal on deleted Object | |
| boost::signals2::signal< void(const Gui::ViewProvider &, const App::Property &)> | signalChangedObject |
| signal on changed object property | |
| boost::signals2::signal< void(const Gui::ViewProvider &)> | signalRelabelObject |
| signal on renamed Object | |
| boost::signals2::signal< void(const Gui::ViewProvider &)> | signalActivatedObject |
| signal on activated Object | |
| boost::signals2::signal< void(const char *)> | signalActivateWorkbench |
| signal on activated workbench | |
| boost::signals2::signal< void(const char *)> | signalAddWorkbench |
| signal on added workbench | |
| boost::signals2::signal< void(const char *)> | signalRemoveWorkbench |
| signal on removed workbench | |
| boost::signals2::signal< void(const Gui::MDIView *)> | signalActivateView |
| signal on activating view | |
| boost::signals2::signal< void(const Gui::ViewProviderDocumentObject &)> | signalInEdit |
| signal on entering in edit mode | |
| boost::signals2::signal< void(const Gui::ViewProviderDocumentObject &)> | signalResetEdit |
| signal on leaving edit mode | |
methods for Document handling | |
| void | onLastWindowClosed (Gui::Document *pcDoc) |
| message when a GuiDocument is about to vanish | |
| Gui::Document * | activeDocument (void) const |
| Getter for the active document. | |
| void | setActiveDocument (Gui::Document *pcDocument) |
| Set the active document. | |
| Gui::Document * | getDocument (const char *name) const |
| Gui::Document * | getDocument (const App::Document *pDoc) const |
| Gui::MDIView * | activeView (void) const |
| Getter for the active view of the active document or null. | |
| void | activateView (const Base::Type &, bool create=false) |
| Activate a view of the given type of the active document. | |
| void | showViewProvider (const App::DocumentObject *) |
| Shows the associated view provider of the given object. | |
| void | hideViewProvider (const App::DocumentObject *) |
| Hides the associated view provider of the given object. | |
| Gui::ViewProvider * | getViewProvider (const App::DocumentObject *) const |
| Get the view provider of the given object. | |
| void | slotNewDocument (const App::Document &) |
| Observer message from the Application. | |
| void | slotDeleteDocument (const App::Document &) |
| void | slotRelabelDocument (const App::Document &) |
| void | slotRenameDocument (const App::Document &) |
| void | slotActiveDocument (const App::Document &) |
| void | slotNewObject (const ViewProvider &) |
| void | slotDeletedObject (const ViewProvider &) |
| void | slotChangedObject (const ViewProvider &, const App::Property &Prop) |
| void | slotRelabelObject (const ViewProvider &) |
| void | slotActivatedObject (const ViewProvider &) |
| void | slotInEdit (const Gui::ViewProviderDocumentObject &) |
| void | slotResetEdit (const Gui::ViewProviderDocumentObject &) |
Init, Destruct an Access methods | |
| static Application * | Instance |
| some kind of singelton | |
| void | tryClose (QCloseEvent *e) |
| static void | initApplication (void) |
| static void | initTypes (void) |
| static void | initOpenInventor (void) |
| static void | runInitGuiScript (void) |
| static void | runApplication (void) |
| Gui::Document* Gui::Application::getDocument | ( | const char * | name | ) | const |
Retrieves a pointer to the Gui::Document whose App::Document has the name name. If no such document exists 0 is returned.
| Gui::Document* Gui::Application::getDocument | ( | const App::Document * | pDoc | ) | const |
Retrieves a pointer to the Gui::Document whose App::Document matches to pDoc. If no such document exists 0 is returned.
1.8.15