Gui: modernize C++: use override
This commit is contained in:
@@ -46,7 +46,7 @@ class ContextMenu : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ContextMenu(QuarterWidget * quarterwidget);
|
||||
~ContextMenu();
|
||||
~ContextMenu() override;
|
||||
|
||||
QMenu * getMenu() const;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class QUARTER_DLL_API InteractionMode : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
InteractionMode(QuarterWidget * quarterwidget);
|
||||
virtual ~InteractionMode();
|
||||
~InteractionMode() override;
|
||||
|
||||
void setEnabled(bool yes);
|
||||
bool enabled() const;
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
bool on() const;
|
||||
|
||||
protected:
|
||||
virtual bool eventFilter(QObject *, QEvent * event);
|
||||
bool eventFilter(QObject *, QEvent * event) override;
|
||||
|
||||
private:
|
||||
bool keyPressEvent(QKeyEvent * event);
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
NativeEvent();
|
||||
#endif // !HAVE_SPACENAV_LIB
|
||||
|
||||
virtual ~NativeEvent();
|
||||
~NativeEvent() override;
|
||||
|
||||
private:
|
||||
void * rawevent;
|
||||
|
||||
@@ -164,10 +164,10 @@ public:
|
||||
#endif
|
||||
setFormat(surfaceFormat);
|
||||
}
|
||||
~CustomGLWidget()
|
||||
~CustomGLWidget() override
|
||||
{
|
||||
}
|
||||
void initializeGL()
|
||||
void initializeGL() override
|
||||
{
|
||||
QOpenGLContext *context = QOpenGLContext::currentContext();
|
||||
#if defined (_DEBUG) && 0
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
// gl = mdi.findChild(QtWidgets.QOpenGLWidget)
|
||||
// img = gl.grabFramebuffer()
|
||||
// \endcode
|
||||
void paintGL()
|
||||
void paintGL() override
|
||||
{
|
||||
QuarterWidget* qw = qobject_cast<QuarterWidget*>(parentWidget());
|
||||
if (qw) {
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
Qt::DirectConnection,
|
||||
QGenericReturnArgument());
|
||||
}
|
||||
bool event(QEvent *e)
|
||||
bool event(QEvent *e) override
|
||||
{
|
||||
// If a debug logger is activated then Qt's default implementation
|
||||
// first releases the context before stopping the logger. However,
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
{
|
||||
qDebug() << message;
|
||||
}
|
||||
void showEvent(QShowEvent*)
|
||||
void showEvent(QShowEvent*) override
|
||||
{
|
||||
update(); // force update when changing window mode
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
explicit QuarterWidget(QWidget * parent = nullptr, const QtGLWidget * sharewidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
explicit QuarterWidget(QtGLContext * context, QWidget * parent = nullptr, const QtGLWidget * sharewidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
explicit QuarterWidget(const QtGLFormat & format, QWidget * parent = nullptr, const QtGLWidget * shareWidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
virtual ~QuarterWidget();
|
||||
~QuarterWidget() override;
|
||||
|
||||
TransparencyType transparencyType() const;
|
||||
RenderMode renderMode() const;
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
void removeStateMachine(SoScXMLStateMachine * statemachine);
|
||||
|
||||
virtual bool processSoEvent(const SoEvent * event);
|
||||
virtual QSize minimumSizeHint() const;
|
||||
QSize minimumSizeHint() const override;
|
||||
|
||||
QList<QAction *> transparencyTypeActions() const;
|
||||
QList<QAction *> stereoModeActions() const;
|
||||
@@ -196,9 +196,9 @@ private Q_SLOTS:
|
||||
virtual void aboutToDestroyGLContext();
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent*);
|
||||
virtual void resizeEvent(QResizeEvent*);
|
||||
virtual bool viewportEvent(QEvent* event);
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void resizeEvent(QResizeEvent*) override;
|
||||
bool viewportEvent(QEvent* event) override;
|
||||
virtual void actualRedraw();
|
||||
virtual bool updateDevicePixelRatio();
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class SensorManager : public QObject {
|
||||
typedef QObject inherited;
|
||||
public:
|
||||
SensorManager();
|
||||
~SensorManager();
|
||||
~SensorManager() override;
|
||||
|
||||
public Q_SLOTS:
|
||||
void idleTimeout();
|
||||
|
||||
@@ -46,9 +46,9 @@ class SignalThread : public QThread {
|
||||
Q_OBJECT
|
||||
public:
|
||||
SignalThread();
|
||||
virtual ~SignalThread();
|
||||
~SignalThread() override;
|
||||
|
||||
virtual void run();
|
||||
void run() override;
|
||||
void trigger();
|
||||
void stopThread();
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
explicit SoQTQuarterAdaptor(QWidget* parent = nullptr, const QtGLWidget* sharewidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
explicit SoQTQuarterAdaptor(const QtGLFormat& format, QWidget* parent = nullptr, const QtGLWidget* shareWidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
explicit SoQTQuarterAdaptor(QtGLContext* context, QWidget* parent = nullptr, const QtGLWidget* sharewidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
virtual ~SoQTQuarterAdaptor();
|
||||
~SoQTQuarterAdaptor() override;
|
||||
|
||||
//the functions available in soqtviewer but missing in quarter
|
||||
QWidget* getWidget();
|
||||
@@ -93,12 +93,12 @@ public:
|
||||
virtual void resetToHomePosition();
|
||||
virtual bool hasHomePosition() const {return m_storedcamera;}
|
||||
|
||||
virtual void setSceneGraph(SoNode* root) {
|
||||
void setSceneGraph(SoNode* root) override {
|
||||
QuarterWidget::setSceneGraph(root);
|
||||
}
|
||||
|
||||
virtual bool processSoEvent(const SoEvent* event);
|
||||
virtual void paintEvent(QPaintEvent*);
|
||||
bool processSoEvent(const SoEvent* event) override;
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
|
||||
//this functions still need to be ported
|
||||
virtual void afterRealizeHook() {} //enables spacenav and joystick in soqt, dunno if this is needed
|
||||
|
||||
@@ -45,9 +45,9 @@ class QUARTER_DLL_API Keyboard : public InputDevice {
|
||||
public:
|
||||
Keyboard(QuarterWidget* quarter);
|
||||
Keyboard();
|
||||
virtual ~Keyboard();
|
||||
~Keyboard() override;
|
||||
|
||||
virtual const SoEvent * translateEvent(QEvent * event);
|
||||
const SoEvent * translateEvent(QEvent * event) override;
|
||||
|
||||
private:
|
||||
friend class KeyboardP;
|
||||
|
||||
@@ -45,9 +45,9 @@ class QUARTER_DLL_API Mouse : public InputDevice {
|
||||
public:
|
||||
Mouse(QuarterWidget* quarter);
|
||||
Mouse();
|
||||
virtual ~Mouse();
|
||||
~Mouse() override;
|
||||
|
||||
virtual const SoEvent * translateEvent(QEvent * event);
|
||||
const SoEvent * translateEvent(QEvent * event) override;
|
||||
|
||||
private:
|
||||
friend class MouseP;
|
||||
|
||||
@@ -44,8 +44,8 @@ class QUARTER_DLL_API SpaceNavigatorDevice : public InputDevice {
|
||||
public:
|
||||
SpaceNavigatorDevice(QuarterWidget* quarter);
|
||||
SpaceNavigatorDevice();
|
||||
virtual ~SpaceNavigatorDevice();
|
||||
virtual const SoEvent * translateEvent(QEvent * event);
|
||||
~SpaceNavigatorDevice() override;
|
||||
const SoEvent * translateEvent(QEvent * event) override;
|
||||
|
||||
private:
|
||||
class SpaceNavigatorDeviceP * pimpl;
|
||||
|
||||
@@ -47,10 +47,10 @@ class QUARTER_DLL_API DragDropHandler : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
DragDropHandler(QuarterWidget * parent);
|
||||
virtual ~DragDropHandler();
|
||||
~DragDropHandler() override;
|
||||
|
||||
protected:
|
||||
virtual bool eventFilter(QObject *, QEvent * event);
|
||||
bool eventFilter(QObject *, QEvent * event) override;
|
||||
|
||||
private:
|
||||
friend class DragDropHandlerP;
|
||||
|
||||
@@ -48,7 +48,7 @@ class QUARTER_DLL_API EventFilter : public QObject {
|
||||
|
||||
public:
|
||||
EventFilter(QObject * parent);
|
||||
~EventFilter();
|
||||
~EventFilter() override;
|
||||
|
||||
void registerInputDevice(InputDevice * device);
|
||||
void unregisterInputDevice(InputDevice * device);
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
const QPoint & globalMousePosition() const;
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject * obj, QEvent * event);
|
||||
bool eventFilter(QObject * obj, QEvent * event) override;
|
||||
|
||||
private:
|
||||
class EventFilterP * pimpl;
|
||||
|
||||
@@ -46,10 +46,10 @@ class FocusHandler : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
FocusHandler(QObject * parent);
|
||||
virtual ~FocusHandler();
|
||||
~FocusHandler() override;
|
||||
|
||||
protected:
|
||||
virtual bool eventFilter(QObject *, QEvent * event);
|
||||
bool eventFilter(QObject *, QEvent * event) override;
|
||||
|
||||
private:
|
||||
void focusEvent(const SbName & focusevent);
|
||||
|
||||
Reference in New Issue
Block a user