From 1f57ba5fec6f3c4d42ee9ae52d2cd096ef3befaf Mon Sep 17 00:00:00 2001 From: sirhc808 Date: Tue, 2 Jul 2019 12:45:05 -0500 Subject: [PATCH] improve physical structure --- AudioDevice.cpp => Audio/AudioDevice.cpp | 20 +++++++++---------- AudioDevice.hpp => Audio/AudioDevice.hpp | 0 soundin.cpp => Audio/soundin.cpp | 0 soundin.h => Audio/soundin.h | 2 +- soundout.cpp => Audio/soundout.cpp | 0 soundout.h => Audio/soundout.h | 0 CMakeLists.txt | 18 ++++++++--------- Configuration.cpp | 2 +- Configuration.hpp | 2 +- decodedtext.cpp => Decoder/decodedtext.cpp | 0 decodedtext.h => Decoder/decodedtext.h | 0 Detector/Detector.hpp | 2 +- MetaDataRegistry.cpp | 2 +- Modulator.cpp => Modulator/Modulator.cpp | 2 +- Modulator.hpp => Modulator/Modulator.hpp | 2 +- LotWUsers.cpp => Network/LotWUsers.cpp | 0 LotWUsers.hpp => Network/LotWUsers.hpp | 0 wsprnet.cpp => Network/wsprnet.cpp | 0 wsprnet.h => Network/wsprnet.h | 0 .../WSPRBandHopping.cpp | 0 .../WSPRBandHopping.hpp | 0 .../WsprTxScheduler.cpp | 0 WsprTxScheduler.h => WSPR/WsprTxScheduler.h | 0 doc/design/DecoderRefactor.puml | 3 +++ widgets/displaytext.cpp | 2 +- widgets/displaytext.h | 2 +- widgets/mainwindow.cpp | 12 +++++------ widgets/mainwindow.h | 4 ++-- 28 files changed, 39 insertions(+), 36 deletions(-) rename AudioDevice.cpp => Audio/AudioDevice.cpp (95%) rename AudioDevice.hpp => Audio/AudioDevice.hpp (100%) rename soundin.cpp => Audio/soundin.cpp (100%) rename soundin.h => Audio/soundin.h (97%) rename soundout.cpp => Audio/soundout.cpp (100%) rename soundout.h => Audio/soundout.h (100%) rename decodedtext.cpp => Decoder/decodedtext.cpp (100%) rename decodedtext.h => Decoder/decodedtext.h (100%) rename Modulator.cpp => Modulator/Modulator.cpp (99%) rename Modulator.hpp => Modulator/Modulator.hpp (98%) rename LotWUsers.cpp => Network/LotWUsers.cpp (100%) rename LotWUsers.hpp => Network/LotWUsers.hpp (100%) rename wsprnet.cpp => Network/wsprnet.cpp (100%) rename wsprnet.h => Network/wsprnet.h (100%) rename WSPRBandHopping.cpp => WSPR/WSPRBandHopping.cpp (100%) rename WSPRBandHopping.hpp => WSPR/WSPRBandHopping.hpp (100%) rename WsprTxScheduler.cpp => WSPR/WsprTxScheduler.cpp (100%) rename WsprTxScheduler.h => WSPR/WsprTxScheduler.h (100%) diff --git a/AudioDevice.cpp b/Audio/AudioDevice.cpp similarity index 95% rename from AudioDevice.cpp rename to Audio/AudioDevice.cpp index 8dae74707..2b8525826 100644 --- a/AudioDevice.cpp +++ b/Audio/AudioDevice.cpp @@ -1,10 +1,10 @@ -#include "AudioDevice.hpp" - -bool AudioDevice::initialize (OpenMode mode, Channel channel) -{ - m_channel = channel; - - // open and ensure we are unbuffered if possible - return QIODevice::open (mode | QIODevice::Unbuffered); -} - +#include "AudioDevice.hpp" + +bool AudioDevice::initialize (OpenMode mode, Channel channel) +{ + m_channel = channel; + + // open and ensure we are unbuffered if possible + return QIODevice::open (mode | QIODevice::Unbuffered); +} + diff --git a/AudioDevice.hpp b/Audio/AudioDevice.hpp similarity index 100% rename from AudioDevice.hpp rename to Audio/AudioDevice.hpp diff --git a/soundin.cpp b/Audio/soundin.cpp similarity index 100% rename from soundin.cpp rename to Audio/soundin.cpp diff --git a/soundin.h b/Audio/soundin.h similarity index 97% rename from soundin.h rename to Audio/soundin.h index 0f05493c9..325d5e89d 100644 --- a/soundin.h +++ b/Audio/soundin.h @@ -9,7 +9,7 @@ #include #include -#include "AudioDevice.hpp" +#include "Audio/AudioDevice.hpp" class QAudioDeviceInfo; class QAudioInput; diff --git a/soundout.cpp b/Audio/soundout.cpp similarity index 100% rename from soundout.cpp rename to Audio/soundout.cpp diff --git a/soundout.h b/Audio/soundout.h similarity index 100% rename from soundout.h rename to Audio/soundout.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 12dff5e9d..bc3b5fb75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,7 +243,7 @@ set (wsjt_qt_CXXSRCS validators/LiveFrequencyValidator.cpp GetUserId.cpp TraceFile.cpp - AudioDevice.cpp + Audio/AudioDevice.cpp Transceiver/Transceiver.cpp Transceiver/TransceiverBase.cpp Transceiver/EmulateSplitTransceiver.cpp @@ -271,7 +271,7 @@ set (wsjt_qt_CXXSRCS Transceiver/EqualizationToolsDialog.cpp widgets/DoubleClickablePushButton.cpp widgets/DoubleClickableRadioButton.cpp - LotWUsers.cpp + Network/LotWUsers.cpp models/DecodeHighlightingModel.cpp widgets/DecodeHighlightingListView.cpp models/FoxLog.cpp @@ -304,14 +304,14 @@ set (jt9_CXXSRCS set (wsjtx_CXXSRCS logbook/logbook.cpp Network/psk_reporter.cpp - Modulator.cpp + Modulator/Modulator.cpp Detector/Detector.cpp widgets/logqso.cpp widgets/displaytext.cpp - decodedtext.cpp + Decoder/decodedtext.cpp getfile.cpp - soundout.cpp - soundin.cpp + Audio/soundout.cpp + Audio/soundin.cpp widgets/meterwidget.cpp widgets/signalmeter.cpp widgets/plotter.cpp @@ -324,12 +324,12 @@ set (wsjtx_CXXSRCS widgets/astro.cpp widgets/messageaveraging.cpp widgets/colorhighlighting.cpp - WsprTxScheduler.cpp + WSPR/WsprTxScheduler.cpp widgets/mainwindow.cpp Configuration.cpp main.cpp - wsprnet.cpp - WSPRBandHopping.cpp + Network/wsprnet.cpp + WSPR/WSPRBandHopping.cpp widgets/ExportCabrillo.cpp ) diff --git a/Configuration.cpp b/Configuration.cpp index 42f7c790d..940ab988c 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -183,7 +183,7 @@ #include "widgets/MessageBox.hpp" #include "validators/MaidenheadLocatorValidator.hpp" #include "validators/CallsignValidator.hpp" -#include "LotWUsers.hpp" +#include "Network/LotWUsers.hpp" #include "models/DecodeHighlightingModel.hpp" #include "logbook/logbook.h" diff --git a/Configuration.hpp b/Configuration.hpp index c79c8b202..1c9a0337a 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -6,7 +6,7 @@ #include "Radio.hpp" #include "models/IARURegions.hpp" -#include "AudioDevice.hpp" +#include "Audio/AudioDevice.hpp" #include "Transceiver/Transceiver.hpp" #include "pimpl_h.hpp" diff --git a/decodedtext.cpp b/Decoder/decodedtext.cpp similarity index 100% rename from decodedtext.cpp rename to Decoder/decodedtext.cpp diff --git a/decodedtext.h b/Decoder/decodedtext.h similarity index 100% rename from decodedtext.h rename to Decoder/decodedtext.h diff --git a/Detector/Detector.hpp b/Detector/Detector.hpp index 412961d6b..53723d431 100644 --- a/Detector/Detector.hpp +++ b/Detector/Detector.hpp @@ -1,6 +1,6 @@ #ifndef DETECTOR_HPP__ #define DETECTOR_HPP__ -#include "AudioDevice.hpp" +#include "Audio/AudioDevice.hpp" #include // diff --git a/MetaDataRegistry.cpp b/MetaDataRegistry.cpp index a3a18439d..4a93131aa 100644 --- a/MetaDataRegistry.cpp +++ b/MetaDataRegistry.cpp @@ -6,7 +6,7 @@ #include "Radio.hpp" #include "models/FrequencyList.hpp" -#include "AudioDevice.hpp" +#include "Audio/AudioDevice.hpp" #include "Configuration.hpp" #include "models/StationList.hpp" #include "Transceiver/Transceiver.hpp" diff --git a/Modulator.cpp b/Modulator/Modulator.cpp similarity index 99% rename from Modulator.cpp rename to Modulator/Modulator.cpp index 4d0171770..ca9942e98 100644 --- a/Modulator.cpp +++ b/Modulator/Modulator.cpp @@ -4,7 +4,7 @@ #include #include #include "widgets/mainwindow.h" // TODO: G4WJS - break this dependency -#include "soundout.h" +#include "Audio/soundout.h" #include "commons.h" #include "moc_Modulator.cpp" diff --git a/Modulator.hpp b/Modulator/Modulator.hpp similarity index 98% rename from Modulator.hpp rename to Modulator/Modulator.hpp index 3371cbe5e..1043be697 100644 --- a/Modulator.hpp +++ b/Modulator/Modulator.hpp @@ -4,7 +4,7 @@ #include #include -#include "AudioDevice.hpp" +#include "Audio/AudioDevice.hpp" class SoundOutput; diff --git a/LotWUsers.cpp b/Network/LotWUsers.cpp similarity index 100% rename from LotWUsers.cpp rename to Network/LotWUsers.cpp diff --git a/LotWUsers.hpp b/Network/LotWUsers.hpp similarity index 100% rename from LotWUsers.hpp rename to Network/LotWUsers.hpp diff --git a/wsprnet.cpp b/Network/wsprnet.cpp similarity index 100% rename from wsprnet.cpp rename to Network/wsprnet.cpp diff --git a/wsprnet.h b/Network/wsprnet.h similarity index 100% rename from wsprnet.h rename to Network/wsprnet.h diff --git a/WSPRBandHopping.cpp b/WSPR/WSPRBandHopping.cpp similarity index 100% rename from WSPRBandHopping.cpp rename to WSPR/WSPRBandHopping.cpp diff --git a/WSPRBandHopping.hpp b/WSPR/WSPRBandHopping.hpp similarity index 100% rename from WSPRBandHopping.hpp rename to WSPR/WSPRBandHopping.hpp diff --git a/WsprTxScheduler.cpp b/WSPR/WsprTxScheduler.cpp similarity index 100% rename from WsprTxScheduler.cpp rename to WSPR/WsprTxScheduler.cpp diff --git a/WsprTxScheduler.h b/WSPR/WsprTxScheduler.h similarity index 100% rename from WsprTxScheduler.h rename to WSPR/WsprTxScheduler.h diff --git a/doc/design/DecoderRefactor.puml b/doc/design/DecoderRefactor.puml index 910e16758..acdf946bf 100644 --- a/doc/design/DecoderRefactor.puml +++ b/doc/design/DecoderRefactor.puml @@ -8,6 +8,9 @@ interface IDecoder interface IEncoder interface IDecode +IDecoder <-- IProtocol +IEncoder <-- IProtocol + class FT8 IProtocol <|-- FT8 diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp index 53d7cd5cd..21459b3bb 100644 --- a/widgets/displaytext.cpp +++ b/widgets/displaytext.cpp @@ -16,7 +16,7 @@ #include #include "Configuration.hpp" -#include "LotWUsers.hpp" +#include "Network/LotWUsers.hpp" #include "models/DecodeHighlightingModel.hpp" #include "logbook/logbook.h" diff --git a/widgets/displaytext.h b/widgets/displaytext.h index 8b580b8a2..5aa8c7103 100644 --- a/widgets/displaytext.h +++ b/widgets/displaytext.h @@ -8,7 +8,7 @@ #include #include -#include "decodedtext.h" +#include "Decoder/decodedtext.h" class QAction; class Configuration; diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 1ac1c8ac9..7b9ea3677 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -43,9 +43,9 @@ #include "revision_utils.hpp" #include "qt_helpers.hpp" #include "Network/NetworkAccessManager.hpp" -#include "soundout.h" -#include "soundin.h" -#include "Modulator.hpp" +#include "Audio/soundout.h" +#include "Audio/soundin.h" +#include "Modulator/Modulator.hpp" #include "Detector/Detector.hpp" #include "plotter.h" #include "echoplot.h" @@ -58,14 +58,14 @@ #include "widegraph.h" #include "sleep.h" #include "logqso.h" -#include "decodedtext.h" +#include "Decoder/decodedtext.h" #include "Radio.hpp" #include "models/Bands.hpp" #include "Transceiver/TransceiverFactory.hpp" #include "models/StationList.hpp" #include "validators/LiveFrequencyValidator.hpp" #include "Network/MessageClient.hpp" -#include "wsprnet.h" +#include "Network/wsprnet.h" #include "signalmeter.h" #include "HelpTextWindow.hpp" #include "SampleDownloader.hpp" @@ -74,7 +74,7 @@ #include "validators/MaidenheadLocatorValidator.hpp" #include "validators/CallsignValidator.hpp" #include "Transceiver/EqualizationToolsDialog.hpp" -#include "LotWUsers.hpp" +#include "Network/LotWUsers.hpp" #include "logbook/AD1CCty.hpp" #include "models/FoxLog.hpp" #include "models/CabrilloLog.hpp" diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 6b2b0d08e..7718a24d5 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -22,13 +22,13 @@ #include #include -#include "AudioDevice.hpp" +#include "Audio/AudioDevice.hpp" #include "commons.h" #include "Radio.hpp" #include "models/Modes.hpp" #include "models/FrequencyList.hpp" #include "Configuration.hpp" -#include "WSPRBandHopping.hpp" +#include "WSPR/WSPRBandHopping.hpp" #include "Transceiver/Transceiver.hpp" #include "DisplayManual.hpp" #include "Network/psk_reporter.h"