From 75fa455c5d99dc84e66eea748175b19db367d502 Mon Sep 17 00:00:00 2001 From: berniev Date: Tue, 9 Aug 2022 13:56:15 +1000 Subject: [PATCH] Gui: Use override etc 2 --- src/Gui/3Dconnexion/GuiAbstractNativeEvent.h | 2 +- src/Gui/3Dconnexion/GuiNativeEventMac.h | 2 +- src/Gui/Action.cpp | 6 +- src/Gui/ActionFunction.h | 4 +- src/Gui/Assistant.h | 2 +- src/Gui/AutoSaver.h | 10 +- src/Gui/BitmapFactory.h | 2 +- src/Gui/CallTips.h | 10 +- src/Gui/ComboView.h | 4 +- src/Gui/Command.h | 76 ++-- src/Gui/CommandDoc.cpp | 8 +- src/Gui/CommandLink.cpp | 14 +- src/Gui/CommandStd.cpp | 12 +- src/Gui/CommandTest.cpp | 14 +- src/Gui/CommandView.cpp | 26 +- src/Gui/CommandWindow.cpp | 2 +- src/Gui/Control.h | 2 +- src/Gui/DAGView/DAGFilter.h | 4 +- src/Gui/DAGView/DAGModel.h | 12 +- src/Gui/DAGView/DAGRectItem.h | 2 +- src/Gui/DAGView/DAGView.h | 6 +- src/Gui/DlgActionsImp.h | 18 +- src/Gui/DlgActivateWindowImp.h | 4 +- src/Gui/DlgCommandsImp.h | 10 +- src/Gui/DlgCreateNewPreferencePackImp.h | 2 +- src/Gui/DlgCustomizeImp.h | 4 +- src/Gui/DlgCustomizeSpNavSettings.h | 10 +- src/Gui/DlgCustomizeSpaceball.h | 44 +- src/Gui/DlgDisplayPropertiesImp.h | 20 +- src/Gui/DlgEditFileIncludePropertyExternal.h | 2 +- src/Gui/DlgEditorImp.h | 8 +- src/Gui/DlgExpressionInput.h | 10 +- src/Gui/DlgGeneralImp.h | 8 +- src/Gui/DlgKeyboardImp.h | 12 +- src/Gui/DlgMacroExecuteImp.cpp | 2 +- src/Gui/DlgMacroExecuteImp.h | 4 +- src/Gui/DlgMacroRecordImp.h | 2 +- src/Gui/DlgMaterialPropertiesImp.h | 2 +- src/Gui/DlgObjectSelection.h | 6 +- src/Gui/DlgOnlineHelpImp.h | 8 +- src/Gui/DlgParameterImp.h | 90 ++-- src/Gui/DlgPreferencesImp.h | 10 +- src/Gui/DlgProjectInformationImp.h | 4 +- src/Gui/DlgProjectUtility.h | 2 +- src/Gui/DlgPropertyLink.cpp | 4 +- src/Gui/DlgPropertyLink.h | 18 +- src/Gui/DlgReportViewImp.h | 8 +- src/Gui/DlgRevertToBackupConfigImp.h | 2 +- src/Gui/DlgRunExternal.h | 6 +- src/Gui/DlgSettings3DViewImp.h | 8 +- src/Gui/DlgSettingsCacheDirectory.h | 8 +- src/Gui/DlgSettingsColorGradientImp.h | 4 +- src/Gui/DlgSettingsDocumentImp.h | 8 +- src/Gui/DlgSettingsImageImp.h | 4 +- src/Gui/DlgSettingsLazyLoadedImp.h | 8 +- src/Gui/DlgSettingsMacroImp.h | 8 +- src/Gui/DlgSettingsNavigation.h | 10 +- src/Gui/DlgSettingsPythonConsole.h | 8 +- src/Gui/DlgSettingsSelection.h | 8 +- src/Gui/DlgSettingsUnitsImp.h | 8 +- src/Gui/DlgSettingsViewColor.h | 8 +- src/Gui/DlgToolbarsImp.h | 34 +- src/Gui/DlgUndoRedo.h | 4 +- src/Gui/DlgUnitsCalculatorImp.h | 6 +- src/Gui/DlgWorkbenchesImp.h | 12 +- src/Gui/DockWindow.h | 12 +- src/Gui/DockWindowManager.h | 2 +- src/Gui/Document.h | 14 +- src/Gui/DocumentModel.cpp | 14 +- src/Gui/DocumentModel.h | 20 +- src/Gui/DocumentRecovery.h | 8 +- src/Gui/DownloadItem.h | 10 +- src/Gui/DownloadManager.h | 10 +- src/Gui/EditorView.h | 44 +- src/Gui/ExpressionBindingPy.h | 4 +- src/Gui/ExpressionCompleter.cpp | 10 +- src/Gui/ExpressionCompleter.h | 12 +- src/Gui/FileDialog.h | 26 +- src/Gui/Flag.h | 44 +- src/Gui/GLPainter.h | 10 +- src/Gui/GestureNavigationStyle.cpp | 20 +- src/Gui/GestureNavigationStyle.h | 2 +- src/Gui/GraphicsViewZoom.h | 2 +- src/Gui/GraphvizView.cpp | 6 +- src/Gui/GraphvizView.h | 14 +- src/Gui/GuiApplication.h | 12 +- src/Gui/GuiApplicationNativeEventAware.h | 2 +- src/Gui/GuiConsole.h | 2 +- src/Gui/InputField.cpp | 6 +- src/Gui/InputField.h | 22 +- src/Gui/InputVector.h | 50 +-- src/Gui/MDIView.h | 20 +- src/Gui/MDIViewPy.h | 4 +- src/Gui/Macro.h | 4 +- src/Gui/MainWindow.cpp | 6 +- src/Gui/MainWindow.h | 28 +- src/Gui/MainWindowPy.h | 4 +- src/Gui/ManualAlignment.cpp | 6 +- src/Gui/ManualAlignment.h | 2 +- src/Gui/MergeDocuments.cpp | 6 +- src/Gui/MergeDocuments.h | 12 +- src/Gui/MouseSelection.h | 48 +-- src/Gui/NaviCube.cpp | 4 +- src/Gui/NavigationStyle.cpp | 8 +- src/Gui/NavigationStyle.h | 62 +-- src/Gui/NetworkRetriever.h | 10 +- src/Gui/OnlineDocumentation.h | 10 +- src/Gui/Placement.h | 40 +- src/Gui/PrefWidgets.h | 84 ++-- src/Gui/ProgressBar.h | 12 +- src/Gui/ProgressDialog.h | 24 +- src/Gui/ProjectView.h | 2 +- src/Gui/PropertyPage.h | 20 +- src/Gui/PropertyView.h | 4 +- src/Gui/PythonConsole.h | 28 +- src/Gui/PythonConsolePy.h | 28 +- src/Gui/PythonDebugger.cpp | 2 +- src/Gui/PythonEditor.h | 6 +- src/Gui/QListWidgetCustom.h | 4 +- src/Gui/QuantitySpinBox_p.h | 2 +- src/Gui/ReportView.cpp | 2 +- src/Gui/ReportView.h | 12 +- src/Gui/SceneInspector.h | 14 +- src/Gui/Selection.h | 8 +- src/Gui/SelectionFilter.h | 16 +- src/Gui/SelectionObject.h | 4 +- src/Gui/SelectionView.h | 10 +- src/Gui/SoFCCSysDragger.h | 8 +- src/Gui/SoFCColorBar.cpp | 4 +- src/Gui/SoFCColorBar.h | 30 +- src/Gui/SoFCColorGradient.h | 20 +- src/Gui/SoFCColorLegend.h | 20 +- src/Gui/SoFCOffscreenRenderer.h | 4 +- src/Gui/SoFCSelection.h | 14 +- src/Gui/SoFCSelectionContext.h | 4 +- src/Gui/SoFCUnifiedSelection.h | 58 +-- src/Gui/SoNavigationDragger.h | 8 +- src/Gui/SoTextLabel.h | 16 +- src/Gui/SoTouchEvents.h | 12 +- src/Gui/SpinBox.h | 54 +-- src/Gui/Splashscreen.cpp | 2 +- src/Gui/Splashscreen.h | 10 +- src/Gui/SplitView3DInventor.h | 36 +- src/Gui/TaskCSysDragger.h | 8 +- src/Gui/TaskDlgRelocation.h | 18 +- src/Gui/TaskElementColors.cpp | 4 +- src/Gui/TaskElementColors.h | 20 +- src/Gui/TaskView/TaskAppearance.h | 6 +- src/Gui/TaskView/TaskDialog.h | 2 +- src/Gui/TaskView/TaskDialogPython.h | 32 +- src/Gui/TaskView/TaskEditControl.h | 2 +- src/Gui/TaskView/TaskSelectLinkProperty.h | 6 +- src/Gui/TaskView/TaskView.h | 28 +- src/Gui/TaskView/TaskWatcher.h | 10 +- src/Gui/TextDocumentEditorView.h | 2 +- src/Gui/TextEdit.h | 24 +- src/Gui/TextureMapping.h | 8 +- src/Gui/Thumbnail.h | 12 +- src/Gui/TransactionObject.h | 6 +- src/Gui/Transform.h | 28 +- src/Gui/Tree.h | 28 +- src/Gui/UiLoader.h | 10 +- src/Gui/Utilities.h | 12 +- src/Gui/VectorListEditor.h | 32 +- src/Gui/View.h | 2 +- src/Gui/View3DInventor.h | 58 +-- src/Gui/View3DInventorViewer.cpp | 12 +- src/Gui/View3DInventorViewer.h | 30 +- src/Gui/View3DPy.h | 8 +- src/Gui/View3DViewerPy.h | 8 +- src/Gui/ViewParams.h | 4 +- src/Gui/ViewProvider.h | 10 +- src/Gui/ViewProviderAnnotation.h | 32 +- src/Gui/ViewProviderBuilder.h | 4 +- src/Gui/ViewProviderDocumentObject.h | 42 +- src/Gui/ViewProviderDocumentObjectGroup.h | 4 +- src/Gui/ViewProviderDragger.h | 4 +- src/Gui/ViewProviderExtension.h | 4 +- src/Gui/ViewProviderExtern.h | 8 +- src/Gui/ViewProviderFeature.h | 4 +- src/Gui/ViewProviderGeoFeatureGroup.h | 2 +- .../ViewProviderGeoFeatureGroupExtension.h | 26 +- src/Gui/ViewProviderGeometryObject.h | 10 +- src/Gui/ViewProviderGroupExtension.h | 22 +- src/Gui/ViewProviderInventorObject.h | 12 +- src/Gui/ViewProviderLine.h | 4 +- src/Gui/ViewProviderLink.cpp | 10 +- src/Gui/ViewProviderLink.h | 30 +- src/Gui/ViewProviderMaterialObject.h | 8 +- src/Gui/ViewProviderMeasureDistance.h | 20 +- src/Gui/ViewProviderOrigin.h | 20 +- src/Gui/ViewProviderOriginFeature.h | 18 +- src/Gui/ViewProviderOriginGroup.h | 2 +- src/Gui/ViewProviderOriginGroupExtension.h | 10 +- src/Gui/ViewProviderPart.h | 10 +- src/Gui/ViewProviderPlacement.h | 10 +- src/Gui/ViewProviderPlane.h | 4 +- src/Gui/ViewProviderPythonFeature.h | 86 ++-- src/Gui/ViewProviderTextDocument.h | 12 +- src/Gui/ViewProviderVRMLObject.h | 10 +- src/Gui/WaitCursor.cpp | 2 +- src/Gui/WhatsThis.h | 6 +- src/Gui/WidgetFactory.h | 38 +- src/Gui/Widgets.cpp | 6 +- src/Gui/Widgets.h | 68 +-- src/Gui/Window.h | 4 +- src/Gui/Workbench.h | 84 ++-- src/Gui/WorkbenchFactory.h | 6 +- src/Gui/propertyeditor/PropertyEditor.h | 24 +- src/Gui/propertyeditor/PropertyItem.cpp | 2 +- src/Gui/propertyeditor/PropertyItem.h | 386 +++++++++--------- src/Gui/propertyeditor/PropertyItemDelegate.h | 18 +- src/Gui/propertyeditor/PropertyModel.h | 24 +- 213 files changed, 1723 insertions(+), 1723 deletions(-) diff --git a/src/Gui/3Dconnexion/GuiAbstractNativeEvent.h b/src/Gui/3Dconnexion/GuiAbstractNativeEvent.h index 4040e931fe..81785569a0 100644 --- a/src/Gui/3Dconnexion/GuiAbstractNativeEvent.h +++ b/src/Gui/3Dconnexion/GuiAbstractNativeEvent.h @@ -37,7 +37,7 @@ namespace Gui Q_OBJECT public: GuiAbstractNativeEvent(GUIApplicationNativeEventAware *app); - virtual ~GuiAbstractNativeEvent()=0; + ~GuiAbstractNativeEvent() override =0; virtual void initSpaceball(QMainWindow *window)=0; private: GuiAbstractNativeEvent(); diff --git a/src/Gui/3Dconnexion/GuiNativeEventMac.h b/src/Gui/3Dconnexion/GuiNativeEventMac.h index 809e668088..059da6a64a 100644 --- a/src/Gui/3Dconnexion/GuiNativeEventMac.h +++ b/src/Gui/3Dconnexion/GuiNativeEventMac.h @@ -63,7 +63,7 @@ namespace Gui public: GuiNativeEvent(GUIApplicationNativeEventAware *app); ~GuiNativeEvent() override; - void initSpaceball(QMainWindow *window) override final; + void initSpaceball(QMainWindow *window) final; private: GuiNativeEvent(); GuiNativeEvent(const GuiNativeEvent&); diff --git a/src/Gui/Action.cpp b/src/Gui/Action.cpp index 52bf37aa6e..3b80571c8b 100644 --- a/src/Gui/Action.cpp +++ b/src/Gui/Action.cpp @@ -387,7 +387,7 @@ public: WorkbenchActionEvent(QAction* a) : QEvent(QEvent::User), act(a) { } - ~WorkbenchActionEvent() + ~WorkbenchActionEvent() override { } QAction* action() const { return act; } @@ -680,12 +680,12 @@ public: handle->Attach(this); } - virtual ~Private() + ~Private() override { handle->Detach(this); } - void OnChange(Base::Subject &, const char *reason) + void OnChange(Base::Subject &, const char *reason) override { if (!updating && reason && strcmp(reason, "RecentFiles")==0) { Base::StateLocker guard(updating); diff --git a/src/Gui/ActionFunction.h b/src/Gui/ActionFunction.h index d015451258..04927e6290 100644 --- a/src/Gui/ActionFunction.h +++ b/src/Gui/ActionFunction.h @@ -68,7 +68,7 @@ class GuiExport ActionFunction : public QObject public: /// Constructor ActionFunction(QObject*); - virtual ~ActionFunction(); + ~ActionFunction() override; /*! Connects the QAction's triggered() signal with the function \a func @@ -97,7 +97,7 @@ class GuiExport TimerFunction : public QObject public: /// Constructor TimerFunction(QObject* = nullptr); - virtual ~TimerFunction(); + ~TimerFunction() override; void setFunction(std::function func); void setFunction(std::function func, QObject* args); diff --git a/src/Gui/Assistant.h b/src/Gui/Assistant.h index f6541bc01c..9ce2469f03 100644 --- a/src/Gui/Assistant.h +++ b/src/Gui/Assistant.h @@ -36,7 +36,7 @@ class Assistant : public QObject public: Assistant(); - ~Assistant(); + ~Assistant() override; void showDocumentation(const QString &file); private Q_SLOTS: diff --git a/src/Gui/AutoSaver.h b/src/Gui/AutoSaver.h index dafaa73b27..2e851e71b9 100644 --- a/src/Gui/AutoSaver.h +++ b/src/Gui/AutoSaver.h @@ -70,7 +70,7 @@ class AutoSaver : public QObject private: static AutoSaver* self; AutoSaver(QObject* parent); - virtual ~AutoSaver(); + ~AutoSaver() override; public: static AutoSaver* instance(); @@ -86,7 +86,7 @@ public: protected: void slotCreateDocument(const App::Document& Doc); void slotDeleteDocument(const App::Document& Doc); - void timerEvent(QTimerEvent * event); + void timerEvent(QTimerEvent * event) override; void saveDocument(const std::string&, AutoSaveProperty&); public Q_SLOTS: @@ -102,15 +102,15 @@ class RecoveryWriter : public Base::FileWriter { public: RecoveryWriter(AutoSaveProperty&); - virtual ~RecoveryWriter(); + ~RecoveryWriter() override; /*! This method can be re-implemented in sub-classes to avoid to write out certain objects. The default implementation always returns true. */ - virtual bool shouldWrite(const std::string&, const Base::Persistence *) const; - virtual void writeFiles(); + bool shouldWrite(const std::string&, const Base::Persistence *) const override; + void writeFiles() override; private: AutoSaveProperty& saver; diff --git a/src/Gui/BitmapFactory.h b/src/Gui/BitmapFactory.h index 4d73a4d620..4f71b3659c 100644 --- a/src/Gui/BitmapFactory.h +++ b/src/Gui/BitmapFactory.h @@ -143,7 +143,7 @@ private: static BitmapFactoryInst* _pcSingleton; BitmapFactoryInst(); - ~BitmapFactoryInst(); + ~BitmapFactoryInst() override; BitmapFactoryInstP* d; }; diff --git a/src/Gui/CallTips.h b/src/Gui/CallTips.h index 5853408145..259a2708b0 100644 --- a/src/Gui/CallTips.h +++ b/src/Gui/CallTips.h @@ -56,16 +56,16 @@ public: /// Construction CallTipsList(QPlainTextEdit* parent); /// Destruction - ~CallTipsList(); + ~CallTipsList() override; - void keyboardSearch (const QString&); + void keyboardSearch (const QString&) override; void showTips(const QString&); void validateCursor(); protected: - bool eventFilter(QObject *, QEvent *); - void showEvent(QShowEvent*); - void hideEvent(QHideEvent*); + bool eventFilter(QObject *, QEvent *) override; + void showEvent(QShowEvent*) override; + void hideEvent(QHideEvent*) override; private Q_SLOTS: void callTipItemActivated(QListWidgetItem *item); diff --git a/src/Gui/ComboView.h b/src/Gui/ComboView.h index 54c4a5d4a1..195790314d 100644 --- a/src/Gui/ComboView.h +++ b/src/Gui/ComboView.h @@ -74,7 +74,7 @@ public: * A destructor. * A more elaborate description of the destructor. */ - virtual ~ComboView(); + ~ComboView() override; Gui::TaskView::TaskView *getTaskPanel(){return taskPanel;} QTabWidget* getTabPanel() const { return tabs;} @@ -92,7 +92,7 @@ protected: void showDialog(Gui::TaskView::TaskDialog *dlg); void closeDialog(); void closedDialog(); - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: int oldTabIndex; diff --git a/src/Gui/Command.h b/src/Gui/Command.h index 63a38fb419..3525304121 100644 --- a/src/Gui/Command.h +++ b/src/Gui/Command.h @@ -314,7 +314,7 @@ class GuiExport Command : public CommandBase { protected: Command(const char* name); - virtual ~Command(); + ~Command() override; protected: /** @name Methods to override when creating a new command @@ -323,7 +323,7 @@ protected: /// Methods which gets called when activated, needs to be reimplemented! virtual void activated(int iMsg)=0; /// Creates the used Action - virtual Action * createAction(); + Action * createAction() override; /// Applies the menu text, tool and status tip to the passed action object void applyCommandData(const char* context, Action* ); const char* keySequenceToAccel(int) const; @@ -419,9 +419,9 @@ public: /// Checks if the active object of the active document is valid static bool isActiveObjectValid(); /// Translate command - void languageChange(); + void languageChange() override; /// Updates the QAction with respect to the passed mode. - void updateAction(int mode); + void updateAction(int mode) override; /// Setup checkable actions based on current TriggerSource void setupCheckable(int iMsg); //@} @@ -642,9 +642,9 @@ public: Command *addCommand(const char *cmdName); protected: - virtual void activated(int iMsg); - virtual Gui::Action * createAction(); - virtual void languageChange(); + void activated(int iMsg) override; + Gui::Action * createAction() override; + void languageChange() override; void setup(Action *); @@ -665,34 +665,34 @@ class PythonCommand: public Command { public: PythonCommand(const char* name, PyObject * pcPyCommand, const char* pActivationString); - virtual ~PythonCommand(); + ~PythonCommand() override; protected: /** @name Methods reimplemented for Command Framework */ //@{ /// Method which gets called when activated - virtual void activated(int iMsg); + void activated(int iMsg) override; /// if the command is not always active - virtual bool isActive(); + bool isActive() override; /// Get the help URL - const char* getHelpUrl() const; + const char* getHelpUrl() const override; /// Creates the used Action - virtual Action * createAction(); + Action * createAction() override; //@} public: /** @name Methods to get the properties of the command */ //@{ /// Reassigns QAction stuff after the language has changed. - void languageChange(); - const char* className() const + void languageChange() override; + const char* className() const override { return "PythonCommand"; } - const char* getWhatsThis () const; - const char* getMenuText () const; - const char* getToolTipText() const; - const char* getStatusTip () const; - const char* getPixmap () const; - const char* getAccel () const; + const char* getWhatsThis () const override; + const char* getMenuText () const override; + const char* getToolTipText() const override; + const char* getStatusTip () const override; + const char* getPixmap () const override; + const char* getAccel () const override; bool isCheckable () const; bool isChecked () const; //@} @@ -716,34 +716,34 @@ class PythonGroupCommand: public Command { public: PythonGroupCommand(const char* name, PyObject * pcPyCommand); - virtual ~PythonGroupCommand(); + ~PythonGroupCommand() override; protected: /** @name Methods reimplemented for Command Framework */ //@{ /// Method which gets called when activated - virtual void activated(int iMsg); + void activated(int iMsg) override; /// if the command is not always active - virtual bool isActive(); + bool isActive() override; /// Get the help URL - const char* getHelpUrl() const; + const char* getHelpUrl() const override; /// Creates the used Action - virtual Action * createAction(); + Action * createAction() override; //@} public: /** @name Methods to get the properties of the command */ //@{ /// Reassigns QAction stuff after the language has changed. - void languageChange(); - const char* className() const + void languageChange() override; + const char* className() const override { return "PythonGroupCommand"; } - const char* getWhatsThis () const; - const char* getMenuText () const; - const char* getToolTipText() const; - const char* getStatusTip () const; - const char* getPixmap () const; - const char* getAccel () const; + const char* getWhatsThis () const override; + const char* getMenuText () const override; + const char* getToolTipText() const override; + const char* getStatusTip () const override; + const char* getPixmap () const override; + const char* getAccel () const override; bool isExclusive () const; bool hasDropDownMenu () const; //@} @@ -771,23 +771,23 @@ class MacroCommand: public Command { public: MacroCommand(const char* name, bool system = false); - virtual ~MacroCommand(); + ~MacroCommand() override; protected: /** @name methods reimplemented for Command Framework */ //@{ /// Method which get called when activated - void activated(int iMsg); + void activated(int iMsg) override; /// Creates the used Action - Action * createAction(); + Action * createAction() override; //@} public: /// Returns the script name const char* getScriptName () const { return sScriptName; } /// Ignore when language has changed. - void languageChange() {} - const char* className() const + void languageChange() override {} + const char* className() const override { return "Gui::MacroCommand"; } /** @name Methods to set the properties of the Script Command */ diff --git a/src/Gui/CommandDoc.cpp b/src/Gui/CommandDoc.cpp index c1045bdba1..33e607d639 100644 --- a/src/Gui/CommandDoc.cpp +++ b/src/Gui/CommandDoc.cpp @@ -1673,10 +1673,10 @@ public: eType = ForEdit; } - virtual const char* className() const {return "StdCmdExpression";} + const char* className() const override {return "StdCmdExpression";} protected: - virtual void activated(int iMsg) { + void activated(int iMsg) override { std::map > objs; switch(iMsg) { case 0: @@ -1705,7 +1705,7 @@ protected: copyExpressions(objs); } - virtual Gui::Action * createAction() { + Gui::Action * createAction() override { ActionGroup* pcAction = new ActionGroup(this, getMainWindow()); pcAction->setDropDownMenu(true); applyCommandData(this->className(), pcAction); @@ -1849,7 +1849,7 @@ protected: } } - bool isActive() { + bool isActive() override { if(!App::GetApplication().getActiveDocument()) { pcActionCopyAll->setEnabled(false); pcActionCopySel->setEnabled(false); diff --git a/src/Gui/CommandLink.cpp b/src/Gui/CommandLink.cpp index dfa2b5013a..bc11d8cfb7 100644 --- a/src/Gui/CommandLink.cpp +++ b/src/Gui/CommandLink.cpp @@ -60,14 +60,14 @@ class StdCmdLinkMakeGroup : public Gui::Command { public: StdCmdLinkMakeGroup(); - const char* className() const + const char* className() const override { return "StdCmdLinkMakeGroup"; } protected: - virtual void activated(int iMsg); - virtual bool isActive(); - virtual Action * createAction(); - virtual void languageChange(); + void activated(int iMsg) override; + bool isActive() override; + Action * createAction() override; + void languageChange() override; }; StdCmdLinkMakeGroup::StdCmdLinkMakeGroup() @@ -857,7 +857,7 @@ public: addCommand(new StdCmdLinkSelectAllLinks()); } - virtual const char* className() const {return "StdCmdLinkSelectActions";} + const char* className() const override {return "StdCmdLinkSelectActions";} }; //====================================================================== @@ -885,7 +885,7 @@ public: addCommand(new StdCmdLinkImportAll()); } - virtual const char* className() const {return "StdCmdLinkActions";} + const char* className() const override {return "StdCmdLinkActions";} }; //=========================================================================== diff --git a/src/Gui/CommandStd.cpp b/src/Gui/CommandStd.cpp index 96f6818f35..db5c4b9e4b 100644 --- a/src/Gui/CommandStd.cpp +++ b/src/Gui/CommandStd.cpp @@ -839,14 +839,14 @@ class StdCmdUserEditMode : public Gui::Command { public: StdCmdUserEditMode(); - virtual ~StdCmdUserEditMode(){} - virtual void languageChange(); - virtual const char* className() const {return "StdCmdUserEditMode";} + ~StdCmdUserEditMode() override{} + void languageChange() override; + const char* className() const override {return "StdCmdUserEditMode";} void updateIcon(int mode); protected: - virtual void activated(int iMsg); - virtual bool isActive(); - virtual Gui::Action * createAction(); + void activated(int iMsg) override; + bool isActive() override; + Gui::Action * createAction() override; }; StdCmdUserEditMode::StdCmdUserEditMode() diff --git a/src/Gui/CommandTest.cpp b/src/Gui/CommandTest.cpp index 769ab0294c..dbfb71b408 100644 --- a/src/Gui/CommandTest.cpp +++ b/src/Gui/CommandTest.cpp @@ -567,10 +567,10 @@ public: BarThread(unsigned long s) : steps(s) { } - ~BarThread() + ~BarThread() override { } - void run() + void run() override { QMutex mutex; QMutexLocker ml(&mutex); @@ -728,7 +728,7 @@ public: TestConsoleObserver() : matchMsg(0), matchWrn(0), matchErr(0), matchLog(0) { } - void SendLog(const std::string& msg, Base::LogStyle level){ + void SendLog(const std::string& msg, Base::LogStyle level) override{ QMutexLocker ml(&mutex); @@ -752,7 +752,7 @@ public: class ConsoleMessageTask : public QRunnable { public: - void run() + void run() override { for (int i=0; i<10; i++) Base::Console().Message("Write a message to the console output.\n"); @@ -762,7 +762,7 @@ public: class ConsoleWarningTask : public QRunnable { public: - void run() + void run() override { for (int i=0; i<10; i++) Base::Console().Warning("Write a warning to the console output.\n"); @@ -772,7 +772,7 @@ public: class ConsoleErrorTask : public QRunnable { public: - void run() + void run() override { for (int i=0; i<10; i++) Base::Console().Error("Write an error to the console output.\n"); @@ -782,7 +782,7 @@ public: class ConsoleLogTask : public QRunnable { public: - void run() + void run() override { for (int i=0; i<10; i++) Base::Console().Log("Write a log to the console output.\n"); diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index e12a9571cd..6084e17e08 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -254,15 +254,15 @@ class StdCmdFreezeViews : public Gui::Command { public: StdCmdFreezeViews(); - virtual ~StdCmdFreezeViews(){} - const char* className() const + ~StdCmdFreezeViews() override{} + const char* className() const override { return "StdCmdFreezeViews"; } protected: - virtual void activated(int iMsg); - virtual bool isActive(); - virtual Action * createAction(); - virtual void languageChange(); + void activated(int iMsg) override; + bool isActive() override; + Action * createAction() override; + void languageChange() override; private: void onSaveViews(); @@ -587,14 +587,14 @@ class StdCmdDrawStyle : public Gui::Command { public: StdCmdDrawStyle(); - virtual ~StdCmdDrawStyle(){} - virtual void languageChange(); - virtual const char* className() const {return "StdCmdDrawStyle";} + ~StdCmdDrawStyle() override{} + void languageChange() override; + const char* className() const override {return "StdCmdDrawStyle";} void updateIcon(const Gui::MDIView* view); protected: - virtual void activated(int iMsg); - virtual bool isActive(); - virtual Gui::Action * createAction(); + void activated(int iMsg) override; + bool isActive() override; + Gui::Action * createAction() override; }; StdCmdDrawStyle::StdCmdDrawStyle() @@ -3567,7 +3567,7 @@ public: addCommand(new StdTreeDrag(),!cmds.empty()); addCommand(new StdTreeSelection(),!cmds.empty()); }; - virtual const char* className() const {return "StdCmdTreeViewActions";} + const char* className() const override {return "StdCmdTreeViewActions";} }; diff --git a/src/Gui/CommandWindow.cpp b/src/Gui/CommandWindow.cpp index 8b40dfd8d2..e592a70642 100644 --- a/src/Gui/CommandWindow.cpp +++ b/src/Gui/CommandWindow.cpp @@ -374,7 +374,7 @@ public: // virtual ~FilterStatusBar() {} protected: Action * action; - bool eventFilter(QObject *obj, QEvent *event) + bool eventFilter(QObject *obj, QEvent *event) override { if (getMainWindow()->findChild() && obj == getMainWindow()->statusBar() && ((event->type() == QEvent::Hide) || (event->type() == QEvent::Show))) { this->action->setChecked(getMainWindow()->statusBar()->isVisible()); diff --git a/src/Gui/Control.h b/src/Gui/Control.h index c15dd6bc56..be66f6f352 100644 --- a/src/Gui/Control.h +++ b/src/Gui/Control.h @@ -122,7 +122,7 @@ private: /// Construction ControlSingleton(); /// Destruction - virtual ~ControlSingleton(); + ~ControlSingleton() override; static ControlSingleton* _pcSingleton; }; diff --git a/src/Gui/DAGView/DAGFilter.h b/src/Gui/DAGView/DAGFilter.h index 0ceb90aae8..4a71408d0c 100644 --- a/src/Gui/DAGView/DAGFilter.h +++ b/src/Gui/DAGView/DAGFilter.h @@ -56,7 +56,7 @@ namespace Gui { public: FilterOrigin(); - virtual bool goFilter(const Vertex &vertexIn, const Graph &graphIn, const GraphLinkContainer &linkIn) const override; + bool goFilter(const Vertex &vertexIn, const Graph &graphIn, const GraphLinkContainer &linkIn) const override; }; /*! Hide nodes of type*/ @@ -65,7 +65,7 @@ namespace Gui public: explicit FilterTyped(const std::string &typeIn); std::string type; - virtual bool goFilter(const Vertex &vertexIn, const Graph &graphIn, const GraphLinkContainer &linkIn) const override; + bool goFilter(const Vertex &vertexIn, const Graph &graphIn, const GraphLinkContainer &linkIn) const override; }; } } diff --git a/src/Gui/DAGView/DAGModel.h b/src/Gui/DAGView/DAGModel.h index 80dc4d8645..f8f0adfdef 100644 --- a/src/Gui/DAGView/DAGModel.h +++ b/src/Gui/DAGView/DAGModel.h @@ -57,7 +57,7 @@ namespace Gui void acceptedSignal(); void rejectedSignal(); protected: - virtual void keyPressEvent(QKeyEvent*); + void keyPressEvent(QKeyEvent*) override; }; class Model : public QGraphicsScene @@ -65,15 +65,15 @@ namespace Gui Q_OBJECT public: Model(QObject *parentIn, const Gui::Document &documentIn); - virtual ~Model() override; + ~Model() override; void awake(); //!< hooked up to event dispatcher for update when idle. void selectionChanged(const SelectionChanges& msg); protected: - virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override; - virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override; - virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override; - virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override; + void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override; + void mousePressEvent(QGraphicsSceneMouseEvent* event) override; + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override; private Q_SLOTS: void updateSlot(); diff --git a/src/Gui/DAGView/DAGRectItem.h b/src/Gui/DAGView/DAGRectItem.h index 9537e1df19..c78c489c91 100644 --- a/src/Gui/DAGView/DAGRectItem.h +++ b/src/Gui/DAGView/DAGRectItem.h @@ -50,7 +50,7 @@ namespace Gui void editingFinished(){editing = false;} bool isEditing(){return editing;} protected: - virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr); + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override; private: QBrush backgroundBrush; //!< brush used for background. not used yet. QBrush editBrush; //!< brush used when object is in edit mode. diff --git a/src/Gui/DAGView/DAGView.h b/src/Gui/DAGView/DAGView.h index f6329e8d08..a205c2af15 100644 --- a/src/Gui/DAGView/DAGView.h +++ b/src/Gui/DAGView/DAGView.h @@ -44,13 +44,13 @@ namespace Gui Q_OBJECT public: View(QWidget *parentIn = nullptr); - virtual ~View() override; + ~View() override; public Q_SLOTS: void awakeSlot(); //!< hooked up to event dispatcher for update when idle. private: - virtual void onSelectionChanged(const SelectionChanges& msg) override; + void onSelectionChanged(const SelectionChanges& msg) override; void slotActiveDocument(const Gui::Document &documentIn); void slotDeleteDocument(const Gui::Document &documentIn); @@ -67,7 +67,7 @@ namespace Gui Q_OBJECT public: DockWindow(Gui::Document* gDocumentIn = nullptr, QWidget *parent = nullptr); - ~DockWindow(){} + ~DockWindow() override{} private: View *dagView; diff --git a/src/Gui/DlgActionsImp.h b/src/Gui/DlgActionsImp.h index 6770fb5a05..534199b105 100644 --- a/src/Gui/DlgActionsImp.h +++ b/src/Gui/DlgActionsImp.h @@ -54,7 +54,7 @@ class DlgCustomActionsImp : public CustomizeActionPage public: DlgCustomActionsImp( QWidget* parent = nullptr ); - ~DlgCustomActionsImp(); + ~DlgCustomActionsImp() override; Q_SIGNALS: void addMacroAction( const QByteArray& ); @@ -63,8 +63,8 @@ Q_SIGNALS: protected: /** Trigger for reparent event. */ - bool event(QEvent* e); - void changeEvent(QEvent *e); + bool event(QEvent* e) override; + void changeEvent(QEvent *e) override; protected Q_SLOTS: /** Enables/disables buttons for deletion */ @@ -77,9 +77,9 @@ protected Q_SLOTS: void on_buttonRemoveAction_clicked(); /** Shows the setup of the action */ void on_buttonReplaceAction_clicked(); - void onAddMacroAction(const QByteArray&); - void onRemoveMacroAction(const QByteArray&); - void onModifyMacroAction(const QByteArray&); + void onAddMacroAction(const QByteArray&) override; + void onRemoveMacroAction(const QByteArray&) override; + void onModifyMacroAction(const QByteArray&) override; private: /** Shows all actions and their pixmaps if available */ @@ -97,8 +97,8 @@ class IconDialog : public QDialog public: IconDialog(QWidget* parent); - ~IconDialog(); - void resizeEvent(QResizeEvent*); + ~IconDialog() override; + void resizeEvent(QResizeEvent*) override; QListWidgetItem* currentItem() const; private Q_SLOTS: @@ -114,7 +114,7 @@ class IconFolders : public QDialog public: IconFolders(const QStringList&, QWidget* parent); - ~IconFolders(); + ~IconFolders() override; QStringList getPaths() const; private Q_SLOTS: diff --git a/src/Gui/DlgActivateWindowImp.h b/src/Gui/DlgActivateWindowImp.h index 33537dc43b..ef21145d32 100644 --- a/src/Gui/DlgActivateWindowImp.h +++ b/src/Gui/DlgActivateWindowImp.h @@ -41,10 +41,10 @@ class DlgActivateWindowImp : public QDialog public: DlgActivateWindowImp(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~DlgActivateWindowImp(); + ~DlgActivateWindowImp() override; protected: - void accept(); + void accept() override; private: Ui_DlgActivateWindow* ui; diff --git a/src/Gui/DlgCommandsImp.h b/src/Gui/DlgCommandsImp.h index b7b2a07207..87a09665b2 100644 --- a/src/Gui/DlgCommandsImp.h +++ b/src/Gui/DlgCommandsImp.h @@ -47,17 +47,17 @@ class DlgCustomCommandsImp : public CustomizeActionPage public: DlgCustomCommandsImp(QWidget* parent = nullptr); - ~DlgCustomCommandsImp(); + ~DlgCustomCommandsImp() override; protected Q_SLOTS: void onGroupActivated(QTreeWidgetItem *i); void onDescription(QTreeWidgetItem *i); - void onAddMacroAction(const QByteArray&); - void onRemoveMacroAction(const QByteArray&); - void onModifyMacroAction(const QByteArray&); + void onAddMacroAction(const QByteArray&) override; + void onRemoveMacroAction(const QByteArray&) override; + void onModifyMacroAction(const QByteArray&) override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: std::unique_ptr ui; diff --git a/src/Gui/DlgCreateNewPreferencePackImp.h b/src/Gui/DlgCreateNewPreferencePackImp.h index b6d0caf705..86e4b2d4b1 100644 --- a/src/Gui/DlgCreateNewPreferencePackImp.h +++ b/src/Gui/DlgCreateNewPreferencePackImp.h @@ -52,7 +52,7 @@ class GuiExport DlgCreateNewPreferencePackImp : public QDialog public: DlgCreateNewPreferencePackImp(QWidget* parent = nullptr); - ~DlgCreateNewPreferencePackImp(); + ~DlgCreateNewPreferencePackImp() override; void setPreferencePackTemplates(const std::vector &availableTemplates); void setPreferencePackNames(const std::vector& usedNames); diff --git a/src/Gui/DlgCustomizeImp.h b/src/Gui/DlgCustomizeImp.h index a12f372b71..217a06a61b 100644 --- a/src/Gui/DlgCustomizeImp.h +++ b/src/Gui/DlgCustomizeImp.h @@ -52,7 +52,7 @@ class DlgCustomizeImp : public QDialog public: DlgCustomizeImp(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~DlgCustomizeImp(); + ~DlgCustomizeImp() override; static void addPage(const char* className); void addPage (QWidget* w); @@ -63,7 +63,7 @@ Q_SIGNALS: void modifyMacroAction(const QByteArray&); protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: /** @name for internal use only */ diff --git a/src/Gui/DlgCustomizeSpNavSettings.h b/src/Gui/DlgCustomizeSpNavSettings.h index 7a74ffcef5..7ed6d8a751 100644 --- a/src/Gui/DlgCustomizeSpNavSettings.h +++ b/src/Gui/DlgCustomizeSpNavSettings.h @@ -40,12 +40,12 @@ namespace Gui public: explicit DlgCustomizeSpNavSettings(QWidget *parent = nullptr); - ~DlgCustomizeSpNavSettings(); + ~DlgCustomizeSpNavSettings() override; protected Q_SLOTS: - void onAddMacroAction(const QByteArray&); - void onRemoveMacroAction(const QByteArray&); - void onModifyMacroAction(const QByteArray&); + void onAddMacroAction(const QByteArray&) override; + void onRemoveMacroAction(const QByteArray&) override; + void onModifyMacroAction(const QByteArray&) override; void on_CBDominant_clicked(); void on_CBFlipYZ_clicked(); void on_CBRotations_clicked(); @@ -73,7 +73,7 @@ namespace Gui void on_ButtonCalibrate_clicked(); protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: ParameterGrp::handle spaceballMotionGroup() const; diff --git a/src/Gui/DlgCustomizeSpaceball.h b/src/Gui/DlgCustomizeSpaceball.h index 3bede9957a..4f84bed9e7 100644 --- a/src/Gui/DlgCustomizeSpaceball.h +++ b/src/Gui/DlgCustomizeSpaceball.h @@ -60,8 +60,8 @@ namespace Gui Q_OBJECT public: ButtonModel(QObject *parent); - virtual int rowCount(const QModelIndex &parent = QModelIndex()) const; - virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; void insertButtonRows(int number); void setCommand(int row, QString command); void goButtonPress(int number); @@ -108,14 +108,14 @@ namespace Gui Q_OBJECT public: CommandModel(QObject *parent = nullptr); - ~CommandModel(); - virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; - virtual QModelIndex parent(const QModelIndex &index) const; - virtual int rowCount(const QModelIndex &parent) const; - virtual int columnCount(const QModelIndex &parent) const; - virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - virtual Qt::ItemFlags flags (const QModelIndex &index) const; + ~CommandModel() override; + QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; + QModelIndex parent(const QModelIndex &index) const override; + int rowCount(const QModelIndex &parent) const override; + int columnCount(const QModelIndex &parent) const override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + Qt::ItemFlags flags (const QModelIndex &index) const override; void goAddMacro(const QByteArray ¯oName); void goRemoveMacro(const QByteArray ¯oName); private: @@ -131,10 +131,10 @@ namespace Gui Q_OBJECT public: PrintModel(QObject *parent, ButtonModel *buttonModelIn, CommandModel *commandModelIn); - virtual int rowCount(const QModelIndex &parent) const; - virtual int columnCount(const QModelIndex &parent) const; - virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + int rowCount(const QModelIndex &parent) const override; + int columnCount(const QModelIndex &parent) const override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; private: ButtonModel *buttonModel; CommandModel *commandModel; @@ -145,17 +145,17 @@ namespace Gui Q_OBJECT public: DlgCustomizeSpaceball(QWidget *parent = nullptr); - virtual ~DlgCustomizeSpaceball(); + ~DlgCustomizeSpaceball() override; protected: - void changeEvent(QEvent *e); - virtual bool event(QEvent *event); - virtual void hideEvent(QHideEvent *event); - virtual void showEvent (QShowEvent *event); + void changeEvent(QEvent *e) override; + bool event(QEvent *event) override; + void hideEvent(QHideEvent *event) override; + void showEvent (QShowEvent *event) override; protected Q_SLOTS: - void onAddMacroAction(const QByteArray ¯oName); - void onRemoveMacroAction(const QByteArray ¯oName); - void onModifyMacroAction(const QByteArray ¯oName); + void onAddMacroAction(const QByteArray ¯oName) override; + void onRemoveMacroAction(const QByteArray ¯oName) override; + void onModifyMacroAction(const QByteArray ¯oName) override; private Q_SLOTS: void goClear(); diff --git a/src/Gui/DlgDisplayPropertiesImp.h b/src/Gui/DlgDisplayPropertiesImp.h index ab8f580704..06c518408c 100644 --- a/src/Gui/DlgDisplayPropertiesImp.h +++ b/src/Gui/DlgDisplayPropertiesImp.h @@ -57,12 +57,12 @@ class DlgDisplayPropertiesImp : public QDialog, public: DlgDisplayPropertiesImp(bool floating, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~DlgDisplayPropertiesImp(); + ~DlgDisplayPropertiesImp() override; /// Observer message from the Selection void OnChange(Gui::SelectionSingleton::SubjectType &rCaller, - Gui::SelectionSingleton::MessageType Reason); + Gui::SelectionSingleton::MessageType Reason) override; void showDefaultButtons(bool); - void reject(); + void reject() override; private Q_SLOTS: void on_changeMaterial_activated(int); @@ -78,7 +78,7 @@ private Q_SLOTS: void on_buttonColorPlot_clicked(); protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: void slotChangedObject(const Gui::ViewProvider&, const App::Property& Prop); @@ -105,18 +105,18 @@ class TaskDisplayProperties : public Gui::TaskView::TaskDialog public: TaskDisplayProperties(); - ~TaskDisplayProperties(); + ~TaskDisplayProperties() override; public: - bool reject(); + bool reject() override; - bool isAllowedAlterDocument() const + bool isAllowedAlterDocument() const override { return true; } - bool isAllowedAlterView() const + bool isAllowedAlterView() const override { return true; } - bool isAllowedAlterSelection() const + bool isAllowedAlterSelection() const override { return true; } - QDialogButtonBox::StandardButtons getStandardButtons() const; + QDialogButtonBox::StandardButtons getStandardButtons() const override; private: DlgDisplayPropertiesImp* widget; diff --git a/src/Gui/DlgEditFileIncludePropertyExternal.h b/src/Gui/DlgEditFileIncludePropertyExternal.h index 261544d558..6c1737fb57 100644 --- a/src/Gui/DlgEditFileIncludePropertyExternal.h +++ b/src/Gui/DlgEditFileIncludePropertyExternal.h @@ -40,7 +40,7 @@ class GuiExport DlgEditFileIncludePropertyExternal : public DlgRunExternal public: DlgEditFileIncludePropertyExternal( App::PropertyFileIncluded& Prop, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() ); - virtual ~DlgEditFileIncludePropertyExternal(); + ~DlgEditFileIncludePropertyExternal() override; int Do(); diff --git a/src/Gui/DlgEditorImp.h b/src/Gui/DlgEditorImp.h index bf747c7e5b..ab23edbc34 100644 --- a/src/Gui/DlgEditorImp.h +++ b/src/Gui/DlgEditorImp.h @@ -46,11 +46,11 @@ class DlgSettingsEditorImp : public PreferencePage public: DlgSettingsEditorImp( QWidget* parent = nullptr ); - ~DlgSettingsEditorImp(); + ~DlgSettingsEditorImp() override; public: - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; protected Q_SLOTS: void on_displayItems_currentItemChanged(QTreeWidgetItem *i); @@ -59,7 +59,7 @@ protected Q_SLOTS: void on_fontSize_valueChanged(const QString&); protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; void setEditorTabWidth(int); private: diff --git a/src/Gui/DlgExpressionInput.h b/src/Gui/DlgExpressionInput.h index 7fbb85ba62..e11081bb64 100644 --- a/src/Gui/DlgExpressionInput.h +++ b/src/Gui/DlgExpressionInput.h @@ -52,7 +52,7 @@ class GuiExport DlgExpressionInput : public QDialog public: explicit DlgExpressionInput(const App::ObjectIdentifier & _path, std::shared_ptr _expression, const Base::Unit &_impliedUnit, QWidget *parent = nullptr); - ~DlgExpressionInput(); + ~DlgExpressionInput() override; std::shared_ptr getExpression() const { return expression; } @@ -61,15 +61,15 @@ public: QPoint expressionPosition() const; void setExpressionInputSize(int width, int height); - bool eventFilter(QObject *obj, QEvent *event); + bool eventFilter(QObject *obj, QEvent *event) override; public Q_SLOTS: void show(); protected: - void showEvent(QShowEvent*); - void mouseReleaseEvent(QMouseEvent*); - void mousePressEvent(QMouseEvent*); + void showEvent(QShowEvent*) override; + void mouseReleaseEvent(QMouseEvent*) override; + void mousePressEvent(QMouseEvent*) override; private Q_SLOTS: void textChanged(const QString & text); diff --git a/src/Gui/DlgGeneralImp.h b/src/Gui/DlgGeneralImp.h index 7ea991d203..0652e39fe6 100644 --- a/src/Gui/DlgGeneralImp.h +++ b/src/Gui/DlgGeneralImp.h @@ -46,13 +46,13 @@ class DlgGeneralImp : public PreferencePage public: DlgGeneralImp( QWidget* parent = nullptr ); - ~DlgGeneralImp(); + ~DlgGeneralImp() override; - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; protected Q_SLOTS: void onLoadPreferencePackClicked(const std::string &packName); diff --git a/src/Gui/DlgKeyboardImp.h b/src/Gui/DlgKeyboardImp.h index 8626c8996e..a8787749bd 100644 --- a/src/Gui/DlgKeyboardImp.h +++ b/src/Gui/DlgKeyboardImp.h @@ -46,10 +46,10 @@ class DlgCustomKeyboardImp : public CustomizeActionPage public: DlgCustomKeyboardImp( QWidget* parent = nullptr ); - ~DlgCustomKeyboardImp(); + ~DlgCustomKeyboardImp() override; protected: - void showEvent(QShowEvent* e); + void showEvent(QShowEvent* e) override; protected Q_SLOTS: void on_categoryBox_activated(int index); @@ -59,12 +59,12 @@ protected Q_SLOTS: void on_buttonReset_clicked(); void on_buttonResetAll_clicked(); void on_editShortcut_textChanged(const QString&); - void onAddMacroAction(const QByteArray&); - void onRemoveMacroAction(const QByteArray&); - void onModifyMacroAction(const QByteArray&); + void onAddMacroAction(const QByteArray&) override; + void onRemoveMacroAction(const QByteArray&) override; + void onModifyMacroAction(const QByteArray&) override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; void setShortcutOfCurrentAction(const QString&); private: diff --git a/src/Gui/DlgMacroExecuteImp.cpp b/src/Gui/DlgMacroExecuteImp.cpp index 2343d7971a..5fed71d093 100644 --- a/src/Gui/DlgMacroExecuteImp.cpp +++ b/src/Gui/DlgMacroExecuteImp.cpp @@ -58,7 +58,7 @@ namespace Gui { : QTreeWidgetItem(widget), systemWide(systemwide){} - ~MacroItem(){} + ~MacroItem() override{} bool systemWide; }; diff --git a/src/Gui/DlgMacroExecuteImp.h b/src/Gui/DlgMacroExecuteImp.h index 0028fd0c89..6e2885fdae 100644 --- a/src/Gui/DlgMacroExecuteImp.h +++ b/src/Gui/DlgMacroExecuteImp.h @@ -45,9 +45,9 @@ class DlgMacroExecuteImp : public QDialog, public Gui::WindowParameter public: DlgMacroExecuteImp( QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() ); - ~DlgMacroExecuteImp(); + ~DlgMacroExecuteImp() override; - void accept(); + void accept() override; public Q_SLOTS: void on_fileChooser_fileNameChanged(const QString&); diff --git a/src/Gui/DlgMacroRecordImp.h b/src/Gui/DlgMacroRecordImp.h index 349751b064..bf57651e8e 100644 --- a/src/Gui/DlgMacroRecordImp.h +++ b/src/Gui/DlgMacroRecordImp.h @@ -43,7 +43,7 @@ class DlgMacroRecordImp : public QDialog, public Gui::WindowParameter public: DlgMacroRecordImp( QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() ); - virtual ~DlgMacroRecordImp(); + ~DlgMacroRecordImp() override; protected Q_SLOTS: void on_buttonStart_clicked(); diff --git a/src/Gui/DlgMaterialPropertiesImp.h b/src/Gui/DlgMaterialPropertiesImp.h index 5ef5273fcf..04e8ee34b7 100644 --- a/src/Gui/DlgMaterialPropertiesImp.h +++ b/src/Gui/DlgMaterialPropertiesImp.h @@ -40,7 +40,7 @@ class DlgMaterialPropertiesImp : public QDialog public: DlgMaterialPropertiesImp(const std::string& mat, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~DlgMaterialPropertiesImp(); + ~DlgMaterialPropertiesImp() override; void setViewProviders(const std::vector&); QColor diffuseColor() const; diff --git a/src/Gui/DlgObjectSelection.h b/src/Gui/DlgObjectSelection.h index 037287882d..cb7ade0e1c 100644 --- a/src/Gui/DlgObjectSelection.h +++ b/src/Gui/DlgObjectSelection.h @@ -71,7 +71,7 @@ public: QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); /// Destructor - ~DlgObjectSelection(); + ~DlgObjectSelection() override; /// Options for getSelections() enum class SelectionOptions { @@ -91,8 +91,8 @@ public: /// Override the prompt message void setMessage(const QString &); - void accept(); - void reject(); + void accept() override; + void reject() override; private Q_SLOTS: void onDepItemChanged(QTreeWidgetItem * item, int); diff --git a/src/Gui/DlgOnlineHelpImp.h b/src/Gui/DlgOnlineHelpImp.h index ac3e4dea6f..6a7c4a4e70 100644 --- a/src/Gui/DlgOnlineHelpImp.h +++ b/src/Gui/DlgOnlineHelpImp.h @@ -42,15 +42,15 @@ class DlgOnlineHelpImp : public PreferencePage public: DlgOnlineHelpImp( QWidget* parent = nullptr ); - ~DlgOnlineHelpImp(); + ~DlgOnlineHelpImp() override; static QString getStartpage(); - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; protected: void on_lineEditDownload_fileNameSelected(const QString&); diff --git a/src/Gui/DlgParameterImp.h b/src/Gui/DlgParameterImp.h index e190affa7a..15d01aa834 100644 --- a/src/Gui/DlgParameterImp.h +++ b/src/Gui/DlgParameterImp.h @@ -48,10 +48,10 @@ class GuiExport DlgParameterImp : public QDialog public: DlgParameterImp( QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() ); - ~DlgParameterImp(); + ~DlgParameterImp() override; - void accept(); - void reject(); + void accept() override; + void reject() override; void activateParameterSet(const char*); @@ -66,9 +66,9 @@ protected Q_SLOTS: void on_checkSort_toggled(bool); protected: - void changeEvent(QEvent *e); - void showEvent(QShowEvent*); - void closeEvent(QCloseEvent*); + void changeEvent(QEvent *e) override; + void showEvent(QShowEvent*) override; + void closeEvent(QCloseEvent*) override; protected: QTreeWidget* paramGroup; @@ -96,13 +96,13 @@ class ParameterGroup : public QTreeWidget public: ParameterGroup( QWidget * parent = nullptr ); - virtual ~ParameterGroup(); + ~ParameterGroup() override; protected: /** Shows the context menu. */ - void contextMenuEvent ( QContextMenuEvent* event ); + void contextMenuEvent ( QContextMenuEvent* event ) override; /** Triggers the "Del" key. */ - void keyPressEvent (QKeyEvent* event); + void keyPressEvent (QKeyEvent* event) override; protected Q_SLOTS: /** Removes the underlying parameter group and its sub-groups from the @@ -123,7 +123,7 @@ protected Q_SLOTS: void onRenameSelectedItem(); protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: QMenu* menuEdit; @@ -148,7 +148,7 @@ class ParameterValue : public QTreeWidget public: ParameterValue( QWidget * parent = nullptr ); - virtual ~ParameterValue(); + ~ParameterValue() override; /** Sets the current parameter group that is displayed. */ void setCurrentGroup( const Base::Reference& _hcGrp ); @@ -157,10 +157,10 @@ public: protected: /** Shows the context menu. */ - void contextMenuEvent ( QContextMenuEvent* event ); + void contextMenuEvent ( QContextMenuEvent* event ) override; /** Invokes onDeleteSelectedItem() if the "Del" key was pressed. */ - void keyPressEvent (QKeyEvent* event); - void resizeEvent(QResizeEvent*); + void keyPressEvent (QKeyEvent* event) override; + void resizeEvent(QResizeEvent*) override; protected Q_SLOTS: /** Changes the value of the leaf of the selected item. */ @@ -186,7 +186,7 @@ protected Q_SLOTS: * @note We need to reimplement this method as QTreeWidgetItem::flags() * doesn't have an int parameter. */ - bool edit ( const QModelIndex & index, QAbstractItemView::EditTrigger trigger, QEvent * event ); + bool edit ( const QModelIndex & index, QAbstractItemView::EditTrigger trigger, QEvent * event ) override; private: QMenu* menuEdit; @@ -215,10 +215,10 @@ public: /// Constructor ParameterGroupItem( ParameterGroupItem * parent, const Base::Reference &hcGrp ); ParameterGroupItem( QTreeWidget* parent, const Base::Reference &hcGrp); - ~ParameterGroupItem(); + ~ParameterGroupItem() override; - void setData ( int column, int role, const QVariant & value ); - QVariant data ( int column, int role ) const; + void setData ( int column, int role, const QVariant & value ) override; + QVariant data ( int column, int role ) const override; void fillUp(); Base::Reference _hcGrp; @@ -238,10 +238,10 @@ class ParameterValueItem : public QTreeWidgetItem public: /// Constructor ParameterValueItem ( QTreeWidget* parent, const Base::Reference &hcGrp); - virtual ~ParameterValueItem(); + ~ParameterValueItem() override; /** If the name of the item has changed replace() is invoked. */ - virtual void setData ( int column, int role, const QVariant & value ); + void setData ( int column, int role, const QVariant & value ) override; /** Opens an input dialog to change the value. */ virtual void changeValue() = 0; /** Append this item as leaf to the parameter group. */ @@ -266,14 +266,14 @@ class ParameterText : public ParameterValueItem public: /// Constructor ParameterText ( QTreeWidget * parent, QString label1, const char* value, const Base::Reference &hcGrp); - ~ParameterText(); + ~ParameterText() override; - void changeValue(); - void appendToGroup(); - void removeFromGroup(); + void changeValue() override; + void appendToGroup() override; + void removeFromGroup() override; protected: - void replace( const QString& oldName, const QString& newName ); + void replace( const QString& oldName, const QString& newName ) override; }; /** @@ -285,14 +285,14 @@ class ParameterInt : public ParameterValueItem public: /// Constructor ParameterInt ( QTreeWidget * parent, QString label1, long value, const Base::Reference &hcGrp); - ~ParameterInt(); + ~ParameterInt() override; - void changeValue(); - void appendToGroup(); - void removeFromGroup(); + void changeValue() override; + void appendToGroup() override; + void removeFromGroup() override; protected: - void replace( const QString& oldName, const QString& newName ); + void replace( const QString& oldName, const QString& newName ) override; }; /** @@ -304,14 +304,14 @@ class ParameterUInt : public ParameterValueItem public: /// Constructor ParameterUInt ( QTreeWidget * parent, QString label1, unsigned long value, const Base::Reference &hcGrp); - ~ParameterUInt(); + ~ParameterUInt() override; - void changeValue(); - void appendToGroup(); - void removeFromGroup(); + void changeValue() override; + void appendToGroup() override; + void removeFromGroup() override; protected: - void replace( const QString& oldName, const QString& newName ); + void replace( const QString& oldName, const QString& newName ) override; }; /** @@ -323,14 +323,14 @@ class ParameterFloat : public ParameterValueItem public: /// Constructor ParameterFloat ( QTreeWidget * parent, QString label1, double value, const Base::Reference &hcGrp); - ~ParameterFloat(); + ~ParameterFloat() override; - void changeValue(); - void appendToGroup(); - void removeFromGroup(); + void changeValue() override; + void appendToGroup() override; + void removeFromGroup() override; protected: - void replace( const QString& oldName, const QString& newName ); + void replace( const QString& oldName, const QString& newName ) override; }; /** @@ -342,14 +342,14 @@ class ParameterBool : public ParameterValueItem public: /// Constructor ParameterBool ( QTreeWidget * parent, QString label1, bool value, const Base::Reference &hcGrp); - ~ParameterBool(); + ~ParameterBool() override; - void changeValue(); - void appendToGroup(); - void removeFromGroup(); + void changeValue() override; + void appendToGroup() override; + void removeFromGroup() override; protected: - void replace( const QString& oldName, const QString& newName ); + void replace( const QString& oldName, const QString& newName ) override; }; } // namespace Dialog diff --git a/src/Gui/DlgPreferencesImp.h b/src/Gui/DlgPreferencesImp.h index e9ed3de0af..1e53dfba64 100644 --- a/src/Gui/DlgPreferencesImp.h +++ b/src/Gui/DlgPreferencesImp.h @@ -119,16 +119,16 @@ public: static void reloadSettings(); DlgPreferencesImp(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~DlgPreferencesImp(); + ~DlgPreferencesImp() override; - void accept(); + void accept() override; void reload(); void activateGroupPage(const QString& group, int id); protected: - void changeEvent(QEvent *e); - void showEvent(QShowEvent*); - void resizeEvent(QResizeEvent*); + void changeEvent(QEvent *e) override; + void showEvent(QShowEvent*) override; + void resizeEvent(QResizeEvent*) override; protected Q_SLOTS: diff --git a/src/Gui/DlgProjectInformationImp.h b/src/Gui/DlgProjectInformationImp.h index c068f91526..235d8f0fc2 100644 --- a/src/Gui/DlgProjectInformationImp.h +++ b/src/Gui/DlgProjectInformationImp.h @@ -41,8 +41,8 @@ class DlgProjectInformationImp : public QDialog public: DlgProjectInformationImp(App::Document* doc, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~DlgProjectInformationImp(); - void accept(); + ~DlgProjectInformationImp() override; + void accept() override; private Q_SLOTS: void open_url(); diff --git a/src/Gui/DlgProjectUtility.h b/src/Gui/DlgProjectUtility.h index 3a44c86186..6bac75fedb 100644 --- a/src/Gui/DlgProjectUtility.h +++ b/src/Gui/DlgProjectUtility.h @@ -36,7 +36,7 @@ class DlgProjectUtility : public QDialog public: DlgProjectUtility(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~DlgProjectUtility(); + ~DlgProjectUtility() override; private Q_SLOTS: void on_extractButton_clicked(); diff --git a/src/Gui/DlgPropertyLink.cpp b/src/Gui/DlgPropertyLink.cpp index 0c02f3b3ff..7830e0b029 100644 --- a/src/Gui/DlgPropertyLink.cpp +++ b/src/Gui/DlgPropertyLink.cpp @@ -54,8 +54,8 @@ class ItemDelegate: public QStyledItemDelegate { public: ItemDelegate(QObject* parent=nullptr): QStyledItemDelegate(parent) {} - virtual QWidget* createEditor(QWidget *parent, - const QStyleOptionViewItem &option, const QModelIndex &index) const + QWidget* createEditor(QWidget *parent, + const QStyleOptionViewItem &option, const QModelIndex &index) const override { if(index.column() != 1) return nullptr; diff --git a/src/Gui/DlgPropertyLink.h b/src/Gui/DlgPropertyLink.h index d13b19a649..6548cacdfc 100644 --- a/src/Gui/DlgPropertyLink.h +++ b/src/Gui/DlgPropertyLink.h @@ -40,9 +40,9 @@ class DlgPropertyLink : public QDialog, public Gui::SelectionObserver public: DlgPropertyLink(QWidget* parent = nullptr); - ~DlgPropertyLink(); + ~DlgPropertyLink() override; - void accept(); + void accept() override; QList currentLinks() const; QList originalLinks() const; @@ -62,17 +62,17 @@ public: static QString formatLinks(App::Document *ownerDoc, QList links); protected: - void showEvent(QShowEvent *); - void hideEvent(QHideEvent *); - void closeEvent (QCloseEvent * e); - void leaveEvent(QEvent *); - bool eventFilter(QObject *obj, QEvent *ev); - void keyPressEvent(QKeyEvent *ev); + void showEvent(QShowEvent *) override; + void hideEvent(QHideEvent *) override; + void closeEvent (QCloseEvent * e) override; + void leaveEvent(QEvent *) override; + bool eventFilter(QObject *obj, QEvent *ev) override; + void keyPressEvent(QKeyEvent *ev) override; void detachObserver(); void attachObserver(); - void onSelectionChanged(const Gui::SelectionChanges& msg); + void onSelectionChanged(const Gui::SelectionChanges& msg) override; private Q_SLOTS: void on_checkObjectType_toggled(bool); diff --git a/src/Gui/DlgReportViewImp.h b/src/Gui/DlgReportViewImp.h index d2af172577..5bba353f5f 100644 --- a/src/Gui/DlgReportViewImp.h +++ b/src/Gui/DlgReportViewImp.h @@ -41,13 +41,13 @@ class DlgReportViewImp : public PreferencePage public: DlgReportViewImp( QWidget* parent = nullptr ); - ~DlgReportViewImp(); + ~DlgReportViewImp() override; - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: std::unique_ptr ui; diff --git a/src/Gui/DlgRevertToBackupConfigImp.h b/src/Gui/DlgRevertToBackupConfigImp.h index cf42a7504c..90135dd79f 100644 --- a/src/Gui/DlgRevertToBackupConfigImp.h +++ b/src/Gui/DlgRevertToBackupConfigImp.h @@ -40,7 +40,7 @@ class DlgRevertToBackupConfigImp : public QDialog public: DlgRevertToBackupConfigImp( QWidget* parent = nullptr ); - ~DlgRevertToBackupConfigImp(); + ~DlgRevertToBackupConfigImp() override; public Q_SLOTS: void accept() override; diff --git a/src/Gui/DlgRunExternal.h b/src/Gui/DlgRunExternal.h index 6988f31f37..70ed2768a3 100644 --- a/src/Gui/DlgRunExternal.h +++ b/src/Gui/DlgRunExternal.h @@ -42,7 +42,7 @@ class GuiExport DlgRunExternal : public QDialog public: DlgRunExternal(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - virtual ~DlgRunExternal(); + ~DlgRunExternal() override; int Do(void); @@ -50,8 +50,8 @@ public: QStringList arguments; protected Q_SLOTS: - virtual void reject(void); - virtual void accept(void); + void reject(void) override; + void accept(void) override; virtual void abort(void); virtual void advanced(void); void finished (int exitCode, QProcess::ExitStatus exitStatus); diff --git a/src/Gui/DlgSettings3DViewImp.h b/src/Gui/DlgSettings3DViewImp.h index 76451c572c..65d8c265eb 100644 --- a/src/Gui/DlgSettings3DViewImp.h +++ b/src/Gui/DlgSettings3DViewImp.h @@ -44,16 +44,16 @@ class DlgSettings3DViewImp : public PreferencePage public: DlgSettings3DViewImp(QWidget* parent = nullptr); - ~DlgSettings3DViewImp(); + ~DlgSettings3DViewImp() override; - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; private Q_SLOTS: void onAliasingChanged(int); protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: std::unique_ptr ui; diff --git a/src/Gui/DlgSettingsCacheDirectory.h b/src/Gui/DlgSettingsCacheDirectory.h index 6701bf3801..9c7b1b1c0c 100644 --- a/src/Gui/DlgSettingsCacheDirectory.h +++ b/src/Gui/DlgSettingsCacheDirectory.h @@ -42,13 +42,13 @@ class DlgSettingsCacheDirectory : public PreferencePage public: DlgSettingsCacheDirectory(QWidget* parent = nullptr); - ~DlgSettingsCacheDirectory(); + ~DlgSettingsCacheDirectory() override; - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: void runCheck(); diff --git a/src/Gui/DlgSettingsColorGradientImp.h b/src/Gui/DlgSettingsColorGradientImp.h index 0cba4c09d0..30726c295d 100644 --- a/src/Gui/DlgSettingsColorGradientImp.h +++ b/src/Gui/DlgSettingsColorGradientImp.h @@ -47,9 +47,9 @@ public: DlgSettingsColorGradientImp(const App::ColorGradient& cg, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~DlgSettingsColorGradientImp(); + ~DlgSettingsColorGradientImp() override; - void accept(); + void accept() override; /** @name Color profile */ //@{ diff --git a/src/Gui/DlgSettingsDocumentImp.h b/src/Gui/DlgSettingsDocumentImp.h index 78663d1729..ad321a0c50 100644 --- a/src/Gui/DlgSettingsDocumentImp.h +++ b/src/Gui/DlgSettingsDocumentImp.h @@ -42,16 +42,16 @@ class DlgSettingsDocumentImp : public PreferencePage public: DlgSettingsDocumentImp( QWidget* parent = nullptr ); - ~DlgSettingsDocumentImp(); + ~DlgSettingsDocumentImp() override; - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; protected Q_SLOTS: void onLicenseTypeChanged(int index); protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: std::unique_ptr ui; diff --git a/src/Gui/DlgSettingsImageImp.h b/src/Gui/DlgSettingsImageImp.h index 67c8176122..1d60cae8a7 100644 --- a/src/Gui/DlgSettingsImageImp.h +++ b/src/Gui/DlgSettingsImageImp.h @@ -44,7 +44,7 @@ class DlgSettingsImageImp : public QWidget public: DlgSettingsImageImp( QWidget* parent = nullptr ); - ~DlgSettingsImageImp(); + ~DlgSettingsImageImp() override; /** @name Image dimensions */ //@{ @@ -79,7 +79,7 @@ protected Q_SLOTS: protected: // helper to force an aspect ratio void adjustImageSize(float fRatio); - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: diff --git a/src/Gui/DlgSettingsLazyLoadedImp.h b/src/Gui/DlgSettingsLazyLoadedImp.h index ce52286423..1bfb59d79a 100644 --- a/src/Gui/DlgSettingsLazyLoadedImp.h +++ b/src/Gui/DlgSettingsLazyLoadedImp.h @@ -45,17 +45,17 @@ class DlgSettingsLazyLoadedImp : public PreferencePage public: DlgSettingsLazyLoadedImp( QWidget* parent = nullptr ); - ~DlgSettingsLazyLoadedImp(); + ~DlgSettingsLazyLoadedImp() override; - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; protected Q_SLOTS: void onLoadClicked(const QString& wbName); protected: void buildUnloadedWorkbenchList(); - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: std::unique_ptr ui; diff --git a/src/Gui/DlgSettingsMacroImp.h b/src/Gui/DlgSettingsMacroImp.h index 08febd279a..9dd5f53d8a 100644 --- a/src/Gui/DlgSettingsMacroImp.h +++ b/src/Gui/DlgSettingsMacroImp.h @@ -42,13 +42,13 @@ class DlgSettingsMacroImp : public PreferencePage public: DlgSettingsMacroImp( QWidget* parent = nullptr ); - ~DlgSettingsMacroImp(); + ~DlgSettingsMacroImp() override; - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: std::unique_ptr ui; diff --git a/src/Gui/DlgSettingsNavigation.h b/src/Gui/DlgSettingsNavigation.h index 6090b3db6d..8ab63ceeb8 100644 --- a/src/Gui/DlgSettingsNavigation.h +++ b/src/Gui/DlgSettingsNavigation.h @@ -45,17 +45,17 @@ class DlgSettingsNavigation : public PreferencePage public: DlgSettingsNavigation(QWidget* parent = nullptr); - ~DlgSettingsNavigation(); + ~DlgSettingsNavigation() override; - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; private Q_SLOTS: void on_mouseButton_clicked(); void onNewDocViewChanged(int); protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; void retranslate(); private: @@ -69,7 +69,7 @@ class CameraDialog : public QDialog public: CameraDialog(QWidget* parent=nullptr); - ~CameraDialog(); + ~CameraDialog() override; void setValues(double q0, double q1, double q2, double q3); void getValues(double& q0, double& q1, double& q2, double& q3) const; diff --git a/src/Gui/DlgSettingsPythonConsole.h b/src/Gui/DlgSettingsPythonConsole.h index 84b507a3b2..15decfe080 100644 --- a/src/Gui/DlgSettingsPythonConsole.h +++ b/src/Gui/DlgSettingsPythonConsole.h @@ -42,13 +42,13 @@ class DlgSettingsPythonConsole : public PreferencePage public: DlgSettingsPythonConsole(QWidget* parent = nullptr); - ~DlgSettingsPythonConsole(); + ~DlgSettingsPythonConsole() override; - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: std::unique_ptr ui; diff --git a/src/Gui/DlgSettingsSelection.h b/src/Gui/DlgSettingsSelection.h index b58846a6a5..fd56ced3e9 100644 --- a/src/Gui/DlgSettingsSelection.h +++ b/src/Gui/DlgSettingsSelection.h @@ -44,13 +44,13 @@ class DlgSettingsSelection : public PreferencePage public: DlgSettingsSelection(QWidget* parent = nullptr); - ~DlgSettingsSelection(); + ~DlgSettingsSelection() override; - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: std::unique_ptr ui; diff --git a/src/Gui/DlgSettingsUnitsImp.h b/src/Gui/DlgSettingsUnitsImp.h index aa04c77207..66c52ffd74 100644 --- a/src/Gui/DlgSettingsUnitsImp.h +++ b/src/Gui/DlgSettingsUnitsImp.h @@ -41,13 +41,13 @@ class DlgSettingsUnitsImp : public PreferencePage public: DlgSettingsUnitsImp(QWidget* parent = nullptr); - ~DlgSettingsUnitsImp(); + ~DlgSettingsUnitsImp() override; - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; public Q_SLOTS: void on_comboBox_ViewSystem_currentIndexChanged(int index); diff --git a/src/Gui/DlgSettingsViewColor.h b/src/Gui/DlgSettingsViewColor.h index 9f0b8c12d0..6d28f78cfe 100644 --- a/src/Gui/DlgSettingsViewColor.h +++ b/src/Gui/DlgSettingsViewColor.h @@ -42,13 +42,13 @@ class DlgSettingsViewColor : public PreferencePage public: DlgSettingsViewColor(QWidget* parent = nullptr); - ~DlgSettingsViewColor(); + ~DlgSettingsViewColor() override; - void saveSettings(); - void loadSettings(); + void saveSettings() override; + void loadSettings() override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; protected Q_SLOTS: void onSwitchGradientColorsPressed(); diff --git a/src/Gui/DlgToolbarsImp.h b/src/Gui/DlgToolbarsImp.h index 496c2e1e2d..79db41a8c8 100644 --- a/src/Gui/DlgToolbarsImp.h +++ b/src/Gui/DlgToolbarsImp.h @@ -47,7 +47,7 @@ protected: enum Type { Toolbar, Toolboxbar }; DlgCustomToolbars(Type, QWidget* parent = nullptr); - virtual ~DlgCustomToolbars(); + ~DlgCustomToolbars() override; protected Q_SLOTS: void on_categoryBox_activated(int index); @@ -59,13 +59,13 @@ protected Q_SLOTS: void on_newButton_clicked(); void on_renameButton_clicked(); void on_deleteButton_clicked(); - void onAddMacroAction(const QByteArray&); - void onRemoveMacroAction(const QByteArray&); - void onModifyMacroAction(const QByteArray&); + void onAddMacroAction(const QByteArray&) override; + void onRemoveMacroAction(const QByteArray&) override; + void onModifyMacroAction(const QByteArray&) override; protected: - void changeEvent(QEvent *e); - void hideEvent(QHideEvent * event); + void changeEvent(QEvent *e) override; + void hideEvent(QHideEvent * event) override; virtual void addCustomToolbar(const QString&); virtual void removeCustomToolbar(const QString&); virtual void renameCustomToolbar(const QString&, const QString&); @@ -95,17 +95,17 @@ class DlgCustomToolbarsImp : public DlgCustomToolbars public: DlgCustomToolbarsImp(QWidget* parent = nullptr); - ~DlgCustomToolbarsImp(); + ~DlgCustomToolbarsImp() override; protected: - void changeEvent(QEvent *e); - virtual void addCustomToolbar(const QString&); - virtual void removeCustomToolbar(const QString&); - virtual void renameCustomToolbar(const QString&, const QString&); - virtual void addCustomCommand(const QString&, const QByteArray&); - virtual void removeCustomCommand(const QString&, const QByteArray&); - virtual void moveUpCustomCommand(const QString&, const QByteArray&); - virtual void moveDownCustomCommand(const QString&, const QByteArray&); + void changeEvent(QEvent *e) override; + void addCustomToolbar(const QString&) override; + void removeCustomToolbar(const QString&) override; + void renameCustomToolbar(const QString&, const QString&) override; + void addCustomCommand(const QString&, const QByteArray&) override; + void removeCustomCommand(const QString&, const QByteArray&) override; + void moveUpCustomCommand(const QString&, const QByteArray&) override; + void moveDownCustomCommand(const QString&, const QByteArray&) override; private: QList getActionGroup(QAction*); @@ -127,10 +127,10 @@ class DlgCustomToolBoxbarsImp : public DlgCustomToolbars public: DlgCustomToolBoxbarsImp(QWidget* parent = nullptr); - ~DlgCustomToolBoxbarsImp(); + ~DlgCustomToolBoxbarsImp() override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; }; } // namespace Dialog diff --git a/src/Gui/DlgUndoRedo.h b/src/Gui/DlgUndoRedo.h index cc615b1bab..35889c4928 100644 --- a/src/Gui/DlgUndoRedo.h +++ b/src/Gui/DlgUndoRedo.h @@ -38,7 +38,7 @@ class UndoDialog : public QMenu public: UndoDialog( QWidget* parent = nullptr ); - virtual ~UndoDialog(); + ~UndoDialog() override; protected Q_SLOTS: void onSelected(); @@ -54,7 +54,7 @@ class RedoDialog : public QMenu public: RedoDialog( QWidget* parent = nullptr ); - virtual ~RedoDialog(); + ~RedoDialog() override; protected Q_SLOTS: void onSelected(); diff --git a/src/Gui/DlgUnitsCalculatorImp.h b/src/Gui/DlgUnitsCalculatorImp.h index dba859643f..9b1b7f120d 100644 --- a/src/Gui/DlgUnitsCalculatorImp.h +++ b/src/Gui/DlgUnitsCalculatorImp.h @@ -43,11 +43,11 @@ class DlgUnitsCalculator : public QDialog public: DlgUnitsCalculator(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~DlgUnitsCalculator(); + ~DlgUnitsCalculator() override; protected: - void accept(); - void reject(); + void accept() override; + void reject() override; protected Q_SLOTS: void textChanged(const QString); diff --git a/src/Gui/DlgWorkbenchesImp.h b/src/Gui/DlgWorkbenchesImp.h index b436d7c00a..12d8b2e621 100644 --- a/src/Gui/DlgWorkbenchesImp.h +++ b/src/Gui/DlgWorkbenchesImp.h @@ -41,19 +41,19 @@ class DlgWorkbenchesImp : public CustomizeActionPage public: DlgWorkbenchesImp(QWidget* parent = nullptr); - ~DlgWorkbenchesImp(); + ~DlgWorkbenchesImp() override; static QStringList load_enabled_workbenches(); static QStringList load_disabled_workbenches(); static const QString all_workbenches; protected: - void changeEvent(QEvent *e); - void hideEvent(QHideEvent * event); + void changeEvent(QEvent *e) override; + void hideEvent(QHideEvent * event) override; protected Q_SLOTS: - void onAddMacroAction(const QByteArray&); - void onRemoveMacroAction(const QByteArray&); - void onModifyMacroAction(const QByteArray&); + void onAddMacroAction(const QByteArray&) override; + void onRemoveMacroAction(const QByteArray&) override; + void onModifyMacroAction(const QByteArray&) override; void on_add_to_enabled_workbenches_btn_clicked(); void on_remove_from_enabled_workbenches_btn_clicked(); void on_shift_workbench_up_btn_clicked(); diff --git a/src/Gui/DockWindow.h b/src/Gui/DockWindow.h index 300b979dbe..c598da023e 100644 --- a/src/Gui/DockWindow.h +++ b/src/Gui/DockWindow.h @@ -57,21 +57,21 @@ public: /** View destructor * Detach the view from the document, if attached. */ - virtual ~DockWindow(); + ~DockWindow() override; /** @name methods to override */ //@{ /// get called when the document is updated - virtual void onUpdate(){} + void onUpdate() override{} /// returns the name of the view (important for messages) - virtual const char *getName() const { return "DockWindow"; } + const char *getName() const override { return "DockWindow"; } /// Message handler - virtual bool onMsg(const char* ,const char** ){ return false; } + bool onMsg(const char* ,const char** ) override{ return false; } /// Message handler test - virtual bool onHasMsg(const char*) const { return false; } + bool onHasMsg(const char*) const override { return false; } /// overwrite when checking on close state - virtual bool canClose(){return true;} + bool canClose() override{return true;} //@} Q_SIGNALS: diff --git a/src/Gui/DockWindowManager.h b/src/Gui/DockWindowManager.h index 571ebfde3f..de314b6af7 100644 --- a/src/Gui/DockWindowManager.h +++ b/src/Gui/DockWindowManager.h @@ -109,7 +109,7 @@ private: QDockWidget* findDockWidget(const QList&, const QString&) const; DockWindowManager(); - ~DockWindowManager(); + ~DockWindowManager() override; static DockWindowManager* _instance; struct DockWindowManagerP* d; }; diff --git a/src/Gui/Document.h b/src/Gui/Document.h index 315b3d67d5..73df51510d 100644 --- a/src/Gui/Document.h +++ b/src/Gui/Document.h @@ -69,7 +69,7 @@ class GuiExport Document : public Base::Persistence { public: Document(App::Document* pcDocument, Application * app); - ~Document(); + ~Document() override; protected: /** @name I/O of the document */ @@ -141,7 +141,7 @@ public: /** @name I/O of the document */ //@{ - unsigned int getMemSize () const; + unsigned int getMemSize () const override; /// Save the document bool save(); /// Save the document under a new file name @@ -151,13 +151,13 @@ public: /// Save all open document static void saveAll(); /// This method is used to save properties or very small amounts of data to an XML document. - virtual void Save (Base::Writer &writer) const; + void Save (Base::Writer &writer) const override; /// This method is used to restore properties from an XML document. - virtual void Restore(Base::XMLReader &reader); + void Restore(Base::XMLReader &reader) override; /// This method is used to save large amounts of data to a binary file. - virtual void SaveDocFile (Base::Writer &writer) const; + void SaveDocFile (Base::Writer &writer) const override; /// This method is used to restore large amounts of data from a binary file. - virtual void RestoreDocFile(Base::Reader &reader); + void RestoreDocFile(Base::Reader &reader) override; void exportObjects(const std::vector&, Base::Writer&); void importObjects(const std::vector&, Base::Reader&, const std::map& nameMapping); @@ -293,7 +293,7 @@ public: /// called by Application before being deleted void beforeDelete(); - virtual PyObject *getPyObject(); + PyObject *getPyObject() override; const char *getCameraSettings() const; bool saveCameraSettings(const char *) const; diff --git a/src/Gui/DocumentModel.cpp b/src/Gui/DocumentModel.cpp index 054087914f..0182ea1ccc 100644 --- a/src/Gui/DocumentModel.cpp +++ b/src/Gui/DocumentModel.cpp @@ -51,7 +51,7 @@ namespace Gui { TYPESYSTEM_HEADER(); public: - virtual ~DocumentModelIndex() + ~DocumentModelIndex() override { qDeleteAll(childItems); } void setParent(DocumentModelIndex* parent) @@ -118,8 +118,8 @@ namespace Gui { public: ApplicationIndex(){} int findChild(const Gui::Document& d) const; - Qt::ItemFlags flags() const; - QVariant data(int role) const; + Qt::ItemFlags flags() const override; + QVariant data(int role) const override; }; // ------------------------------------------------------------------------ @@ -142,14 +142,14 @@ namespace Gui { if (!documentIcon) documentIcon = new QIcon(Gui::BitmapFactory().pixmap("Document")); } - ~DocumentIndex() + ~DocumentIndex() override { qDeleteAll(childItems); childItems.clear(); } ViewProviderIndex* cloneViewProvider(const ViewProviderDocumentObject&) const; int rowOfViewProvider(const ViewProviderDocumentObject&) const; void findViewProviders(const ViewProviderDocumentObject&, QList&) const; - QVariant data(int role) const; + QVariant data(int role) const override; }; // ------------------------------------------------------------------------ @@ -162,10 +162,10 @@ namespace Gui { public: const Gui::ViewProviderDocumentObject& v; ViewProviderIndex(const Gui::ViewProviderDocumentObject& v, DocumentIndex* d); - ~ViewProviderIndex(); + ~ViewProviderIndex() override; ViewProviderIndex* clone() const; void findViewProviders(const ViewProviderDocumentObject&, QList&) const; - QVariant data(int role) const; + QVariant data(int role) const override; private: DocumentIndex* d; diff --git a/src/Gui/DocumentModel.h b/src/Gui/DocumentModel.h index becb4dedf1..9a55bc94f3 100644 --- a/src/Gui/DocumentModel.h +++ b/src/Gui/DocumentModel.h @@ -39,17 +39,17 @@ class DocumentModel : public QAbstractItemModel { public: DocumentModel(QObject* parent); - virtual ~DocumentModel(); + ~DocumentModel() override; - int columnCount (const QModelIndex & parent = QModelIndex()) const; - QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const; - bool setData (const QModelIndex & idx, const QVariant & value, int role); - Qt::ItemFlags flags(const QModelIndex &index) const; - QModelIndex index (int row, int column, const QModelIndex & parent = QModelIndex()) const; - QModelIndex parent (const QModelIndex & index) const; - int rowCount (const QModelIndex & parent = QModelIndex()) const; - QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - bool setHeaderData (int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole); + int columnCount (const QModelIndex & parent = QModelIndex()) const override; + QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override; + bool setData (const QModelIndex & idx, const QVariant & value, int role) override; + Qt::ItemFlags flags(const QModelIndex &index) const override; + QModelIndex index (int row, int column, const QModelIndex & parent = QModelIndex()) const override; + QModelIndex parent (const QModelIndex & index) const override; + int rowCount (const QModelIndex & parent = QModelIndex()) const override; + QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + bool setHeaderData (int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole) override; private: void slotNewDocument(const Gui::Document&); diff --git a/src/Gui/DocumentRecovery.h b/src/Gui/DocumentRecovery.h index c8183beff6..615d1816f0 100644 --- a/src/Gui/DocumentRecovery.h +++ b/src/Gui/DocumentRecovery.h @@ -44,14 +44,14 @@ class DocumentRecovery : public QDialog public: DocumentRecovery(const QList&, QWidget* parent = nullptr); - virtual ~DocumentRecovery(); + ~DocumentRecovery() override; - void accept(); + void accept() override; bool foundDocuments() const; protected: - void closeEvent(QCloseEvent*); - void contextMenuEvent(QContextMenuEvent*); + void closeEvent(QCloseEvent*) override; + void contextMenuEvent(QContextMenuEvent*) override; QString createProjectFile(const QString&); void cleanup(QDir&, const QList&, const QString&); diff --git a/src/Gui/DownloadItem.h b/src/Gui/DownloadItem.h index ff3df9d4bb..6344841ce6 100644 --- a/src/Gui/DownloadItem.h +++ b/src/Gui/DownloadItem.h @@ -43,7 +43,7 @@ class EditTableView : public QTableView public: EditTableView(QWidget *parent = nullptr); - void keyPressEvent(QKeyEvent *event); + void keyPressEvent(QKeyEvent *event) override; public Q_SLOTS: void removeOne(); @@ -58,7 +58,7 @@ public: SqueezeLabel(QWidget *parent = nullptr); protected: - void paintEvent(QPaintEvent *event); + void paintEvent(QPaintEvent *event) override; }; @@ -73,14 +73,14 @@ Q_OBJECT public: AutoSaver(QObject *parent); - ~AutoSaver(); + ~AutoSaver() override; void saveIfNecessary(); public Q_SLOTS: void changeOccurred(); protected: - void timerEvent(QTimerEvent *event); + void timerEvent(QTimerEvent *event) override; private: QBasicTimer m_timer; @@ -137,7 +137,7 @@ private Q_SLOTS: void finished(); private: - void contextMenuEvent(QContextMenuEvent *); + void contextMenuEvent(QContextMenuEvent *) override; void getFileName(); void init(); void updateInfoLabel(); diff --git a/src/Gui/DownloadManager.h b/src/Gui/DownloadManager.h index 31851f7ab1..b172443aee 100644 --- a/src/Gui/DownloadManager.h +++ b/src/Gui/DownloadManager.h @@ -60,7 +60,7 @@ public: private: DownloadManager(QWidget *parent = nullptr); - ~DownloadManager(); + ~DownloadManager() override; public: int activeDownloads() const; @@ -69,7 +69,7 @@ public: RemovePolicy removePolicy() const; void setRemovePolicy(RemovePolicy policy); - void closeEvent(QCloseEvent* e); + void closeEvent(QCloseEvent* e) override; QUrl redirectUrl(const QUrl&) const; public Q_SLOTS: @@ -108,9 +108,9 @@ class DownloadModel : public QAbstractListModel public: DownloadModel(DownloadManager *downloadManager, QObject *parent = nullptr); - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - int rowCount(const QModelIndex &parent = QModelIndex()) const; - bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; private: DownloadManager *m_downloadManager; diff --git a/src/Gui/EditorView.h b/src/Gui/EditorView.h index ab6c851bce..eba3adc554 100644 --- a/src/Gui/EditorView.h +++ b/src/Gui/EditorView.h @@ -60,19 +60,19 @@ public: }; EditorView(QPlainTextEdit* editor, QWidget* parent); - ~EditorView(); + ~EditorView() override; QPlainTextEdit* getEditor() const; void setDisplayName(DisplayName); - void OnChange(Base::Subject &rCaller,const char* rcReason); + void OnChange(Base::Subject &rCaller,const char* rcReason) override; - const char *getName() const {return "EditorView";} - void onUpdate(){} + const char *getName() const override {return "EditorView";} + void onUpdate() override{} - bool onMsg(const char* pMsg,const char** ppReturn); - bool onHasMsg(const char* pMsg) const; + bool onMsg(const char* pMsg,const char** ppReturn) override; + bool onHasMsg(const char* pMsg) const override; - bool canClose(); + bool canClose() override; /** @name Standard actions of the editor */ //@{ @@ -83,21 +83,21 @@ public: void paste (); void undo (); void redo (); - void print (); - void printPdf(); - void printPreview(); - void print(QPrinter*); + void print () override; + void printPdf() override; + void printPreview() override; + void print(QPrinter*) override; //@} - QStringList undoActions() const; - QStringList redoActions() const; + QStringList undoActions() const override; + QStringList redoActions() const override; QString fileName() const; protected: - void focusInEvent(QFocusEvent* e); - void showEvent(QShowEvent*); - void hideEvent(QHideEvent*); - void closeEvent(QCloseEvent*); + void focusInEvent(QFocusEvent* e) override; + void showEvent(QShowEvent*) override; + void hideEvent(QHideEvent*) override; + void closeEvent(QCloseEvent*) override; private Q_SLOTS: void checkTimestamp(); @@ -125,10 +125,10 @@ class GuiExport PythonEditorView : public EditorView public: PythonEditorView(PythonEditor* editor, QWidget* parent); - ~PythonEditorView(); + ~PythonEditorView() override; - bool onMsg(const char* pMsg,const char** ppReturn); - bool onHasMsg(const char* pMsg) const; + bool onMsg(const char* pMsg,const char** ppReturn) override; + bool onHasMsg(const char* pMsg) const override; public Q_SLOTS: void executeScript(); @@ -151,8 +151,8 @@ public: void setEditor(QPlainTextEdit *textEdit); protected: - void keyPressEvent(QKeyEvent*); - void changeEvent(QEvent*); + void keyPressEvent(QKeyEvent*) override; + void changeEvent(QEvent*) override; public Q_SLOTS: void activate(); diff --git a/src/Gui/ExpressionBindingPy.h b/src/Gui/ExpressionBindingPy.h index 2c5c8a751d..1dd18d6350 100644 --- a/src/Gui/ExpressionBindingPy.h +++ b/src/Gui/ExpressionBindingPy.h @@ -34,9 +34,9 @@ public: static void init_type(); // announce properties and methods ExpressionBindingPy(ExpressionBinding*); - ~ExpressionBindingPy(); + ~ExpressionBindingPy() override; - Py::Object repr(); + Py::Object repr() override; Py::Object bind(const Py::Tuple&); Py::Object isBound(const Py::Tuple&); diff --git a/src/Gui/ExpressionCompleter.cpp b/src/Gui/ExpressionCompleter.cpp index b418c62174..d6c6f3b45e 100644 --- a/src/Gui/ExpressionCompleter.cpp +++ b/src/Gui/ExpressionCompleter.cpp @@ -138,7 +138,7 @@ public: return res; } - QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const { + QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override { if(role!=Qt::EditRole && role!=Qt::DisplayRole && role!=Qt::UserRole) return QVariant(); QVariant v; @@ -260,7 +260,7 @@ public: return; } - QModelIndex parent(const QModelIndex & index) const { + QModelIndex parent(const QModelIndex & index) const override { if(!index.isValid()) return QModelIndex(); Info info; @@ -277,7 +277,7 @@ public: return QModelIndex(); } - QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex()) const { + QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex()) const override { if(row<0) return QModelIndex(); Info info; @@ -296,7 +296,7 @@ public: return createIndex(row,column,infoId(info)); } - int rowCount(const QModelIndex & parent = QModelIndex()) const { + int rowCount(const QModelIndex & parent = QModelIndex()) const override { Info info; int row = 0; if(!parent.isValid()) { @@ -318,7 +318,7 @@ public: return count; } - int columnCount(const QModelIndex &) const { + int columnCount(const QModelIndex &) const override { return 1; } diff --git a/src/Gui/ExpressionCompleter.h b/src/Gui/ExpressionCompleter.h index deae91f554..3cafbf9e92 100644 --- a/src/Gui/ExpressionCompleter.h +++ b/src/Gui/ExpressionCompleter.h @@ -69,8 +69,8 @@ public Q_SLOTS: private: void init(); - virtual QString pathFromIndex ( const QModelIndex & index ) const; - virtual QStringList splitPath ( const QString & path ) const; + QString pathFromIndex ( const QModelIndex & index ) const override; + QStringList splitPath ( const QString & path ) const override; int prefixStart = 0; int prefixEnd = 0; @@ -97,8 +97,8 @@ public Q_SLOTS: void slotTextChanged(const QString & text); void slotCompleteText(const QString & completionPrefix); protected: - void keyPressEvent(QKeyEvent * event); - void contextMenuEvent(QContextMenuEvent * event); + void keyPressEvent(QKeyEvent * event) override; + void contextMenuEvent(QContextMenuEvent * event) override; private: ExpressionCompleter * completer; bool block; @@ -117,8 +117,8 @@ public: void hideCompleter(); void setExactMatch(bool enabled=true); protected: - void keyPressEvent(QKeyEvent * event); - void contextMenuEvent(QContextMenuEvent * event); + void keyPressEvent(QKeyEvent * event) override; + void contextMenuEvent(QContextMenuEvent * event) override; Q_SIGNALS: void textChanged2(QString text, int pos); public Q_SLOTS: diff --git a/src/Gui/FileDialog.h b/src/Gui/FileDialog.h index f7cfede8cc..1804737c49 100644 --- a/src/Gui/FileDialog.h +++ b/src/Gui/FileDialog.h @@ -77,9 +77,9 @@ public: static void saveLocation(const QString&); FileDialog(QWidget * parent = nullptr); - ~FileDialog(); + ~FileDialog() override; - void accept(); + void accept() override; private Q_SLOTS: void onSelectedFilter(const QString&); @@ -107,9 +107,9 @@ public: }; FileOptionsDialog ( QWidget* parent, Qt::WindowFlags ); - virtual ~FileOptionsDialog(); + ~FileOptionsDialog() override; - void accept(); + void accept() override; void setOptionsWidget( ExtensionPosition pos , QWidget*, bool show = false ); QWidget* getOptionsWidget() const; @@ -134,11 +134,11 @@ class FileIconProvider : public QFileIconProvider { public: FileIconProvider(); - ~FileIconProvider(); + ~FileIconProvider() override; - QIcon icon(IconType type) const; - QIcon icon(const QFileInfo & info) const; - QString type(const QFileInfo & info) const; + QIcon icon(IconType type) const override; + QIcon icon(const QFileInfo & info) const override; + QString type(const QFileInfo & info) const override; }; // ---------------------------------------------------------------------- @@ -166,7 +166,7 @@ public: public: FileChooser ( QWidget * parent = nullptr ); - virtual ~FileChooser(); + ~FileChooser() override; /** * Returns the set filter. @@ -219,7 +219,7 @@ private Q_SLOTS: void editingFinished(); protected: - void resizeEvent(QResizeEvent*); + void resizeEvent(QResizeEvent*) override; private: QLineEdit *lineEdit; @@ -246,7 +246,7 @@ public: typedef QMap Dict; SelectModule (const QString& type, const Dict&, QWidget* parent); - virtual ~SelectModule(); + ~SelectModule() override; QString getModule() const; /** @name Import/Export handler @@ -261,8 +261,8 @@ public: static Dict importHandler(const QStringList& fn, const QString& filter=QString()); //@} - void accept(); - void reject(); + void accept() override; + void reject() override; private Q_SLOTS: void onButtonClicked(); diff --git a/src/Gui/Flag.h b/src/Gui/Flag.h index 3694989141..a93ebaef10 100644 --- a/src/Gui/Flag.h +++ b/src/Gui/Flag.h @@ -42,24 +42,24 @@ class GuiExport Flag : public QtGLWidget public: Flag(QWidget* parent=nullptr); - ~Flag(); + ~Flag() override; - QSize sizeHint() const; + QSize sizeHint() const override; void setOrigin(const SbVec3f&); const SbVec3f& getOrigin() const; void drawLine(Gui::View3DInventorViewer*, int tox, int toy); void setText(const QString&); protected: - void initializeGL(); - void resizeGL(int width, int height); - void paintGL(); + void initializeGL() override; + void resizeGL(int width, int height) override; + void paintGL() override; - void paintEvent(QPaintEvent *); - void mouseMoveEvent(QMouseEvent *); - void mousePressEvent(QMouseEvent *); - void resizeEvent(QResizeEvent *); - void contextMenuEvent(QContextMenuEvent *); + void paintEvent(QPaintEvent *) override; + void mouseMoveEvent(QMouseEvent *) override; + void mousePressEvent(QMouseEvent *) override; + void resizeEvent(QResizeEvent *) override; + void contextMenuEvent(QContextMenuEvent *) override; private: QString text; @@ -77,18 +77,18 @@ public: FlagLayout(QWidget *parent, int margin = 0, int spacing = -1); FlagLayout(int spacing = -1); - ~FlagLayout(); + ~FlagLayout() override; - void addItem(QLayoutItem *item); + void addItem(QLayoutItem *item) override; void addWidget(QWidget *widget, Position position); - Qt::Orientations expandingDirections() const; - bool hasHeightForWidth() const; - int count() const; - QLayoutItem *itemAt(int index) const; - QSize minimumSize() const; - void setGeometry(const QRect &rect); - QSize sizeHint() const; - QLayoutItem *takeAt(int index); + Qt::Orientations expandingDirections() const override; + bool hasHeightForWidth() const override; + int count() const override; + QLayoutItem *itemAt(int index) const override; + QSize minimumSize() const override; + void setGeometry(const QRect &rect) override; + QSize sizeHint() const override; + QLayoutItem *takeAt(int index) override; void add(QLayoutItem *item, Position position); @@ -116,14 +116,14 @@ class GuiExport GLFlagWindow : public Gui::GLGraphicsItem public: GLFlagWindow(View3DInventorViewer*); - virtual ~GLFlagWindow(); + ~GLFlagWindow() override; void addFlag(Flag* item, FlagLayout::Position pos); void removeFlag(Flag* item); void deleteFlags(); Flag* getFlag(int) const; int countFlags() const; - void paintGL(); + void paintGL() override; private: View3DInventorViewer* _viewer; diff --git a/src/Gui/GLPainter.h b/src/Gui/GLPainter.h index af69c24e31..cc6c47b6e9 100644 --- a/src/Gui/GLPainter.h +++ b/src/Gui/GLPainter.h @@ -90,7 +90,7 @@ public: GLGraphicsItem() { } - virtual ~GLGraphicsItem() + ~GLGraphicsItem() override { } virtual void paintGL() = 0; @@ -106,14 +106,14 @@ class GuiExport Rubberband : public Gui::GLGraphicsItem public: Rubberband(View3DInventorViewer* v); Rubberband(); - ~Rubberband(); + ~Rubberband() override; void setWorking(bool on); void setLineStipple(bool on); bool isWorking(); void setViewer(View3DInventorViewer* v); void setCoords(int x1, int y1, int x2, int y2); void setColor(float r, float g, float b, float a); - void paintGL(); + void paintGL() override; }; class GuiExport Polyline : public Gui::GLGraphicsItem @@ -128,7 +128,7 @@ class GuiExport Polyline : public Gui::GLGraphicsItem public: Polyline(View3DInventorViewer* v); Polyline(); - ~Polyline(); + ~Polyline() override; void setWorking(bool on); bool isWorking() const; void setViewer(View3DInventorViewer* v); @@ -140,7 +140,7 @@ public: void addNode(const QPoint& p); void popNode(); void clear(); - void paintGL(); + void paintGL() override; }; } // namespace Gui diff --git a/src/Gui/GestureNavigationStyle.cpp b/src/Gui/GestureNavigationStyle.cpp index 4080376b1e..69bb9264a1 100644 --- a/src/Gui/GestureNavigationStyle.cpp +++ b/src/Gui/GestureNavigationStyle.cpp @@ -94,7 +94,7 @@ class NS::Event : public sc::event { public: Event():inventor_event(nullptr), modifiers{}, flags(new Flags){} - virtual ~Event(){} + ~Event() override{} void log() const { if (isPress(1)) @@ -245,7 +245,7 @@ public: if (ns.logging) Base::Console().Log(" -> IdleState\n"); } - virtual ~IdleState(){} + ~IdleState() override{} sc::result react(const NS::Event& ev){ auto &ns = this->outermost_context().ns; @@ -371,7 +371,7 @@ public: // unregisterRecognizer routines failed to affect anything. } - virtual ~AwaitingMoveState(){ + ~AwaitingMoveState() override{ //always clear postponed events when leaving this state. this->outermost_context().ns.postponedEvents.discardAll(); } @@ -494,7 +494,7 @@ public: if (ns.logging) Base::Console().Log(" -> RotateState\n"); } - virtual ~RotateState(){} + ~RotateState() override{} sc::result react(const NS::Event& ev){ if(ev.isMouseButtonEvent()){ @@ -539,7 +539,7 @@ public: this->ratio = ns.viewer->getSoRenderManager()->getViewportRegion().getViewportAspectRatio(); ns.pan(ns.viewer->getSoRenderManager()->getCamera());//set up panningplane } - virtual ~PanState(){} + ~PanState() override{} sc::result react(const NS::Event& ev){ if(ev.isMouseButtonEvent()){ @@ -586,7 +586,7 @@ public: this->ratio = ns.viewer->getSoRenderManager()->getViewportRegion().getViewportAspectRatio(); ns.pan(ns.viewer->getSoRenderManager()->getCamera());//set up panningplane } - virtual ~StickyPanState(){ + ~StickyPanState() override{ auto &ns = this->outermost_context().ns; ns.button2down = false; //a workaround for dealing with Qt not sending UP event after a tap-hold-drag sequence. } @@ -631,7 +631,7 @@ public: Base::Console().Log(" -> TiltState\n"); ns.pan(ns.viewer->getSoRenderManager()->getCamera());//set up panningplane } - virtual ~TiltState(){} + ~TiltState() override{} sc::result react(const NS::Event& ev){ if(ev.isMouseButtonEvent()){ @@ -684,7 +684,7 @@ public: enableTilt = !(App::GetApplication().GetParameterGroupByPath ("User parameter:BaseApp/Preferences/View")->GetBool("DisableTouchTilt",true)); } - virtual ~GestureState(){ + ~GestureState() override{ auto &ns = this->outermost_context().ns; //a workaround for Qt not always sending release evends during touchecreen gestures on Windows ns.button1down = false; @@ -759,7 +759,7 @@ public: if (ns.logging) Base::Console().Log(" -> AwaitingReleaseState\n"); } - virtual ~AwaitingReleaseState(){} + ~AwaitingReleaseState() override{} sc::result react(const NS::Event& ev){ auto &ns = this->outermost_context().ns; @@ -810,7 +810,7 @@ public: if (ns.logging) Base::Console().Log(" -> InteractState\n"); } - virtual ~InteractState(){} + ~InteractState() override{} sc::result react(const NS::Event& ev){ if(ev.isMouseButtonEvent()){ diff --git a/src/Gui/GestureNavigationStyle.h b/src/Gui/GestureNavigationStyle.h index cdf6aa0f04..c2ec99a10e 100644 --- a/src/Gui/GestureNavigationStyle.h +++ b/src/Gui/GestureNavigationStyle.h @@ -39,7 +39,7 @@ class GestureNavigationStyle: public UserNavigationStyle public: GestureNavigationStyle(); - virtual ~GestureNavigationStyle() override; + ~GestureNavigationStyle() override; const char* mouseButtons(ViewerMode) override; protected: diff --git a/src/Gui/GraphicsViewZoom.h b/src/Gui/GraphicsViewZoom.h index 1c6612ddfd..6fd5690147 100644 --- a/src/Gui/GraphicsViewZoom.h +++ b/src/Gui/GraphicsViewZoom.h @@ -87,7 +87,7 @@ private: double _zoom_factor_base; bool m_invert_zoom; QPointF target_scene_pos, target_viewport_pos; - bool eventFilter(QObject* object, QEvent* event); + bool eventFilter(QObject* object, QEvent* event) override; }; #endif // GRAPHICSVIEWZOOM_H diff --git a/src/Gui/GraphvizView.cpp b/src/Gui/GraphvizView.cpp index b32af17a5e..92793bace0 100644 --- a/src/Gui/GraphvizView.cpp +++ b/src/Gui/GraphvizView.cpp @@ -69,7 +69,7 @@ public: { } - virtual ~GraphvizWorker() + ~GraphvizWorker() override { dotProc.moveToThread(this); unflattenProc.moveToThread(this); @@ -90,7 +90,7 @@ public: Q_EMIT emitFinished(); } - void run() { + void run() override { QByteArray preprocessed = str; ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/DependencyGraph"); @@ -140,7 +140,7 @@ class GraphvizGraphicsView final : public QGraphicsView { public: GraphvizGraphicsView(QGraphicsScene* scene, QWidget* parent); - ~GraphvizGraphicsView() = default; + ~GraphvizGraphicsView() override = default; GraphvizGraphicsView(const GraphvizGraphicsView&) = delete; GraphvizGraphicsView(GraphvizGraphicsView&&) = delete; diff --git a/src/Gui/GraphvizView.h b/src/Gui/GraphvizView.h index 1e3ea5dd35..b49245b2a4 100644 --- a/src/Gui/GraphvizView.h +++ b/src/Gui/GraphvizView.h @@ -43,23 +43,23 @@ class GuiExport GraphvizView : public MDIView public: GraphvizView(App::Document &_doc, QWidget* parent=nullptr); - ~GraphvizView(); + ~GraphvizView() override; QByteArray exportGraph(const QString& filter); /// Message handler - virtual bool onMsg(const char* pMsg,const char** ppReturn); + bool onMsg(const char* pMsg,const char** ppReturn) override; /// Message handler test - virtual bool onHasMsg(const char* pMsg) const; + bool onHasMsg(const char* pMsg) const override; /** @name Printing */ //@{ - virtual void print(QPrinter* printer); + void print(QPrinter* printer) override; /** Print content of view */ - virtual void print(); + void print() override; /** Print to PDF file */ - virtual void printPdf(); + void printPdf() override; /** Show a preview dialog */ - virtual void printPreview(); + void printPreview() override; //@} private Q_SLOTS: diff --git a/src/Gui/GuiApplication.h b/src/Gui/GuiApplication.h index 85b7f2cf31..7d6934e9cf 100644 --- a/src/Gui/GuiApplication.h +++ b/src/Gui/GuiApplication.h @@ -42,13 +42,13 @@ class GUIApplication : public GUIApplicationNativeEventAware public: explicit GUIApplication(int & argc, char ** argv); - virtual ~GUIApplication(); + ~GUIApplication() override; /** * Make forwarding events exception-safe and get more detailed information * where an unhandled exception comes from. */ - bool notify (QObject * receiver, QEvent * event); + bool notify (QObject * receiver, QEvent * event) override; /// Pointer to exceptions caught in Qt event handler std::shared_ptr caughtException; @@ -57,7 +57,7 @@ public Q_SLOTS: void commitData(QSessionManager &manager); protected: - bool event(QEvent * event); + bool event(QEvent * event) override; }; class GUISingleApplication : public GUIApplication @@ -66,7 +66,7 @@ class GUISingleApplication : public GUIApplication public: explicit GUISingleApplication(int & argc, char ** argv); - virtual ~GUISingleApplication(); + ~GUISingleApplication() override; bool isRunning() const; bool sendMessage(const QByteArray &message, int timeout = 5000); @@ -89,7 +89,7 @@ class WheelEventFilter : public QObject public: WheelEventFilter(QObject* parent); - bool eventFilter(QObject* obj, QEvent* ev); + bool eventFilter(QObject* obj, QEvent* ev) override; }; class KeyboardFilter : public QObject @@ -98,7 +98,7 @@ class KeyboardFilter : public QObject public: KeyboardFilter(QObject* parent); - bool eventFilter(QObject* obj, QEvent* ev); + bool eventFilter(QObject* obj, QEvent* ev) override; }; } diff --git a/src/Gui/GuiApplicationNativeEventAware.h b/src/Gui/GuiApplicationNativeEventAware.h index b1d18b14b0..8a0d2f7a1a 100644 --- a/src/Gui/GuiApplicationNativeEventAware.h +++ b/src/Gui/GuiApplicationNativeEventAware.h @@ -39,7 +39,7 @@ namespace Gui Q_OBJECT public: GUIApplicationNativeEventAware(int &argc, char *argv[]); - ~GUIApplicationNativeEventAware(); + ~GUIApplicationNativeEventAware() override; void initSpaceball(QMainWindow *window); bool isSpaceballPresent() const {return spaceballPresent;} void setSpaceballPresent(bool present) {spaceballPresent = present;} diff --git a/src/Gui/GuiConsole.h b/src/Gui/GuiConsole.h index 993bfef188..6e55983529 100644 --- a/src/Gui/GuiConsole.h +++ b/src/Gui/GuiConsole.h @@ -46,7 +46,7 @@ public: /// Constructor GUIConsole(); /// Destructor - virtual ~GUIConsole(); + ~GUIConsole() override; void SendLog(const std::string& msg, Base::LogStyle level) override; const char* Name() override {return "GUIConsole";} diff --git a/src/Gui/InputField.cpp b/src/Gui/InputField.cpp index f0c80996c9..a5d6077d61 100644 --- a/src/Gui/InputField.cpp +++ b/src/Gui/InputField.cpp @@ -53,10 +53,10 @@ class InputValidator : public QValidator { public: InputValidator(InputField* parent); - ~InputValidator(); + ~InputValidator() override; - void fixup(QString& input) const; - State validate(QString& input, int& pos) const; + void fixup(QString& input) const override; + State validate(QString& input, int& pos) const override; private: InputField* dptr; diff --git a/src/Gui/InputField.h b/src/Gui/InputField.h index 450b630fb4..2a22dbe73e 100644 --- a/src/Gui/InputField.h +++ b/src/Gui/InputField.h @@ -75,7 +75,7 @@ class GuiExport InputField : public ExpressionLineEdit, public ExpressionBinding public: InputField (QWidget * parent = nullptr); - virtual ~InputField(); + ~InputField() override; /// set the field with a quantity void setValue(const Base::Quantity&); @@ -166,9 +166,9 @@ public: std::vector getSavedValues(); //@} - void bind(const App::ObjectIdentifier &_path); - bool apply(const std::string &propName); - bool apply(); + void bind(const App::ObjectIdentifier &_path) override; + bool apply(const std::string &propName) override; + bool apply() override; Q_SIGNALS: /** gets emitted if the user has entered a VALID input @@ -194,13 +194,13 @@ protected Q_SLOTS: void updateIconLabel(const QString& text); protected: - virtual void showEvent(QShowEvent * event); - virtual void focusInEvent(QFocusEvent * event); - virtual void focusOutEvent(QFocusEvent * event); - virtual void keyPressEvent(QKeyEvent * event); - virtual void wheelEvent(QWheelEvent * event); - virtual void contextMenuEvent(QContextMenuEvent * event); - virtual void resizeEvent(QResizeEvent*); + void showEvent(QShowEvent * event) override; + void focusInEvent(QFocusEvent * event) override; + void focusOutEvent(QFocusEvent * event) override; + void keyPressEvent(QKeyEvent * event) override; + void wheelEvent(QWheelEvent * event) override; + void contextMenuEvent(QContextMenuEvent * event) override; + void resizeEvent(QResizeEvent*) override; private: QPixmap getValidationIcon(const char* name, const QSize& size) const; diff --git a/src/Gui/InputVector.h b/src/Gui/InputVector.h index ddef82a6ab..0ef3f512e0 100644 --- a/src/Gui/InputVector.h +++ b/src/Gui/InputVector.h @@ -43,8 +43,8 @@ class GuiExport LocationWidget : public QWidget public: LocationWidget (QWidget * parent = nullptr); - virtual ~LocationWidget(); - QSize sizeHint() const; + ~LocationWidget() override; + QSize sizeHint() const override; Base::Vector3d getPosition() const; void setPosition(const Base::Vector3d&); @@ -56,7 +56,7 @@ private Q_SLOTS: void on_direction_activated(int); private: - void changeEvent(QEvent*); + void changeEvent(QEvent*) override; void retranslateUi(); private: @@ -81,10 +81,10 @@ class GuiExport LocationDialog : public QDialog protected: LocationDialog(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - virtual ~LocationDialog(); + ~LocationDialog() override; protected: - virtual void changeEvent(QEvent *e) = 0; + void changeEvent(QEvent *e) override = 0; private Q_SLOTS: void on_direction_activated(int); @@ -118,7 +118,7 @@ public: this->setupUi(this); this->retranslate(); } - virtual ~LocationDialogUi(){} + ~LocationDialogUi() override{} void retranslate() { @@ -162,7 +162,7 @@ public: this->zPos->value().getValue()); } - Base::Vector3d getDirection() const + Base::Vector3d getDirection() const override { QVariant data = this->direction->itemData (this->direction->currentIndex()); if (data.canConvert()) { @@ -174,7 +174,7 @@ public: } protected: - void changeEvent(QEvent *e) + void changeEvent(QEvent *e) override { if (e->type() == QEvent::LanguageChange) { this->retranslate(); @@ -212,7 +212,7 @@ private: QVariant::fromValue(dir)); this->direction->setCurrentIndex(this->direction->count()-2); } - void directionActivated(int index) + void directionActivated(int index) override { // last item is selected to define direction by user if (index+1 == this->direction->count()) { @@ -367,18 +367,18 @@ public: : LocationDialog(parent, fl), ui(this) { } - virtual ~LocationDialogImp() + ~LocationDialogImp() override { // no need to delete child widgets, Qt does it all for us } - Base::Vector3d getDirection() const + Base::Vector3d getDirection() const override { return ui.getDirection(); } protected: - void changeEvent(QEvent *e) + void changeEvent(QEvent *e) override { if (e->type() == QEvent::LanguageChange) { ui.retranslate(this); @@ -389,7 +389,7 @@ protected: } private: - void directionActivated(int index) + void directionActivated(int index) override { ui.directionActivated(this,index); } @@ -428,16 +428,16 @@ public: LocationImpUi(Ui* ui) : ui(ui) { } - ~LocationImpUi() + ~LocationImpUi() override { } - boost::any get() + boost::any get() override { return ui; } - void retranslate(QDialog *dlg) + void retranslate(QDialog *dlg) override { ui->retranslateUi(dlg); @@ -465,21 +465,21 @@ public: } } - void setPosition(const Base::Vector3d& v) + void setPosition(const Base::Vector3d& v) override { ui->xPos->setValue(v.x); ui->yPos->setValue(v.y); ui->zPos->setValue(v.z); } - Base::Vector3d getPosition() const + Base::Vector3d getPosition() const override { return Base::Vector3d(ui->xPos->value().getValue(), ui->yPos->value().getValue(), ui->zPos->value().getValue()); } - Base::Vector3d getDirection() const + Base::Vector3d getDirection() const override { QVariant data = ui->direction->itemData (ui->direction->currentIndex()); if (data.canConvert()) { @@ -491,7 +491,7 @@ public: } public: - void setDirection(const Base::Vector3d& dir) + void setDirection(const Base::Vector3d& dir) override { if (dir.Length() < Base::Vector3d::epsilon()) { return; @@ -518,7 +518,7 @@ public: QVariant::fromValue(dir)); ui->direction->setCurrentIndex(ui->direction->count()-2); } - bool directionActivated(LocationDialog* dlg, int index) + bool directionActivated(LocationDialog* dlg, int index) override { // last item is selected to define direction by user if (index+1 == ui->direction->count()) { @@ -560,17 +560,17 @@ public: uit->setupUi(this); ui->retranslate(this); } - virtual ~LocationDialogUiImp(); + ~LocationDialogUiImp() override; - Base::Vector3d getDirection() const; + Base::Vector3d getDirection() const override; Base::Vector3d getPosition() const; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: - void directionActivated(int index); + void directionActivated(int index) override; protected: std::unique_ptr ui; diff --git a/src/Gui/MDIView.h b/src/Gui/MDIView.h index 3fb7f0b365..de1fa0701c 100644 --- a/src/Gui/MDIView.h +++ b/src/Gui/MDIView.h @@ -68,21 +68,21 @@ public: /** View destructor * Detach the view from the document, if attached. */ - ~MDIView(); + ~MDIView() override; /// get called when the document is updated - virtual void onRelabel(Gui::Document *pDoc); + void onRelabel(Gui::Document *pDoc) override; virtual void viewAll(); /// Message handler - virtual bool onMsg(const char* pMsg,const char** ppReturn); + bool onMsg(const char* pMsg,const char** ppReturn) override; /// Message handler test - virtual bool onHasMsg(const char* pMsg) const; + bool onHasMsg(const char* pMsg) const override; /// overwrite when checking on close state - virtual bool canClose(); + bool canClose() override; /// delete itself - virtual void deleteSelf(); - virtual PyObject *getPyObject(); + void deleteSelf() override; + PyObject *getPyObject() override; /** @name Printing */ //@{ public Q_SLOTS: @@ -107,7 +107,7 @@ public: virtual QStringList redoActions() const; //@} - QSize minimumSizeHint () const; + QSize minimumSizeHint () const override; /// MDI view mode enum enum ViewMode { @@ -169,9 +169,9 @@ protected Q_SLOTS: virtual void windowStateChanged(Gui::MDIView*); protected: - void closeEvent(QCloseEvent *e); + void closeEvent(QCloseEvent *e) override; /** \internal */ - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; protected: PyObject* pythonObject; diff --git a/src/Gui/MDIViewPy.h b/src/Gui/MDIViewPy.h index 86ced43a8b..c47dbd4aa4 100644 --- a/src/Gui/MDIViewPy.h +++ b/src/Gui/MDIViewPy.h @@ -42,9 +42,9 @@ public: static Py::ExtensionObject create(MDIView *mdi); MDIViewPy(MDIView *mdi); - ~MDIViewPy(); + ~MDIViewPy() override; - Py::Object repr(); + Py::Object repr() override; /** @name Printing */ //@{ diff --git a/src/Gui/Macro.h b/src/Gui/Macro.h index af878b78aa..7d6b5bde13 100644 --- a/src/Gui/Macro.h +++ b/src/Gui/Macro.h @@ -44,7 +44,7 @@ class GuiExport MacroManager : public Base::Observer { protected: MacroManager(); - ~MacroManager(); + ~MacroManager() override; public: @@ -90,7 +90,7 @@ public: /// Get the Python debugger PythonDebugger* debugger() const; /** Observes its parameter group. */ - void OnChange(Base::Subject &rCaller, const char * sReason); + void OnChange(Base::Subject &rCaller, const char * sReason) override; /// Return the added lines regardless of recording or not long getLines() const {return totalLines;} diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index d03ab86fd8..aab8fe3fe1 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -126,7 +126,7 @@ public: CustomMessageEvent(int t, const QString& s, int timeout=0) : QEvent(QEvent::User), _type(t), msg(s), _timeout(timeout) { } - ~CustomMessageEvent() + ~CustomMessageEvent() override { } int type() const { return _type; } @@ -172,13 +172,13 @@ public: setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); } - ~MDITabbar() + ~MDITabbar() override { delete menu; } protected: - void contextMenuEvent ( QContextMenuEvent * e ) + void contextMenuEvent ( QContextMenuEvent * e ) override { menu->clear(); CommandManager& cMgr = Application::Instance->commandManager(); diff --git a/src/Gui/MainWindow.h b/src/Gui/MainWindow.h index 7d95b36f21..5ef71b4152 100644 --- a/src/Gui/MainWindow.h +++ b/src/Gui/MainWindow.h @@ -58,7 +58,7 @@ public: UrlHandler(QObject* parent = nullptr) : QObject(parent){ } - virtual ~UrlHandler() { + ~UrlHandler() override { } virtual void openUrl(App::Document*, const QUrl&) { } @@ -87,11 +87,11 @@ public: */ MainWindow(QWidget * parent = nullptr, Qt::WindowFlags f = Qt::Window); /** Destroys the object and frees any allocated resources. */ - ~MainWindow(); + ~MainWindow() override; /** * Filters events if this object has been installed as an event filter for the watched object. */ - bool eventFilter(QObject* o, QEvent* e); + bool eventFilter(QObject* o, QEvent* e) override; /** * Adds an MDI window \a view to the main window's workspace and adds a new tab * to the tab bar. @@ -129,7 +129,7 @@ public: /** * Returns true that the context menu contains the 'Customize...' menu item. */ - QMenu * createPopupMenu(); + QMenu * createPopupMenu() override; /** @name Splasher and access methods */ //@{ @@ -253,28 +253,28 @@ protected: /** * This method checks if the main window can be closed by checking all open documents and views. */ - void closeEvent (QCloseEvent * e); - void showEvent (QShowEvent * e); - void hideEvent (QHideEvent * e); - void timerEvent (QTimerEvent * ) { + void closeEvent (QCloseEvent * e) override; + void showEvent (QShowEvent * e) override; + void hideEvent (QHideEvent * e) override; + void timerEvent (QTimerEvent * ) override { Q_EMIT timeEvent(); } - void customEvent(QEvent * e); - bool event (QEvent * e); + void customEvent(QEvent * e) override; + bool event (QEvent * e) override; /** * Try to interpret dropped elements. */ - void dropEvent (QDropEvent * e); + void dropEvent (QDropEvent * e) override; /** * Checks if a mime source object can be interpreted. */ - void dragEnterEvent(QDragEnterEvent * e); + void dragEnterEvent(QDragEnterEvent * e) override; /** * This method is called from the Qt framework automatically whenever a * QTranslator object has been installed. This allows to translate all * relevant user visible text. */ - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private Q_SLOTS: /** @@ -349,7 +349,7 @@ class StatusBarObserver: public WindowParameter, public Base::ILogger { public: StatusBarObserver(); - virtual ~StatusBarObserver(); + ~StatusBarObserver() override; /** Observes its parameter group. */ void OnChange(Base::Subject &rCaller, const char * sReason) override; diff --git a/src/Gui/MainWindowPy.h b/src/Gui/MainWindowPy.h index abc03bb013..292eb2f0be 100644 --- a/src/Gui/MainWindowPy.h +++ b/src/Gui/MainWindowPy.h @@ -43,9 +43,9 @@ public: static Py::ExtensionObject create(MainWindow *mw); MainWindowPy(MainWindow *mw); - ~MainWindowPy(); + ~MainWindowPy() override; - Py::Object repr(); + Py::Object repr() override; Py::Object getWindows(const Py::Tuple&); Py::Object getWindowsOfType(const Py::Tuple&); diff --git a/src/Gui/ManualAlignment.cpp b/src/Gui/ManualAlignment.cpp index a518dda19c..7e0b8e7fad 100644 --- a/src/Gui/ManualAlignment.cpp +++ b/src/Gui/ManualAlignment.cpp @@ -429,14 +429,14 @@ public: static_cast(getViewer(1)->getSoRenderManager()->getSceneGraph())-> addChild(setupHeadUpDisplay(tr("Fixed object"))); } - ~AlignmentView() + ~AlignmentView() override { } - PyObject* getPyObject() + PyObject* getPyObject() override { Py_Return; } - bool canClose() + bool canClose() override { return false; } diff --git a/src/Gui/ManualAlignment.h b/src/Gui/ManualAlignment.h index 69e9a46050..4631c0e743 100644 --- a/src/Gui/ManualAlignment.h +++ b/src/Gui/ManualAlignment.h @@ -191,7 +191,7 @@ class GuiExport ManualAlignment : public QObject protected: ManualAlignment(); - ~ManualAlignment(); + ~ManualAlignment() override; public: static ManualAlignment* instance(); diff --git a/src/Gui/MergeDocuments.cpp b/src/Gui/MergeDocuments.cpp index 62508e7d57..8af6c864d4 100644 --- a/src/Gui/MergeDocuments.cpp +++ b/src/Gui/MergeDocuments.cpp @@ -48,11 +48,11 @@ public: : Base::XMLReader(FileName, str), nameMap(name) {} - void addName(const char* s1, const char* s2) + void addName(const char* s1, const char* s2) override { nameMap[s1] = s2; } - const char* getName(const char* name) const + const char* getName(const char* name) const override { std::map::const_iterator it = nameMap.find(name); if (it != nameMap.end()) @@ -60,7 +60,7 @@ public: else return name; } - bool doNameMapping() const + bool doNameMapping() const override { return true; } diff --git a/src/Gui/MergeDocuments.h b/src/Gui/MergeDocuments.h index 1a32390006..f4d08f363d 100644 --- a/src/Gui/MergeDocuments.h +++ b/src/Gui/MergeDocuments.h @@ -40,15 +40,15 @@ class GuiExport MergeDocuments : public Base::Persistence { public: MergeDocuments(App::Document* doc); - ~MergeDocuments(); - unsigned int getMemSize () const; + ~MergeDocuments() override; + unsigned int getMemSize () const override; std::vector importObjects(std::istream&); void importObject(const std::vector& o, Base::XMLReader & r); void exportObject(const std::vector& o, Base::Writer & w); - void Save (Base::Writer & w) const; - void Restore(Base::XMLReader &r); - void SaveDocFile (Base::Writer & w) const; - void RestoreDocFile(Base::Reader & r); + void Save (Base::Writer & w) const override; + void Restore(Base::XMLReader &r) override; + void SaveDocFile (Base::Writer & w) const override; + void RestoreDocFile(Base::Reader & r) override; private: zipios::ZipInputStream* stream; diff --git a/src/Gui/MouseSelection.h b/src/Gui/MouseSelection.h index db09124082..8b227bf2a4 100644 --- a/src/Gui/MouseSelection.h +++ b/src/Gui/MouseSelection.h @@ -112,7 +112,7 @@ class GuiExport BaseMouseSelection : public AbstractMouseSelection { public: BaseMouseSelection(); - virtual ~BaseMouseSelection(){} + ~BaseMouseSelection() override{} }; // ----------------------------------------------------------------------------------- @@ -126,21 +126,21 @@ class GuiExport PolyPickerSelection : public BaseMouseSelection { public: PolyPickerSelection(); - virtual ~PolyPickerSelection(); + ~PolyPickerSelection() override; void setLineWidth(float l); void setColor(float r, float g, float b, float a = 1.0); - virtual void initialize(); - virtual void terminate(bool abort = false); + void initialize() override; + void terminate(bool abort = false) override; protected: - virtual int mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos); - virtual int locationEvent(const SoLocation2Event* const e, const QPoint& pos); - virtual int keyboardEvent(const SoKeyboardEvent* const e); + int mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos) override; + int locationEvent(const SoLocation2Event* const e, const QPoint& pos) override; + int keyboardEvent(const SoKeyboardEvent* const e) override; /// draw the polygon - virtual void draw(); + void draw() override; virtual int popupMenu(); protected: @@ -159,7 +159,7 @@ class GuiExport PolyClipSelection : public PolyPickerSelection { public: PolyClipSelection(); - virtual ~PolyClipSelection(); + ~PolyClipSelection() override; inline void setRole(SelectionRole pos, bool on) { selectionBits.set(static_cast(pos), on); @@ -169,7 +169,7 @@ public: } protected: - virtual int popupMenu(); + int popupMenu() override; private: std::bitset<8> selectionBits; @@ -185,14 +185,14 @@ class GuiExport FreehandSelection : public PolyPickerSelection { public: FreehandSelection(); - virtual ~FreehandSelection(); + ~FreehandSelection() override; void setClosed(bool c); protected: - virtual int popupMenu(); - virtual int mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos); - virtual int locationEvent(const SoLocation2Event* const e, const QPoint& pos); + int popupMenu() override; + int mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos) override; + int locationEvent(const SoLocation2Event* const e, const QPoint& pos) override; }; // ----------------------------------------------------------------------------------- @@ -206,20 +206,20 @@ class GuiExport RubberbandSelection : public BaseMouseSelection { public: RubberbandSelection(); - virtual ~RubberbandSelection(); + ~RubberbandSelection() override; void setColor(float r, float g, float b, float a = 1.0); - virtual void initialize(); - virtual void terminate(bool abort = false); + void initialize() override; + void terminate(bool abort = false) override; protected: - virtual int mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos); - virtual int locationEvent(const SoLocation2Event* const e, const QPoint& pos); - virtual int keyboardEvent(const SoKeyboardEvent* const e); + int mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos) override; + int locationEvent(const SoLocation2Event* const e, const QPoint& pos) override; + int keyboardEvent(const SoKeyboardEvent* const e) override; /// draw the rectangle - virtual void draw(); + void draw() override; protected: Gui::Rubberband rubberband; @@ -236,7 +236,7 @@ class GuiExport RectangleSelection : public RubberbandSelection { public: RectangleSelection(); - virtual ~RectangleSelection(); + ~RectangleSelection() override; }; // ----------------------------------------------------------------------------------- @@ -250,8 +250,8 @@ class GuiExport BoxZoomSelection : public RubberbandSelection { public: BoxZoomSelection(); - ~BoxZoomSelection(); - void terminate(bool abort = false); + ~BoxZoomSelection() override; + void terminate(bool abort = false) override; }; } // namespace Gui diff --git a/src/Gui/NaviCube.cpp b/src/Gui/NaviCube.cpp index b5890ed273..2166d57343 100644 --- a/src/Gui/NaviCube.cpp +++ b/src/Gui/NaviCube.cpp @@ -113,12 +113,12 @@ public: class NaviCubeImplementation : public ParameterGrp::ObserverType { public: NaviCubeImplementation(Gui::View3DInventorViewer*); - virtual ~NaviCubeImplementation(); + ~NaviCubeImplementation() override; void drawNaviCube(); void createContextMenu(const std::vector& cmd); /// Observer message from the ParameterGrp - virtual void OnChange(ParameterGrp::SubjectType& rCaller, ParameterGrp::MessageType Reason); + void OnChange(ParameterGrp::SubjectType& rCaller, ParameterGrp::MessageType Reason) override; bool processSoEvent(const SoEvent* ev); private: diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index d19ae5987f..d80bf0d2db 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -93,23 +93,23 @@ public: { } - void setViewVolume (const SbViewVolume &vol) + void setViewVolume (const SbViewVolume &vol) override { inherited::setViewVolume(vol); } - void setWorkingSpace (const SbMatrix &space) + void setWorkingSpace (const SbMatrix &space) override { //inherited::setWorkingSpace(space); this->worldToScreen = space.inverse(); } - SbVec3f project(const SbVec2f &point) + SbVec3f project(const SbVec2f &point) override { return inherited::project(point); } - SbRotation getRotation(const SbVec3f &point1, const SbVec3f &point2) + SbRotation getRotation(const SbVec3f &point1, const SbVec3f &point2) override { SbRotation rot = inherited::getRotation(point1, point2); if (orbit == Trackball) diff --git a/src/Gui/NavigationStyle.h b/src/Gui/NavigationStyle.h index 2d8dbe3c61..f17b010513 100644 --- a/src/Gui/NavigationStyle.h +++ b/src/Gui/NavigationStyle.h @@ -61,7 +61,7 @@ class GuiExport NavigationStyleEvent : public QEvent { public: NavigationStyleEvent(const Base::Type& s); - ~NavigationStyleEvent(); + ~NavigationStyleEvent() override; const Base::Type& style() const; private: Base::Type t; @@ -112,7 +112,7 @@ public: public: NavigationStyle(); - virtual ~NavigationStyle(); + ~NavigationStyle() override; NavigationStyle& operator = (const NavigationStyle& ns); void setViewer(View3DInventorViewer*); @@ -282,7 +282,7 @@ class GuiExport UserNavigationStyle : public NavigationStyle { public: UserNavigationStyle(){} - ~UserNavigationStyle(){} + ~UserNavigationStyle() override{} virtual const char* mouseButtons(ViewerMode) = 0; virtual std::string userFriendlyName() const; static std::map getUserFriendlyNames(); @@ -295,12 +295,12 @@ class GuiExport InventorNavigationStyle : public UserNavigationStyle { public: InventorNavigationStyle(); - ~InventorNavigationStyle(); - const char* mouseButtons(ViewerMode); - virtual std::string userFriendlyName() const; + ~InventorNavigationStyle() override; + const char* mouseButtons(ViewerMode) override; + std::string userFriendlyName() const override; protected: - SbBool processSoEvent(const SoEvent * const ev); + SbBool processSoEvent(const SoEvent * const ev) override; }; class GuiExport CADNavigationStyle : public UserNavigationStyle { @@ -310,11 +310,11 @@ class GuiExport CADNavigationStyle : public UserNavigationStyle { public: CADNavigationStyle(); - ~CADNavigationStyle(); - const char* mouseButtons(ViewerMode); + ~CADNavigationStyle() override; + const char* mouseButtons(ViewerMode) override; protected: - SbBool processSoEvent(const SoEvent * const ev); + SbBool processSoEvent(const SoEvent * const ev) override; private: SbBool lockButton1; @@ -327,11 +327,11 @@ class GuiExport RevitNavigationStyle : public UserNavigationStyle { public: RevitNavigationStyle(); - ~RevitNavigationStyle(); - const char* mouseButtons(ViewerMode); + ~RevitNavigationStyle() override; + const char* mouseButtons(ViewerMode) override; protected: - SbBool processSoEvent(const SoEvent * const ev); + SbBool processSoEvent(const SoEvent * const ev) override; private: SbBool lockButton1; @@ -344,11 +344,11 @@ class GuiExport BlenderNavigationStyle : public UserNavigationStyle { public: BlenderNavigationStyle(); - ~BlenderNavigationStyle(); - const char* mouseButtons(ViewerMode); + ~BlenderNavigationStyle() override; + const char* mouseButtons(ViewerMode) override; protected: - SbBool processSoEvent(const SoEvent * const ev); + SbBool processSoEvent(const SoEvent * const ev) override; private: SbBool lockButton1; @@ -361,11 +361,11 @@ class GuiExport MayaGestureNavigationStyle : public UserNavigationStyle { public: MayaGestureNavigationStyle(); - ~MayaGestureNavigationStyle(); - const char* mouseButtons(ViewerMode); + ~MayaGestureNavigationStyle() override; + const char* mouseButtons(ViewerMode) override; protected: - SbBool processSoEvent(const SoEvent * const ev); + SbBool processSoEvent(const SoEvent * const ev) override; SbVec2s mousedownPos;//the position where some mouse button was pressed (local pixel coordinates). short mouseMoveThreshold;//setting. Minimum move required to consider it a move (in pixels). @@ -385,11 +385,11 @@ class GuiExport TouchpadNavigationStyle : public UserNavigationStyle { public: TouchpadNavigationStyle(); - ~TouchpadNavigationStyle(); - const char* mouseButtons(ViewerMode); + ~TouchpadNavigationStyle() override; + const char* mouseButtons(ViewerMode) override; protected: - SbBool processSoEvent(const SoEvent * const ev); + SbBool processSoEvent(const SoEvent * const ev) override; }; class GuiExport OpenCascadeNavigationStyle : public UserNavigationStyle { @@ -399,11 +399,11 @@ class GuiExport OpenCascadeNavigationStyle : public UserNavigationStyle { public: OpenCascadeNavigationStyle(); - ~OpenCascadeNavigationStyle(); - const char* mouseButtons(ViewerMode); + ~OpenCascadeNavigationStyle() override; + const char* mouseButtons(ViewerMode) override; protected: - SbBool processSoEvent(const SoEvent * const ev); + SbBool processSoEvent(const SoEvent * const ev) override; }; class GuiExport OpenSCADNavigationStyle : public UserNavigationStyle { @@ -413,11 +413,11 @@ class GuiExport OpenSCADNavigationStyle : public UserNavigationStyle { public: OpenSCADNavigationStyle(); - ~OpenSCADNavigationStyle(); - const char* mouseButtons(ViewerMode); + ~OpenSCADNavigationStyle() override; + const char* mouseButtons(ViewerMode) override; protected: - SbBool processSoEvent(const SoEvent * const ev); + SbBool processSoEvent(const SoEvent * const ev) override; }; class GuiExport TinkerCADNavigationStyle : public UserNavigationStyle { @@ -427,11 +427,11 @@ class GuiExport TinkerCADNavigationStyle : public UserNavigationStyle { public: TinkerCADNavigationStyle(); - ~TinkerCADNavigationStyle(); - const char* mouseButtons(ViewerMode); + ~TinkerCADNavigationStyle() override; + const char* mouseButtons(ViewerMode) override; protected: - SbBool processSoEvent(const SoEvent * const ev); + SbBool processSoEvent(const SoEvent * const ev) override; }; } // namespace Gui diff --git a/src/Gui/NetworkRetriever.h b/src/Gui/NetworkRetriever.h index 51110c387f..271bfdc826 100644 --- a/src/Gui/NetworkRetriever.h +++ b/src/Gui/NetworkRetriever.h @@ -43,7 +43,7 @@ class NetworkRetriever : public QObject public: NetworkRetriever( QObject * parent = nullptr ); - virtual ~NetworkRetriever(); + ~NetworkRetriever() override; void setNumberOfTries( int ); void setOutputFile( const QString& ); @@ -83,15 +83,15 @@ class StdCmdDownloadOnlineHelp : public QObject, public Command public: StdCmdDownloadOnlineHelp(QObject * parent = nullptr); - virtual ~StdCmdDownloadOnlineHelp(); + ~StdCmdDownloadOnlineHelp() override; /** i18n stuff of the command. */ - virtual void languageChange(); + void languageChange() override; protected: - virtual void activated(int iMsg); + void activated(int iMsg) override; /** Creates the action object. */ - virtual Action* createAction(); + Action* createAction() override; private Q_SLOTS: void wgetFinished(); diff --git a/src/Gui/OnlineDocumentation.h b/src/Gui/OnlineDocumentation.h index ea38b59c93..5a345ada84 100644 --- a/src/Gui/OnlineDocumentation.h +++ b/src/Gui/OnlineDocumentation.h @@ -45,7 +45,7 @@ class PythonOnlineHelp : public QObject public: PythonOnlineHelp(); - ~PythonOnlineHelp(); + ~PythonOnlineHelp() override; QByteArray loadResource(const QString& filename) const; QByteArray fileNotFound() const; @@ -62,7 +62,7 @@ class HttpServer : public QTcpServer public: HttpServer(QObject* parent = nullptr); - void incomingConnection(qintptr socket); + void incomingConnection(qintptr socket) override; void pause(); void resume(); @@ -81,12 +81,12 @@ class StdCmdPythonHelp : public Command { public: StdCmdPythonHelp(); - ~StdCmdPythonHelp(); - const char* className() const + ~StdCmdPythonHelp() override; + const char* className() const override { return "Gui::StdCmdPythonHelp"; } protected: - void activated(int iMsg); + void activated(int iMsg) override; private: HttpServer* server; diff --git a/src/Gui/Placement.h b/src/Gui/Placement.h index 1f61050d42..b02a04fef0 100644 --- a/src/Gui/Placement.h +++ b/src/Gui/Placement.h @@ -44,20 +44,20 @@ class GuiExport Placement : public Gui::LocationDialog public: Placement(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~Placement(); - void accept(); - void reject(); + ~Placement() override; + void accept() override; + void reject() override; void bindObject(); - Base::Vector3d getDirection() const; + Base::Vector3d getDirection() const override; void setPlacement(const Base::Placement&); Base::Placement getPlacement() const; void showDefaultButtons(bool); protected: - void open(); - void changeEvent(QEvent *e); - void keyPressEvent(QKeyEvent*); + void open() override; + void changeEvent(QEvent *e) override; + void keyPressEvent(QKeyEvent*) override; private Q_SLOTS: void openTransaction(); @@ -75,7 +75,7 @@ private: Base::Placement getPlacementData() const; Base::Vector3d getCenterData() const; QString getPlacementString() const; - void directionActivated(int); + void directionActivated(int) override; void applyPlacement(const Base::Placement& p, bool incremental); void applyPlacement(const QString& p, bool incremental); void revertTransformation(); @@ -115,10 +115,10 @@ class GuiExport DockablePlacement : public Placement public: DockablePlacement(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~DockablePlacement(); + ~DockablePlacement() override; - void accept(); - void reject(); + void accept() override; + void reject() override; }; class TaskPlacement : public Gui::TaskView::TaskDialog @@ -127,24 +127,24 @@ class TaskPlacement : public Gui::TaskView::TaskDialog public: TaskPlacement(); - ~TaskPlacement(); + ~TaskPlacement() override; public: void setPropertyName(const QString&); void setPlacement(const Base::Placement&); void bindObject(); - bool accept(); - bool reject(); - void clicked(int id); + bool accept() override; + bool reject() override; + void clicked(int id) override; - void open(); - bool isAllowedAlterDocument() const + void open() override; + bool isAllowedAlterDocument() const override { return true; } - bool isAllowedAlterView() const + bool isAllowedAlterView() const override { return true; } - bool isAllowedAlterSelection() const + bool isAllowedAlterSelection() const override { return true; } - QDialogButtonBox::StandardButtons getStandardButtons() const; + QDialogButtonBox::StandardButtons getStandardButtons() const override; public Q_SLOTS: void slotPlacementChanged(const QVariant &, bool, bool); diff --git a/src/Gui/PrefWidgets.h b/src/Gui/PrefWidgets.h index dda4f35946..0501c13b6d 100644 --- a/src/Gui/PrefWidgets.h +++ b/src/Gui/PrefWidgets.h @@ -75,7 +75,7 @@ public: */ void setPrefPath(const QByteArray& name); - virtual void OnChange(Base::Subject &rCaller, const char * sReason); + void OnChange(Base::Subject &rCaller, const char * sReason) override; void onSave(); void onRestore(); @@ -96,7 +96,7 @@ protected: void failedToRestore(const QString&) const; PrefWidget(); - virtual ~PrefWidget(); + ~PrefWidget() override; private: QByteArray m_sPrefName; @@ -118,12 +118,12 @@ class GuiExport PrefSpinBox : public QSpinBox, public PrefWidget public: PrefSpinBox ( QWidget * parent = nullptr ); - virtual ~PrefSpinBox(); + ~PrefSpinBox() override; protected: // restore from/save to parameters - void restorePreferences(); - void savePreferences(); + void restorePreferences() override; + void savePreferences() override; }; /** The PrefDoubleSpinBox class. @@ -138,12 +138,12 @@ class GuiExport PrefDoubleSpinBox : public QDoubleSpinBox, public PrefWidget public: PrefDoubleSpinBox ( QWidget * parent = nullptr ); - virtual ~PrefDoubleSpinBox(); + ~PrefDoubleSpinBox() override; protected: // restore from/save to parameters - void restorePreferences(); - void savePreferences(); + void restorePreferences() override; + void savePreferences() override; }; /** @@ -159,12 +159,12 @@ class GuiExport PrefLineEdit : public QLineEdit, public PrefWidget public: PrefLineEdit ( QWidget * parent = nullptr ); - virtual ~PrefLineEdit(); + ~PrefLineEdit() override; protected: // restore from/save to parameters - void restorePreferences(); - void savePreferences(); + void restorePreferences() override; + void savePreferences() override; }; /** @@ -180,12 +180,12 @@ class GuiExport PrefTextEdit : public QTextEdit, public PrefWidget public: PrefTextEdit(QWidget* parent = nullptr); - virtual ~PrefTextEdit(); + ~PrefTextEdit() override; protected: // restore from/save to parameters - void restorePreferences(); - void savePreferences(); + void restorePreferences() override; + void savePreferences() override; }; /** @@ -201,12 +201,12 @@ class GuiExport PrefFileChooser : public FileChooser, public PrefWidget public: PrefFileChooser ( QWidget * parent = nullptr ); - virtual ~PrefFileChooser(); + ~PrefFileChooser() override; protected: // restore from/save to parameters - void restorePreferences(); - void savePreferences(); + void restorePreferences() override; + void savePreferences() override; }; /** @@ -222,12 +222,12 @@ class GuiExport PrefComboBox : public QComboBox, public PrefWidget public: PrefComboBox ( QWidget * parent = nullptr ); - virtual ~PrefComboBox(); + ~PrefComboBox() override; protected: // restore from/save to parameters - void restorePreferences(); - void savePreferences(); + void restorePreferences() override; + void savePreferences() override; }; /** @@ -243,12 +243,12 @@ class GuiExport PrefCheckBox : public QCheckBox, public PrefWidget public: PrefCheckBox ( QWidget * parent = nullptr ); - virtual ~PrefCheckBox(); + ~PrefCheckBox() override; protected: // restore from/save to parameters - void restorePreferences(); - void savePreferences(); + void restorePreferences() override; + void savePreferences() override; }; /** @@ -264,12 +264,12 @@ class GuiExport PrefRadioButton : public QRadioButton, public PrefWidget public: PrefRadioButton ( QWidget * parent = nullptr ); - virtual ~PrefRadioButton(); + ~PrefRadioButton() override; protected: // restore from/save to parameters - void restorePreferences(); - void savePreferences(); + void restorePreferences() override; + void savePreferences() override; }; /** @@ -285,12 +285,12 @@ class GuiExport PrefSlider : public QSlider, public PrefWidget public: PrefSlider ( QWidget * parent = nullptr ); - virtual ~PrefSlider(); + ~PrefSlider() override; protected: // restore from/save to parameters - void restorePreferences(); - void savePreferences(); + void restorePreferences() override; + void savePreferences() override; }; /** @@ -306,12 +306,12 @@ class GuiExport PrefColorButton : public ColorButton, public PrefWidget public: PrefColorButton ( QWidget * parent = nullptr ); - virtual ~PrefColorButton(); + ~PrefColorButton() override; protected: // restore from/save to parameters - void restorePreferences(); - void savePreferences(); + void restorePreferences() override; + void savePreferences() override; }; /** The PrefUnitSpinBox class. @@ -328,12 +328,12 @@ class GuiExport PrefUnitSpinBox : public QuantitySpinBox, public PrefWidget public: PrefUnitSpinBox ( QWidget * parent = nullptr ); - virtual ~PrefUnitSpinBox(); + ~PrefUnitSpinBox() override; protected: // restore from/save to parameters - void restorePreferences(); - void savePreferences(); + void restorePreferences() override; + void savePreferences() override; }; class PrefQuantitySpinBoxPrivate; @@ -352,7 +352,7 @@ class GuiExport PrefQuantitySpinBox : public QuantitySpinBox, public PrefWidget public: PrefQuantitySpinBox (QWidget * parent = nullptr); - virtual ~PrefQuantitySpinBox(); + ~PrefQuantitySpinBox() override; /// set the input field to the last used value (works only if the setParamGrpPath() was called) void setToLastUsedValue(); @@ -370,10 +370,10 @@ public: //@} protected: - virtual void contextMenuEvent(QContextMenuEvent * event); + void contextMenuEvent(QContextMenuEvent * event) override; // restore from/save to parameters - void restorePreferences(); - void savePreferences(); + void restorePreferences() override; + void savePreferences() override; private: QScopedPointer d_ptr; @@ -393,12 +393,12 @@ class GuiExport PrefFontBox : public QFontComboBox, public PrefWidget public: PrefFontBox ( QWidget * parent = nullptr ); - virtual ~PrefFontBox(); + ~PrefFontBox() override; protected: // restore from/save to parameters - void restorePreferences(); - void savePreferences(); + void restorePreferences() override; + void savePreferences() override; }; } // namespace Gui diff --git a/src/Gui/ProgressBar.h b/src/Gui/ProgressBar.h index b780d5a4c3..265de9c51b 100644 --- a/src/Gui/ProgressBar.h +++ b/src/Gui/ProgressBar.h @@ -106,13 +106,13 @@ public: /** Returns an instance of the progress bar. It creates one if needed. */ QProgressBar* getProgressBar(QWidget* parent=nullptr); - virtual void checkAbort() override; + void checkAbort() override; protected: /** Construction */ SequencerBar(); /** Destruction */ - ~SequencerBar(); + ~SequencerBar() override; /** Puts text to the status bar */ void setText (const char* pszTxt) override; @@ -147,12 +147,12 @@ public: /** Construction */ ProgressBar (SequencerBar* s, QWidget * parent=nullptr); /** Destruction */ - ~ProgressBar (); + ~ProgressBar () override; /** Handles all incoming events while the progress bar is running. All key and mouse * events are ignored to block user input. */ - bool eventFilter(QObject* o, QEvent* e); + bool eventFilter(QObject* o, QEvent* e) override; /** Returns the time in milliseconds that must pass before the progress bar appears. */ int minimumDuration() const; @@ -172,8 +172,8 @@ public: bool canAbort() const; protected: - void showEvent(QShowEvent*); - void hideEvent(QHideEvent*); + void showEvent(QShowEvent*) override; + void hideEvent(QHideEvent*) override; protected Q_SLOTS: /* Shows the progress bar if it is still hidden after the operation has been started diff --git a/src/Gui/ProgressDialog.h b/src/Gui/ProgressDialog.h index 0297563f90..ea20713320 100644 --- a/src/Gui/ProgressDialog.h +++ b/src/Gui/ProgressDialog.h @@ -40,27 +40,27 @@ class GuiExport SequencerDialog : public Base::SequencerBase { public: static SequencerDialog* instance(); - void pause(); - void resume(); - bool isBlocking() const; + void pause() override; + void resume() override; + bool isBlocking() const override; bool canAbort() const; protected: /** Construction */ SequencerDialog (); /** Destruction */ - ~SequencerDialog (); + ~SequencerDialog () override; /** Puts text to the progress dialog */ - void setText (const char* pszTxt); + void setText (const char* pszTxt) override; /** Starts the progress dialog */ - void startStep(); + void startStep() override; /** Increase the step indicator of the progress dialog. */ - void nextStep(bool canAbort); + void nextStep(bool canAbort) override; /** Sets the progress indicator to a certain position. */ - void setProgress(size_t); + void setProgress(size_t) override; /** Resets the sequencer */ - void resetData(); + void resetData() override; void showRemainingTime(); private: @@ -85,7 +85,7 @@ public: /** Construction */ ProgressDialog (SequencerDialog* s, QWidget * parent=nullptr); /** Destruction */ - ~ProgressDialog (); + ~ProgressDialog () override; protected Q_SLOTS: void onCancel(); @@ -96,8 +96,8 @@ private Q_SLOTS: void setValueEx(int value); void aboutToShow(); void aboutToHide(); - void showEvent(QShowEvent*); - void hideEvent(QHideEvent*); + void showEvent(QShowEvent*) override; + void hideEvent(QHideEvent*) override; protected: bool canAbort() const; diff --git a/src/Gui/ProjectView.h b/src/Gui/ProjectView.h index 7718d7ca8f..47689aefda 100644 --- a/src/Gui/ProjectView.h +++ b/src/Gui/ProjectView.h @@ -40,7 +40,7 @@ class ProjectWidget : public QTreeView public: ProjectWidget(QWidget* parent=nullptr); - ~ProjectWidget(); + ~ProjectWidget() override; private: QFileSystemModel *fileModel; diff --git a/src/Gui/PropertyPage.h b/src/Gui/PropertyPage.h index 024686b906..1df92e192b 100644 --- a/src/Gui/PropertyPage.h +++ b/src/Gui/PropertyPage.h @@ -39,7 +39,7 @@ class GuiExport PropertyPage : public QWidget public: PropertyPage(QWidget* parent = nullptr); - virtual ~PropertyPage(); + ~PropertyPage() override; bool isModified(); void setModified(bool b); @@ -69,14 +69,14 @@ class GuiExport PreferencePage : public QWidget public: PreferencePage(QWidget* parent = nullptr); - virtual ~PreferencePage(); + ~PreferencePage() override; public Q_SLOTS: virtual void loadSettings()=0; virtual void saveSettings()=0; protected: - virtual void changeEvent(QEvent *e) = 0; + void changeEvent(QEvent *e) override = 0; }; /** Subclass that embeds a form from a UI file. @@ -88,13 +88,13 @@ class GuiExport PreferenceUiForm : public PreferencePage public: PreferenceUiForm(const QString& fn, QWidget* parent = nullptr); - virtual ~PreferenceUiForm(); + ~PreferenceUiForm() override; - void loadSettings(); - void saveSettings(); + void loadSettings() override; + void saveSettings() override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: template @@ -115,11 +115,11 @@ class GuiExport CustomizeActionPage : public QWidget public: CustomizeActionPage(QWidget* parent = nullptr); - virtual ~CustomizeActionPage(); + ~CustomizeActionPage() override; protected: - bool event(QEvent* e); - virtual void changeEvent(QEvent *e) = 0; + bool event(QEvent* e) override; + void changeEvent(QEvent *e) override = 0; protected Q_SLOTS: virtual void onAddMacroAction(const QByteArray&)=0; diff --git a/src/Gui/PropertyView.h b/src/Gui/PropertyView.h index ff6a5e8aee..39e99dde1c 100644 --- a/src/Gui/PropertyView.h +++ b/src/Gui/PropertyView.h @@ -57,7 +57,7 @@ class PropertyView : public QWidget, public Gui::SelectionObserver public: PropertyView(QWidget *parent=nullptr); - virtual ~PropertyView(); + ~PropertyView() override; Gui::PropertyEditor::PropertyEditor* propertyEditorView; Gui::PropertyEditor::PropertyEditor* propertyEditorData; @@ -121,7 +121,7 @@ class PropertyDockView : public Gui::DockWindow public: PropertyDockView(Gui::Document* pcDocument, QWidget *parent=nullptr); - virtual ~PropertyDockView(); + ~PropertyDockView() override; }; } // namespace DockWnd diff --git a/src/Gui/PythonConsole.h b/src/Gui/PythonConsole.h index c2065ae802..a71d16411d 100644 --- a/src/Gui/PythonConsole.h +++ b/src/Gui/PythonConsole.h @@ -106,9 +106,9 @@ public: }; PythonConsole(QWidget *parent = nullptr); - ~PythonConsole(); + ~PythonConsole() override; - void OnChange( Base::Subject &rCaller,const char* rcReason ); + void OnChange( Base::Subject &rCaller,const char* rcReason ) override; void printStatement( const QString& cmd ); QString readline( ); @@ -124,21 +124,21 @@ private Q_SLOTS: void visibilityChanged (bool visible); protected: - void keyPressEvent ( QKeyEvent * e ); - void showEvent ( QShowEvent * e ); - void dropEvent ( QDropEvent * e ); - void dragEnterEvent ( QDragEnterEvent * e ); - void dragMoveEvent ( QDragMoveEvent * e ); - void changeEvent ( QEvent * e ); - void mouseReleaseEvent( QMouseEvent * e ); + void keyPressEvent ( QKeyEvent * e ) override; + void showEvent ( QShowEvent * e ) override; + void dropEvent ( QDropEvent * e ) override; + void dragEnterEvent ( QDragEnterEvent * e ) override; + void dragMoveEvent ( QDragMoveEvent * e ) override; + void changeEvent ( QEvent * e ) override; + void mouseReleaseEvent( QMouseEvent * e ) override; void overrideCursor(const QString& txt); /** Pops up the context menu with some extensions */ - void contextMenuEvent ( QContextMenuEvent* e ); - bool canInsertFromMimeData ( const QMimeData * source ) const; - QMimeData * createMimeDataFromSelection () const; - void insertFromMimeData ( const QMimeData * source ); + void contextMenuEvent ( QContextMenuEvent* e ) override; + bool canInsertFromMimeData ( const QMimeData * source ) const override; + QMimeData * createMimeDataFromSelection () const override; + void insertFromMimeData ( const QMimeData * source ) override; QTextCursor inputBegin( ) const; private: @@ -175,7 +175,7 @@ class GuiExport PythonConsoleHighlighter : public PythonSyntaxHighlighter { public: PythonConsoleHighlighter(QObject* parent); - ~PythonConsoleHighlighter(); + ~PythonConsoleHighlighter() override; void highlightBlock (const QString & text); diff --git a/src/Gui/PythonConsolePy.h b/src/Gui/PythonConsolePy.h index db7419acfe..3cc94afed6 100644 --- a/src/Gui/PythonConsolePy.h +++ b/src/Gui/PythonConsolePy.h @@ -48,10 +48,10 @@ public: static void init_type(); // announce properties and methods PythonStdout(PythonConsole *pc); - ~PythonStdout(); + ~PythonStdout() override; - Py::Object getattr(const char *name); - Py::Object repr(); + Py::Object getattr(const char *name) override; + Py::Object repr() override; Py::Object write(const Py::Tuple&); Py::Object flush(const Py::Tuple&); Py::Object isatty(); @@ -74,10 +74,10 @@ public: static void init_type(); // announce properties and methods PythonStderr(PythonConsole *pc); - ~PythonStderr(); + ~PythonStderr() override; - Py::Object getattr(const char *name); - Py::Object repr(); + Py::Object getattr(const char *name) override; + Py::Object repr() override; Py::Object write(const Py::Tuple&); Py::Object flush(const Py::Tuple&); Py::Object isatty(); @@ -97,10 +97,10 @@ public: static void init_type(); // announce properties and methods OutputStdout(); - ~OutputStdout(); + ~OutputStdout() override; - Py::Object getattr(const char *name); - Py::Object repr(); + Py::Object getattr(const char *name) override; + Py::Object repr() override; Py::Object write(const Py::Tuple&); Py::Object flush(const Py::Tuple&); Py::Object isatty(); @@ -120,10 +120,10 @@ public: static void init_type(); // announce properties and methods OutputStderr(); - ~OutputStderr(); + ~OutputStderr() override; - Py::Object getattr(const char *name); - Py::Object repr(); + Py::Object getattr(const char *name) override; + Py::Object repr() override; Py::Object write(const Py::Tuple&); Py::Object flush(const Py::Tuple&); Py::Object isatty(); @@ -142,9 +142,9 @@ public: static void init_type(); // announce properties and methods PythonStdin(PythonConsole *pc); - ~PythonStdin(); + ~PythonStdin() override; - Py::Object repr(); + Py::Object repr() override; Py::Object readline(const Py::Tuple&); }; diff --git a/src/Gui/PythonDebugger.cpp b/src/Gui/PythonDebugger.cpp index 62573e0994..8a50016fe8 100644 --- a/src/Gui/PythonDebugger.cpp +++ b/src/Gui/PythonDebugger.cpp @@ -321,7 +321,7 @@ class PythonDebuggerPy : public Py::PythonExtension { public: PythonDebuggerPy(PythonDebugger* d) : dbg(d), depth(0) { } - ~PythonDebuggerPy() {} + ~PythonDebuggerPy() override {} PythonDebugger* dbg; int depth; }; diff --git a/src/Gui/PythonEditor.h b/src/Gui/PythonEditor.h index d2851e6670..f0e5e21d5c 100644 --- a/src/Gui/PythonEditor.h +++ b/src/Gui/PythonEditor.h @@ -42,7 +42,7 @@ class GuiExport PythonEditor : public TextEditor public: PythonEditor(QWidget *parent = nullptr); - ~PythonEditor(); + ~PythonEditor() override; void toggleBreakpoint(); void showDebugMarker(int line); @@ -64,8 +64,8 @@ public Q_SLOTS: protected: /** Pops up the context menu with some extensions */ - void contextMenuEvent ( QContextMenuEvent* e ); - void drawMarker(int line, int x, int y, QPainter*); + void contextMenuEvent ( QContextMenuEvent* e ) override; + void drawMarker(int line, int x, int y, QPainter*) override; private: //PythonSyntaxHighlighter* pythonSyntax; diff --git a/src/Gui/QListWidgetCustom.h b/src/Gui/QListWidgetCustom.h index ab97ac3d85..89f255cec9 100644 --- a/src/Gui/QListWidgetCustom.h +++ b/src/Gui/QListWidgetCustom.h @@ -34,10 +34,10 @@ class QListWidgetCustom : public QListWidget public: QListWidgetCustom (QWidget *parent); - virtual ~QListWidgetCustom (); + ~QListWidgetCustom () override; protected: - void dragMoveEvent(QDragMoveEvent *e); + void dragMoveEvent(QDragMoveEvent *e) override; }; #endif diff --git a/src/Gui/QuantitySpinBox_p.h b/src/Gui/QuantitySpinBox_p.h index 3b1c7aa5e8..ec475a30e4 100644 --- a/src/Gui/QuantitySpinBox_p.h +++ b/src/Gui/QuantitySpinBox_p.h @@ -40,7 +40,7 @@ public: } protected: - void mouseReleaseEvent(QMouseEvent * event) { + void mouseReleaseEvent(QMouseEvent * event) override { if (rect().contains(event->pos())) Q_EMIT clicked(); } diff --git a/src/Gui/ReportView.cpp b/src/Gui/ReportView.cpp index 0c56c300e9..82a8dfc1b5 100644 --- a/src/Gui/ReportView.cpp +++ b/src/Gui/ReportView.cpp @@ -270,7 +270,7 @@ public: CustomReportEvent(ReportHighlighter::Paragraph p, const QString& s) : QEvent(QEvent::Type(QEvent::User)) { par = p; msg = s;} - ~CustomReportEvent() + ~CustomReportEvent() override { } const QString& message() const { return msg; } diff --git a/src/Gui/ReportView.h b/src/Gui/ReportView.h index 7cbd39c8e6..9700f98a9b 100644 --- a/src/Gui/ReportView.h +++ b/src/Gui/ReportView.h @@ -52,10 +52,10 @@ class ReportView : public QWidget public: ReportView( QWidget* parent = nullptr); - ~ReportView(); + ~ReportView() override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: QTabWidget* tabWidget; @@ -78,10 +78,10 @@ public: public: ReportHighlighter(QTextEdit* ); - ~ReportHighlighter(); + ~ReportHighlighter() override; /** Parses the given text and highlight it in the right colors. */ - void highlightBlock ( const QString & text ); + void highlightBlock ( const QString & text ) override; /** * Sets the current paragraph type used in ReportOutput * @see ReportOutput::Message @@ -129,7 +129,7 @@ class GuiExport ReportOutput : public QTextEdit, public WindowParameter, public public: ReportOutput(QWidget* parent=nullptr); - virtual ~ReportOutput(); + ~ReportOutput() override; /** Observes its parameter group. */ void OnChange(Base::Subject &rCaller, const char * sReason) override; @@ -208,7 +208,7 @@ class ReportOutputObserver : public QObject public: ReportOutputObserver (ReportOutput* view); - bool eventFilter(QObject *obj, QEvent *event); + bool eventFilter(QObject *obj, QEvent *event) override; protected: QPointer reportView; diff --git a/src/Gui/SceneInspector.h b/src/Gui/SceneInspector.h index 2fb933b4c3..8857cc3b16 100644 --- a/src/Gui/SceneInspector.h +++ b/src/Gui/SceneInspector.h @@ -42,23 +42,23 @@ class SceneModel : public QStandardItemModel public: SceneModel(QObject* parent); - virtual ~SceneModel(); + ~SceneModel() override; /// Tree structure: column count is 1. - int columnCount (const QModelIndex & parent = QModelIndex()) const; + int columnCount (const QModelIndex & parent = QModelIndex()) const override; /** returns empty QVariant, unless orientation == Qt::Horizontal, * role == Qt::DisplayRole and section == 0 where it returns * "Inventor Tree" */ - QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; /// header data not used: returns false - bool setHeaderData (int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole); + bool setHeaderData (int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole) override; /// insert the first node in tree void setNode(SoNode* node); /// set names per node void setNodeNames(const QHash& names); /// returns standard parent's flags - Qt::ItemFlags flags (const QModelIndex & index) const; + Qt::ItemFlags flags (const QModelIndex & index) const override; private: void setNode(QModelIndex, SoNode*); @@ -72,7 +72,7 @@ class DlgInspector : public QDialog public: DlgInspector(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~DlgInspector(); + ~DlgInspector() override; void setDocument(Gui::Document* doc); @@ -80,7 +80,7 @@ private Q_SLOTS: void on_refreshButton_clicked(); protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; void setNode(SoNode* node); void setNodeNames(Gui::Document*); diff --git a/src/Gui/Selection.h b/src/Gui/Selection.h index 25de69d89e..8d03b443d0 100644 --- a/src/Gui/Selection.h +++ b/src/Gui/Selection.h @@ -281,13 +281,13 @@ class GuiExport SelectionObserverPython : public SelectionObserver public: /// Constructor SelectionObserverPython(const Py::Object& obj, ResolveMode resolve = ResolveMode::OldStyleElement); - virtual ~SelectionObserverPython(); + ~SelectionObserverPython() override; static void addObserver(const Py::Object& obj, ResolveMode resolve = ResolveMode::OldStyleElement); static void removeObserver(const Py::Object& obj); private: - void onSelectionChanged(const SelectionChanges& msg); + void onSelectionChanged(const SelectionChanges& msg) override; void addSelection(const SelectionChanges&); void removeSelection(const SelectionChanges&); void setSelection(const SelectionChanges&); @@ -343,7 +343,7 @@ class GuiExport SelectionGateFilterExternal: public SelectionGate { public: SelectionGateFilterExternal(const char *docName, const char *objName=nullptr); - virtual bool allow(App::Document*,App::DocumentObject*, const char*) override; + bool allow(App::Document*,App::DocumentObject*, const char*) override; private: std::string DocName; std::string ObjName; @@ -681,7 +681,7 @@ protected: /// Construction SelectionSingleton(); /// Destruction - virtual ~SelectionSingleton(); + ~SelectionSingleton() override; /// Observer message from the App doc void slotDeletedObject(const App::DocumentObject&); diff --git a/src/Gui/SelectionFilter.h b/src/Gui/SelectionFilter.h index 54ef1237c9..9892979e37 100644 --- a/src/Gui/SelectionFilter.h +++ b/src/Gui/SelectionFilter.h @@ -105,8 +105,8 @@ public: /// construct with the filter string SelectionFilterGate(const char* filter); SelectionFilterGate(SelectionFilter* filter); - ~SelectionFilterGate(); - virtual bool allow(App::Document*,App::DocumentObject*, const char*); + ~SelectionFilterGate() override; + bool allow(App::Document*,App::DocumentObject*, const char*) override; protected: static SelectionFilter* nullPointer() { @@ -131,9 +131,9 @@ class SelectionGatePython : public SelectionGate public: /// Constructor SelectionGatePython(const Py::Object& obj); - virtual ~SelectionGatePython(); + ~SelectionGatePython() override; - bool allow(App::Document*, App::DocumentObject*, const char*); + bool allow(App::Document*, App::DocumentObject*, const char*) override; private: Py::Object gate; @@ -157,9 +157,9 @@ public: static void init_type(); // announce properties and methods SelectionFilterPy(const std::string&); - ~SelectionFilterPy(); + ~SelectionFilterPy() override; - Py::Object repr(); + Py::Object repr() override; Py::Object match(const Py::Tuple&); Py::Object result(const Py::Tuple&); Py::Object test(const Py::Tuple&); @@ -190,9 +190,9 @@ class SelectionFilterGatePython : public SelectionGate public: /// Constructor SelectionFilterGatePython(SelectionFilterPy* obj); - virtual ~SelectionFilterGatePython(); + ~SelectionFilterGatePython() override; - bool allow(App::Document*, App::DocumentObject*, const char*); + bool allow(App::Document*, App::DocumentObject*, const char*) override; private: SelectionFilterPy* filter; diff --git a/src/Gui/SelectionObject.h b/src/Gui/SelectionObject.h index ec33ad0947..c80fe0bbc7 100644 --- a/src/Gui/SelectionObject.h +++ b/src/Gui/SelectionObject.h @@ -50,11 +50,11 @@ public: */ SelectionObject(const SelectionChanges& msg); explicit SelectionObject(App::DocumentObject*); - virtual ~SelectionObject(); + ~SelectionObject() override; /** * The default implementation returns an instance of @ref SelectionObjectPy. */ - PyObject* getPyObject(); + PyObject* getPyObject() override; /// get the SubElement name of this SelectionObject inline const std::vector &getSubNames() const { return SubNames; } diff --git a/src/Gui/SelectionView.h b/src/Gui/SelectionView.h index 205fadc514..3341332590 100644 --- a/src/Gui/SelectionView.h +++ b/src/Gui/SelectionView.h @@ -57,19 +57,19 @@ public: * A destructor. * A more elaborate description of the destructor. */ - virtual ~SelectionView(); + ~SelectionView() override; /// Observer message from the Selection - virtual void onSelectionChanged(const SelectionChanges& msg) override; + void onSelectionChanged(const SelectionChanges& msg) override; - virtual void leaveEvent(QEvent*) override; + void leaveEvent(QEvent*) override; bool onMsg(const char* pMsg,const char** ppReturn) override; - virtual const char *getName() const override {return "SelectionView";} + const char *getName() const override {return "SelectionView";} /// get called when the document is changed or updated - virtual void onUpdate() override; + void onUpdate() override; QListWidget* selectionView; QLabel* countLabel; diff --git a/src/Gui/SoFCCSysDragger.h b/src/Gui/SoFCCSysDragger.h index fb2ecf085d..acdca57807 100644 --- a/src/Gui/SoFCCSysDragger.h +++ b/src/Gui/SoFCCSysDragger.h @@ -62,8 +62,8 @@ public: SoSFFloat autoScaleResult; //!< set from parent dragger. protected: - virtual ~TDragger() override; - virtual SbBool setUpConnections(SbBool onoff, SbBool doitalways = FALSE) override; + ~TDragger() override; + SbBool setUpConnections(SbBool onoff, SbBool doitalways = FALSE) override; static void startCB(void *, SoDragger * d); static void motionCB(void *, SoDragger * d); @@ -107,8 +107,8 @@ public: SoSFColor color; //!< set from outside. non-active color. protected: - virtual ~RDragger() override; - virtual SbBool setUpConnections(SbBool onoff, SbBool doitalways = FALSE) override; + ~RDragger() override; + SbBool setUpConnections(SbBool onoff, SbBool doitalways = FALSE) override; static void startCB(void *, SoDragger * d); static void motionCB(void *, SoDragger * d); diff --git a/src/Gui/SoFCColorBar.cpp b/src/Gui/SoFCColorBar.cpp index 604d5f5735..ed021c8d4d 100644 --- a/src/Gui/SoFCColorBar.cpp +++ b/src/Gui/SoFCColorBar.cpp @@ -159,8 +159,8 @@ class SoFCColorBarProxyObject : public QObject public: SoFCColorBarProxyObject(SoFCColorBar* b) : QObject(nullptr), bar(b) {} - ~SoFCColorBarProxyObject() {} - void customEvent(QEvent *) + ~SoFCColorBarProxyObject() override {} + void customEvent(QEvent *) override { bar->customize(bar->getActiveBar()); this->deleteLater(); diff --git a/src/Gui/SoFCColorBar.h b/src/Gui/SoFCColorBar.h index c6515aa779..afde2c6a90 100644 --- a/src/Gui/SoFCColorBar.h +++ b/src/Gui/SoFCColorBar.h @@ -54,7 +54,7 @@ public: static void initClass(); static void finish(); - virtual void GLRenderBelowPath ( SoGLRenderAction *action ); + void GLRenderBelowPath ( SoGLRenderAction *action ) override; /** * Sets the range of the colorbar from the maximum \a fMax to the minimum \a fMin. @@ -68,7 +68,7 @@ public: * * This method must be implemented in subclasses. */ - virtual App::Color getColor(float fVal) const = 0; + App::Color getColor(float fVal) const override = 0; /** * Returns always true if the color bar is in mode to show colors to arbitrary values of \a fVal, * otherwise true is returned if \a fVal is within the specified parameter range, if not false is @@ -135,7 +135,7 @@ protected: void setModified(); SoFCColorBarBase (); - virtual ~SoFCColorBarBase (); + ~SoFCColorBarBase () override; private: float _boxWidth; @@ -165,51 +165,51 @@ public: /** * Handles the mouse button events and checks if the user has clicked on the area of the currently active color bar. */ - void handleEvent (SoHandleEventAction *action); + void handleEvent (SoHandleEventAction *action) override; /** * Sets the range of all color bars from the maximum \a fMax to the minimum \a fMin. * \a prec indicates the post decimal positions, \a prec should be in between 0 and 6. */ - void setRange( float fMin, float fMax, int prec=3 ); + void setRange( float fMin, float fMax, int prec=3 ) override; /** * Returns the associated color to the value \a fVal of the currently active color bar. */ - App::Color getColor(float fVal) const; + App::Color getColor(float fVal) const override; /** * Sets whether values outside the range should be in gray, */ - void setOutsideGrayed (bool bVal); + void setOutsideGrayed (bool bVal) override; /** * Returns the return value of the currently active color bar. */ - bool isVisible (float fVal) const; + bool isVisible (float fVal) const override; /** * Returns the current minimum of the parameter range of the currently active color bar. */ - float getMinValue () const; + float getMinValue () const override; /** * Returns the current maximum of the parameter range of the currently active color bar. */ - float getMaxValue () const; + float getMaxValue () const override; /** * Customizes the currently active color bar. */ - void customize(SoFCColorBarBase*); + void customize(SoFCColorBarBase*) override; /** * Notify observers */ - void triggerChange(SoFCColorBarBase*); + void triggerChange(SoFCColorBarBase*) override; /** Returns the name of the color bar. */ - const char* getColorBarName() const { return "Color Bar"; } + const char* getColorBarName() const override { return "Color Bar"; } protected: /** * Sets the current viewer size to all color bars to recalculate their new position. */ - void setViewportSize( const SbVec2s& size ); + void setViewportSize( const SbVec2s& size ) override; - virtual ~SoFCColorBar(); + ~SoFCColorBar() override; private: static void eventCallback(void * userdata, SoEventCallback * node); diff --git a/src/Gui/SoFCColorGradient.h b/src/Gui/SoFCColorGradient.h index d7994b9220..f45fddbea2 100644 --- a/src/Gui/SoFCColorGradient.h +++ b/src/Gui/SoFCColorGradient.h @@ -50,36 +50,36 @@ public: * Sets the range of the colorbar from the maximum \a fMax to the minimum \a fMin. * \a prec indicates the post decimal positions, \a prec should be in between 0 and 6. */ - void setRange( float fMin, float fMax, int prec=3 ); + void setRange( float fMin, float fMax, int prec=3 ) override; /** * Returns the associated color to the value \a fVal. */ - App::Color getColor (float fVal) const { return _cColGrad.getColor(fVal); } - void setOutsideGrayed (bool bVal) { _cColGrad.setOutsideGrayed(bVal); } + App::Color getColor (float fVal) const override { return _cColGrad.getColor(fVal); } + void setOutsideGrayed (bool bVal) override { _cColGrad.setOutsideGrayed(bVal); } /** * Returns always true if the gradient is in mode to show colors to arbitrary values of \a fVal, * otherwise true is returned if \a fVal is within the specified parameter range, if not false is * returned. */ - bool isVisible (float fVal) const; + bool isVisible (float fVal) const override; /** Returns the current minimum of the parameter range. */ - float getMinValue () const { return _cColGrad.getMinValue(); } + float getMinValue () const override { return _cColGrad.getMinValue(); } /** Returns the current maximum of the parameter range. */ - float getMaxValue () const { return _cColGrad.getMaxValue(); } + float getMaxValue () const override { return _cColGrad.getMaxValue(); } /** * Opens a dialog to customize the current settings of the color gradient bar. */ - void customize(SoFCColorBarBase*); + void customize(SoFCColorBarBase*) override; /** Returns the name of the color bar. */ - const char* getColorBarName() const { return "Color Gradient"; } + const char* getColorBarName() const override { return "Color Gradient"; } protected: /** * Sets the current viewer size this color gradient is embedded into, to recalculate its new position. */ - void setViewportSize( const SbVec2s& size ); + void setViewportSize( const SbVec2s& size ) override; - virtual ~SoFCColorGradient(); + ~SoFCColorGradient() override; /** * Sets the color model of the underlying color gradient to \a index. */ diff --git a/src/Gui/SoFCColorLegend.h b/src/Gui/SoFCColorLegend.h index 17d1142330..49ebeee116 100644 --- a/src/Gui/SoFCColorLegend.h +++ b/src/Gui/SoFCColorLegend.h @@ -51,30 +51,30 @@ public: * Sets the range of the colorbar from the maximum \a fMax to the minimum \a fMin. * \a prec indicates the post decimal positions, \a prec should be in between 0 and 6. */ - void setRange( float fMin, float fMax, int prec=3 ); + void setRange( float fMin, float fMax, int prec=3 ) override; /** * Updates the node with the given color legend. */ void setColorLegend (const App::ColorLegend& legend); unsigned short getColorIndex (float fVal) const { return _currentLegend.getColorIndex(fVal); } - App::Color getColor (float fVal) const { return _currentLegend.getColor(fVal); } - void setOutsideGrayed (bool bVal) { _currentLegend.setOutsideGrayed(bVal); } - bool isVisible (float) const { return false; } - float getMinValue () const { return _currentLegend.getMinValue(); } - float getMaxValue () const { return _currentLegend.getMaxValue(); } + App::Color getColor (float fVal) const override { return _currentLegend.getColor(fVal); } + void setOutsideGrayed (bool bVal) override { _currentLegend.setOutsideGrayed(bVal); } + bool isVisible (float) const override { return false; } + float getMinValue () const override { return _currentLegend.getMinValue(); } + float getMaxValue () const override { return _currentLegend.getMaxValue(); } std::size_t countColors () const { return _currentLegend.hasNumberOfFields(); } - void customize(SoFCColorBarBase*) { } - const char* getColorBarName() const { return "Color Legend"; } + void customize(SoFCColorBarBase*) override { } + const char* getColorBarName() const override { return "Color Legend"; } // virtual void handleEvent(SoHandleEventAction * action); // virtual void GLRenderBelowPath(SoGLRenderAction * action); // virtual void GLRenderInPath(SoGLRenderAction * action); protected: - void setViewportSize( const SbVec2s& size ); - virtual ~SoFCColorLegend(); + void setViewportSize( const SbVec2s& size ) override; + ~SoFCColorLegend() override; // virtual void redrawHighlighted(SoAction * act, SbBool flag); private: void setMarkerLabel(const SoMFString& label); diff --git a/src/Gui/SoFCOffscreenRenderer.h b/src/Gui/SoFCOffscreenRenderer.h index 501b281f6e..aff0538bc7 100644 --- a/src/Gui/SoFCOffscreenRenderer.h +++ b/src/Gui/SoFCOffscreenRenderer.h @@ -154,9 +154,9 @@ public: static void init_type(); SoQtOffscreenRendererPy(const SbViewportRegion&); - ~SoQtOffscreenRendererPy(); + ~SoQtOffscreenRendererPy() override; - Py::Object repr(); + Py::Object repr() override; Py::Object setViewportRegion(const Py::Tuple&); Py::Object getViewportRegion(const Py::Tuple&); diff --git a/src/Gui/SoFCSelection.h b/src/Gui/SoFCSelection.h index 6bddfb1a9c..d694bc1ebe 100644 --- a/src/Gui/SoFCSelection.h +++ b/src/Gui/SoFCSelection.h @@ -99,16 +99,16 @@ public: SoSFString subElementName; SoSFBool useNewSelection; - virtual void doAction(SoAction *action); - virtual void GLRender(SoGLRenderAction * action); + void doAction(SoAction *action) override; + void GLRender(SoGLRenderAction * action) override; - virtual void handleEvent(SoHandleEventAction * action); - virtual void GLRenderBelowPath(SoGLRenderAction * action); - virtual void GLRenderInPath(SoGLRenderAction * action); + void handleEvent(SoHandleEventAction * action) override; + void GLRenderBelowPath(SoGLRenderAction * action) override; + void GLRenderInPath(SoGLRenderAction * action) override; static void turnOffCurrentHighlight(SoGLRenderAction * action); protected: - virtual ~SoFCSelection(); + ~SoFCSelection() override; typedef SoFCSelectionContext SelContext; typedef std::shared_ptr SelContextPtr; @@ -117,7 +117,7 @@ protected: virtual void redrawHighlighted(SoAction * act, SbBool flag); - virtual SbBool readInstance(SoInput * in, unsigned short flags); + SbBool readInstance(SoInput * in, unsigned short flags) override; private: static int getPriority(const SoPickedPoint*); diff --git a/src/Gui/SoFCSelectionContext.h b/src/Gui/SoFCSelectionContext.h index 6c86468914..82e78bce33 100644 --- a/src/Gui/SoFCSelectionContext.h +++ b/src/Gui/SoFCSelectionContext.h @@ -56,7 +56,7 @@ struct GuiExport SoFCSelectionContext : SoFCSelectionContextBase SbColor highlightColor; std::shared_ptr counter; - virtual ~SoFCSelectionContext(); + ~SoFCSelectionContext() override; bool isSelected() const { return !selectionIndex.empty(); @@ -110,7 +110,7 @@ struct GuiExport SoFCSelectionContextEx : SoFCSelectionContext bool applyColor(int idx, std::vector &packedColors, bool &hasTransparency); bool isSingleColor(uint32_t &color, bool &hasTransparency); - virtual SoFCSelectionContextBasePtr copy() { + SoFCSelectionContextBasePtr copy() override { return std::make_shared(*this); } diff --git a/src/Gui/SoFCUnifiedSelection.h b/src/Gui/SoFCUnifiedSelection.h index 06671b3b32..b415984457 100644 --- a/src/Gui/SoFCUnifiedSelection.h +++ b/src/Gui/SoFCUnifiedSelection.h @@ -69,8 +69,8 @@ public: AUTO, ON, OFF }; - const char* getFileFormatName() const; - void write(SoWriteAction * action); + const char* getFileFormatName() const override; + void write(SoWriteAction * action) override; SoSFColor colorHighlight; SoSFColor colorSelection; @@ -79,11 +79,11 @@ public: SoSFBool selectionRole; SoSFBool useNewSelection; - virtual void doAction(SoAction *action); + void doAction(SoAction *action) override; //virtual void GLRender(SoGLRenderAction * action); - virtual void handleEvent(SoHandleEventAction * action); - virtual void GLRenderBelowPath(SoGLRenderAction * action); + void handleEvent(SoHandleEventAction * action) override; + void GLRenderBelowPath(SoGLRenderAction * action) override; //virtual void GLRenderInPath(SoGLRenderAction * action); //static void turnOffCurrentHighlight(SoGLRenderAction * action); @@ -92,7 +92,7 @@ public: friend class View3DInventorViewer; protected: - virtual ~SoFCUnifiedSelection(); + ~SoFCUnifiedSelection() override; //virtual void redrawHighlighted(SoAction * act, SbBool flag); //virtual SbBool readInstance(SoInput * in, unsigned short flags); @@ -144,14 +144,14 @@ public: void setDetail(SoDetail *d); SoDetail *getDetail() {return det;} - virtual void GLRenderBelowPath(SoGLRenderAction * action); - virtual void GLRender(SoGLRenderAction * action); - virtual void GLRenderInPath(SoGLRenderAction * action); + void GLRenderBelowPath(SoGLRenderAction * action) override; + void GLRender(SoGLRenderAction * action) override; + void GLRenderInPath(SoGLRenderAction * action) override; - virtual void getBoundingBox(SoGetBoundingBoxAction * action); + void getBoundingBox(SoGetBoundingBoxAction * action) override; protected: - virtual ~SoFCPathAnnotation(); + ~SoFCPathAnnotation() override; protected: SoPath *path; @@ -169,7 +169,7 @@ public: static void finish(); SoFCSeparator(bool trackCacheMode=true); - virtual void GLRenderBelowPath(SoGLRenderAction * action); + void GLRenderBelowPath(SoGLRenderAction * action) override; static void setCacheMode(CacheEnabled mode) { CacheMode = mode; @@ -193,18 +193,18 @@ public: static void finish(); SoFCSelectionRoot(bool trackCacheMode=false); - virtual void GLRenderBelowPath(SoGLRenderAction * action); - virtual void GLRenderInPath(SoGLRenderAction * action); + void GLRenderBelowPath(SoGLRenderAction * action) override; + void GLRenderInPath(SoGLRenderAction * action) override; - virtual void doAction(SoAction *action); - virtual void pick(SoPickAction * action); - virtual void rayPick(SoRayPickAction * action); - virtual void handleEvent(SoHandleEventAction * action); - virtual void search(SoSearchAction * action); - virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action); - virtual void getBoundingBox(SoGetBoundingBoxAction * action); - virtual void getMatrix(SoGetMatrixAction * action); - virtual void callback(SoCallbackAction *action); + void doAction(SoAction *action) override; + void pick(SoPickAction * action) override; + void rayPick(SoRayPickAction * action) override; + void handleEvent(SoHandleEventAction * action) override; + void search(SoSearchAction * action) override; + void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; + void getBoundingBox(SoGetBoundingBoxAction * action) override; + void getMatrix(SoGetMatrixAction * action) override; + void callback(SoCallbackAction *action) override; template static std::shared_ptr getRenderContext(SoNode *node, std::shared_ptr def = std::shared_ptr()) { @@ -326,7 +326,7 @@ public: static bool renderBBox(SoGLRenderAction *action, SoNode *node, SbColor color); protected: - virtual ~SoFCSelectionRoot(); + ~SoFCSelectionRoot() override; void renderPrivate(SoGLRenderAction *, bool inPath); bool _renderPrivate(SoGLRenderAction *, bool inPath); @@ -385,7 +385,7 @@ class GuiExport SoHighlightElementAction : public SoAction public: SoHighlightElementAction (); - ~SoHighlightElementAction(); + ~SoHighlightElementAction() override; void setHighlighted(SbBool); SbBool isHighlighted() const; @@ -397,7 +397,7 @@ public: static void initClass(); protected: - virtual void beginTraversal(SoNode *node); + void beginTraversal(SoNode *node) override; private: static void callDoAction(SoAction *action,SoNode *node); @@ -419,7 +419,7 @@ public: enum Type {None, Append, Remove, All, Color, Hide, Show}; SoSelectionElementAction (Type=None, bool secondary = false); - ~SoSelectionElementAction(); + ~SoSelectionElementAction() override; Type getType() const; void setType(Type type) { @@ -449,7 +449,7 @@ public: static void initClass(); protected: - virtual void beginTraversal(SoNode *node); + void beginTraversal(SoNode *node) override; private: static void callDoAction(SoAction *action,SoNode *node); @@ -471,7 +471,7 @@ class GuiExport SoVRMLAction : public SoAction public: SoVRMLAction(); - ~SoVRMLAction(); + ~SoVRMLAction() override; void setOverrideMode(SbBool); SbBool isOverrideMode() const; diff --git a/src/Gui/SoNavigationDragger.h b/src/Gui/SoNavigationDragger.h index 00c1091bae..a39fc8bcaa 100644 --- a/src/Gui/SoNavigationDragger.h +++ b/src/Gui/SoNavigationDragger.h @@ -105,20 +105,20 @@ class RotTransDragger : public SoDragger // and at the start/end of SoBaseKit::readInstance() // and on the new copy at the start/end of SoBaseKit::copy() // Returns the state of the node when this was called. - virtual SbBool setUpConnections( SbBool onOff, - SbBool doItAlways = false); + SbBool setUpConnections( SbBool onOff, + SbBool doItAlways = false) override; // This allows us to specify that certain parts do not // write out. We'll use this on the antiSquish and // surroundScale parts. - virtual void setDefaultOnNonWritingFields(); + void setDefaultOnNonWritingFields() override; private: static const char NavigationDraggerLayout[]; // Destructor. - ~RotTransDragger(); + ~RotTransDragger() override; }; #endif //SONAVIGATIONDRAGGER_H diff --git a/src/Gui/SoTextLabel.h b/src/Gui/SoTextLabel.h index 882527523e..afcfc6ad15 100644 --- a/src/Gui/SoTextLabel.h +++ b/src/Gui/SoTextLabel.h @@ -55,8 +55,8 @@ public: SoSFFloat frameSize; protected: - virtual ~SoTextLabel() {} - virtual void GLRender(SoGLRenderAction *action); + ~SoTextLabel() override {} + void GLRender(SoGLRenderAction *action) override; }; /** @@ -91,8 +91,8 @@ public: SoSFInt32 size; protected: - virtual ~SoStringLabel() {}; - virtual void GLRender(SoGLRenderAction *action); + ~SoStringLabel() override {}; + void GLRender(SoGLRenderAction *action) override; }; class GuiExport SoFrameLabel : public SoImage { @@ -118,9 +118,9 @@ public: //SoSFImage image; protected: - virtual ~SoFrameLabel() {}; - virtual void notify(SoNotList * list); - virtual void GLRender(SoGLRenderAction *action); + ~SoFrameLabel() override {}; + void notify(SoNotList * list) override; + void GLRender(SoGLRenderAction *action) override; private: void drawImage(); @@ -137,7 +137,7 @@ public: private: // Destructor - ~TranslateManip(); + ~TranslateManip() override; }; } // namespace Gui diff --git a/src/Gui/SoTouchEvents.h b/src/Gui/SoTouchEvents.h index ccba4add80..5e2c915a44 100644 --- a/src/Gui/SoTouchEvents.h +++ b/src/Gui/SoTouchEvents.h @@ -40,7 +40,7 @@ public: SO_EVENT_INIT_CLASS(SoGestureEvent, SoEvent); } SoGestureEvent() : state(SbGSNoGesture) {} - ~SoGestureEvent(){} + ~SoGestureEvent() override{} SbBool isSoGestureEvent(const SoEvent* ev) const; enum SbGestureState { @@ -61,7 +61,7 @@ public: } SoGesturePanEvent() {} SoGesturePanEvent(QPanGesture *qpan, QWidget *widget); - ~SoGesturePanEvent(){} + ~SoGesturePanEvent() override{} SbBool isSoGesturePanEvent(const SoEvent* ev) const; SbVec2f deltaOffset; @@ -79,7 +79,7 @@ public: { } SoGesturePinchEvent(QPinchGesture* qpinch, QWidget* widget); - ~SoGesturePinchEvent(){} + ~SoGesturePinchEvent() override{} SbBool isSoGesturePinchEvent(const SoEvent* ev) const; SbVec2f startCenter;//in GL pixel coordinates (from bottom left corner of view area) @@ -104,7 +104,7 @@ public: { } SoGestureSwipeEvent(QSwipeGesture* qwsipe, QWidget *widget); - ~SoGestureSwipeEvent(){} + ~SoGestureSwipeEvent() override{} SbBool isSoGestureSwipeEvent(const SoEvent* ev) const; double angle; @@ -117,8 +117,8 @@ class GesturesDevice : public Quarter::InputDevice { public: GesturesDevice(QWidget* widget);//it needs to know the widget to do coordinate translation - virtual ~GesturesDevice() {} - virtual const SoEvent* translateEvent(QEvent* event); + ~GesturesDevice() override {} + const SoEvent* translateEvent(QEvent* event) override; protected: QWidget* widget; }; diff --git a/src/Gui/SpinBox.h b/src/Gui/SpinBox.h index c99fce900e..caa91c6931 100644 --- a/src/Gui/SpinBox.h +++ b/src/Gui/SpinBox.h @@ -40,10 +40,10 @@ class GuiExport ExpressionSpinBox : public ExpressionBinding { public: ExpressionSpinBox(QAbstractSpinBox*); - virtual ~ExpressionSpinBox(); + ~ExpressionSpinBox() override; - void bind(const App::ObjectIdentifier &_path); - void setExpression(std::shared_ptr expr); + void bind(const App::ObjectIdentifier &_path) override; + void setExpression(std::shared_ptr expr) override; protected: /*! Expression handling */ @@ -58,7 +58,7 @@ protected: void updateExpression(); //@} - void onChange(); + void onChange() override; virtual void setNumberExpression(App::NumberExpression*) = 0; void resizeWidget(); @@ -85,9 +85,9 @@ class GuiExport UnsignedValidator : public QValidator public: UnsignedValidator( QObject * parent ); UnsignedValidator( uint bottom, uint top, QObject * parent ); - ~UnsignedValidator(); + ~UnsignedValidator() override; - QValidator::State validate( QString &, int & ) const; + QValidator::State validate( QString &, int & ) const override; void setBottom( uint ); void setTop( uint ); @@ -116,22 +116,22 @@ class GuiExport UIntSpinBox : public QSpinBox, public ExpressionSpinBox public: UIntSpinBox ( QWidget* parent=nullptr ); - virtual ~UIntSpinBox(); + ~UIntSpinBox() override; void setRange( uint minVal, uint maxVal ); uint value() const; - virtual QValidator::State validate ( QString & input, int & pos ) const; + QValidator::State validate ( QString & input, int & pos ) const override; uint minimum() const; void setMinimum( uint value ); uint maximum() const; void setMaximum( uint value ); - bool apply(const std::string &propName); + bool apply(const std::string &propName) override; using ExpressionSpinBox::apply; - void keyPressEvent(QKeyEvent *event); - void resizeEvent(QResizeEvent *event); - void paintEvent(QPaintEvent *event); + void keyPressEvent(QKeyEvent *event) override; + void resizeEvent(QResizeEvent *event) override; + void paintEvent(QPaintEvent *event) override; Q_SIGNALS: void valueChanged( uint value ); // clazy:exclude=overloaded-signal @@ -143,9 +143,9 @@ private Q_SLOTS: void valueChange( int value ); protected: - virtual QString textFromValue ( int v ) const; - virtual int valueFromText ( const QString & text ) const; - virtual void setNumberExpression(App::NumberExpression*); + QString textFromValue ( int v ) const override; + int valueFromText ( const QString & text ) const override; + void setNumberExpression(App::NumberExpression*) override; private: void updateValidator(); @@ -163,15 +163,15 @@ class GuiExport IntSpinBox : public QSpinBox, public ExpressionSpinBox public: IntSpinBox ( QWidget* parent=nullptr ); - virtual ~IntSpinBox(); + ~IntSpinBox() override; - bool apply(const std::string &propName); + bool apply(const std::string &propName) override; using ExpressionSpinBox::apply; - void setNumberExpression(App::NumberExpression*); + void setNumberExpression(App::NumberExpression*) override; - void keyPressEvent(QKeyEvent *event); - void resizeEvent(QResizeEvent *event); - void paintEvent(QPaintEvent *event); + void keyPressEvent(QKeyEvent *event) override; + void resizeEvent(QResizeEvent *event) override; + void paintEvent(QPaintEvent *event) override; }; /** @@ -185,15 +185,15 @@ class GuiExport DoubleSpinBox : public QDoubleSpinBox, public ExpressionSpinBox public: DoubleSpinBox ( QWidget* parent=nullptr ); - virtual ~DoubleSpinBox(); + ~DoubleSpinBox() override; - bool apply(const std::string &propName); + bool apply(const std::string &propName) override; using ExpressionSpinBox::apply; - void setNumberExpression(App::NumberExpression*); + void setNumberExpression(App::NumberExpression*) override; - void keyPressEvent(QKeyEvent *event); - void resizeEvent(QResizeEvent *event); - void paintEvent(QPaintEvent *event); + void keyPressEvent(QKeyEvent *event) override; + void resizeEvent(QResizeEvent *event) override; + void paintEvent(QPaintEvent *event) override; }; } // namespace Gui diff --git a/src/Gui/Splashscreen.cpp b/src/Gui/Splashscreen.cpp index 1a454da40b..70a0992f23 100644 --- a/src/Gui/Splashscreen.cpp +++ b/src/Gui/Splashscreen.cpp @@ -97,7 +97,7 @@ public: textColor = col; } } - virtual ~SplashObserver() + ~SplashObserver() override { Base::Console().DetachObserver(this); } diff --git a/src/Gui/Splashscreen.h b/src/Gui/Splashscreen.h index 53d842b324..1248a2e9c6 100644 --- a/src/Gui/Splashscreen.h +++ b/src/Gui/Splashscreen.h @@ -42,10 +42,10 @@ class SplashScreen : public QSplashScreen public: SplashScreen( const QPixmap & pixmap = QPixmap ( ), Qt::WindowFlags f = Qt::WindowFlags() ); - ~SplashScreen(); + ~SplashScreen() override; protected: - void drawContents ( QPainter * painter ); + void drawContents ( QPainter * painter ) override; private: SplashObserver* messages; @@ -75,10 +75,10 @@ class GuiExport LicenseView : public Gui::MDIView public: LicenseView(QWidget* parent=nullptr); - virtual ~LicenseView(); + ~LicenseView() override; void setSource(const QUrl & url); - const char *getName() const { + const char *getName() const override { return "LicenseView"; } @@ -96,7 +96,7 @@ class GuiExport AboutDialog : public QDialog public: AboutDialog(bool showLic, QWidget* parent = nullptr); - ~AboutDialog(); + ~AboutDialog() override; protected: void setupLabels(); diff --git a/src/Gui/SplitView3DInventor.h b/src/Gui/SplitView3DInventor.h index d6db11dc17..09e5f89e45 100644 --- a/src/Gui/SplitView3DInventor.h +++ b/src/Gui/SplitView3DInventor.h @@ -45,24 +45,24 @@ class GuiExport AbstractSplitView : public MDIView, public ParameterGrp::Observe public: AbstractSplitView(Gui::Document* pcDocument, QWidget* parent, Qt::WindowFlags wflags=Qt::WindowFlags()); - ~AbstractSplitView(); + ~AbstractSplitView() override; - virtual const char *getName() const; + const char *getName() const override; /// Message handler - virtual bool onMsg(const char* pMsg, const char** ppReturn); - virtual bool onHasMsg(const char* pMsg) const; - virtual void OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::MessageType Reason); - virtual void onUpdate(); - virtual void deleteSelf(); - virtual void viewAll(); + bool onMsg(const char* pMsg, const char** ppReturn) override; + bool onHasMsg(const char* pMsg) const override; + void OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::MessageType Reason) override; + void onUpdate() override; + void deleteSelf() override; + void viewAll() override; View3DInventorViewer *getViewer(unsigned int) const; - void setOverrideCursor(const QCursor&); - virtual bool containsViewProvider(const ViewProvider*) const; + void setOverrideCursor(const QCursor&) override; + bool containsViewProvider(const ViewProvider*) const override; - PyObject *getPyObject(); - void setPyObject(PyObject *); + PyObject *getPyObject() override; + void setPyObject(PyObject *) override; int getSize(); protected: @@ -82,11 +82,11 @@ public: static void init_type(); // announce properties and methods AbstractSplitViewPy(AbstractSplitView *vi); - ~AbstractSplitViewPy(); + ~AbstractSplitViewPy() override; AbstractSplitView* getSplitViewPtr(); - Py::Object repr(); - Py::Object getattr(const char *); + Py::Object repr() override; + Py::Object getattr(const char *) override; Py::Object cast_to_base(const Py::Tuple&); Py::Object fitAll(const Py::Tuple&); @@ -98,9 +98,9 @@ public: Py::Object viewTop(const Py::Tuple&); Py::Object viewIsometric(const Py::Tuple&); Py::Object getViewer(const Py::Tuple&); - Py::Object sequence_item(Py_ssize_t); + Py::Object sequence_item(Py_ssize_t) override; Py::Object close(const Py::Tuple&); - PyCxx_ssize_t sequence_length(); + PyCxx_ssize_t sequence_length() override; private: Gui::MDIViewPy base; @@ -115,7 +115,7 @@ class GuiExport SplitView3DInventor : public AbstractSplitView public: SplitView3DInventor(int views, Gui::Document* pcDocument, QWidget* parent, Qt::WindowFlags wflags=Qt::WindowFlags()); - ~SplitView3DInventor(); + ~SplitView3DInventor() override; }; } // namespace Gui diff --git a/src/Gui/TaskCSysDragger.h b/src/Gui/TaskCSysDragger.h index 0055fce7f6..b9d13b5901 100644 --- a/src/Gui/TaskCSysDragger.h +++ b/src/Gui/TaskCSysDragger.h @@ -38,11 +38,11 @@ namespace Gui Q_OBJECT public: TaskCSysDragger(ViewProviderDocumentObject *vpObjectIn, SoFCCSysDragger *draggerIn); - virtual ~TaskCSysDragger() override; - virtual QDialogButtonBox::StandardButtons getStandardButtons() const override + ~TaskCSysDragger() override; + QDialogButtonBox::StandardButtons getStandardButtons() const override { return QDialogButtonBox::Ok;} - virtual void open() override; - virtual bool accept() override; + void open() override; + bool accept() override; private Q_SLOTS: void onTIncrementSlot(double freshValue); void onRIncrementSlot(double freshValue); diff --git a/src/Gui/TaskDlgRelocation.h b/src/Gui/TaskDlgRelocation.h index b4d452891f..70cee3bc4f 100644 --- a/src/Gui/TaskDlgRelocation.h +++ b/src/Gui/TaskDlgRelocation.h @@ -39,7 +39,7 @@ class TaskBoxPosition : public Gui::TaskView::TaskBox public: TaskBoxPosition(QWidget *parent = nullptr); - ~TaskBoxPosition(); + ~TaskBoxPosition() override; private Q_SLOTS: @@ -57,7 +57,7 @@ class TaskBoxAngle : public Gui::TaskView::TaskBox public: TaskBoxAngle(QWidget *parent = nullptr); - ~TaskBoxAngle(); + ~TaskBoxAngle() override; private Q_SLOTS: @@ -77,22 +77,22 @@ class GuiExport TaskDlgRelocation : public Gui::TaskView::TaskDialog public: TaskDlgRelocation(); - ~TaskDlgRelocation(); + ~TaskDlgRelocation() override; public: /// is called the TaskView when the dialog is opened - virtual void open(); + void open() override; /// is called by the framework if an button is clicked which has no accept or rject role - virtual void clicked(int); + void clicked(int) override; /// is called by the framework if the dialog is accepted (Ok) - virtual bool accept(); + bool accept() override; /// is called by the framework if the dialog is rejected (Cancel) - virtual bool reject(); + bool reject() override; /// is called by the framework if the user press the help button - virtual void helpRequested(); + void helpRequested() override; /// returns for Close and Help button - virtual QDialogButtonBox::StandardButtons getStandardButtons() const + QDialogButtonBox::StandardButtons getStandardButtons() const override { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; } protected: diff --git a/src/Gui/TaskElementColors.cpp b/src/Gui/TaskElementColors.cpp index afb4e148d2..5ca57f09ff 100644 --- a/src/Gui/TaskElementColors.cpp +++ b/src/Gui/TaskElementColors.cpp @@ -100,7 +100,7 @@ public: px = QPixmap(w,w); } - ~Private() { + ~Private() override { try { vpParent->OnTopWhenSelected.setValue(onTopMode); } @@ -109,7 +109,7 @@ public: } } - bool allow(App::Document *doc, App::DocumentObject *obj, const char *subname) { + bool allow(App::Document *doc, App::DocumentObject *obj, const char *subname) override { if(editDoc!=doc->getName() || editObj!=obj->getNameInDocument() || !boost::starts_with(subname,editSub)) diff --git a/src/Gui/TaskElementColors.h b/src/Gui/TaskElementColors.h index 34bb5b122b..6e6aa838ee 100644 --- a/src/Gui/TaskElementColors.h +++ b/src/Gui/TaskElementColors.h @@ -39,7 +39,7 @@ class GuiExport ElementColors : public QWidget, public SelectionObserver public: ElementColors(ViewProviderDocumentObject* vp, bool noHide=false); - ~ElementColors(); + ~ElementColors() override; bool accept(); bool reject(); @@ -57,9 +57,9 @@ private Q_SLOTS: void on_boxSelect_clicked(); protected: - void onSelectionChanged(const SelectionChanges& msg); - void changeEvent(QEvent *e); - void leaveEvent(QEvent *); + void onSelectionChanged(const SelectionChanges& msg) override; + void changeEvent(QEvent *e) override; + void leaveEvent(QEvent *) override; void slotDeleteDocument(const Document&); void slotDeleteObject(const ViewProvider&); private: @@ -73,15 +73,15 @@ class GuiExport TaskElementColors : public TaskView::TaskDialog public: TaskElementColors(ViewProviderDocumentObject* vp, bool noHide=false); - ~TaskElementColors(); + ~TaskElementColors() override; public: - void open(); - bool accept(); - bool reject(); - void clicked(int); + void open() override; + bool accept() override; + bool reject() override; + void clicked(int) override; - QDialogButtonBox::StandardButtons getStandardButtons() const + QDialogButtonBox::StandardButtons getStandardButtons() const override { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; } private: diff --git a/src/Gui/TaskView/TaskAppearance.h b/src/Gui/TaskView/TaskAppearance.h index f67e8b7441..b8edba0ccd 100644 --- a/src/Gui/TaskView/TaskAppearance.h +++ b/src/Gui/TaskView/TaskAppearance.h @@ -46,10 +46,10 @@ class TaskAppearance : public TaskBox, public Gui::SelectionSingleton::ObserverT public: TaskAppearance(QWidget *parent = nullptr); - ~TaskAppearance(); + ~TaskAppearance() override; /// Observer message from the Selection void OnChange(Gui::SelectionSingleton::SubjectType &rCaller, - Gui::SelectionSingleton::MessageType Reason); + Gui::SelectionSingleton::MessageType Reason) override; private Q_SLOTS: void on_changeMode_activated(const QString&); @@ -59,7 +59,7 @@ private Q_SLOTS: void on_spinLineWidth_valueChanged(int); protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: void slotChangedObject(const Gui::ViewProvider&, const App::Property& Prop); diff --git a/src/Gui/TaskView/TaskDialog.h b/src/Gui/TaskView/TaskDialog.h index 728f91b318..a15fe66bc7 100644 --- a/src/Gui/TaskView/TaskDialog.h +++ b/src/Gui/TaskView/TaskDialog.h @@ -51,7 +51,7 @@ public: }; TaskDialog(); - ~TaskDialog(); + ~TaskDialog() override; void setButtonPosition(ButtonPosition p) { pos = p; } diff --git a/src/Gui/TaskView/TaskDialogPython.h b/src/Gui/TaskView/TaskDialogPython.h index a4d2a340dd..ff2b0eff1e 100644 --- a/src/Gui/TaskView/TaskDialogPython.h +++ b/src/Gui/TaskView/TaskDialogPython.h @@ -38,9 +38,9 @@ public: static ControlPy* getInstance(); ControlPy(); - ~ControlPy(); + ~ControlPy() override; - Py::Object repr(); + Py::Object repr() override; Py::Object showDialog(const Py::Tuple&); Py::Object activeDialog(const Py::Tuple&); Py::Object closeDialog(const Py::Tuple&); @@ -60,8 +60,8 @@ class GuiExport TaskWatcherPython : public TaskWatcher { public: TaskWatcherPython(const Py::Object&); - ~TaskWatcherPython(); - bool shouldShow(); + ~TaskWatcherPython() override; + bool shouldShow() override; private: Py::Object watcher; @@ -71,39 +71,39 @@ class GuiExport TaskDialogPython : public TaskDialog { public: TaskDialogPython(const Py::Object&); - ~TaskDialogPython(); + ~TaskDialogPython() override; - virtual QDialogButtonBox::StandardButtons getStandardButtons() const; - virtual void modifyStandardButtons(QDialogButtonBox*); + QDialogButtonBox::StandardButtons getStandardButtons() const override; + void modifyStandardButtons(QDialogButtonBox*) override; /*! Indicates whether this task dialog allows other commands to modify the document while it is open. */ - virtual bool isAllowedAlterDocument() const; + bool isAllowedAlterDocument() const override; /*! Indicates whether this task dialog allows other commands to modify the 3d view while it is open. */ - virtual bool isAllowedAlterView() const; + bool isAllowedAlterView() const override; /*! Indicates whether this task dialog allows other commands to modify the selection while it is open. */ - virtual bool isAllowedAlterSelection() const; - virtual bool needsFullSpace() const; + bool isAllowedAlterSelection() const override; + bool needsFullSpace() const override; public: /// is called by the framework when the dialog is opened - virtual void open(); + void open() override; /// is called by the framework if a button is clicked which has no accept or reject role - virtual void clicked(int); + void clicked(int) override; /// is called by the framework if the dialog is accepted (Ok) - virtual bool accept(); + bool accept() override; /// is called by the framework if the dialog is rejected (Cancel) - virtual bool reject(); + bool reject() override; /// is called by the framework if the user press the help button - virtual void helpRequested(); + void helpRequested() override; private: void clearForm(); diff --git a/src/Gui/TaskView/TaskEditControl.h b/src/Gui/TaskView/TaskEditControl.h index f0997673d2..fd0a8e58f1 100644 --- a/src/Gui/TaskView/TaskEditControl.h +++ b/src/Gui/TaskView/TaskEditControl.h @@ -47,7 +47,7 @@ class TaskEditControl : public TaskWidget public: TaskEditControl(QWidget *parent = nullptr); - ~TaskEditControl(); + ~TaskEditControl() override; QDialogButtonBox* standardButtons() const; friend class TaskView; diff --git a/src/Gui/TaskView/TaskSelectLinkProperty.h b/src/Gui/TaskView/TaskSelectLinkProperty.h index 6a8c2b0db5..497b30c661 100644 --- a/src/Gui/TaskView/TaskSelectLinkProperty.h +++ b/src/Gui/TaskView/TaskSelectLinkProperty.h @@ -57,10 +57,10 @@ class GuiExport TaskSelectLinkProperty : public TaskBox, public Gui::SelectionSi public: TaskSelectLinkProperty(const char *,App::Property *,QWidget *parent = nullptr); - ~TaskSelectLinkProperty(); + ~TaskSelectLinkProperty() override; /// Observer message from the Selection void OnChange(Gui::SelectionSingleton::SubjectType &rCaller, - Gui::SelectionSingleton::MessageType Reason); + Gui::SelectionSingleton::MessageType Reason) override; /// set the filter criterion (same as in constructor) bool setFilter(const char*); @@ -88,7 +88,7 @@ Q_SIGNALS: void emitSelectionMisfit(); protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: // checks for selection and set background color and signals diff --git a/src/Gui/TaskView/TaskView.h b/src/Gui/TaskView/TaskView.h index 0411c66fde..d73f676944 100644 --- a/src/Gui/TaskView/TaskView.h +++ b/src/Gui/TaskView/TaskView.h @@ -64,10 +64,10 @@ public: explicit TaskGroup(QWidget *parent = nullptr); explicit TaskGroup(const QString & headerText, QWidget *parent = nullptr); explicit TaskGroup(const QPixmap & icon, const QString & headerText, QWidget *parent = nullptr); - ~TaskGroup(); + ~TaskGroup() override; protected: - void actionEvent (QActionEvent*); + void actionEvent (QActionEvent*) override; }; /// Father class of content with header and Icon @@ -98,15 +98,15 @@ public: const QString& title, bool expandable = true, QWidget *parent = nullptr); - virtual QSize minimumSizeHint() const; + QSize minimumSizeHint() const override; - ~TaskBox(); + ~TaskBox() override; void hideGroupBox(); bool isGroupVisible() const; protected: - void showEvent(QShowEvent*); - void actionEvent (QActionEvent*); + void showEvent(QShowEvent*) override; + void actionEvent (QActionEvent*) override; private: bool wasShown; @@ -118,8 +118,8 @@ class GuiExport TaskPanel : public QSint::ActionPanel public: explicit TaskPanel(QWidget *parent = nullptr); - virtual ~TaskPanel(); - virtual QSize minimumSizeHint() const; + ~TaskPanel() override; + QSize minimumSizeHint() const override; }; /// Father class of content of a Free widget (without header and Icon), shut be an exception! @@ -129,7 +129,7 @@ class GuiExport TaskWidget : public QWidget, public TaskContent public: TaskWidget(QWidget *parent=nullptr); - ~TaskWidget(); + ~TaskWidget() override; }; /** TaskView class @@ -143,11 +143,11 @@ class GuiExport TaskView : public QScrollArea, public Gui::SelectionSingleton::O public: TaskView(QWidget *parent = nullptr); - ~TaskView(); + ~TaskView() override; /// Observer message from the Selection - virtual void OnChange(Gui::SelectionSingleton::SubjectType &rCaller, - Gui::SelectionSingleton::MessageType Reason); + void OnChange(Gui::SelectionSingleton::SubjectType &rCaller, + Gui::SelectionSingleton::MessageType Reason) override; friend class Gui::DockWnd::ComboView; friend class Gui::ControlSingleton; @@ -165,8 +165,8 @@ protected Q_SLOTS: void clicked (QAbstractButton * button); protected: - virtual void keyPressEvent(QKeyEvent*); - virtual bool event(QEvent*); + void keyPressEvent(QKeyEvent*) override; + bool event(QEvent*) override; void addTaskWatcher(); void removeTaskWatcher(); diff --git a/src/Gui/TaskView/TaskWatcher.h b/src/Gui/TaskView/TaskWatcher.h index 10639df61d..fe40d3795c 100644 --- a/src/Gui/TaskView/TaskWatcher.h +++ b/src/Gui/TaskView/TaskWatcher.h @@ -42,7 +42,7 @@ class GuiExport TaskWatcher : public QObject, public Gui::SelectionFilter public: TaskWatcher(const char* Filter); - virtual ~TaskWatcher(); + ~TaskWatcher() override; std::vector &getWatcherContent(); @@ -68,7 +68,7 @@ public: public: /// is called wenn the document or the Selection changes. - virtual bool shouldShow(); + bool shouldShow() override; }; @@ -84,7 +84,7 @@ public: public: /// is called wenn the document or the Selection changes. - virtual bool shouldShow(); + bool shouldShow() override; }; @@ -97,11 +97,11 @@ class GuiExport TaskWatcherCommandsEmptySelection : public TaskWatcherCommands public: TaskWatcherCommandsEmptySelection(const char* commands[], const char* name, const char* pixmap); - ~TaskWatcherCommandsEmptySelection(); + ~TaskWatcherCommandsEmptySelection() override; public: /// is called wenn the document or the Selection changes. - virtual bool shouldShow(); + bool shouldShow() override; }; diff --git a/src/Gui/TextDocumentEditorView.h b/src/Gui/TextDocumentEditorView.h index 28ac3b90fc..0ba1d6f165 100644 --- a/src/Gui/TextDocumentEditorView.h +++ b/src/Gui/TextDocumentEditorView.h @@ -40,7 +40,7 @@ public: TextDocumentEditorView( App::TextDocument* textDocument, QPlainTextEdit* editor, QWidget* parent); - ~TextDocumentEditorView(); + ~TextDocumentEditorView() override; const char *getName() const override { return "TextDocumentEditorView"; } bool onMsg(const char* msg, const char**) override; bool onHasMsg(const char* msg) const override; diff --git a/src/Gui/TextEdit.h b/src/Gui/TextEdit.h index 26a1025ec2..055705409e 100644 --- a/src/Gui/TextEdit.h +++ b/src/Gui/TextEdit.h @@ -58,7 +58,7 @@ class GuiExport TextEdit : public QPlainTextEdit public: TextEdit(QWidget *parent = nullptr); - virtual ~TextEdit(); + ~TextEdit() override; private Q_SLOTS: void complete(); @@ -69,7 +69,7 @@ Q_SIGNALS: void findPrevious(); protected: - void keyPressEvent(QKeyEvent *); + void keyPressEvent(QKeyEvent *) override; private: void createListBox(); @@ -87,10 +87,10 @@ class GuiExport TextEditor : public TextEdit, public WindowParameter public: TextEditor(QWidget *parent = nullptr); - ~TextEditor(); + ~TextEditor() override; void setSyntaxHighlighter(SyntaxHighlighter*); - void OnChange(Base::Subject &rCaller,const char* rcReason); + void OnChange(Base::Subject &rCaller,const char* rcReason) override; void lineNumberAreaPaintEvent(QPaintEvent* ); int lineNumberAreaWidth(); @@ -101,10 +101,10 @@ private Q_SLOTS: void highlightCurrentLine(); protected: - void keyPressEvent (QKeyEvent * e); + void keyPressEvent (QKeyEvent * e) override; /** Draw a beam in the line where the cursor is. */ - void paintEvent (QPaintEvent * e); - void resizeEvent(QResizeEvent* e); + void paintEvent (QPaintEvent * e) override; + void resizeEvent(QResizeEvent* e) override; QWidget* getMarker() const { return lineNumberArea; } virtual void drawMarker(int line, int x, int y, QPainter*); @@ -123,12 +123,12 @@ class LineMarker : public QWidget public: LineMarker(TextEditor* editor); - virtual ~LineMarker(); + ~LineMarker() override; - QSize sizeHint() const; + QSize sizeHint() const override; protected: - void paintEvent (QPaintEvent *); + void paintEvent (QPaintEvent *) override; private: TextEditor *textEditor; @@ -147,12 +147,12 @@ public: /// Construction CompletionList(QPlainTextEdit* parent); /// Destruction - ~CompletionList(); + ~CompletionList() override; void findCurrentWord(const QString&); protected: - bool eventFilter(QObject *, QEvent *); + bool eventFilter(QObject *, QEvent *) override; private Q_SLOTS: void completionItem(QListWidgetItem *item); diff --git a/src/Gui/TextureMapping.h b/src/Gui/TextureMapping.h index 482dd44625..b258b007d1 100644 --- a/src/Gui/TextureMapping.h +++ b/src/Gui/TextureMapping.h @@ -66,13 +66,13 @@ class TaskTextureMapping : public Gui::TaskView::TaskDialog public: TaskTextureMapping(); - ~TaskTextureMapping(); + ~TaskTextureMapping() override; public: - bool accept(); - bool reject(); + bool accept() override; + bool reject() override; - virtual QDialogButtonBox::StandardButtons getStandardButtons() const + QDialogButtonBox::StandardButtons getStandardButtons() const override { return QDialogButtonBox::Close; } private: diff --git a/src/Gui/Thumbnail.h b/src/Gui/Thumbnail.h index 665543acbb..2563ef30df 100644 --- a/src/Gui/Thumbnail.h +++ b/src/Gui/Thumbnail.h @@ -36,7 +36,7 @@ class Thumbnail : public Base::Persistence { public: Thumbnail(int s = 128); - ~Thumbnail(); + ~Thumbnail() override; void setViewer(View3DInventorViewer*); void setSize(int); @@ -44,15 +44,15 @@ public: /** @name I/O of the document */ //@{ - unsigned int getMemSize () const; + unsigned int getMemSize () const override; /// This method is used to save properties or very small amounts of data to an XML document. - void Save (Base::Writer &writer) const; + void Save (Base::Writer &writer) const override; /// This method is used to restore properties from an XML document. - void Restore(Base::XMLReader &reader); + void Restore(Base::XMLReader &reader) override; /// This method is used to save large amounts of data to a binary file. - void SaveDocFile (Base::Writer &writer) const; + void SaveDocFile (Base::Writer &writer) const override; /// This method is used to restore large amounts of data from a binary file. - void RestoreDocFile(Base::Reader &reader); + void RestoreDocFile(Base::Reader &reader) override; //@} private: diff --git a/src/Gui/TransactionObject.h b/src/Gui/TransactionObject.h index 155ec36dc3..f79b6c40f0 100644 --- a/src/Gui/TransactionObject.h +++ b/src/Gui/TransactionObject.h @@ -34,10 +34,10 @@ class TransactionViewProvider : public App::TransactionObject public: TransactionViewProvider(); - virtual ~TransactionViewProvider(); + ~TransactionViewProvider() override; - void applyNew(App::Document& Doc, App::TransactionalObject* pcObj); - void applyDel(App::Document& Doc, App::TransactionalObject* pcObj); + void applyNew(App::Document& Doc, App::TransactionalObject* pcObj) override; + void applyDel(App::Document& Doc, App::TransactionalObject* pcObj) override; }; } //namespace Gui diff --git a/src/Gui/Transform.h b/src/Gui/Transform.h index 7c1a49f977..88ed66e417 100644 --- a/src/Gui/Transform.h +++ b/src/Gui/Transform.h @@ -56,11 +56,11 @@ class GuiExport DefaultTransformStrategy : public TransformStrategy, { public: DefaultTransformStrategy(QWidget* widget); - virtual ~DefaultTransformStrategy(); - std::set transformObjects() const; + ~DefaultTransformStrategy() override; + std::set transformObjects() const override; private: - void onSelectionChanged(const Gui::SelectionChanges& msg); + void onSelectionChanged(const Gui::SelectionChanges& msg) override; private: std::set selection; @@ -74,15 +74,15 @@ class GuiExport Transform : public Gui::LocationDialog public: Transform(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~Transform(); - void accept(); - void reject(); + ~Transform() override; + void accept() override; + void reject() override; void showStandardButtons(bool); void setTransformStrategy(TransformStrategy* ts); protected: - Base::Vector3d getDirection() const; - void changeEvent(QEvent *e); + Base::Vector3d getDirection() const override; + void changeEvent(QEvent *e) override; public Q_SLOTS: void on_applyButton_clicked(); @@ -92,7 +92,7 @@ private Q_SLOTS: private: Base::Placement getPlacementData() const; - void directionActivated(int); + void directionActivated(int) override; Q_SIGNALS: void directionChanged(); @@ -111,15 +111,15 @@ class GuiExport TaskTransform : public Gui::TaskView::TaskDialog public: TaskTransform(); - ~TaskTransform(); + ~TaskTransform() override; public: - bool accept(); - bool reject(); - void clicked(int); + bool accept() override; + bool reject() override; + void clicked(int) override; void setTransformStrategy(TransformStrategy* ts); - virtual QDialogButtonBox::StandardButtons getStandardButtons() const + QDialogButtonBox::StandardButtons getStandardButtons() const override { return QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Cancel; } diff --git a/src/Gui/Tree.h b/src/Gui/Tree.h index e6ce57cb9d..1a71a5f1ac 100644 --- a/src/Gui/Tree.h +++ b/src/Gui/Tree.h @@ -57,7 +57,7 @@ class TreeWidget : public QTreeWidget, public SelectionObserver public: TreeWidget(const char *name, QWidget* parent=nullptr); - ~TreeWidget(); + ~TreeWidget() override; static void scrollItemToTop(); void selectAllInstances(const ViewProviderDocumentObject &vpd); @@ -88,7 +88,7 @@ public: void markItem(const App::DocumentObject* Obj,bool mark); void syncView(ViewProviderDocumentObject *vp); - virtual void selectAll() override; + void selectAll() override; const char *getTreeName() const; @@ -259,7 +259,7 @@ class DocumentItem : public QTreeWidgetItem, public Base::Persistence { public: DocumentItem(const Gui::Document* doc, QTreeWidgetItem * parent); - ~DocumentItem(); + ~DocumentItem() override; Gui::Document* document() const; void clearSelection(DocumentObjectItem *exclude=nullptr); @@ -292,9 +292,9 @@ public: bool isObjectShowable(App::DocumentObject *obj); - virtual unsigned int getMemSize () const override; - virtual void Save (Base::Writer &) const override; - virtual void Restore(Base::XMLReader &) override; + unsigned int getMemSize () const override; + void Save (Base::Writer &) const override; + void Restore(Base::XMLReader &) override; class ExpandInfo; typedef std::shared_ptr ExpandInfoPtr; @@ -372,14 +372,14 @@ class DocumentObjectItem : public QTreeWidgetItem { public: DocumentObjectItem(DocumentItem *ownerDocItem, DocumentObjectDataPtr data); - ~DocumentObjectItem(); + ~DocumentObjectItem() override; Gui::ViewProviderDocumentObject* object() const; void testStatus(bool resetStatus, QIcon &icon1, QIcon &icon2); void testStatus(bool resetStatus); void displayStatusInfo(); void setExpandedStatus(bool); - void setData(int column, int role, const QVariant & value); + void setData(int column, int role, const QVariant & value) override; bool isChildOfItem(DocumentObjectItem*); void restoreBackground(); @@ -447,9 +447,9 @@ class TreePanel : public QWidget public: TreePanel(const char *name, QWidget* parent=nullptr); - virtual ~TreePanel(); + ~TreePanel() override; - bool eventFilter(QObject *obj, QEvent *ev); + bool eventFilter(QObject *obj, QEvent *ev) override; private Q_SLOTS: void accept(); @@ -472,7 +472,7 @@ class TreeDockWidget : public Gui::DockWindow public: TreeDockWidget(Gui::Document* pcDocument,QWidget *parent=nullptr); - ~TreeDockWidget(); + ~TreeDockWidget() override; }; @@ -483,8 +483,8 @@ class TreeWidgetEditDelegate: public QStyledItemDelegate { Q_OBJECT public: TreeWidgetEditDelegate(QObject* parent=nullptr); - virtual QWidget* createEditor(QWidget *parent, - const QStyleOptionViewItem &, const QModelIndex &index) const; + QWidget* createEditor(QWidget *parent, + const QStyleOptionViewItem &, const QModelIndex &index) const override; }; @@ -508,7 +508,7 @@ public: class GuiExport TreeParams : public ParameterGrp::ObserverType { public: TreeParams(); - void OnChange(Base::Subject &, const char* sReason); + void OnChange(Base::Subject &, const char* sReason) override; static TreeParams *Instance(); bool getTreeViewStretchDescription() const; diff --git a/src/Gui/UiLoader.h b/src/Gui/UiLoader.h index 3d33db681d..03f386eaff 100644 --- a/src/Gui/UiLoader.h +++ b/src/Gui/UiLoader.h @@ -90,7 +90,7 @@ class PySideUicModule : public Py::ExtensionModule public: PySideUicModule(); - virtual ~PySideUicModule() {} + ~PySideUicModule() override {} private: Py::Object loadUiType(const Py::Tuple& args); @@ -108,14 +108,14 @@ class UiLoader : public QUiLoader { public: UiLoader(QObject* parent=nullptr); - virtual ~UiLoader(); + ~UiLoader() override; /** * Creates a widget of the type \a className with the parent \a parent. * For more details see the documentation to QWidgetFactory. */ QWidget* createWidget(const QString & className, QWidget * parent=nullptr, - const QString& name = QString()); + const QString& name = QString()) override; private: QStringList cw; @@ -129,9 +129,9 @@ public: static void init_type(); // announce properties and methods UiLoaderPy(); - ~UiLoaderPy(); + ~UiLoaderPy() override; - Py::Object repr(); + Py::Object repr() override; Py::Object createWidget(const Py::Tuple&); Py::Object load(const Py::Tuple&); diff --git a/src/Gui/Utilities.h b/src/Gui/Utilities.h index 2ba37b6a39..7e322c1610 100644 --- a/src/Gui/Utilities.h +++ b/src/Gui/Utilities.h @@ -115,14 +115,14 @@ class GuiExport ViewVolumeProjection : public Base::ViewProjMethod { public: ViewVolumeProjection (const SbViewVolume &vv); - virtual ~ViewVolumeProjection(){} + ~ViewVolumeProjection() override{} - Base::Vector3f operator()(const Base::Vector3f &rclPt) const; - Base::Vector3d operator()(const Base::Vector3d &rclPt) const; - Base::Vector3f inverse (const Base::Vector3f &rclPt) const; - Base::Vector3d inverse (const Base::Vector3d &rclPt) const; + Base::Vector3f operator()(const Base::Vector3f &rclPt) const override; + Base::Vector3d operator()(const Base::Vector3d &rclPt) const override; + Base::Vector3f inverse (const Base::Vector3f &rclPt) const override; + Base::Vector3d inverse (const Base::Vector3d &rclPt) const override; - Base::Matrix4D getProjectionMatrix () const; + Base::Matrix4D getProjectionMatrix () const override; protected: SbViewVolume viewVolume; diff --git a/src/Gui/VectorListEditor.h b/src/Gui/VectorListEditor.h index 82705e1878..16bbacfd81 100644 --- a/src/Gui/VectorListEditor.h +++ b/src/Gui/VectorListEditor.h @@ -41,17 +41,17 @@ class VectorTableModel : public QAbstractTableModel public: VectorTableModel(int decimals, QObject *parent = nullptr); - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - virtual int columnCount(const QModelIndex &parent = QModelIndex()) const; - virtual int rowCount(const QModelIndex &parent = QModelIndex()) const; - Qt::ItemFlags flags (const QModelIndex & index) const; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); - virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - virtual QModelIndex parent(const QModelIndex &index) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + Qt::ItemFlags flags (const QModelIndex & index) const override; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + QModelIndex parent(const QModelIndex &index) const override; void setValues(const QList& d); const QList& values() const; - virtual bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); - virtual bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); + bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; + bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; private: QList vectors; @@ -66,14 +66,14 @@ public: VectorTableDelegate(int decimals, QObject *parent = nullptr); QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, - const QModelIndex &index) const; + const QModelIndex &index) const override; - void setEditorData(QWidget *editor, const QModelIndex &index) const; + void setEditorData(QWidget *editor, const QModelIndex &index) const override; void setModelData(QWidget *editor, QAbstractItemModel *model, - const QModelIndex &index) const; + const QModelIndex &index) const override; void updateEditorGeometry(QWidget *editor, - const QStyleOptionViewItem &option, const QModelIndex &index) const; + const QStyleOptionViewItem &option, const QModelIndex &index) const override; private: int decimals; @@ -86,13 +86,13 @@ class VectorListEditor : public QDialog public: VectorListEditor(int decimals, QWidget* parent = nullptr); - ~VectorListEditor(); + ~VectorListEditor() override; void setValues(const QList&); const QList& getValues() const; - void accept(); - void reject(); + void accept() override; + void reject() override; private Q_SLOTS: void addRow(); diff --git a/src/Gui/View.h b/src/Gui/View.h index e2ef1b072a..737251ad49 100644 --- a/src/Gui/View.h +++ b/src/Gui/View.h @@ -61,7 +61,7 @@ public: /** View destructor * Detach the view from the document, if attached! */ - virtual ~BaseView(); + ~BaseView() override; /** @name methods used by the Application and the GuiDocument diff --git a/src/Gui/View3DInventor.h b/src/Gui/View3DInventor.h index 2bc59ffd99..a4e830df5a 100644 --- a/src/Gui/View3DInventor.h +++ b/src/Gui/View3DInventor.h @@ -47,11 +47,11 @@ class GuiExport GLOverlayWidget : public QWidget public: GLOverlayWidget(QWidget* parent=nullptr) : QWidget(parent) {} - ~GLOverlayWidget() + ~GLOverlayWidget() override {} virtual void setImage(const QImage& img) { image = img; } - void paintEvent(QPaintEvent*); + void paintEvent(QPaintEvent*) override; protected: QImage image; @@ -69,27 +69,27 @@ class GuiExport View3DInventor : public MDIView, public ParameterGrp::ObserverTy public: View3DInventor(Gui::Document* pcDocument, QWidget* parent, const QtGLWidget* sharewidget = nullptr, Qt::WindowFlags wflags=Qt::WindowFlags()); - ~View3DInventor(); + ~View3DInventor() override; /// Message handler - virtual bool onMsg(const char* pMsg, const char** ppReturn); - virtual bool onHasMsg(const char* pMsg) const; - virtual void deleteSelf(); + bool onMsg(const char* pMsg, const char** ppReturn) override; + bool onHasMsg(const char* pMsg) const override; + void deleteSelf() override; /// Observer message from the ParameterGrp - virtual void OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::MessageType Reason); + void OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::MessageType Reason) override; /// get called when the document is updated - virtual void onRename(Gui::Document *pDoc); - virtual void onUpdate(); - virtual void viewAll(); - virtual const char *getName() const; + void onRename(Gui::Document *pDoc) override; + void onUpdate() override; + void viewAll() override; + const char *getName() const override; /// print function of the view - virtual void print(); - virtual void printPdf(); - virtual void printPreview(); - virtual void print(QPrinter*); + void print() override; + void printPdf() override; + void printPreview() override; + void print(QPrinter*) override; - virtual PyObject *getPyObject(); + PyObject *getPyObject() override; /** * If \a b is set to \a FullScreen the MDI view is displayed in full screen mode, if \a b * is set to \a TopLevel then it is displayed as an own top-level window, otherwise (\a Normal) @@ -97,7 +97,7 @@ public: * This method is reimplemented from MDIView to set the this widget as the proxy of the embedded * GL widget to get all key events in \a TopLevel or \a Fullscreen mode. */ - void setCurrentViewMode(ViewMode b); + void setCurrentViewMode(ViewMode b) override; bool setCamera(const char* pCamera); void toggleClippingPlane(); bool hasClippingPlane() const; @@ -106,12 +106,12 @@ public: void removeOverlayWidget(); View3DInventorViewer *getViewer() const {return _viewer;} - virtual bool containsViewProvider(const ViewProvider*) const; + bool containsViewProvider(const ViewProvider*) const override; public Q_SLOTS: /// override the cursor in this view - void setOverrideCursor(const QCursor&); - void restoreOverrideCursor(); + void setOverrideCursor(const QCursor&) override; + void restoreOverrideCursor() override; void dump(const char* filename, bool onlyVisible=false); @@ -119,17 +119,17 @@ protected Q_SLOTS: void stopAnimating(); public: - bool eventFilter(QObject*, QEvent* ); + bool eventFilter(QObject*, QEvent* ) override; protected: - void windowStateChanged(MDIView* ); - void dropEvent (QDropEvent * e); - void dragEnterEvent (QDragEnterEvent * e); - void keyPressEvent (QKeyEvent * e); - void keyReleaseEvent (QKeyEvent * e); - void focusInEvent (QFocusEvent * e); - void customEvent (QEvent * e); - void contextMenuEvent (QContextMenuEvent*e); + void windowStateChanged(MDIView* ) override; + void dropEvent (QDropEvent * e) override; + void dragEnterEvent (QDragEnterEvent * e) override; + void keyPressEvent (QKeyEvent * e) override; + void keyReleaseEvent (QKeyEvent * e) override; + void focusInEvent (QFocusEvent * e) override; + void customEvent (QEvent * e) override; + void contextMenuEvent (QContextMenuEvent*e) override; /// handle to the viewer parameter group ParameterGrp::handle hGrp; diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 15c46f7282..18bdeb2f25 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -200,9 +200,9 @@ class Gui::ViewerEventFilter : public QObject { public: ViewerEventFilter() {} - ~ViewerEventFilter() {} + ~ViewerEventFilter() override {} - bool eventFilter(QObject* obj, QEvent* event) { + bool eventFilter(QObject* obj, QEvent* event) override { // Bug #0000607: Some mice also support horizontal scrolling which however might // lead to some unwanted zooming when pressing the MMB for panning. // Thus, we filter out horizontal scrolling. @@ -243,8 +243,8 @@ public: class SpaceNavigatorDevice : public Quarter::InputDevice { public: SpaceNavigatorDevice() {} - virtual ~SpaceNavigatorDevice() {} - virtual const SoEvent* translateEvent(QEvent* event) { + ~SpaceNavigatorDevice() override {} + const SoEvent* translateEvent(QEvent* event) override { if (event->type() == Spaceball::MotionEvent::MotionEventType) { Spaceball::MotionEvent* motionEvent = static_cast(event); @@ -2793,11 +2793,11 @@ namespace Gui { startPos = camera->position.getValue(); startRot = camera->orientation.getValue(); } - virtual ~CameraAnimation() + ~CameraAnimation() override { } protected: - void updateCurrentValue(const QVariant & value) + void updateCurrentValue(const QVariant & value) override { int steps = endValue().toInt(); int curr = value.toInt(); diff --git a/src/Gui/View3DInventorViewer.h b/src/Gui/View3DInventorViewer.h index d825c7ca4e..f9f9c33251 100644 --- a/src/Gui/View3DInventorViewer.h +++ b/src/Gui/View3DInventorViewer.h @@ -133,19 +133,19 @@ public: View3DInventorViewer (QWidget *parent, const QtGLWidget* sharewidget = nullptr); View3DInventorViewer (const QtGLFormat& format, QWidget *parent, const QtGLWidget* sharewidget = nullptr); - virtual ~View3DInventorViewer(); + ~View3DInventorViewer() override; void init(); /// Observer message from the Selection - virtual void onSelectionChanged(const SelectionChanges &Reason); + void onSelectionChanged(const SelectionChanges &Reason) override; void checkGroupOnTop(const SelectionChanges &Reason); void clearGroupOnTop(); SoDirectionalLight* getBacklight() const; void setBacklight(SbBool on); SbBool isBacklight() const; - void setSceneGraph (SoNode *root); + void setSceneGraph (SoNode *root) override; SbBool searchNode(SoNode*) const; void setAnimationEnabled(const SbBool enable); @@ -173,7 +173,7 @@ public: void imageFromFramebuffer(int width, int height, int samples, const QColor& bgcolor, QImage& img); - virtual void setViewing(SbBool enable); + void setViewing(SbBool enable) override; virtual void setCursorEnabled(SbBool enable); void addGraphicsItem(GLGraphicsItem*); @@ -343,7 +343,7 @@ public: * set. */ void setCameraOrientation(const SbRotation& rot, SbBool moveTocenter=false); - void setCameraType(SoType t); + void setCameraType(SoType t) override; void moveCameraTo(const SbRotation& rot, const SbVec3f& pos, int steps, int ms); /** * Zooms the viewport to the size of the bounding box. @@ -352,7 +352,7 @@ public: /** * Reposition the current camera so we can see the complete scene. */ - void viewAll(); + void viewAll() override; void viewAll(float factor); /// Breaks out a VR window for a Rift @@ -404,14 +404,14 @@ protected: void renderFramebuffer(); void renderGLImage(); void animatedViewAll(int steps, int ms); - virtual void actualRedraw(); - virtual void setSeekMode(SbBool enable); - virtual void afterRealizeHook(); - virtual bool processSoEvent(const SoEvent * ev); - void dropEvent (QDropEvent * e); - void dragEnterEvent (QDragEnterEvent * e); - void dragMoveEvent(QDragMoveEvent *e); - void dragLeaveEvent(QDragLeaveEvent *e); + void actualRedraw() override; + void setSeekMode(SbBool enable) override; + void afterRealizeHook() override; + bool processSoEvent(const SoEvent * ev) override; + void dropEvent (QDropEvent * e) override; + void dragEnterEvent (QDragEnterEvent * e) override; + void dragMoveEvent(QDragMoveEvent *e) override; + void dragLeaveEvent(QDragLeaveEvent *e) override; SbBool processSoEventBase(const SoEvent * const ev); void printDimension(); void selectAll(); @@ -433,7 +433,7 @@ private: void drawAxisCross(); static void drawArrow(); void setCursorRepresentation(int mode); - void aboutToDestroyGLContext(); + void aboutToDestroyGLContext() override; void createStandardCursors(double); private: diff --git a/src/Gui/View3DPy.h b/src/Gui/View3DPy.h index 3ce99980e0..7d1bd2b091 100644 --- a/src/Gui/View3DPy.h +++ b/src/Gui/View3DPy.h @@ -60,12 +60,12 @@ public: static void init_type(); // announce properties and methods View3DInventorPy(View3DInventor *vi); - ~View3DInventorPy(); + ~View3DInventorPy() override; View3DInventor* getView3DIventorPtr(); - Py::Object repr(); - Py::Object getattr(const char *); - int setattr(const char *, const Py::Object &); + Py::Object repr() override; + Py::Object getattr(const char *) override; + int setattr(const char *, const Py::Object &) override; Py::Object cast_to_base(const Py::Tuple&); Py::Object fitAll(const Py::Tuple&); diff --git a/src/Gui/View3DViewerPy.h b/src/Gui/View3DViewerPy.h index af9cf4de0a..2b63855218 100644 --- a/src/Gui/View3DViewerPy.h +++ b/src/Gui/View3DViewerPy.h @@ -45,11 +45,11 @@ public: static void init_type(); // announce properties and methods View3DInventorViewerPy(View3DInventorViewer *vi); - ~View3DInventorViewerPy(); + ~View3DInventorViewerPy() override; - Py::Object repr(); - Py::Object getattr(const char *); - int setattr(const char *, const Py::Object &); + Py::Object repr() override; + Py::Object getattr(const char *) override; + int setattr(const char *, const Py::Object &) override; //exposed methods Py::Object getSoEventManager(const Py::Tuple&); diff --git a/src/Gui/ViewParams.h b/src/Gui/ViewParams.h index b679f129fa..654af67bb9 100644 --- a/src/Gui/ViewParams.h +++ b/src/Gui/ViewParams.h @@ -35,8 +35,8 @@ namespace Gui { class GuiExport ViewParams: public ParameterGrp::ObserverType { public: ViewParams(); - virtual ~ViewParams(); - void OnChange(Base::Subject &, const char* sReason); + ~ViewParams() override; + void OnChange(Base::Subject &, const char* sReason) override; static ViewParams *instance(); ParameterGrp::handle getHandle() { diff --git a/src/Gui/ViewProvider.h b/src/Gui/ViewProvider.h index b82acdf2da..8f9c488710 100644 --- a/src/Gui/ViewProvider.h +++ b/src/Gui/ViewProvider.h @@ -125,7 +125,7 @@ public: ViewProvider(); /// destructor. - virtual ~ViewProvider(); + ~ViewProvider() override; // returns the root node of the Provider (3D) virtual SoSeparator* getRoot() const {return pcRoot;} @@ -374,7 +374,7 @@ public: void setStatus(ViewStatus pos, bool on) {StatusBits.set((size_t)pos, on);} std::string toString() const; - PyObject* getPyObject(); + PyObject* getPyObject() override; /** @name Display mode methods */ @@ -497,7 +497,7 @@ public: //restoring the object from document: //this may be of interest to extensions, hence call them - virtual void Restore(Base::XMLReader& reader); + void Restore(Base::XMLReader& reader) override; bool isRestoring() {return testStatus(Gui::isRestoring);} @@ -539,9 +539,9 @@ protected: SoPickedPoint* getPointOnRay(const SbVec3f& pos, const SbVec3f& dir, const View3DInventorViewer* viewer) const; /// Reimplemented from subclass - void onBeforeChange(const App::Property* prop); + void onBeforeChange(const App::Property* prop) override; /// Reimplemented from subclass - void onChanged(const App::Property* prop); + void onChanged(const App::Property* prop) override; /** @name Methods used by the Tree * If you want to take control over the diff --git a/src/Gui/ViewProviderAnnotation.h b/src/Gui/ViewProviderAnnotation.h index 39d5659619..7fa8aa265d 100644 --- a/src/Gui/ViewProviderAnnotation.h +++ b/src/Gui/ViewProviderAnnotation.h @@ -47,7 +47,7 @@ class GuiExport ViewProviderAnnotation : public ViewProviderDocumentObject public: /// Constructor ViewProviderAnnotation(); - virtual ~ViewProviderAnnotation(); + ~ViewProviderAnnotation() override; // Display properties App::PropertyColor TextColor; @@ -58,13 +58,13 @@ public: App::PropertyAngle Rotation; App::PropertyEnumeration RotationAxis; - void attach(App::DocumentObject *); - void updateData(const App::Property*); - std::vector getDisplayModes() const; - void setDisplayMode(const char* ModeName); + void attach(App::DocumentObject *) override; + void updateData(const App::Property*) override; + std::vector getDisplayModes() const override; + void setDisplayMode(const char* ModeName) override; protected: - void onChanged(const App::Property* prop); + void onChanged(const App::Property* prop) override; private: SoFont * pFont; @@ -91,7 +91,7 @@ class GuiExport ViewProviderAnnotationLabel : public ViewProviderDocumentObject public: /// Constructor ViewProviderAnnotationLabel(); - virtual ~ViewProviderAnnotationLabel(); + ~ViewProviderAnnotationLabel() override; // Display properties App::PropertyColor TextColor; @@ -101,22 +101,22 @@ public: App::PropertyFont FontName; App::PropertyBool Frame; - void attach(App::DocumentObject *); - void updateData(const App::Property*); - std::vector getDisplayModes() const; - void setDisplayMode(const char* ModeName); + void attach(App::DocumentObject *) override; + void updateData(const App::Property*) override; + std::vector getDisplayModes() const override; + void setDisplayMode(const char* ModeName) override; /** @name Edit methods */ //@{ - bool doubleClicked(); - void setupContextMenu(QMenu*, QObject*, const char*); + bool doubleClicked() override; + void setupContextMenu(QMenu*, QObject*, const char*) override; protected: - bool setEdit(int ModNum); - void unsetEdit(int ModNum); + bool setEdit(int ModNum) override; + void unsetEdit(int ModNum) override; //@} protected: - void onChanged(const App::Property* prop); + void onChanged(const App::Property* prop) override; void drawImage(const std::vector&); private: diff --git a/src/Gui/ViewProviderBuilder.h b/src/Gui/ViewProviderBuilder.h index 4c732974f3..9a10276b47 100644 --- a/src/Gui/ViewProviderBuilder.h +++ b/src/Gui/ViewProviderBuilder.h @@ -60,8 +60,8 @@ class GuiExport ViewProviderColorBuilder : public ViewProviderBuilder public: /// Constructor ViewProviderColorBuilder(); - virtual ~ViewProviderColorBuilder(); - virtual void buildNodes(const App::Property*, std::vector&) const; + ~ViewProviderColorBuilder() override; + void buildNodes(const App::Property*, std::vector&) const override; }; } //namespace Gui diff --git a/src/Gui/ViewProviderDocumentObject.h b/src/Gui/ViewProviderDocumentObject.h index 77626aa68b..f01c808069 100644 --- a/src/Gui/ViewProviderDocumentObject.h +++ b/src/Gui/ViewProviderDocumentObject.h @@ -55,7 +55,7 @@ public: ViewProviderDocumentObject(); /// destructor. - virtual ~ViewProviderDocumentObject(); + ~ViewProviderDocumentObject() override; // Display properties App::PropertyEnumeration DisplayMode; @@ -66,43 +66,43 @@ public: virtual void attach(App::DocumentObject *pcObject); virtual void reattach(App::DocumentObject *); - virtual void update(const App::Property*) override; + void update(const App::Property*) override; /// Set the active mode, i.e. the first item of the 'Display' property. void setActiveMode(); /// Hide the object in the view - virtual void hide() override; + void hide() override; /// Show the object in the view - virtual void show() override; + void show() override; /// Is called by the tree if the user double clicks on the object. It returns the string /// for the transaction that will be shown in the undo/redo dialog. /// If null is returned then no transaction will be opened. - virtual const char* getTransactionText() const override; + const char* getTransactionText() const override; - virtual bool canDropObjectEx(App::DocumentObject *, App::DocumentObject *, + bool canDropObjectEx(App::DocumentObject *, App::DocumentObject *, const char *, const std::vector &) const override; - virtual int replaceObject(App::DocumentObject*, App::DocumentObject*) override; + int replaceObject(App::DocumentObject*, App::DocumentObject*) override; - virtual bool showInTree() const override; + bool showInTree() const override; /// Get a list of TaskBoxes associated with this object - virtual void getTaskViewContent(std::vector&) const override; + void getTaskViewContent(std::vector&) const override; /// Run a redraw void updateView(); /// Get the object of this ViewProvider object App::DocumentObject *getObject() const {return pcObject;} /// Asks the view provider if the given object can be deleted. - virtual bool canDelete(App::DocumentObject* obj) const override; + bool canDelete(App::DocumentObject* obj) const override; /// Get the GUI document to this ViewProvider object Gui::Document* getDocument() const; /// Get the python wrapper for that ViewProvider PyObject* getPyObject() override; /// return a hit element given the picked point which contains the full node path - virtual bool getElementPicked(const SoPickedPoint *, std::string &subname) const override; + bool getElementPicked(const SoPickedPoint *, std::string &subname) const override; /// return the coin node detail and path to the node of the subname - virtual bool getDetailPath(const char *subname, SoFullPath *pPath, bool append, SoDetail *&det) const override; + bool getDetailPath(const char *subname, SoFullPath *pPath, bool append, SoDetail *&det) const override; /* Force update visual * @@ -121,9 +121,9 @@ public: virtual void finishRestoring(); //@} - virtual bool removeDynamicProperty(const char* prop) override; + bool removeDynamicProperty(const char* prop) override; - virtual App::Property* addDynamicProperty( + App::Property* addDynamicProperty( const char* type, const char* name=nullptr, const char* group=nullptr, const char* doc=nullptr, short attr=0, bool ro=false, bool hidden=false) override; @@ -142,7 +142,7 @@ public: virtual ViewProviderDocumentObject *getLinkedViewProvider( std::string *subname=nullptr, bool recursive=false) const; - virtual std::string getFullName() const override; + std::string getFullName() const override; /** Allow this class to be used as an override for the original view provider of the given object * @@ -181,9 +181,9 @@ protected: */ Gui::MDIView* getViewOfNode(SoNode* node) const; /// get called before the value is changed - virtual void onBeforeChange(const App::Property* prop) override; + void onBeforeChange(const App::Property* prop) override; /// Gets called by the container whenever a property has been changed - virtual void onChanged(const App::Property* prop) override; + void onChanged(const App::Property* prop) override; /** Searches in all view providers that are attached to an object that * is part of the same document as the object this view provider is * attached to for an front root of \a type. @@ -196,15 +196,15 @@ protected: /** @name Transaction handling */ //@{ - virtual bool isAttachedToDocument() const override; - virtual const char* detachFromDocument() override; + bool isAttachedToDocument() const override; + const char* detachFromDocument() override; /// get called when a property status has changed - virtual void onPropertyStatusChanged(const App::Property &prop, unsigned long oldStatus) override; + void onPropertyStatusChanged(const App::Property &prop, unsigned long oldStatus) override; //@} - virtual void setModeSwitch() override; + void setModeSwitch() override; /** Adds a menu item and bind it with \ref startDefaultEditMode(). */ void addDefaultAction(QMenu*, const QString&); diff --git a/src/Gui/ViewProviderDocumentObjectGroup.h b/src/Gui/ViewProviderDocumentObjectGroup.h index ae3f6ef3a6..b61dad9232 100644 --- a/src/Gui/ViewProviderDocumentObjectGroup.h +++ b/src/Gui/ViewProviderDocumentObjectGroup.h @@ -39,14 +39,14 @@ public: /// constructor. ViewProviderDocumentObjectGroup(); /// destructor. - virtual ~ViewProviderDocumentObjectGroup(); + ~ViewProviderDocumentObjectGroup() override; /// returns a list of all possible modes std::vector getDisplayModes() const override; bool isShow() const override; /// deliver the icon shown in the tree view - virtual QIcon getIcon() const override; + QIcon getIcon() const override; protected: void getViewProviders(std::vector&) const; diff --git a/src/Gui/ViewProviderDragger.h b/src/Gui/ViewProviderDragger.h index 17e2b545ea..e0c7f221de 100644 --- a/src/Gui/ViewProviderDragger.h +++ b/src/Gui/ViewProviderDragger.h @@ -50,7 +50,7 @@ public: ViewProviderDragger(); /// destructor. - virtual ~ViewProviderDragger(); + ~ViewProviderDragger() override; /** @name Edit methods */ //@{ @@ -58,7 +58,7 @@ public: void setupContextMenu(QMenu*, QObject*, const char*) override; void updateData(const App::Property*) override; - virtual ViewProvider *startEditing(int ModNum=0) override; + ViewProvider *startEditing(int ModNum=0) override; /*! synchronize From FC placement to Coin placement*/ static void updateTransform(const Base::Placement &from, SoTransform *to); diff --git a/src/Gui/ViewProviderExtension.h b/src/Gui/ViewProviderExtension.h index 9f2d38989a..559ec7a993 100644 --- a/src/Gui/ViewProviderExtension.h +++ b/src/Gui/ViewProviderExtension.h @@ -56,7 +56,7 @@ class GuiExport ViewProviderExtension : public App::Extension public: ViewProviderExtension (); - virtual ~ViewProviderExtension (); + ~ViewProviderExtension () override; Gui::ViewProviderDocumentObject* getExtendedViewProvider(); const Gui::ViewProviderDocumentObject* getExtendedViewProvider() const; @@ -105,7 +105,7 @@ public: // update data of extended object virtual void extensionUpdateData(const App::Property*); - virtual PyObject* getExtensionPyObject(); + PyObject* getExtensionPyObject() override; void setIgnoreOverlayIcon(bool on) { m_ignoreOverlayIcon = on; diff --git a/src/Gui/ViewProviderExtern.h b/src/Gui/ViewProviderExtern.h index 2fc3889e1e..8a89e57170 100644 --- a/src/Gui/ViewProviderExtern.h +++ b/src/Gui/ViewProviderExtern.h @@ -42,16 +42,16 @@ public: ViewProviderExtern(); /// destructor. - virtual ~ViewProviderExtern(); + ~ViewProviderExtern() override; void setModeByString(const char* name, const char* ivFragment); void setModeByFile(const char* name, const char* ivFileName); void setModeBySoInput(const char* name, SoInput &ivFileInput); void adjustDocumentName(const char* docname); - virtual const char* getDefaultDisplayMode() const; - virtual std::vector getDisplayModes() const; - virtual void updateData(const App::Property*){} + const char* getDefaultDisplayMode() const override; + std::vector getDisplayModes() const override; + void updateData(const App::Property*) override{} private: void adjustRecursiveDocumentName(SoNode*, const char* docname); diff --git a/src/Gui/ViewProviderFeature.h b/src/Gui/ViewProviderFeature.h index c6494ee2ce..5d01f95c56 100644 --- a/src/Gui/ViewProviderFeature.h +++ b/src/Gui/ViewProviderFeature.h @@ -41,14 +41,14 @@ public: ViewProviderFeature(); /// destructor. - virtual ~ViewProviderFeature(); + ~ViewProviderFeature() override; App::PropertyColorList ColourList; /** * Attaches the document object to this view provider. */ - virtual void attach(App::DocumentObject *pcObj); + void attach(App::DocumentObject *pcObj) override; }; } // namespace Gui diff --git a/src/Gui/ViewProviderGeoFeatureGroup.h b/src/Gui/ViewProviderGeoFeatureGroup.h index bcb3c1ac9c..5b65739569 100644 --- a/src/Gui/ViewProviderGeoFeatureGroup.h +++ b/src/Gui/ViewProviderGeoFeatureGroup.h @@ -41,7 +41,7 @@ public: /// constructor. ViewProviderGeoFeatureGroup(); /// destructor. - virtual ~ViewProviderGeoFeatureGroup(); + ~ViewProviderGeoFeatureGroup() override; }; typedef ViewProviderPythonFeatureT ViewProviderGeoFeatureGroupPython; diff --git a/src/Gui/ViewProviderGeoFeatureGroupExtension.h b/src/Gui/ViewProviderGeoFeatureGroupExtension.h index b32ddcb709..b0aa469ee4 100644 --- a/src/Gui/ViewProviderGeoFeatureGroupExtension.h +++ b/src/Gui/ViewProviderGeoFeatureGroupExtension.h @@ -38,28 +38,28 @@ class GuiExport ViewProviderGeoFeatureGroupExtension : public ViewProviderGroupE public: /// Constructor ViewProviderGeoFeatureGroupExtension(); - virtual ~ViewProviderGeoFeatureGroupExtension(); + ~ViewProviderGeoFeatureGroupExtension() override; - virtual std::vector extensionClaimChildren3D()const override; - virtual std::vector< App::DocumentObject* > extensionClaimChildren() const override; - virtual SoSeparator* extensionGetFrontRoot() const override {return pcGroupFront;} - virtual SoSeparator* extensionGetBackRoot() const override {return pcGroupBack;} - virtual SoGroup* extensionGetChildRoot() const override {return pcGroupChildren;} - virtual void extensionAttach(App::DocumentObject* pcObject) override; - virtual void extensionSetDisplayMode(const char* ModeName) override; - virtual std::vector extensionGetDisplayModes() const override; - virtual void extensionFinishRestoring() override; + std::vector extensionClaimChildren3D()const override; + std::vector< App::DocumentObject* > extensionClaimChildren() const override; + SoSeparator* extensionGetFrontRoot() const override {return pcGroupFront;} + SoSeparator* extensionGetBackRoot() const override {return pcGroupBack;} + SoGroup* extensionGetChildRoot() const override {return pcGroupChildren;} + void extensionAttach(App::DocumentObject* pcObject) override; + void extensionSetDisplayMode(const char* ModeName) override; + std::vector extensionGetDisplayModes() const override; + void extensionFinishRestoring() override; /// Show the object in the view: suppresses behavior of DocumentObjectGroup - virtual void extensionShow() override { + void extensionShow() override { ViewProviderExtension::extensionShow(); // clazy:exclude=skipped-base-method } /// Hide the object in the view: suppresses behavior of DocumentObjectGroup - virtual void extensionHide() override { + void extensionHide() override { ViewProviderExtension::extensionHide(); // clazy:exclude=skipped-base-method } - virtual void extensionUpdateData(const App::Property*) override; + void extensionUpdateData(const App::Property*) override; protected: SoSeparator *pcGroupFront; diff --git a/src/Gui/ViewProviderGeometryObject.h b/src/Gui/ViewProviderGeometryObject.h index 2b31f01325..5fc680608a 100644 --- a/src/Gui/ViewProviderGeometryObject.h +++ b/src/Gui/ViewProviderGeometryObject.h @@ -52,7 +52,7 @@ public: ViewProviderGeometryObject(); /// destructor. - virtual ~ViewProviderGeometryObject(); + ~ViewProviderGeometryObject() override; // Display properties App::PropertyColor ShapeColor; @@ -64,10 +64,10 @@ public: /** * Attaches the document object to this view provider. */ - void attach(App::DocumentObject *pcObject); - void updateData(const App::Property*); + void attach(App::DocumentObject *pcObject) override; + void updateData(const App::Property*) override; - bool isSelectable() const {return Selectable.getValue();} + bool isSelectable() const override {return Selectable.getValue();} /** * Returns a list of picked points from the geometry under \a getRoot(). @@ -89,7 +89,7 @@ public: protected: /// get called by the container whenever a property has been changed - void onChanged(const App::Property* prop); + void onChanged(const App::Property* prop) override; void setSelectable(bool Selectable=true); virtual unsigned long getBoundColor() const; diff --git a/src/Gui/ViewProviderGroupExtension.h b/src/Gui/ViewProviderGroupExtension.h index ea7fbfe44f..1ae880a04a 100644 --- a/src/Gui/ViewProviderGroupExtension.h +++ b/src/Gui/ViewProviderGroupExtension.h @@ -36,20 +36,20 @@ class GuiExport ViewProviderGroupExtension : public ViewProviderExtension public: /// Constructor ViewProviderGroupExtension(); - virtual ~ViewProviderGroupExtension(); + ~ViewProviderGroupExtension() override; - virtual std::vector extensionClaimChildren()const override; - virtual bool extensionCanDragObjects() const override; - virtual bool extensionCanDragObject(App::DocumentObject*) const override; - virtual void extensionDragObject(App::DocumentObject*) override; - virtual bool extensionCanDropObjects() const override; - virtual bool extensionCanDropObject(App::DocumentObject*) const override; - virtual void extensionDropObject(App::DocumentObject*) override; + std::vector extensionClaimChildren()const override; + bool extensionCanDragObjects() const override; + bool extensionCanDragObject(App::DocumentObject*) const override; + void extensionDragObject(App::DocumentObject*) override; + bool extensionCanDropObjects() const override; + bool extensionCanDropObject(App::DocumentObject*) const override; + void extensionDropObject(App::DocumentObject*) override; - virtual void extensionHide() override; - virtual void extensionShow() override; + void extensionHide() override; + void extensionShow() override; - virtual bool extensionOnDelete(const std::vector &) override; + bool extensionOnDelete(const std::vector &) override; private: bool guard; diff --git a/src/Gui/ViewProviderInventorObject.h b/src/Gui/ViewProviderInventorObject.h index cb8ad9e32e..cbf21f8636 100644 --- a/src/Gui/ViewProviderInventorObject.h +++ b/src/Gui/ViewProviderInventorObject.h @@ -39,13 +39,13 @@ public: ViewProviderInventorObject(); /// destructor. - ~ViewProviderInventorObject(); + ~ViewProviderInventorObject() override; - void attach(App::DocumentObject *pcObject); - void setDisplayMode(const char* ModeName); - std::vector getDisplayModes() const; - void updateData(const App::Property*); - bool useNewSelectionModel() const {return true;} + void attach(App::DocumentObject *pcObject) override; + void setDisplayMode(const char* ModeName) override; + std::vector getDisplayModes() const override; + void updateData(const App::Property*) override; + bool useNewSelectionModel() const override {return true;} private: void adjustSelectionNodes(SoNode* child, const char* docname, const char* objname); diff --git a/src/Gui/ViewProviderLine.h b/src/Gui/ViewProviderLine.h index 68eafd0074..cd52e077e0 100644 --- a/src/Gui/ViewProviderLine.h +++ b/src/Gui/ViewProviderLine.h @@ -35,9 +35,9 @@ class GuiExport ViewProviderLine : public ViewProviderOriginFeature { public: /// Constructor ViewProviderLine(); - virtual ~ViewProviderLine(); + ~ViewProviderLine() override; - virtual void attach ( App::DocumentObject * ); + void attach ( App::DocumentObject * ) override; }; } //namespace Gui diff --git a/src/Gui/ViewProviderLink.cpp b/src/Gui/ViewProviderLink.cpp index 7cc07e1673..4c54226980 100644 --- a/src/Gui/ViewProviderLink.cpp +++ b/src/Gui/ViewProviderLink.cpp @@ -777,7 +777,7 @@ public: pcNode->addChild(pcTransform); } - ~SubInfo() { + ~SubInfo() override { unlink(); auto root = handle.getLinkRoot(); if(root) { @@ -787,12 +787,12 @@ public: } } - virtual void onLinkedIconChange(LinkInfoPtr) override { + void onLinkedIconChange(LinkInfoPtr) override { if(handle.autoSubLink && handle.subInfo.size()==1) handle.onLinkedIconChange(handle.linkInfo); } - virtual void unlink(LinkInfoPtr info=LinkInfoPtr()) override { + void unlink(LinkInfoPtr info=LinkInfoPtr()) override { (void)info; if(linkInfo) { linkInfo->remove(this); @@ -838,7 +838,7 @@ public: pcSwitch->whichChild = 0; } - ~Element() { + ~Element() override { unlink(); auto root = handle.getLinkRoot(); if(root) { @@ -848,7 +848,7 @@ public: } } - virtual void unlink(LinkInfoPtr info=LinkInfoPtr()) override{ + void unlink(LinkInfoPtr info=LinkInfoPtr()) override{ (void)info; if(linkInfo) { linkInfo->remove(this); diff --git a/src/Gui/ViewProviderLink.h b/src/Gui/ViewProviderLink.h index 3d7580e75e..6ed6b97d11 100644 --- a/src/Gui/ViewProviderLink.h +++ b/src/Gui/ViewProviderLink.h @@ -44,7 +44,7 @@ class GuiExport ViewProviderLinkObserver: public ViewProviderExtension { EXTENSION_TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: ViewProviderLinkObserver(); - virtual ~ViewProviderLinkObserver(); + ~ViewProviderLinkObserver() override; void extensionReattach(App::DocumentObject *) override; void extensionBeforeDelete() override; void extensionOnChanged(const App::Property *) override; @@ -74,15 +74,15 @@ class GuiExport LinkView : public Base::BaseClass, public LinkOwner { public: LinkView(); - ~LinkView(); + ~LinkView() override; LinkView &operator=(const LinkView&) = delete; LinkView(const LinkView&) = delete; - virtual PyObject *getPyObject() override; + PyObject *getPyObject() override; - virtual void unlink(LinkInfoPtr) override; - virtual void onLinkedIconChange(LinkInfoPtr) override; - virtual void onLinkedUpdateData(LinkInfoPtr, const App::Property *) override; + void unlink(LinkInfoPtr) override; + void onLinkedIconChange(LinkInfoPtr) override; + void onLinkedUpdateData(LinkInfoPtr, const App::Property *) override; bool isLinked() const; @@ -196,7 +196,7 @@ public: App::PropertyPersistentObject ChildViewProvider; ViewProviderLink(); - virtual ~ViewProviderLink(); + ~ViewProviderLink() override; void attach(App::DocumentObject *pcObj) override; void reattach(App::DocumentObject *pcObj) override; @@ -252,24 +252,24 @@ public: void setOverrideMode(const std::string &mode) override; - virtual void onBeforeChange(const App::Property*) override; + void onBeforeChange(const App::Property*) override; ViewProviderDocumentObject *getChildViewProvider() const { return childVp; } - virtual App::Property *getPropertyByName(const char* name) const override; - virtual void getPropertyMap(std::map &Map) const override; - virtual void getPropertyList(std::vector &List) const override; + App::Property *getPropertyByName(const char* name) const override; + void getPropertyMap(std::map &Map) const override; + void getPropertyList(std::vector &List) const override; - virtual ViewProviderDocumentObject *getLinkedViewProvider( + ViewProviderDocumentObject *getLinkedViewProvider( std::string *subname=nullptr, bool recursive=false) const override; - virtual bool allowOverride(const App::DocumentObject &) const override { + bool allowOverride(const App::DocumentObject &) const override { return true; } - virtual void setTransformation(const Base::Matrix4D &rcMatrix) override; - virtual void setTransformation(const SbMatrix &rcMatrix) override; + void setTransformation(const Base::Matrix4D &rcMatrix) override; + void setTransformation(const SbMatrix &rcMatrix) override; protected: bool setEdit(int ModNum) override; diff --git a/src/Gui/ViewProviderMaterialObject.h b/src/Gui/ViewProviderMaterialObject.h index 0181e1ca36..607b727579 100644 --- a/src/Gui/ViewProviderMaterialObject.h +++ b/src/Gui/ViewProviderMaterialObject.h @@ -38,14 +38,14 @@ public: /// constructor. ViewProviderMaterialObject(); /// destructor. - virtual ~ViewProviderMaterialObject(); + ~ViewProviderMaterialObject() override; - QIcon getIcon() const; + QIcon getIcon() const override; - bool doubleClicked(); + bool doubleClicked() override; // shows solid in the tree - virtual bool isShow() const{return true;} + bool isShow() const override{return true;} }; diff --git a/src/Gui/ViewProviderMeasureDistance.h b/src/Gui/ViewProviderMeasureDistance.h index 15a56b95fc..cc6e2ccb9d 100644 --- a/src/Gui/ViewProviderMeasureDistance.h +++ b/src/Gui/ViewProviderMeasureDistance.h @@ -45,13 +45,13 @@ class PointMarker : public QObject { public: PointMarker(View3DInventorViewer* view); - ~PointMarker(); + ~PointMarker() override; void addPoint(const SbVec3f&); int countPoints() const; protected: - void customEvent(QEvent* e); + void customEvent(QEvent* e) override; private: View3DInventorViewer *view; @@ -65,7 +65,7 @@ class GuiExport ViewProviderPointMarker : public ViewProviderDocumentObject public: ViewProviderPointMarker(); - virtual ~ViewProviderPointMarker(); + ~ViewProviderPointMarker() override; protected: SoCoordinate3 * pCoords; @@ -80,7 +80,7 @@ class GuiExport ViewProviderMeasureDistance : public ViewProviderDocumentObject public: /// Constructor ViewProviderMeasureDistance(); - virtual ~ViewProviderMeasureDistance(); + ~ViewProviderMeasureDistance() override; // Display properties App::PropertyColor TextColor; @@ -89,16 +89,16 @@ public: App::PropertyFloat DistFactor; App::PropertyBool Mirror; - void attach(App::DocumentObject *); - void updateData(const App::Property*); - bool useNewSelectionModel() const {return true;} - std::vector getDisplayModes() const; - void setDisplayMode(const char* ModeName); + void attach(App::DocumentObject *) override; + void updateData(const App::Property*) override; + bool useNewSelectionModel() const override {return true;} + std::vector getDisplayModes() const override; + void setDisplayMode(const char* ModeName) override; static void measureDistanceCallback(void * ud, SoEventCallback * n); protected: - void onChanged(const App::Property* prop); + void onChanged(const App::Property* prop) override; private: SoFontStyle * pFont; diff --git a/src/Gui/ViewProviderOrigin.h b/src/Gui/ViewProviderOrigin.h index f5af0b5b5e..8b689f1a70 100644 --- a/src/Gui/ViewProviderOrigin.h +++ b/src/Gui/ViewProviderOrigin.h @@ -44,18 +44,18 @@ public: /// constructor. ViewProviderOrigin(); /// destructor. - virtual ~ViewProviderOrigin(); + ~ViewProviderOrigin() override; /// @name Override methods ///@{ - virtual std::vector claimChildren() const; - virtual std::vector claimChildren3D() const; + std::vector claimChildren() const override; + std::vector claimChildren3D() const override; - virtual SoGroup* getChildRoot() const {return pcGroupChildren;}; + SoGroup* getChildRoot() const override {return pcGroupChildren;}; - virtual void attach(App::DocumentObject* pcObject); - virtual std::vector getDisplayModes() const; - virtual void setDisplayMode(const char* ModeName); + void attach(App::DocumentObject* pcObject) override; + std::vector getDisplayModes() const override; + void setDisplayMode(const char* ModeName) override; ///@} /** @name Temporary visibility mode @@ -70,15 +70,15 @@ public: void resetTemporaryVisibility (); ///@} - virtual bool canDragObjects() const { + bool canDragObjects() const override { return false; } /// Returns default size. Use this if it is not possible to determine appropriate size by other means static double defaultSize(); protected: - virtual void onChanged(const App::Property* prop); - virtual bool onDelete(const std::vector &); + void onChanged(const App::Property* prop) override; + bool onDelete(const std::vector &) override; private: SoGroup *pcGroupChildren; diff --git a/src/Gui/ViewProviderOriginFeature.h b/src/Gui/ViewProviderOriginFeature.h index 7bdde15680..efc5823857 100644 --- a/src/Gui/ViewProviderOriginFeature.h +++ b/src/Gui/ViewProviderOriginFeature.h @@ -42,7 +42,7 @@ public: App::PropertyFloat Size; ViewProviderOriginFeature (); - virtual ~ViewProviderOriginFeature (); + ~ViewProviderOriginFeature () override; /// Get point derived classes will add their specific stuff SoSeparator * getOriginFeatureRoot () { return pOriginFeatureRoot; } @@ -50,22 +50,22 @@ public: /// Get pointer to the text label associated with the feature SoAsciiText * getLabel () { return pLabel; } - virtual void attach(App::DocumentObject *); - virtual void updateData(const App::Property *); - virtual std::vector getDisplayModes () const; - virtual void setDisplayMode (const char* ModeName); + void attach(App::DocumentObject *) override; + void updateData(const App::Property *) override; + std::vector getDisplayModes () const override; + void setDisplayMode (const char* ModeName) override; /// @name Suppress ViewProviderGeometryObject's behaviour ///@{ - virtual bool setEdit ( int ) + bool setEdit ( int ) override { return false; } - virtual void unsetEdit ( int ) + void unsetEdit ( int ) override { } ///@} protected: - virtual void onChanged ( const App::Property* prop ); - virtual bool onDelete ( const std::vector & ); + void onChanged ( const App::Property* prop ) override; + bool onDelete ( const std::vector & ) override; protected: SoSeparator * pOriginFeatureRoot; SoScale * pScale; diff --git a/src/Gui/ViewProviderOriginGroup.h b/src/Gui/ViewProviderOriginGroup.h index d27611236f..d10f93f688 100644 --- a/src/Gui/ViewProviderOriginGroup.h +++ b/src/Gui/ViewProviderOriginGroup.h @@ -33,7 +33,7 @@ class GuiExport ViewProviderOriginGroup: public ViewProviderDocumentObject, PROPERTY_HEADER_WITH_EXTENSIONS(Gui::ViewProviderOriginGroup); public: ViewProviderOriginGroup (); - virtual ~ViewProviderOriginGroup (); + ~ViewProviderOriginGroup () override; }; } /* Gui */ diff --git a/src/Gui/ViewProviderOriginGroupExtension.h b/src/Gui/ViewProviderOriginGroupExtension.h index 852e862de8..330df8a64c 100644 --- a/src/Gui/ViewProviderOriginGroupExtension.h +++ b/src/Gui/ViewProviderOriginGroupExtension.h @@ -37,13 +37,13 @@ class GuiExport ViewProviderOriginGroupExtension : public ViewProviderGeoFeature public: /// Constructor ViewProviderOriginGroupExtension(); - virtual ~ViewProviderOriginGroupExtension(); + ~ViewProviderOriginGroupExtension() override; - virtual std::vector extensionClaimChildren()const override; - virtual std::vector extensionClaimChildren3D()const override; + std::vector extensionClaimChildren()const override; + std::vector extensionClaimChildren3D()const override; - virtual void extensionAttach(App::DocumentObject *pcObject) override; - virtual void extensionUpdateData(const App::Property* prop) override; + void extensionAttach(App::DocumentObject *pcObject) override; + void extensionUpdateData(const App::Property* prop) override; void updateOriginSize(); diff --git a/src/Gui/ViewProviderPart.h b/src/Gui/ViewProviderPart.h index f6263beac7..dc546f01f4 100644 --- a/src/Gui/ViewProviderPart.h +++ b/src/Gui/ViewProviderPart.h @@ -39,18 +39,18 @@ public: /// constructor. ViewProviderPart(); /// destructor. - virtual ~ViewProviderPart(); + ~ViewProviderPart() override; - virtual bool doubleClicked() override; - virtual void setupContextMenu(QMenu* menu, QObject* receiver, const char* member) override; + bool doubleClicked() override; + void setupContextMenu(QMenu* menu, QObject* receiver, const char* member) override; /// deliver the icon shown in the tree view /// override from ViewProvider.h - virtual QIcon getIcon() const override; + QIcon getIcon() const override; protected: /// get called by the container whenever a property has been changed - virtual void onChanged(const App::Property* prop) override; + void onChanged(const App::Property* prop) override; /// a second icon for the Assembly type const char* aPixmap; diff --git a/src/Gui/ViewProviderPlacement.h b/src/Gui/ViewProviderPlacement.h index 2d6238bc6a..72c4c21521 100644 --- a/src/Gui/ViewProviderPlacement.h +++ b/src/Gui/ViewProviderPlacement.h @@ -47,7 +47,7 @@ class GuiExport ViewProviderPlacement : public ViewProviderGeometryObject public: /// Constructor ViewProviderPlacement(); - virtual ~ViewProviderPlacement(); + ~ViewProviderPlacement() override; void attach(App::DocumentObject *) override; void updateData(const App::Property*) override; @@ -55,12 +55,12 @@ public: void setDisplayMode(const char* ModeName) override; /// indicates if the ViewProvider use the new Selection model - virtual bool useNewSelectionModel() const override {return true;} + bool useNewSelectionModel() const override {return true;} /// indicates if the ViewProvider can be selected - virtual bool isSelectable() const override; + bool isSelectable() const override; - virtual bool getElementPicked(const SoPickedPoint *pp, std::string &subname) const override; - virtual bool getDetailPath(const char *, SoFullPath *, bool, SoDetail *&) const override; + bool getElementPicked(const SoPickedPoint *pp, std::string &subname) const override; + bool getDetailPath(const char *, SoFullPath *, bool, SoDetail *&) const override; protected: void onChanged(const App::Property* prop) override; diff --git a/src/Gui/ViewProviderPlane.h b/src/Gui/ViewProviderPlane.h index 91ec417ae7..12a9f4f547 100644 --- a/src/Gui/ViewProviderPlane.h +++ b/src/Gui/ViewProviderPlane.h @@ -36,9 +36,9 @@ class GuiExport ViewProviderPlane : public ViewProviderOriginFeature public: /// Constructor ViewProviderPlane(); - virtual ~ViewProviderPlane(); + ~ViewProviderPlane() override; - virtual void attach ( App::DocumentObject * ); + void attach ( App::DocumentObject * ) override; }; } //namespace Gui diff --git a/src/Gui/ViewProviderPythonFeature.h b/src/Gui/ViewProviderPythonFeature.h index 6b347bf598..405437d13a 100644 --- a/src/Gui/ViewProviderPythonFeature.h +++ b/src/Gui/ViewProviderPythonFeature.h @@ -227,21 +227,21 @@ public: /** @name Nodes */ //@{ - virtual SoSeparator* getRoot() const override { + SoSeparator* getRoot() const override { return ViewProviderT::getRoot(); } - virtual SoSeparator* getFrontRoot() const override { + SoSeparator* getFrontRoot() const override { return ViewProviderT::getFrontRoot(); } // returns the root node of the Provider (3D) - virtual SoSeparator* getBackRoot() const override { + SoSeparator* getBackRoot() const override { return ViewProviderT::getBackRoot(); } //@} /** @name Selection handling */ //@{ - virtual bool useNewSelectionModel() const override { + bool useNewSelectionModel() const override { switch(imp->useNewSelectionModel()) { case ViewProviderPythonFeatureImp::Accepted: return true; @@ -251,7 +251,7 @@ public: return ViewProviderT::useNewSelectionModel(); } } - virtual bool getElementPicked(const SoPickedPoint *pp, std::string &subname) const override { + bool getElementPicked(const SoPickedPoint *pp, std::string &subname) const override { auto ret = imp->getElementPicked(pp,subname); if(ret == ViewProviderPythonFeatureImp::NotImplemented) return ViewProviderT::getElementPicked(pp,subname); @@ -259,44 +259,44 @@ public: return true; return false; } - virtual std::string getElement(const SoDetail *det) const override { + std::string getElement(const SoDetail *det) const override { std::string name; if(!imp->getElement(det,name)) return ViewProviderT::getElement(det); return name; } - virtual SoDetail* getDetail(const char* name) const override { + SoDetail* getDetail(const char* name) const override { SoDetail *det = nullptr; if(imp->getDetail(name,det)) return det; return ViewProviderT::getDetail(name); } - virtual bool getDetailPath(const char *name, SoFullPath *path, bool append,SoDetail *&det) const override { + bool getDetailPath(const char *name, SoFullPath *path, bool append,SoDetail *&det) const override { auto ret = imp->getDetailPath(name,path,append,det); if(ret == ViewProviderPythonFeatureImp::NotImplemented) return ViewProviderT::getDetailPath(name,path,append,det); return ret == ViewProviderPythonFeatureImp::Accepted; } - virtual std::vector getSelectionShape(const char* Element) const override { + std::vector getSelectionShape(const char* Element) const override { return ViewProviderT::getSelectionShape(Element); }; //@} /** @name Update data methods*/ //@{ - virtual void attach(App::DocumentObject *obj) override { + void attach(App::DocumentObject *obj) override { // delay loading of the actual attach() method because the Python // view provider class is not attached yet ViewProviderT::pcObject = obj; } - virtual void updateData(const App::Property* prop) override { + void updateData(const App::Property* prop) override { imp->updateData(prop); ViewProviderT::updateData(prop); } - virtual void getTaskViewContent(std::vector& c) const override { + void getTaskViewContent(std::vector& c) const override { ViewProviderT::getTaskViewContent(c); } - virtual bool onDelete(const std::vector & sub) override { + bool onDelete(const std::vector & sub) override { switch(imp->onDelete(sub)) { case ViewProviderPythonFeatureImp::Accepted: return true; @@ -306,7 +306,7 @@ public: return ViewProviderT::onDelete(sub); } } - virtual bool canDelete(App::DocumentObject *obj) const override { + bool canDelete(App::DocumentObject *obj) const override { switch(imp->canDelete(obj)) { case ViewProviderPythonFeatureImp::Accepted: return true; @@ -320,11 +320,11 @@ public: /** @name Restoring view provider from document load */ //@{ - virtual void startRestoring() override { + void startRestoring() override { ViewProviderT::startRestoring(); imp->startRestoring(); } - virtual void finishRestoring() override { + void finishRestoring() override { imp->finishRestoring(); ViewProviderT::finishRestoring(); } @@ -333,7 +333,7 @@ public: /** @name Drag and drop */ //@{ /// Returns true if the view provider generally supports dragging objects - virtual bool canDragObjects() const override { + bool canDragObjects() const override { switch (imp->canDragObjects()) { case ViewProviderPythonFeatureImp::Accepted: return true; @@ -344,7 +344,7 @@ public: } } /// Check whether the object can be removed from the view provider by drag and drop - virtual bool canDragObject(App::DocumentObject* obj) const override { + bool canDragObject(App::DocumentObject* obj) const override { switch (imp->canDragObject(obj)) { case ViewProviderPythonFeatureImp::Accepted: return true; @@ -355,7 +355,7 @@ public: } } /// Starts to drag the object - virtual void dragObject(App::DocumentObject* obj) override { + void dragObject(App::DocumentObject* obj) override { App::AutoTransaction committer; switch (imp->dragObject(obj)) { case ViewProviderPythonFeatureImp::Accepted: @@ -366,7 +366,7 @@ public: } } /// Returns true if the view provider generally accepts dropping of objects - virtual bool canDropObjects() const override { + bool canDropObjects() const override { switch (imp->canDropObjects()) { case ViewProviderPythonFeatureImp::Accepted: return true; @@ -377,7 +377,7 @@ public: } } /// Check whether the object can be dropped to the view provider by drag and drop - virtual bool canDropObject(App::DocumentObject* obj) const override { + bool canDropObject(App::DocumentObject* obj) const override { switch (imp->canDropObject(obj)) { case ViewProviderPythonFeatureImp::Accepted: return true; @@ -388,7 +388,7 @@ public: } } /// If the dropped object type is accepted the object will be added as child - virtual void dropObject(App::DocumentObject* obj) override { + void dropObject(App::DocumentObject* obj) override { App::AutoTransaction committer; switch (imp->dropObject(obj)) { case ViewProviderPythonFeatureImp::Accepted: @@ -399,7 +399,7 @@ public: } } /** Return false to force drop only operation for a give object*/ - virtual bool canDragAndDropObject(App::DocumentObject *obj) const override { + bool canDragAndDropObject(App::DocumentObject *obj) const override { switch (imp->canDragAndDropObject(obj)) { case ViewProviderPythonFeatureImp::Accepted: return true; @@ -409,7 +409,7 @@ public: return ViewProviderT::canDragAndDropObject(obj); } } - virtual bool canDropObjectEx(App::DocumentObject *obj, App::DocumentObject *owner, + bool canDropObjectEx(App::DocumentObject *obj, App::DocumentObject *owner, const char *subname, const std::vector &elements) const override { switch (imp->canDropObjectEx(obj,owner,subname,elements)) { @@ -422,7 +422,7 @@ public: } } /** Add an object with full qualified name to the view provider by drag and drop */ - virtual std::string dropObjectEx(App::DocumentObject *obj, App::DocumentObject *owner, + std::string dropObjectEx(App::DocumentObject *obj, App::DocumentObject *owner, const char *subname, const std::vector &elements) override { App::AutoTransaction committer; @@ -436,7 +436,7 @@ public: /** @name Display methods */ //@{ /// Returns true if the icon must always appear enabled in the tree view - virtual bool isShow() const override { + bool isShow() const override { switch(imp->isShow()) { case ViewProviderPythonFeatureImp::Accepted: return true; @@ -447,28 +447,28 @@ public: } } /// get the default display mode - virtual const char* getDefaultDisplayMode() const override { + const char* getDefaultDisplayMode() const override { defaultMode.clear(); if(imp->getDefaultDisplayMode(defaultMode)) return defaultMode.c_str(); return ViewProviderT::getDefaultDisplayMode(); } /// returns a list of all possible modes - virtual std::vector getDisplayModes() const override { + std::vector getDisplayModes() const override { std::vector modes = ViewProviderT::getDisplayModes(); std::vector more_modes = imp->getDisplayModes(); modes.insert(modes.end(), more_modes.begin(), more_modes.end()); return modes; } /// set the display mode - virtual void setDisplayMode(const char* ModeName) override { + void setDisplayMode(const char* ModeName) override { std::string mask = imp->setDisplayMode(ModeName); ViewProviderT::setDisplayMaskMode(mask.c_str()); ViewProviderT::setDisplayMode(ModeName); } //@} - virtual bool canRemoveChildrenFromRoot() const override { + bool canRemoveChildrenFromRoot() const override { switch(imp->canRemoveChildrenFromRoot()) { case ViewProviderPythonFeatureImp::NotImplemented: return ViewProviderT::canRemoveChildrenFromRoot(); @@ -483,7 +483,7 @@ public: return ViewProviderT::getPyObject(); } - virtual bool canAddToSceneGraph() const override { + bool canAddToSceneGraph() const override { switch(imp->canAddToSceneGraph()) { case ViewProviderPythonFeatureImp::Accepted: return true; @@ -495,7 +495,7 @@ public: } protected: - virtual void onChanged(const App::Property* prop) override { + void onChanged(const App::Property* prop) override { if (prop == &Proxy) { imp->init(Proxy.getValue().ptr()); if (ViewProviderT::pcObject && !Proxy.getValue().is(Py::_None())) { @@ -519,7 +519,7 @@ protected: ViewProviderT::onChanged(prop); } /// is called by the document when the provider goes in edit mode - virtual bool setEdit(int ModNum) override + bool setEdit(int ModNum) override { switch (imp->setEdit(ModNum)) { case ViewProviderPythonFeatureImp::Accepted: @@ -531,7 +531,7 @@ protected: } } /// is called when you lose the edit mode - virtual void unsetEdit(int ModNum) override + void unsetEdit(int ModNum) override { switch (imp->unsetEdit(ModNum)) { case ViewProviderPythonFeatureImp::Accepted: @@ -541,23 +541,23 @@ protected: return ViewProviderT::unsetEdit(ModNum); } } - virtual void setEditViewer(View3DInventorViewer *viewer, int ModNum) override { + void setEditViewer(View3DInventorViewer *viewer, int ModNum) override { if (imp->setEditViewer(viewer,ModNum) == ViewProviderPythonFeatureImp::NotImplemented) ViewProviderT::setEditViewer(viewer,ModNum); } - virtual void unsetEditViewer(View3DInventorViewer *viewer) override { + void unsetEditViewer(View3DInventorViewer *viewer) override { if (imp->unsetEditViewer(viewer) == ViewProviderPythonFeatureImp::NotImplemented) ViewProviderT::unsetEditViewer(viewer); } - virtual std::string getDropPrefix() const override { + std::string getDropPrefix() const override { std::string prefix; if(!imp->getDropPrefix(prefix)) return ViewProviderT::getDropPrefix(); return prefix; } - virtual int replaceObject(App::DocumentObject *oldObj, App::DocumentObject *newObj) override { + int replaceObject(App::DocumentObject *oldObj, App::DocumentObject *newObj) override { App::AutoTransaction committer; switch (imp->replaceObject(oldObj,newObj)) { case ViewProviderPythonFeatureImp::Accepted: @@ -569,7 +569,7 @@ protected: } } - virtual ViewProviderDocumentObject *getLinkedViewProvider( + ViewProviderDocumentObject *getLinkedViewProvider( std::string *subname=nullptr, bool recursive=false) const override{ ViewProviderDocumentObject *res = nullptr; if(!imp->getLinkedViewProvider(res, subname, recursive)) @@ -577,20 +577,20 @@ protected: return res; } - virtual void editProperty(const char *propName) override { + void editProperty(const char *propName) override { if (!imp->editProperty(propName)) ViewProviderT::editProperty(propName); } public: - virtual void setupContextMenu(QMenu* menu, QObject* recipient, const char* member) override + void setupContextMenu(QMenu* menu, QObject* recipient, const char* member) override { if(!imp->setupContextMenu(menu)) ViewProviderT::setupContextMenu(menu, recipient, member); } protected: - virtual bool doubleClicked() override + bool doubleClicked() override { App::AutoTransaction committer; switch (imp->doubleClicked()) { @@ -602,7 +602,7 @@ protected: return ViewProviderT::doubleClicked(); } } - virtual void setOverrideMode(const std::string &mode) override + void setOverrideMode(const std::string &mode) override { ViewProviderT::setOverrideMode(mode); viewerMode = mode; diff --git a/src/Gui/ViewProviderTextDocument.h b/src/Gui/ViewProviderTextDocument.h index 0a1efc38e9..c5c885803e 100644 --- a/src/Gui/ViewProviderTextDocument.h +++ b/src/Gui/ViewProviderTextDocument.h @@ -35,20 +35,20 @@ class GuiExport ViewProviderTextDocument : public ViewProviderDocumentObject { PROPERTY_HEADER(Gui::ViewProviderTextDocument); public: ViewProviderTextDocument(); - ~ViewProviderTextDocument() {} + ~ViewProviderTextDocument() override {} App::PropertyBool ReadOnly; App::PropertyFloat FontSize; App::PropertyFont FontName; App::PropertyEnumeration SyntaxHighlighter; - bool doubleClicked(); - void setupContextMenu(QMenu* menu, QObject* receiver, const char* member); - bool isShow() const { return true; } + bool doubleClicked() override; + void setupContextMenu(QMenu* menu, QObject* receiver, const char* member) override; + bool isShow() const override { return true; } - void onChanged(const App::Property* prop); + void onChanged(const App::Property* prop) override; - virtual MDIView *getMDIView() const; + MDIView *getMDIView() const override; private: bool activateView() const; diff --git a/src/Gui/ViewProviderVRMLObject.h b/src/Gui/ViewProviderVRMLObject.h index 39a0244910..d759f53404 100644 --- a/src/Gui/ViewProviderVRMLObject.h +++ b/src/Gui/ViewProviderVRMLObject.h @@ -41,12 +41,12 @@ public: ViewProviderVRMLObject(); /// destructor. - ~ViewProviderVRMLObject(); + ~ViewProviderVRMLObject() override; - void attach(App::DocumentObject *pcObject); - void setDisplayMode(const char* ModeName); - std::vector getDisplayModes() const; - void updateData(const App::Property*); + void attach(App::DocumentObject *pcObject) override; + void setDisplayMode(const char* ModeName) override; + std::vector getDisplayModes() const override; + void updateData(const App::Property*) override; void getLocalResources(SoNode*, std::list&); void addResource(const SbString&, std::list&); template void getResourceFile(SoNode*, std::list&); diff --git a/src/Gui/WaitCursor.cpp b/src/Gui/WaitCursor.cpp index 44d0262a55..593801043a 100644 --- a/src/Gui/WaitCursor.cpp +++ b/src/Gui/WaitCursor.cpp @@ -47,7 +47,7 @@ public: void setIgnoreEvents(WaitCursor::FilterEventsFlags flags); protected: - bool eventFilter(QObject*, QEvent*); + bool eventFilter(QObject*, QEvent*) override; bool isModalDialog(QObject* o) const; private: diff --git a/src/Gui/WhatsThis.h b/src/Gui/WhatsThis.h index 4c58d4b185..8a0b4965cd 100644 --- a/src/Gui/WhatsThis.h +++ b/src/Gui/WhatsThis.h @@ -36,7 +36,7 @@ class StdCmdDescription : public Command { public: StdCmdDescription(); - ~StdCmdDescription(); + ~StdCmdDescription() override; static bool inDescriptionMode(); static void enterDescriptionMode(); @@ -45,8 +45,8 @@ public: static void setSource( const QString& ); protected: - Action* createAction(); - void activated(int iMsg); + Action* createAction() override; + void activated(int iMsg) override; private: static bool _descrMode; diff --git a/src/Gui/WidgetFactory.h b/src/Gui/WidgetFactory.h index 8e958d693b..4f840d836f 100644 --- a/src/Gui/WidgetFactory.h +++ b/src/Gui/WidgetFactory.h @@ -62,7 +62,7 @@ private: static WidgetFactoryInst* _pcSingleton; WidgetFactoryInst(){} - ~WidgetFactoryInst(){} + ~WidgetFactoryInst() override{} }; inline WidgetFactoryInst& WidgetFactory() @@ -90,12 +90,12 @@ public: WidgetFactoryInst::instance().AddProducer(cname, this); } - virtual ~WidgetProducer (){} + ~WidgetProducer () override{} /** * Creates an instance of the specified widget. */ - virtual void* Produce () const + void* Produce () const override { return (new CLASS); } @@ -129,12 +129,12 @@ public: } } - virtual ~PrefPageProducer (){} + ~PrefPageProducer () override{} /** * Creates an instance of the specified widget. */ - virtual void* Produce () const + void* Produce () const override { return (new CLASS); } @@ -152,11 +152,11 @@ public: * Register a special type of preference page to the WidgetFactoryInst. */ PrefPageUiProducer (const char* filename, const char* group); - virtual ~PrefPageUiProducer (); + ~PrefPageUiProducer () override; /** * Creates an instance of the specified widget. */ - virtual void* Produce () const; + void* Produce () const override; private: QString fn; @@ -174,11 +174,11 @@ public: * Register a special type of preference page to the WidgetFactoryInst. */ PrefPagePyProducer (const Py::Object&, const char* group); - virtual ~PrefPagePyProducer (); + ~PrefPagePyProducer () override; /** * Creates an instance of the specified widget. */ - virtual void* Produce () const; + void* Produce () const override; private: Py::Object type; @@ -212,12 +212,12 @@ public: } } - virtual ~CustomPageProducer (){} + ~CustomPageProducer () override{} /** * Creates an instance of the specified widget. */ - virtual void* Produce () const + void* Produce () const override { return (new CLASS); } @@ -262,7 +262,7 @@ class ContainerDialog : public QDialog public: ContainerDialog( QWidget* templChild ); - ~ContainerDialog(); + ~ContainerDialog() override; QPushButton* buttonOk; /**< The Ok button. */ QPushButton* buttonCancel; /**< The cancel button. */ @@ -332,12 +332,12 @@ public: static void init_type(); // announce properties and methods PyResource(); - ~PyResource(); + ~PyResource() override; void load(const char* name); bool connect(const char* sender, const char* signal, PyObject* cb); - Py::Object repr(); + Py::Object repr() override; Py::Object value(const Py::Tuple&); Py::Object setValue(const Py::Tuple&); @@ -361,7 +361,7 @@ class SignalConnect : public QObject public: SignalConnect(PyObject* res, PyObject* cb); - ~SignalConnect(); + ~SignalConnect() override; public Q_SLOTS: void onExecute(); @@ -383,13 +383,13 @@ class GuiExport PreferencePagePython : public PreferencePage public: PreferencePagePython(const Py::Object& dlg, QWidget* parent = nullptr); - virtual ~PreferencePagePython(); + ~PreferencePagePython() override; - void loadSettings(); - void saveSettings(); + void loadSettings() override; + void saveSettings() override; protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) override; private: Py::Object page; diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index 57ef33d64c..ace41e8ba3 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -1241,12 +1241,12 @@ public: codeEditor = editor; } - QSize sizeHint() const { + QSize sizeHint() const override { return QSize(codeEditor->lineNumberAreaWidth(), 0); } protected: - void paintEvent(QPaintEvent *event) { + void paintEvent(QPaintEvent *event) override { codeEditor->lineNumberAreaPaintEvent(event); } @@ -1359,7 +1359,7 @@ public: { } - void accept() + void accept() override { PropertyListEditor* edit = this->findChild(); QStringList lines; diff --git a/src/Gui/Widgets.h b/src/Gui/Widgets.h index 2e8d8d9c98..0963952e42 100644 --- a/src/Gui/Widgets.h +++ b/src/Gui/Widgets.h @@ -64,10 +64,10 @@ class CommandIconView : public QListWidget public: CommandIconView (QWidget * parent = nullptr); - virtual ~CommandIconView (); + ~CommandIconView () override; protected: - void startDrag ( Qt::DropActions supportedActions ); + void startDrag ( Qt::DropActions supportedActions ) override; protected Q_SLOTS: void onSelectionChanged( QListWidgetItem * item, QListWidgetItem * ); @@ -85,7 +85,7 @@ class GuiExport ActionSelector : public QWidget public: ActionSelector(QWidget* parent=nullptr); - ~ActionSelector(); + ~ActionSelector() override; QTreeWidget* availableTreeWidget() const { return availableWidget; } @@ -97,8 +97,8 @@ public: QString availableLabel() const; private: - void keyPressEvent(QKeyEvent *); - void changeEvent(QEvent*); + void keyPressEvent(QKeyEvent *) override; + void changeEvent(QEvent*) override; void retranslateUi(); void setButtonsEnabled(); @@ -141,7 +141,7 @@ public: bool isNone() const; protected: - void keyPressEvent(QKeyEvent * e); + void keyPressEvent(QKeyEvent * e) override; private: int keyPressedCount; @@ -160,7 +160,7 @@ public: ModifierLineEdit(QWidget * parent=nullptr); protected: - void keyPressEvent(QKeyEvent * e); + void keyPressEvent(QKeyEvent * e) override; }; // ------------------------------------------------------------------------------ @@ -177,7 +177,7 @@ public: ClearLineEdit (QWidget * parent=nullptr); protected: - void resizeEvent(QResizeEvent *); + void resizeEvent(QResizeEvent *) override; private Q_SLOTS: void updateClearButton(const QString &text); @@ -203,13 +203,13 @@ class GuiExport CheckListDialog : public QDialog public: CheckListDialog( QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() ); - ~CheckListDialog(); + ~CheckListDialog() override; void setCheckableItems( const QStringList& items ); void setCheckableItems( const QList& items ); QStringList getCheckedItems() const; - void accept (); + void accept () override; private: QStringList checked; @@ -233,7 +233,7 @@ class GuiExport ColorButton : public QPushButton public: ColorButton(QWidget* parent = nullptr); - ~ColorButton(); + ~ColorButton() override; void setColor(const QColor&); QColor color() const; @@ -265,7 +265,7 @@ Q_SIGNALS: void changed(); protected: - void paintEvent (QPaintEvent*); + void paintEvent (QPaintEvent*) override; private: struct ColorButtonP *d; @@ -289,7 +289,7 @@ class GuiExport UrlLabel : public QLabel public: UrlLabel ( QWidget * parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags() ); - virtual ~UrlLabel(); + ~UrlLabel() override; QString url() const; bool launchExternal() const; @@ -302,7 +302,7 @@ public Q_SLOTS: void setLaunchExternal(bool l); protected: - void mouseReleaseEvent ( QMouseEvent * ); + void mouseReleaseEvent ( QMouseEvent * ) override; private: QString _url; @@ -343,7 +343,7 @@ class GuiExport StatefulLabel : public QLabel, public Base::Observer& rCaller, const char* rcReason); + void OnChange(Base::Subject& rCaller, const char* rcReason) override; public Q_SLOTS: void setState(QString state); @@ -402,7 +402,7 @@ class GuiExport LabelButton : public QWidget public: LabelButton (QWidget * parent = nullptr); - virtual ~LabelButton(); + ~LabelButton() override; QVariant value() const; @@ -414,7 +414,7 @@ public Q_SLOTS: protected: virtual void showValue(const QVariant& data); - void resizeEvent(QResizeEvent*); + void resizeEvent(QResizeEvent*) override; protected Q_SLOTS: virtual void browse(); @@ -447,10 +447,10 @@ protected: static ToolTip* instance(); ToolTip(); - virtual ~ToolTip(); + ~ToolTip() override; - void timerEvent(QTimerEvent *e); - bool eventFilter(QObject* o, QEvent*e); + void timerEvent(QTimerEvent *e) override; + bool eventFilter(QObject* o, QEvent*e) override; void installEventFilter(); void removeEventFilter(); @@ -473,14 +473,14 @@ class GuiExport StatusWidget : public QDialog public: StatusWidget(QWidget* parent); - ~StatusWidget(); + ~StatusWidget() override; void setStatusText(const QString&); - QSize sizeHint () const; + QSize sizeHint () const override; void showText(int ms); protected: - void showEvent(QShowEvent*); - void hideEvent(QHideEvent*); + void showEvent(QShowEvent*) override; + void hideEvent(QHideEvent*) override; private: QLabel* label; @@ -499,7 +499,7 @@ public: int lineNumberAreaWidth(); protected: - void resizeEvent(QResizeEvent *event); + void resizeEvent(QResizeEvent *event) override; private Q_SLOTS: void updateLineNumberAreaWidth(int newBlockCount); @@ -523,7 +523,7 @@ public: enum InputType {String, Float, Integer}; LabelEditor (QWidget * parent = nullptr); - virtual ~LabelEditor(); + ~LabelEditor() override; /** * Returns the text. @@ -552,7 +552,7 @@ private Q_SLOTS: void changeText(); protected: - void resizeEvent(QResizeEvent*); + void resizeEvent(QResizeEvent*) override; private: InputType type; @@ -572,17 +572,17 @@ class GuiExport ExpLineEdit : public QLineEdit, public ExpressionBinding public: ExpLineEdit ( QWidget * parent=nullptr, bool expressionOnly=false ); - void setExpression(std::shared_ptr expr); - void bind(const App::ObjectIdentifier &_path); - bool apply(const std::string &propName); + void setExpression(std::shared_ptr expr) override; + void bind(const App::ObjectIdentifier &_path) override; + bool apply(const std::string &propName) override; - void keyPressEvent(QKeyEvent *event); - void resizeEvent(QResizeEvent *event); + void keyPressEvent(QKeyEvent *event) override; + void resizeEvent(QResizeEvent *event) override; private Q_SLOTS: void finishFormulaDialog(); void openFormulaDialog(); - virtual void onChange(); + void onChange() override; private: bool autoClose; diff --git a/src/Gui/Window.h b/src/Gui/Window.h index c4a17a8541..8bc2960691 100644 --- a/src/Gui/Window.h +++ b/src/Gui/Window.h @@ -36,10 +36,10 @@ class GuiExport WindowParameter : public ParameterGrp::ObserverType { public: WindowParameter(const char *name); - virtual ~WindowParameter(); + ~WindowParameter() override; bool setGroupName( const char* name ); - void OnChange(Base::Subject &rCaller, const char * sReason); + void OnChange(Base::Subject &rCaller, const char * sReason) override; /// get the parameters static ParameterGrp::handle getDefaultParameter(); diff --git a/src/Gui/Workbench.h b/src/Gui/Workbench.h index 9ea1b10aff..cf1b8d3e38 100644 --- a/src/Gui/Workbench.h +++ b/src/Gui/Workbench.h @@ -56,7 +56,7 @@ class GuiExport Workbench : public Base::BaseClass public: /** Constructs a workbench object. */ Workbench(); - virtual ~Workbench(); + ~Workbench() override; /** * Returns the name of the workbench object. */ @@ -68,7 +68,7 @@ public: /** * The default implementation returns an instance of @ref WorkbenchPy. */ - PyObject* getPyObject(); + PyObject* getPyObject() override; /** Sets up the contextmenu for this workbench. * The default implementation does nothing. */ @@ -150,22 +150,22 @@ class GuiExport StdWorkbench : public Workbench public: StdWorkbench(); - virtual ~StdWorkbench(); + ~StdWorkbench() override; public: /** Defines the standard context menu. */ - virtual void setupContextMenu(const char* recipient, MenuItem*) const; - virtual void createMainWindowPopupMenu(MenuItem*) const; + void setupContextMenu(const char* recipient, MenuItem*) const override; + void createMainWindowPopupMenu(MenuItem*) const override; protected: /** Defines the standard menus. */ - virtual MenuItem* setupMenuBar() const; + MenuItem* setupMenuBar() const override; /** Defines the standard toolbars. */ - virtual ToolBarItem* setupToolBars() const; + ToolBarItem* setupToolBars() const override; /** Defines the standard command bars. */ - virtual ToolBarItem* setupCommandBars() const; + ToolBarItem* setupCommandBars() const override; /** Returns a DockWindowItems structure of dock windows this workbench. */ - virtual DockWindowItems* setupDockWindows() const; + DockWindowItems* setupDockWindows() const override; friend class PythonWorkbench; }; @@ -180,24 +180,24 @@ class GuiExport BlankWorkbench : public Workbench public: BlankWorkbench(); - virtual ~BlankWorkbench(); + ~BlankWorkbench() override; /** Defines the standard context menu. */ - virtual void setupContextMenu(const char* recipient,MenuItem*) const; + void setupContextMenu(const char* recipient,MenuItem*) const override; /** Run some actions when the workbench gets activated. */ - virtual void activated(); + void activated() override; /** Run some actions when the workbench gets deactivated. */ - virtual void deactivated(); + void deactivated() override; protected: /** Defines the standard menus. */ - virtual MenuItem* setupMenuBar() const; + MenuItem* setupMenuBar() const override; /** Defines the standard toolbars. */ - virtual ToolBarItem* setupToolBars() const; + ToolBarItem* setupToolBars() const override; /** Defines the standard command bars. */ - virtual ToolBarItem* setupCommandBars() const; + ToolBarItem* setupCommandBars() const override; /** Returns a DockWindowItems structure of dock windows this workbench. */ - virtual DockWindowItems* setupDockWindows() const; + DockWindowItems* setupDockWindows() const override; }; /** @@ -210,20 +210,20 @@ class GuiExport NoneWorkbench : public StdWorkbench public: NoneWorkbench(); - virtual ~NoneWorkbench(); + ~NoneWorkbench() override; /** Defines the standard context menu. */ - virtual void setupContextMenu(const char* recipient,MenuItem*) const; + void setupContextMenu(const char* recipient,MenuItem*) const override; protected: /** Defines the standard menus. */ - virtual MenuItem* setupMenuBar() const; + MenuItem* setupMenuBar() const override; /** Defines the standard toolbars. */ - virtual ToolBarItem* setupToolBars() const; + ToolBarItem* setupToolBars() const override; /** Defines the standard command bars. */ - virtual ToolBarItem* setupCommandBars() const; + ToolBarItem* setupCommandBars() const override; /** Returns a DockWindowItems structure of dock windows this workbench. */ - virtual DockWindowItems* setupDockWindows() const; + DockWindowItems* setupDockWindows() const override; }; class GuiExport TestWorkbench : public StdWorkbench @@ -232,12 +232,12 @@ class GuiExport TestWorkbench : public StdWorkbench public: TestWorkbench(); - ~TestWorkbench(); + ~TestWorkbench() override; protected: - MenuItem* setupMenuBar() const; - ToolBarItem* setupToolBars() const; - ToolBarItem* setupCommandBars() const; + MenuItem* setupMenuBar() const override; + ToolBarItem* setupToolBars() const override; + ToolBarItem* setupCommandBars() const override; }; /** @@ -251,11 +251,11 @@ class GuiExport PythonBaseWorkbench : public Workbench public: PythonBaseWorkbench(); - ~PythonBaseWorkbench(); + ~PythonBaseWorkbench() override; /** * Creates and returns immediately the corresponding Python workbench object. */ - PyObject* getPyObject(); + PyObject* getPyObject() override; /** @name Manipulation methods */ //@{ @@ -268,7 +268,7 @@ public: void appendContextMenu(const std::list& menu, const std::list& items) const; /// Removes a context menu void removeContextMenu(const std::string& menu ) const; - void setupContextMenu(const char* recipient,MenuItem*) const; + void setupContextMenu(const char* recipient,MenuItem*) const override; void clearContextMenu(); /// Appends a new toolbar @@ -283,10 +283,10 @@ public: //@} protected: - MenuItem* setupMenuBar() const; - ToolBarItem* setupToolBars() const; - ToolBarItem* setupCommandBars() const; - DockWindowItems* setupDockWindows() const; + MenuItem* setupMenuBar() const override; + ToolBarItem* setupToolBars() const override; + ToolBarItem* setupCommandBars() const override; + DockWindowItems* setupDockWindows() const override; protected: MenuItem* _menuBar; @@ -302,7 +302,7 @@ class GuiExport PythonBlankWorkbench : public PythonBaseWorkbench public: PythonBlankWorkbench(); - ~PythonBlankWorkbench(); + ~PythonBlankWorkbench() override; }; /** @@ -316,17 +316,17 @@ class GuiExport PythonWorkbench : public PythonBaseWorkbench public: PythonWorkbench(); - ~PythonWorkbench(); + ~PythonWorkbench() override; /** Defines the standard context menu. */ - virtual void setupContextMenu(const char* recipient, MenuItem*) const; - virtual void createMainWindowPopupMenu(MenuItem*) const; + void setupContextMenu(const char* recipient, MenuItem*) const override; + void createMainWindowPopupMenu(MenuItem*) const override; protected: - MenuItem* setupMenuBar() const; - ToolBarItem* setupToolBars() const; - ToolBarItem* setupCommandBars() const; - DockWindowItems* setupDockWindows() const; + MenuItem* setupMenuBar() const override; + ToolBarItem* setupToolBars() const override; + ToolBarItem* setupCommandBars() const override; + DockWindowItems* setupDockWindows() const override; }; } // namespace Gui diff --git a/src/Gui/WorkbenchFactory.h b/src/Gui/WorkbenchFactory.h index 7b2ed02a9d..979292cdb5 100644 --- a/src/Gui/WorkbenchFactory.h +++ b/src/Gui/WorkbenchFactory.h @@ -57,7 +57,7 @@ private: static WorkbenchFactoryInst* _pcSingleton; WorkbenchFactoryInst(){} - ~WorkbenchFactoryInst(){} + ~WorkbenchFactoryInst() override{} }; inline GuiExport WorkbenchFactoryInst& WorkbenchFactory() @@ -80,9 +80,9 @@ public: { } - virtual ~WorkbenchProducer (){} + ~WorkbenchProducer () override{} - virtual void* Produce () const + void* Produce () const override { return (new CLASS); } diff --git a/src/Gui/propertyeditor/PropertyEditor.h b/src/Gui/propertyeditor/PropertyEditor.h index f7cefc6aa7..f8b21ca329 100644 --- a/src/Gui/propertyeditor/PropertyEditor.h +++ b/src/Gui/propertyeditor/PropertyEditor.h @@ -67,7 +67,7 @@ class PropertyEditor : public QTreeView public: PropertyEditor(QWidget *parent = nullptr); - ~PropertyEditor(); + ~PropertyEditor() override; /** Builds up the list view with the properties. */ void buildUp(PropertyModel::PropertyList &&props = PropertyModel::PropertyList(), bool checkDocument=false); @@ -78,7 +78,7 @@ public: void setAutomaticDocumentUpdate(bool); bool isAutomaticDocumentUpdate(bool) const; /*! Reset the internal state of the view. */ - virtual void reset(); + void reset() override; QBrush groupBackground() const; void setGroupBackground(const QBrush& c); @@ -97,16 +97,16 @@ protected Q_SLOTS: void onRowsRemoved(const QModelIndex &parent, int start, int end); protected: - virtual void closeEditor (QWidget * editor, QAbstractItemDelegate::EndEditHint hint); - virtual void commitData (QWidget * editor); - virtual void editorDestroyed (QObject * editor); - virtual void currentChanged (const QModelIndex & current, const QModelIndex & previous); - virtual void rowsInserted (const QModelIndex & parent, int start, int end); - virtual void rowsAboutToBeRemoved (const QModelIndex & parent, int start, int end); - virtual void drawBranches(QPainter *painter, const QRect &rect, const QModelIndex &index) const; - virtual QStyleOptionViewItem viewOptions() const; - virtual void contextMenuEvent(QContextMenuEvent *event); - virtual bool event(QEvent*); + void closeEditor (QWidget * editor, QAbstractItemDelegate::EndEditHint hint) override; + void commitData (QWidget * editor) override; + void editorDestroyed (QObject * editor) override; + void currentChanged (const QModelIndex & current, const QModelIndex & previous) override; + void rowsInserted (const QModelIndex & parent, int start, int end) override; + void rowsAboutToBeRemoved (const QModelIndex & parent, int start, int end) override; + void drawBranches(QPainter *painter, const QRect &rect, const QModelIndex &index) const override; + QStyleOptionViewItem viewOptions() const override; + void contextMenuEvent(QContextMenuEvent *event) override; + bool event(QEvent*) override; private: void setEditorMode(const QModelIndex & parent, int start, int end); diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index ecef0408b3..a81a8c13ae 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -1355,7 +1355,7 @@ public: { } - bool apply(const std::string &propName) { + bool apply(const std::string &propName) override { if (!ExpressionBinding::apply(propName)) { // clazy:exclude=skipped-base-method QVariant data = property("coords"); if (data.canConvert()) { diff --git a/src/Gui/propertyeditor/PropertyItem.h b/src/Gui/propertyeditor/PropertyItem.h index ac230e38da..bde6df92ea 100644 --- a/src/Gui/propertyeditor/PropertyItem.h +++ b/src/Gui/propertyeditor/PropertyItem.h @@ -98,7 +98,7 @@ private: static PropertyItemFactory* _singleton; PropertyItemFactory(){} - ~PropertyItemFactory(){} + ~PropertyItemFactory() override{} }; template @@ -108,9 +108,9 @@ public: PropertyItemProducer(const char* className) { PropertyItemFactory::instance().AddProducer(className, this); } - virtual ~PropertyItemProducer() { + ~PropertyItemProducer() override { } - virtual void* Produce () const { + void* Produce () const override { return CLASS::create(); } }; @@ -126,7 +126,7 @@ class GuiExport PropertyItem : public QObject, public ExpressionBinding PROPERTYITEM_HEADER public: - ~PropertyItem(); + ~PropertyItem() override; /** Sets the current property objects. */ void setPropertyData( const std::vector& ); @@ -152,8 +152,8 @@ public: /**override the bind functions to ensure we issue the propertyBound() call, which is then overloaded by childs which like to be informed of a binding*/ - virtual void bind(const App::Property& prop); - virtual void bind(const App::ObjectIdentifier& _path); + void bind(const App::Property& prop) override; + void bind(const App::ObjectIdentifier& _path) override; virtual void propertyBound() {} QString expressionAsString() const; @@ -203,7 +203,7 @@ protected: virtual void initialize(); //gets called when the bound expression is changed - virtual void onChange(); + void onChange() override; protected: QString propName; @@ -228,13 +228,13 @@ class GuiExport PropertyStringItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyStringItem(); @@ -249,13 +249,13 @@ class GuiExport PropertyFontItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyFontItem(); @@ -270,10 +270,10 @@ class GuiExport PropertySeparatorItem : public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - bool isSeparator() const { return true; } - QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; + bool isSeparator() const override { return true; } + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; - virtual int row() const { + int row() const override { return _row<0?PropertyItem::row():_row; } @@ -291,14 +291,14 @@ class GuiExport PropertyIntegerItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyIntegerItem(); @@ -313,14 +313,14 @@ class GuiExport PropertyIntegerConstraintItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyIntegerConstraintItem(); @@ -335,14 +335,14 @@ class GuiExport PropertyFloatItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyFloatItem(); @@ -357,14 +357,14 @@ class GuiExport PropertyUnitItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; PropertyUnitItem(); }; @@ -378,7 +378,7 @@ class GuiExport PropertyUnitConstraintItem: public PropertyUnitItem Q_OBJECT PROPERTYITEM_HEADER - virtual void setEditorData(QWidget *editor, const QVariant& data) const; + void setEditorData(QWidget *editor, const QVariant& data) const override; protected: PropertyUnitConstraintItem(); @@ -393,14 +393,14 @@ class GuiExport PropertyFloatConstraintItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyFloatConstraintItem(); @@ -427,8 +427,8 @@ class GuiExport PropertyAngleItem : public PropertyUnitConstraintItem PROPERTYITEM_HEADER protected: - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant toString(const QVariant&) const; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant toString(const QVariant&) const override; protected: PropertyAngleItem(); @@ -443,13 +443,13 @@ class GuiExport PropertyBoolItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyBoolItem(); @@ -468,9 +468,9 @@ class GuiExport PropertyVectorItem: public PropertyItem Q_PROPERTY(double z READ z WRITE setZ DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; double x() const; void setX(double x); @@ -480,13 +480,13 @@ class GuiExport PropertyVectorItem: public PropertyItem void setZ(double z); protected: - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyVectorItem(); - virtual void propertyBound(); + void propertyBound() override; private: PropertyFloatItem* m_x; @@ -500,7 +500,7 @@ class PropertyEditorWidget : public QWidget public: PropertyEditorWidget (QWidget * parent = nullptr); - virtual ~PropertyEditorWidget(); + ~PropertyEditorWidget() override; QVariant value() const; @@ -509,7 +509,7 @@ public Q_SLOTS: protected: virtual void showValue(const QVariant& data); - void resizeEvent(QResizeEvent*); + void resizeEvent(QResizeEvent*) override; Q_SIGNALS: void buttonClick(); @@ -529,7 +529,7 @@ public: VectorListWidget (int decimals, QWidget * parent = nullptr); protected: - virtual void showValue(const QVariant& data) override; + void showValue(const QVariant& data) override; private Q_SLOTS: void buttonClicked(); @@ -547,14 +547,14 @@ class GuiExport PropertyVectorListItem : public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyVectorListItem(); @@ -573,11 +573,11 @@ class GuiExport PropertyVectorDistanceItem: public PropertyItem Q_PROPERTY(Base::Quantity z READ z WRITE setZ DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; - virtual void propertyBound(); + void propertyBound() override; Base::Quantity x() const; void setX(Base::Quantity x); @@ -587,9 +587,9 @@ class GuiExport PropertyVectorDistanceItem: public PropertyItem void setZ(Base::Quantity z); protected: - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; PropertyVectorDistanceItem(); @@ -633,9 +633,9 @@ class GuiExport PropertyMatrixItem: public PropertyItem Q_PROPERTY(double A44 READ getA44 WRITE setA44 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; double getA11() const; void setA11(double A11); @@ -671,13 +671,13 @@ class GuiExport PropertyMatrixItem: public PropertyItem void setA44(double A44); protected: - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyMatrixItem(); - virtual QVariant toolTip(const App::Property*) const; + QVariant toolTip(const App::Property*) const override; private: PropertyFloatItem* m_a11; @@ -731,12 +731,12 @@ class GuiExport PropertyRotationItem: public PropertyItem Q_PROPERTY(Base::Vector3d Axis READ getAxis WRITE setAxis DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; - virtual void propertyBound(); - virtual void assignProperty(const App::Property*); + void propertyBound() override; + void assignProperty(const App::Property*) override; Base::Quantity getAngle() const; void setAngle(Base::Quantity); @@ -745,11 +745,11 @@ class GuiExport PropertyRotationItem: public PropertyItem protected: PropertyRotationItem(); - ~PropertyRotationItem(); - virtual QVariant toolTip(const App::Property*) const; - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + ~PropertyRotationItem() override; + QVariant toolTip(const App::Property*) const override; + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; private: mutable RotationHelper h; @@ -763,14 +763,14 @@ class PlacementEditor : public Gui::LabelButton public: PlacementEditor(const QString& name, QWidget * parent = nullptr); - ~PlacementEditor(); + ~PlacementEditor() override; private Q_SLOTS: void updateValue(const QVariant& v, bool, bool); private: - void browse(); - void showValue(const QVariant& d); + void browse() override; + void showValue(const QVariant& d) override; private: QPointer _task; @@ -789,12 +789,12 @@ class GuiExport PropertyPlacementItem: public PropertyItem Q_PROPERTY(Base::Vector3d Position READ getPosition WRITE setPosition DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; - virtual void propertyBound(); - virtual void assignProperty(const App::Property*); + void propertyBound() override; + void assignProperty(const App::Property*) override; Base::Quantity getAngle() const; void setAngle(Base::Quantity); @@ -805,11 +805,11 @@ class GuiExport PropertyPlacementItem: public PropertyItem protected: PropertyPlacementItem(); - ~PropertyPlacementItem(); - virtual QVariant toolTip(const App::Property*) const; - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + ~PropertyPlacementItem() override; + QVariant toolTip(const App::Property*) const override; + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; private: mutable RotationHelper h; @@ -830,17 +830,17 @@ class GuiExport PropertyEnumItem: public PropertyItem Q_PROPERTY(QStringList Enum READ getEnum WRITE setEnum DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; QStringList getEnum() const; void setEnum(QStringList); protected: - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); - virtual void propertyBound(); + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; + void propertyBound() override; protected: PropertyEnumItem(); @@ -870,14 +870,14 @@ class GuiExport PropertyStringListItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyStringListItem(); @@ -892,14 +892,14 @@ class GuiExport PropertyFloatListItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyFloatListItem(); @@ -914,14 +914,14 @@ class GuiExport PropertyIntegerListItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyIntegerListItem(); @@ -936,15 +936,15 @@ class GuiExport PropertyColorItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant decoration(const QVariant&) const; - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant decoration(const QVariant&) const override; + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyColorItem(); @@ -965,11 +965,11 @@ class GuiExport PropertyMaterialItem : public PropertyItem Q_PROPERTY(float Transparency READ getTransparency WRITE setTransparency DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; - virtual void propertyBound(); + void propertyBound() override; QColor getAmbientColor() const; void setAmbientColor(const QColor&); @@ -986,13 +986,13 @@ class GuiExport PropertyMaterialItem : public PropertyItem protected: PropertyMaterialItem(); - virtual ~PropertyMaterialItem(); + ~PropertyMaterialItem() override; - virtual QVariant decoration(const QVariant&) const; - virtual QVariant toolTip(const App::Property*) const; - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant decoration(const QVariant&) const override; + QVariant toolTip(const App::Property*) const override; + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; private: PropertyColorItem* ambient; @@ -1014,11 +1014,11 @@ class GuiExport PropertyMaterialListItem : public PropertyItem Q_PROPERTY(float Transparency READ getTransparency WRITE setTransparency DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; - virtual void propertyBound(); + void propertyBound() override; QColor getAmbientColor() const; void setAmbientColor(const QColor&); @@ -1035,13 +1035,13 @@ class GuiExport PropertyMaterialListItem : public PropertyItem protected: PropertyMaterialListItem(); - virtual ~PropertyMaterialListItem(); + ~PropertyMaterialListItem() override; - virtual QVariant decoration(const QVariant&) const; - virtual QVariant toolTip(const App::Property*) const; - virtual QVariant toString(const QVariant&) const; - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant decoration(const QVariant&) const override; + QVariant toolTip(const App::Property*) const override; + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; private: PropertyColorItem* ambient; @@ -1061,17 +1061,17 @@ class GuiExport PropertyFileItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyFileItem(); - virtual QVariant toolTip(const App::Property*) const; + QVariant toolTip(const App::Property*) const override; }; /** @@ -1083,17 +1083,17 @@ class GuiExport PropertyPathItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyPathItem(); - virtual QVariant toolTip(const App::Property*) const; + QVariant toolTip(const App::Property*) const override; }; /** @@ -1105,17 +1105,17 @@ class GuiExport PropertyTransientFileItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const; - virtual void setEditorData(QWidget *editor, const QVariant& data) const; - virtual QVariant editorData(QWidget *editor) const; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant value(const App::Property*) const; - virtual void setValue(const QVariant&); + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; protected: PropertyTransientFileItem(); - virtual QVariant toolTip(const App::Property*) const; + QVariant toolTip(const App::Property*) const override; }; class LinkSelection : public QObject @@ -1124,7 +1124,7 @@ class LinkSelection : public QObject public: LinkSelection(const App::SubObjectT &); - ~LinkSelection(); + ~LinkSelection() override; public Q_SLOTS: void select(); @@ -1140,12 +1140,12 @@ class LinkLabel : public QWidget public: LinkLabel (QWidget * parent, const App::Property *prop); - virtual ~LinkLabel(); + ~LinkLabel() override; void updatePropertyLink(); QVariant propertyLink() const; protected: - void resizeEvent(QResizeEvent*); + void resizeEvent(QResizeEvent*) override; protected Q_SLOTS: void onLinkActivated(const QString&); @@ -1173,15 +1173,15 @@ class GuiExport PropertyLinkItem: public PropertyItem Q_OBJECT PROPERTYITEM_HEADER - virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; - virtual void setEditorData(QWidget *editor, const QVariant& data) const override; - virtual QVariant editorData(QWidget *editor) const override; + QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget *editor, const QVariant& data) const override; + QVariant editorData(QWidget *editor) const override; protected: - virtual QVariant toString(const QVariant&) const override; - virtual QVariant value(const App::Property*) const override; - virtual void setValue(const QVariant&) override; - virtual QVariant data(int column, int role) const override; + QVariant toString(const QVariant&) const override; + QVariant value(const App::Property*) const override; + void setValue(const QVariant&) override; + QVariant data(int column, int role) const override; protected: PropertyLinkItem(); @@ -1204,10 +1204,10 @@ class PropertyItemEditorFactory : public QItemEditorFactory { public: PropertyItemEditorFactory(); - virtual ~PropertyItemEditorFactory(); + ~PropertyItemEditorFactory() override; - virtual QWidget *createEditor(int userType, QWidget *parent) const; - virtual QByteArray valuePropertyName(int userType) const; + QWidget *createEditor(int userType, QWidget *parent) const override; + QByteArray valuePropertyName(int userType) const override; }; } // namespace PropertyEditor diff --git a/src/Gui/propertyeditor/PropertyItemDelegate.h b/src/Gui/propertyeditor/PropertyItemDelegate.h index 1b543902b7..b464207aa5 100644 --- a/src/Gui/propertyeditor/PropertyItemDelegate.h +++ b/src/Gui/propertyeditor/PropertyItemDelegate.h @@ -37,17 +37,17 @@ class PropertyItemDelegate : public QItemDelegate public: PropertyItemDelegate(QObject* parent); - ~PropertyItemDelegate(); + ~PropertyItemDelegate() override; - virtual void paint(QPainter *painter, const QStyleOptionViewItem &opt, const QModelIndex &index) const; - virtual QWidget * createEditor (QWidget *, const QStyleOptionViewItem&, const QModelIndex&) const; - virtual void setEditorData(QWidget *editor, const QModelIndex &index) const; - virtual void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex& index ) const; - virtual QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const; - virtual bool editorEvent (QEvent *event, QAbstractItemModel *model, - const QStyleOptionViewItem& option, const QModelIndex& index); + void paint(QPainter *painter, const QStyleOptionViewItem &opt, const QModelIndex &index) const override; + QWidget * createEditor (QWidget *, const QStyleOptionViewItem&, const QModelIndex&) const override; + void setEditorData(QWidget *editor, const QModelIndex &index) const override; + void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex& index ) const override; + QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const override; + bool editorEvent (QEvent *event, QAbstractItemModel *model, + const QStyleOptionViewItem& option, const QModelIndex& index) override; protected: - bool eventFilter(QObject *, QEvent *); + bool eventFilter(QObject *, QEvent *) override; public Q_SLOTS: void valueChanged(); diff --git a/src/Gui/propertyeditor/PropertyModel.h b/src/Gui/propertyeditor/PropertyModel.h index 37d06d2596..f23ef9d57a 100644 --- a/src/Gui/propertyeditor/PropertyModel.h +++ b/src/Gui/propertyeditor/PropertyModel.h @@ -46,21 +46,21 @@ public: typedef std::vector< std::pair< std::string, std::vector > > PropertyList; PropertyModel(QObject* parent); - virtual ~PropertyModel(); + ~PropertyModel() override; - QModelIndex buddy (const QModelIndex & index) const; - int columnCount (const QModelIndex & parent = QModelIndex()) const; - QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const; - bool setData (const QModelIndex & idx, const QVariant & value, int role); - Qt::ItemFlags flags(const QModelIndex &index) const; - QModelIndex index (int row, int column, const QModelIndex & parent = QModelIndex()) const; - QModelIndex parent (const QModelIndex & index) const; - int rowCount (const QModelIndex & parent = QModelIndex()) const; - QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - bool setHeaderData (int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole); + QModelIndex buddy (const QModelIndex & index) const override; + int columnCount (const QModelIndex & parent = QModelIndex()) const override; + QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override; + bool setData (const QModelIndex & idx, const QVariant & value, int role) override; + Qt::ItemFlags flags(const QModelIndex &index) const override; + QModelIndex index (int row, int column, const QModelIndex & parent = QModelIndex()) const override; + QModelIndex parent (const QModelIndex & index) const override; + int rowCount (const QModelIndex & parent = QModelIndex()) const override; + QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + bool setHeaderData (int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole) override; void buildUp(const PropertyList& props); - bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex()); + bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex()) override; void updateProperty(const App::Property&); void appendProperty(const App::Property&);