diff --git a/src/Gui/Control.h b/src/Gui/Control.h index e95db54535..68b2375889 100644 --- a/src/Gui/Control.h +++ b/src/Gui/Control.h @@ -79,8 +79,20 @@ public: QTabWidget* tabPanel() const; //@} + /*! + If a task dialog is open then it indicates whether this task dialog allows other commands to modify + the document while it is open. If no task dialog is open true is returned. + */ bool isAllowedAlterDocument(void) const; + /*! + If a task dialog is open then it indicates whether this task dialog allows other commands to modify + the 3d view while it is open. If no task dialog is open true is returned. + */ bool isAllowedAlterView(void) const; + /*! + If a task dialog is open then it indicates whether this task dialog allows other commands to modify + the selection while it is open. If no task dialog is open true is returned. + */ bool isAllowedAlterSelection(void) const; public Q_SLOTS: diff --git a/src/Gui/TaskView/TaskDialog.h b/src/Gui/TaskView/TaskDialog.h index 6772575bce..2f05ec4355 100644 --- a/src/Gui/TaskView/TaskDialog.h +++ b/src/Gui/TaskView/TaskDialog.h @@ -71,10 +71,22 @@ public: { return documentName; } void setDocumentName(const std::string& doc) { documentName = doc; } + /*! + Indicates whether this task dialog allows other commands to modify + the document while it is open. + */ virtual bool isAllowedAlterDocument(void) const { return false; } + /*! + Indicates whether this task dialog allows other commands to modify + the 3d view while it is open. + */ virtual bool isAllowedAlterView(void) const { return true; } + /*! + Indicates whether this task dialog allows other commands to modify + the selection while it is open. + */ virtual bool isAllowedAlterSelection(void) const { return true; } virtual bool needsFullSpace() const diff --git a/src/Gui/TaskView/TaskDialogPython.h b/src/Gui/TaskView/TaskDialogPython.h index 64ce68f4f2..7222ea0f8f 100644 --- a/src/Gui/TaskView/TaskDialogPython.h +++ b/src/Gui/TaskView/TaskDialogPython.h @@ -75,16 +75,33 @@ public: virtual QDialogButtonBox::StandardButtons getStandardButtons(void) const; virtual void modifyStandardButtons(QDialogButtonBox*); + /*! + Indicates whether this task dialog allows other commands to modify + the document while it is open. + */ virtual bool isAllowedAlterDocument(void) const; + /*! + Indicates whether this task dialog allows other commands to modify + the 3d view while it is open. + */ virtual bool isAllowedAlterView(void) const; + /*! + Indicates whether this task dialog allows other commands to modify + the selection while it is open. + */ virtual bool isAllowedAlterSelection(void) const; virtual bool needsFullSpace() const; public: + /// is called by the framework when the dialog is opened virtual void open(); + /// is called by the framework if a button is clicked which has no accept or reject role virtual void clicked(int); + /// is called by the framework if the dialog is accepted (Ok) virtual bool accept(); + /// is called by the framework if the dialog is rejected (Cancel) virtual bool reject(); + /// is called by the framework if the user press the help button virtual void helpRequested(); private: diff --git a/src/Mod/Fem/Gui/TaskFemConstraint.h b/src/Mod/Fem/Gui/TaskFemConstraint.h index f163f6da7c..4ba7392721 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraint.h +++ b/src/Mod/Fem/Gui/TaskFemConstraint.h @@ -86,7 +86,6 @@ public: virtual bool accept(); /// is called by the framework if the dialog is rejected (Cancel) virtual bool reject(); - /// is called by the framework if the user presses the help button virtual bool isAllowedAlterDocument(void) const { return false; } diff --git a/src/Mod/PartDesign/Gui/TaskChamferParameters.h b/src/Mod/PartDesign/Gui/TaskChamferParameters.h index 9c0c99ec7f..20d16bd396 100644 --- a/src/Mod/PartDesign/Gui/TaskChamferParameters.h +++ b/src/Mod/PartDesign/Gui/TaskChamferParameters.h @@ -90,7 +90,6 @@ public: virtual bool accept(); /// is called by the framework if the dialog is rejected (Cancel) virtual bool reject(); - /// is called by the framework if the user presses the help button virtual bool isAllowedAlterDocument(void) const { return false; } diff --git a/src/Mod/PartDesign/Gui/TaskDraftParameters.h b/src/Mod/PartDesign/Gui/TaskDraftParameters.h index 9f95bb9c36..7a19fef51f 100644 --- a/src/Mod/PartDesign/Gui/TaskDraftParameters.h +++ b/src/Mod/PartDesign/Gui/TaskDraftParameters.h @@ -108,7 +108,6 @@ public: virtual bool accept(); /// is called by the framework if the dialog is rejected (Cancel) virtual bool reject(); - /// is called by the framework if the user presses the help button virtual bool isAllowedAlterDocument(void) const { return false; } diff --git a/src/Mod/PartDesign/Gui/TaskFilletParameters.h b/src/Mod/PartDesign/Gui/TaskFilletParameters.h index 06b735114e..e05fd9fd22 100644 --- a/src/Mod/PartDesign/Gui/TaskFilletParameters.h +++ b/src/Mod/PartDesign/Gui/TaskFilletParameters.h @@ -90,7 +90,6 @@ public: virtual bool accept(); /// is called by the framework if the dialog is rejected (Cancel) virtual bool reject(); - /// is called by the framework if the user presses the help button virtual bool isAllowedAlterDocument(void) const { return false; } diff --git a/src/Mod/PartDesign/Gui/TaskGrooveParameters.h b/src/Mod/PartDesign/Gui/TaskGrooveParameters.h index 3587aba337..dbc5f9d4e0 100644 --- a/src/Mod/PartDesign/Gui/TaskGrooveParameters.h +++ b/src/Mod/PartDesign/Gui/TaskGrooveParameters.h @@ -99,7 +99,6 @@ public: virtual bool accept(); /// is called by the framework if the dialog is rejected (Cancel) virtual bool reject(); - /// is called by the framework if the user presses the help button virtual bool isAllowedAlterDocument(void) const { return false; } diff --git a/src/Mod/PartDesign/Gui/TaskPadParameters.h b/src/Mod/PartDesign/Gui/TaskPadParameters.h index c78aa41836..e69295b349 100644 --- a/src/Mod/PartDesign/Gui/TaskPadParameters.h +++ b/src/Mod/PartDesign/Gui/TaskPadParameters.h @@ -107,7 +107,6 @@ public: virtual bool accept(); /// is called by the framework if the dialog is rejected (Cancel) virtual bool reject(); - /// is called by the framework if the user presses the help button virtual bool isAllowedAlterDocument(void) const { return false; } diff --git a/src/Mod/PartDesign/Gui/TaskPocketParameters.h b/src/Mod/PartDesign/Gui/TaskPocketParameters.h index 2d209b0511..ad5ef90dea 100644 --- a/src/Mod/PartDesign/Gui/TaskPocketParameters.h +++ b/src/Mod/PartDesign/Gui/TaskPocketParameters.h @@ -104,7 +104,6 @@ public: virtual bool accept(); /// is called by the framework if the dialog is rejected (Cancel) virtual bool reject(); - /// is called by the framework if the user presses the help button virtual bool isAllowedAlterDocument(void) const { return false; } diff --git a/src/Mod/PartDesign/Gui/TaskRevolutionParameters.h b/src/Mod/PartDesign/Gui/TaskRevolutionParameters.h index 1240a422f0..764246cf8b 100644 --- a/src/Mod/PartDesign/Gui/TaskRevolutionParameters.h +++ b/src/Mod/PartDesign/Gui/TaskRevolutionParameters.h @@ -99,7 +99,6 @@ public: virtual bool accept(); /// is called by the framework if the dialog is rejected (Cancel) virtual bool reject(); - /// is called by the framework if the user presses the help button virtual bool isAllowedAlterDocument(void) const { return false; } diff --git a/src/Mod/PartDesign/Gui/TaskTransformedParameters.h b/src/Mod/PartDesign/Gui/TaskTransformedParameters.h index 06de7ae15c..c497665484 100644 --- a/src/Mod/PartDesign/Gui/TaskTransformedParameters.h +++ b/src/Mod/PartDesign/Gui/TaskTransformedParameters.h @@ -132,7 +132,6 @@ public: virtual bool accept(); /// is called by the framework if the dialog is rejected (Cancel) virtual bool reject(); - /// is called by the framework if the user presses the help button virtual bool isAllowedAlterDocument(void) const { return false; }