From a048d2e0df3351c182f019f75b676ff4887a3537 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Sat, 18 Dec 2021 23:42:40 +0000 Subject: [PATCH] Clean constructor of SubWindowAbstract --- app/SubWindowAbstract.cpp | 7 +------ app/SubWindowAbstract.h | 6 +++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/app/SubWindowAbstract.cpp b/app/SubWindowAbstract.cpp index e2f8876..8187d51 100644 --- a/app/SubWindowAbstract.cpp +++ b/app/SubWindowAbstract.cpp @@ -35,7 +35,7 @@ #include "MdiSubWindow.h" SubWindowAbstract::SubWindowAbstract( QWidget* parent, unsigned int category ) - : QWidget( parent ), m_cSubWindow( NULL ) + : QWidget{ parent }, m_uiCategory{ category }, m_cWindowName{ " " } { setParent( parent ); setVisible( false ); @@ -46,11 +46,6 @@ SubWindowAbstract::SubWindowAbstract( QWidget* parent, unsigned int category ) setWindowIcon( QIcon( ":/logos/calyp-icon.png" ) ); - // setWidgetResizable( true ); - m_pcLayout = NULL; - m_uiCategory = category; - m_cWindowName = QString( " " ); - connect( this, SIGNAL( destroyed() ), this, SLOT( onDestroyed() ) ); } diff --git a/app/SubWindowAbstract.h b/app/SubWindowAbstract.h index 166ac52..52c06f4 100644 --- a/app/SubWindowAbstract.h +++ b/app/SubWindowAbstract.h @@ -56,11 +56,11 @@ class SubWindowAbstract : public QWidget Q_OBJECT private: - QHBoxLayout* m_pcLayout; + QHBoxLayout* m_pcLayout{ nullptr }; unsigned int m_uiCategory; QString m_cWindowName; - MdiSubWindow* m_cSubWindow; + MdiSubWindow* m_cSubWindow{ nullptr }; public: enum SubWindowCategory @@ -90,7 +90,7 @@ public: */ virtual void zoomToFit() = 0; /** - * Scale the image (zoomed in or out) to speficied absolute zoom value (1.0 = + * Scale the image (zoomed in or out) to specified absolute zoom value (1.0 = * original size). */ virtual void zoomToFactor( double factor, QPoint center = QPoint() ) = 0;