Skip to content

Commit 5d4dd2b

Browse files
committed
Removed a lot of redundant m_parent members in dialogs
1 parent 1411b69 commit 5d4dd2b

18 files changed

Lines changed: 87 additions & 54 deletions

lib

src/ngscopeclient/BERTInputChannelDialog.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2024 Andrew D. Zonenberg *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -45,9 +45,13 @@ using namespace std;
4545
// Construction / destruction
4646

4747
BERTInputChannelDialog::BERTInputChannelDialog(BERTInputChannel* chan, MainWindow* parent, bool graphEditorMode)
48-
: EmbeddableDialog(chan->GetHwname(), string("Channel properties: ") + chan->GetHwname(), ImVec2(300, 400), graphEditorMode)
48+
: EmbeddableDialog(
49+
chan->GetHwname(),
50+
string("Channel properties: ") + chan->GetHwname(),
51+
ImVec2(300, 400),
52+
parent,
53+
graphEditorMode)
4954
, m_channel(chan)
50-
, m_parent(parent)
5155
{
5256
m_committedDisplayName = m_channel->GetDisplayName();
5357
m_displayName = m_committedDisplayName;

src/ngscopeclient/BERTInputChannelDialog.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2024 Andrew D. Zonenberg *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -56,7 +56,6 @@ class BERTInputChannelDialog : public EmbeddableDialog
5656
protected:
5757

5858
BERTInputChannel* m_channel;
59-
MainWindow* m_parent;
6059

6160
bool m_invert;
6261

src/ngscopeclient/BERTOutputChannelDialog.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2024 Andrew D. Zonenberg *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -43,7 +43,12 @@ using namespace std;
4343
// Construction / destruction
4444

4545
BERTOutputChannelDialog::BERTOutputChannelDialog(BERTOutputChannel* chan, bool graphEditorMode)
46-
: EmbeddableDialog(chan->GetHwname(), string("Channel properties: ") + chan->GetHwname(), ImVec2(300, 400), graphEditorMode)
46+
: EmbeddableDialog(
47+
chan->GetHwname(),
48+
string("Channel properties: ") + chan->GetHwname(),
49+
ImVec2(300, 400),
50+
nullptr,
51+
graphEditorMode)
4752
, m_channel(chan)
4853
{
4954
m_committedDisplayName = m_channel->GetDisplayName();

src/ngscopeclient/BERTOutputChannelDialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2024 Andrew D. Zonenberg *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *

src/ngscopeclient/BaseChannelPropertiesDialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2025 Andrew D. Zonenberg *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -50,9 +50,9 @@ BaseChannelPropertiesDialog::BaseChannelPropertiesDialog(
5050
chan->GetHwname(),
5151
string("Channel properties: ") + chan->GetHwname(),
5252
ImVec2(300, 400),
53+
parent,
5354
graphEditorMode)
5455
, m_channel(chan)
55-
, m_parent(parent)
5656
{
5757
}
5858

src/ngscopeclient/BaseChannelPropertiesDialog.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2025 Andrew D. Zonenberg *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -51,8 +51,6 @@ class BaseChannelPropertiesDialog : public EmbeddableDialog
5151

5252
protected:
5353
InstrumentChannel* m_channel;
54-
55-
MainWindow* m_parent;
5654
};
5755

5856
#endif

src/ngscopeclient/DigitalIOChannelDialog.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2024 Andrew D. Zonenberg *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -45,9 +45,13 @@ using namespace std;
4545
// Construction / destruction
4646

4747
DigitalIOChannelDialog::DigitalIOChannelDialog(DigitalIOChannel* chan, MainWindow* parent, bool graphEditorMode)
48-
: EmbeddableDialog(chan->GetHwname(), string("Channel properties: ") + chan->GetHwname(), ImVec2(300, 400), graphEditorMode)
48+
: EmbeddableDialog(
49+
chan->GetHwname(),
50+
string("Channel properties: ") + chan->GetHwname(),
51+
ImVec2(300, 400),
52+
parent,
53+
graphEditorMode)
4954
, m_channel(chan)
50-
, m_parent(parent)
5155
, m_threshold("")
5256
, m_committedThreshold(0)
5357
, m_drive("")

src/ngscopeclient/DigitalIOChannelDialog.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2024 Andrew D. Zonenberg *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -53,7 +53,6 @@ class DigitalIOChannelDialog : public EmbeddableDialog
5353
protected:
5454

5555
DigitalIOChannel* m_channel;
56-
MainWindow* m_parent;
5756

5857
std::string m_threshold;
5958
float m_committedThreshold;

src/ngscopeclient/DigitalInputChannelDialog.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2024 Andrew D. Zonenberg *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -45,9 +45,13 @@ using namespace std;
4545
// Construction / destruction
4646

4747
DigitalInputChannelDialog::DigitalInputChannelDialog(DigitalInputChannel* chan, MainWindow* parent, bool graphEditorMode)
48-
: EmbeddableDialog(chan->GetHwname(), string("Channel properties: ") + chan->GetHwname(), ImVec2(300, 400), graphEditorMode)
48+
: EmbeddableDialog(
49+
chan->GetHwname(),
50+
string("Channel properties: ") + chan->GetHwname(),
51+
ImVec2(300, 400),
52+
parent,
53+
graphEditorMode)
4954
, m_channel(chan)
50-
, m_parent(parent)
5155
, m_threshold("")
5256
, m_committedThreshold(0)
5357
{

0 commit comments

Comments
 (0)