diff --git a/src/Gui/Control.h b/src/Gui/Control.h index e95db5453..68b237588 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 6772575bc..2f05ec435 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 64ce68f4f..7222ea0f8 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 f163f6da7..4ba739272 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 9c0c99ec7..20d16bd39 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 9f95bb9c3..7a19fef51 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 06b735114..e05fd9fd2 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 3587aba33..dbc5f9d4e 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 c78aa4183..e69295b34 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 2d209b051..ad5ef90de 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 1240a422f..764246cf8 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 06de7ae15..c49766548 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; }