diff --git a/src/ngscopeclient/AddMiscDialog.cpp b/src/ngscopeclient/AddMiscDialog.cpp deleted file mode 100644 index e404b63d..00000000 --- a/src/ngscopeclient/AddMiscDialog.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/*********************************************************************************************************************** -* * -* ngscopeclient * -* * -* Copyright (c) 2012-2024 Andrew D. Zonenberg and contributors * -* All rights reserved. * -* * -* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * -* following conditions are met: * -* * -* * Redistributions of source code must retain the above copyright notice, this list of conditions, and the * -* following disclaimer. * -* * -* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the * -* following disclaimer in the documentation and/or other materials provided with the distribution. * -* * -* * Neither the name of the author nor the names of any contributors may be used to endorse or promote products * -* derived from this software without specific prior written permission. * -* * -* THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * -* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * -* THE AUTHORS BE HELD LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * -* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -* POSSIBILITY OF SUCH DAMAGE. * -* * -***********************************************************************************************************************/ - -/** - @file - @author Andrew D. Zonenberg - @brief Implementation of AddMiscDialog - */ - -#include "ngscopeclient.h" -#include "AddMiscDialog.h" - -using namespace std; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Construction / destruction - -AddMiscDialog::AddMiscDialog(Session& session) - : AddInstrumentDialog("Add Misc Instrument", "inst", session, "misc") -{ -} - -AddMiscDialog::~AddMiscDialog() -{ -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// UI event handlers - -/** - @brief Connects to a scope - - @return True if successful - */ -bool AddMiscDialog::DoConnect(SCPITransport* transport) -{ - //Create the instrument - auto inst = SCPIMiscInstrument::CreateInstrument(m_drivers[m_selectedDriver], transport); - if(inst == nullptr) - { - ShowErrorPopup( - "Driver error", - "Failed to create misc instrument driver of type \"" + m_drivers[m_selectedDriver] + "\""); - delete transport; - return false; - } - - //TODO: apply preferences - LogDebug("FIXME: apply PreferenceManager settings to newly created misc instrument\n"); - - inst->m_nickname = m_nickname; - m_session.AddInstrument(inst); - return true; -} diff --git a/src/ngscopeclient/AddMiscDialog.h b/src/ngscopeclient/AddMiscDialog.h deleted file mode 100644 index 1e274d41..00000000 --- a/src/ngscopeclient/AddMiscDialog.h +++ /dev/null @@ -1,50 +0,0 @@ -/*********************************************************************************************************************** -* * -* glscopeclient * -* * -* Copyright (c) 2012-2023 Andrew D. Zonenberg * -* All rights reserved. * -* * -* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * -* following conditions are met: * -* * -* * Redistributions of source code must retain the above copyright notice, this list of conditions, and the * -* following disclaimer. * -* * -* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the * -* following disclaimer in the documentation and/or other materials provided with the distribution. * -* * -* * Neither the name of the author nor the names of any contributors may be used to endorse or promote products * -* derived from this software without specific prior written permission. * -* * -* THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * -* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * -* THE AUTHORS BE HELD LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * -* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -* POSSIBILITY OF SUCH DAMAGE. * -* * -***********************************************************************************************************************/ - -/** - @file - @author Andrew D. Zonenberg - @brief Declaration of AddMiscDialog - */ -#ifndef AddMiscDialog_h -#define AddMiscDialog_h - -#include "AddInstrumentDialog.h" - -class AddMiscDialog : public AddInstrumentDialog -{ -public: - AddMiscDialog(Session& session); - virtual ~AddMiscDialog(); - -protected: - virtual bool DoConnect(SCPITransport* transport); -}; - -#endif diff --git a/src/ngscopeclient/AddMultimeterDialog.cpp b/src/ngscopeclient/AddMultimeterDialog.cpp deleted file mode 100644 index 188cd093..00000000 --- a/src/ngscopeclient/AddMultimeterDialog.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/*********************************************************************************************************************** -* * -* ngscopeclient * -* * -* Copyright (c) 2012-2024 Andrew D. Zonenberg * -* All rights reserved. * -* * -* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * -* following conditions are met: * -* * -* * Redistributions of source code must retain the above copyright notice, this list of conditions, and the * -* following disclaimer. * -* * -* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the * -* following disclaimer in the documentation and/or other materials provided with the distribution. * -* * -* * Neither the name of the author nor the names of any contributors may be used to endorse or promote products * -* derived from this software without specific prior written permission. * -* * -* THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * -* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * -* THE AUTHORS BE HELD LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * -* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -* POSSIBILITY OF SUCH DAMAGE. * -* * -***********************************************************************************************************************/ - -/** - @file - @author Andrew D. Zonenberg - @brief Implementation of AddMultimeterDialog - */ - -#include "ngscopeclient.h" -#include "AddMultimeterDialog.h" - -using namespace std; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Construction / destruction - -AddMultimeterDialog::AddMultimeterDialog(Session& session) - : AddInstrumentDialog("Add Multimeter", "multimeter", session, "multimeter") -{ -} - -AddMultimeterDialog::~AddMultimeterDialog() -{ -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// UI event handlers - -/** - @brief Connects to a scope - - @return True if successful - */ -bool AddMultimeterDialog::DoConnect(SCPITransport* transport) -{ - //Create the meter - auto meter = SCPIMultimeter::CreateMultimeter(m_drivers[m_selectedDriver], transport); - if(meter == nullptr) - { - ShowErrorPopup( - "Driver error", - "Failed to create multimeter driver of type \"" + m_drivers[m_selectedDriver] + "\""); - delete transport; - return false; - } - - //TODO: apply preferences - LogDebug("FIXME: apply PreferenceManager settings to newly created meter\n"); - - meter->m_nickname = m_nickname; - m_session.AddInstrument(meter); - return true; -} diff --git a/src/ngscopeclient/AddMultimeterDialog.h b/src/ngscopeclient/AddMultimeterDialog.h deleted file mode 100644 index 44dd5a48..00000000 --- a/src/ngscopeclient/AddMultimeterDialog.h +++ /dev/null @@ -1,50 +0,0 @@ -/*********************************************************************************************************************** -* * -* ngscopeclient * -* * -* Copyright (c) 2012-2024 Andrew D. Zonenberg * -* All rights reserved. * -* * -* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * -* following conditions are met: * -* * -* * Redistributions of source code must retain the above copyright notice, this list of conditions, and the * -* following disclaimer. * -* * -* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the * -* following disclaimer in the documentation and/or other materials provided with the distribution. * -* * -* * Neither the name of the author nor the names of any contributors may be used to endorse or promote products * -* derived from this software without specific prior written permission. * -* * -* THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * -* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * -* THE AUTHORS BE HELD LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * -* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -* POSSIBILITY OF SUCH DAMAGE. * -* * -***********************************************************************************************************************/ - -/** - @file - @author Andrew D. Zonenberg - @brief Declaration of AddMultimeterDialog - */ -#ifndef AddMultimeterDialog_h -#define AddMultimeterDialog_h - -#include "AddInstrumentDialog.h" - -class AddMultimeterDialog : public AddInstrumentDialog -{ -public: - AddMultimeterDialog(Session& session); - virtual ~AddMultimeterDialog(); - -protected: - virtual bool DoConnect(SCPITransport* transport); -}; - -#endif diff --git a/src/ngscopeclient/AddPowerSupplyDialog.cpp b/src/ngscopeclient/AddPowerSupplyDialog.cpp deleted file mode 100644 index cf782dc7..00000000 --- a/src/ngscopeclient/AddPowerSupplyDialog.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/*********************************************************************************************************************** -* * -* ngscopeclient * -* * -* Copyright (c) 2012-2024 Andrew D. Zonenberg and contributors * -* All rights reserved. * -* * -* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * -* following conditions are met: * -* * -* * Redistributions of source code must retain the above copyright notice, this list of conditions, and the * -* following disclaimer. * -* * -* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the * -* following disclaimer in the documentation and/or other materials provided with the distribution. * -* * -* * Neither the name of the author nor the names of any contributors may be used to endorse or promote products * -* derived from this software without specific prior written permission. * -* * -* THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * -* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * -* THE AUTHORS BE HELD LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * -* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -* POSSIBILITY OF SUCH DAMAGE. * -* * -***********************************************************************************************************************/ - -/** - @file - @author Andrew D. Zonenberg - @brief Implementation of AddPowerSupplyDialog - */ - -#include "ngscopeclient.h" -#include "AddPowerSupplyDialog.h" - -using namespace std; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Construction / destruction - -AddPowerSupplyDialog::AddPowerSupplyDialog(Session& session) - : AddInstrumentDialog("Add Power Supply", "psu", session, "psu") -{ -} - -AddPowerSupplyDialog::~AddPowerSupplyDialog() -{ -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// UI event handlers - -/** - @brief Connects to a scope - - @return True if successful - */ -bool AddPowerSupplyDialog::DoConnect(SCPITransport* transport) -{ - //Create the scope - auto psu = SCPIPowerSupply::CreatePowerSupply(m_drivers[m_selectedDriver], transport); - if(psu == nullptr) - { - ShowErrorPopup( - "Driver error", - "Failed to create PSU driver of type \"" + m_drivers[m_selectedDriver] + "\""); - delete transport; - return false; - } - - //TODO: apply preferences - LogDebug("FIXME: apply PreferenceManager settings to newly created PSU\n"); - - psu->m_nickname = m_nickname; - m_session.AddInstrument(psu); - return true; -} diff --git a/src/ngscopeclient/AddPowerSupplyDialog.h b/src/ngscopeclient/AddPowerSupplyDialog.h deleted file mode 100644 index 9f5e8ee9..00000000 --- a/src/ngscopeclient/AddPowerSupplyDialog.h +++ /dev/null @@ -1,50 +0,0 @@ -/*********************************************************************************************************************** -* * -* ngscopeclient * -* * -* Copyright (c) 2012-2024 Andrew D. Zonenberg * -* All rights reserved. * -* * -* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * -* following conditions are met: * -* * -* * Redistributions of source code must retain the above copyright notice, this list of conditions, and the * -* following disclaimer. * -* * -* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the * -* following disclaimer in the documentation and/or other materials provided with the distribution. * -* * -* * Neither the name of the author nor the names of any contributors may be used to endorse or promote products * -* derived from this software without specific prior written permission. * -* * -* THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * -* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * -* THE AUTHORS BE HELD LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * -* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -* POSSIBILITY OF SUCH DAMAGE. * -* * -***********************************************************************************************************************/ - -/** - @file - @author Andrew D. Zonenberg - @brief Declaration of AddPowerSupplyDialog - */ -#ifndef AddPowerSupplyDialog_h -#define AddPowerSupplyDialog_h - -#include "AddInstrumentDialog.h" - -class AddPowerSupplyDialog : public AddInstrumentDialog -{ -public: - AddPowerSupplyDialog(Session& session); - virtual ~AddPowerSupplyDialog(); - -protected: - virtual bool DoConnect(SCPITransport* transport); -}; - -#endif diff --git a/src/ngscopeclient/AddRFGeneratorDialog.cpp b/src/ngscopeclient/AddRFGeneratorDialog.cpp deleted file mode 100644 index 88521fa9..00000000 --- a/src/ngscopeclient/AddRFGeneratorDialog.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/*********************************************************************************************************************** -* * -* ngscopeclient * -* * -* Copyright (c) 2012-2024 Andrew D. Zonenberg and contributors * -* All rights reserved. * -* * -* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * -* following conditions are met: * -* * -* * Redistributions of source code must retain the above copyright notice, this list of conditions, and the * -* following disclaimer. * -* * -* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the * -* following disclaimer in the documentation and/or other materials provided with the distribution. * -* * -* * Neither the name of the author nor the names of any contributors may be used to endorse or promote products * -* derived from this software without specific prior written permission. * -* * -* THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * -* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * -* THE AUTHORS BE HELD LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * -* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -* POSSIBILITY OF SUCH DAMAGE. * -* * -***********************************************************************************************************************/ - -/** - @file - @author Andrew D. Zonenberg - @brief Implementation of AddRFGeneratorDialog - */ - -#include "ngscopeclient.h" -#include "AddRFGeneratorDialog.h" - -using namespace std; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Construction / destruction - -AddRFGeneratorDialog::AddRFGeneratorDialog(Session& session) - : AddInstrumentDialog("Add RF Generator", "rfgen", session, "rfgen") -{ -} - -AddRFGeneratorDialog::~AddRFGeneratorDialog() -{ -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// UI event handlers - -/** - @brief Connects to a scope - - @return True if successful - */ -bool AddRFGeneratorDialog::DoConnect(SCPITransport* transport) -{ - //Create the RF Generator - auto gen = SCPIRFSignalGenerator::CreateRFSignalGenerator(m_drivers[m_selectedDriver], transport); - if(gen == nullptr) - { - ShowErrorPopup( - "Driver error", - "Failed to create RF generator driver of type \"" + m_drivers[m_selectedDriver] + "\""); - delete transport; - return false; - } - - //TODO: apply preferences - LogDebug("FIXME: apply PreferenceManager settings to newly created RF generator\n"); - - gen->m_nickname = m_nickname; - m_session.AddInstrument(gen); - return true; -} diff --git a/src/ngscopeclient/AddRFGeneratorDialog.h b/src/ngscopeclient/AddRFGeneratorDialog.h deleted file mode 100644 index 19fc8a09..00000000 --- a/src/ngscopeclient/AddRFGeneratorDialog.h +++ /dev/null @@ -1,50 +0,0 @@ -/*********************************************************************************************************************** -* * -* ngscopeclient * -* * -* Copyright (c) 2012-2024 Andrew D. Zonenberg and contributors * -* All rights reserved. * -* * -* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * -* following conditions are met: * -* * -* * Redistributions of source code must retain the above copyright notice, this list of conditions, and the * -* following disclaimer. * -* * -* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the * -* following disclaimer in the documentation and/or other materials provided with the distribution. * -* * -* * Neither the name of the author nor the names of any contributors may be used to endorse or promote products * -* derived from this software without specific prior written permission. * -* * -* THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * -* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * -* THE AUTHORS BE HELD LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * -* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -* POSSIBILITY OF SUCH DAMAGE. * -* * -***********************************************************************************************************************/ - -/** - @file - @author Andrew D. Zonenberg - @brief Declaration of AddRFGeneratorDialog - */ -#ifndef AddRFGeneratorDialog_h -#define AddRFGeneratorDialog_h - -#include "AddInstrumentDialog.h" - -class AddRFGeneratorDialog : public AddInstrumentDialog -{ -public: - AddRFGeneratorDialog(Session& session); - virtual ~AddRFGeneratorDialog(); - -protected: - virtual bool DoConnect(SCPITransport* transport); -}; - -#endif diff --git a/src/ngscopeclient/CMakeLists.txt b/src/ngscopeclient/CMakeLists.txt index 7233749d..1f5b44b8 100644 --- a/src/ngscopeclient/CMakeLists.txt +++ b/src/ngscopeclient/CMakeLists.txt @@ -43,10 +43,6 @@ add_executable(ngscopeclient AboutDialog.cpp AddInstrumentDialog.cpp - AddMiscDialog.cpp - AddMultimeterDialog.cpp - AddPowerSupplyDialog.cpp - AddRFGeneratorDialog.cpp AddScopeDialog.cpp AddSDRDialog.cpp AddSpectrometerDialog.cpp diff --git a/src/ngscopeclient/MainWindow.cpp b/src/ngscopeclient/MainWindow.cpp index 1620935a..09b08f7e 100644 --- a/src/ngscopeclient/MainWindow.cpp +++ b/src/ngscopeclient/MainWindow.cpp @@ -48,10 +48,6 @@ #include "imgui_internal.h" //Dialogs -#include "AddMultimeterDialog.h" -#include "AddPowerSupplyDialog.h" -#include "AddRFGeneratorDialog.h" -#include "AddScopeDialog.h" #include "BERTDialog.h" #include "BERTInputChannelDialog.h" #include "ChannelPropertiesDialog.h" diff --git a/src/ngscopeclient/MainWindow_Menus.cpp b/src/ngscopeclient/MainWindow_Menus.cpp index d47393bf..5fc0312e 100644 --- a/src/ngscopeclient/MainWindow_Menus.cpp +++ b/src/ngscopeclient/MainWindow_Menus.cpp @@ -43,10 +43,6 @@ //Dialogs #include "AboutDialog.h" #include "AddInstrumentDialog.h" -#include "AddMiscDialog.h" -#include "AddMultimeterDialog.h" -#include "AddPowerSupplyDialog.h" -#include "AddRFGeneratorDialog.h" #include "AddScopeDialog.h" #include "AddSDRDialog.h" #include "AddSpectrometerDialog.h" @@ -519,7 +515,7 @@ void MainWindow::AddMiscMenu(vector& timestamps, map(m_session)); + m_dialogs.emplace(make_shared("Add Miscellaneous", "misc", m_session, "misc")); ImGui::Separator(); //Find all known miscellaneous drivers.. @@ -591,7 +587,7 @@ void MainWindow::AddMultimeterMenu(vector& timestamps, map(m_session)); + m_dialogs.emplace(make_shared("Add Multimeter", "multimeter", m_session, "multimeter")); ImGui::Separator(); //Find all known multimeter drivers. @@ -737,7 +733,7 @@ void MainWindow::AddPowerSupplyMenu(vector& timestamps, map(m_session)); + m_dialogs.emplace(make_shared("Add Power Supply", "psu", m_session, "psu")); ImGui::Separator(); @@ -811,7 +807,8 @@ void MainWindow::AddRFGeneratorMenu(vector& timestamps, map(m_session)); + m_dialogs.emplace(make_shared("Add RF Generator", "rfgen", m_session, "rfgen")); + ImGui::Separator(); //Find all known function generator drivers. diff --git a/src/ngscopeclient/Session.cpp b/src/ngscopeclient/Session.cpp index 1215f0d6..00189048 100644 --- a/src/ngscopeclient/Session.cpp +++ b/src/ngscopeclient/Session.cpp @@ -2695,6 +2695,14 @@ void Session::CreateAndAddInstrument(const string& driver, SCPITransport* transp inst = SCPIFunctionGenerator::CreateFunctionGenerator(driver, transport); else if(type == "load") inst = SCPILoad::CreateLoad(driver, transport); + else if(type == "misc") + inst = SCPIMiscInstrument::CreateInstrument(driver, transport); + else if(type == "multimeter") + inst = SCPIMultimeter::CreateMultimeter(driver, transport); + else if(type == "psu") + inst = SCPIPowerSupply::CreatePowerSupply(driver, transport); + else if(type == "rfgen") + inst = SCPIRFSignalGenerator::CreateRFSignalGenerator(driver, transport); break; }