JS8Call-Improved master
Loading...
Searching...
No Matches
UI_Constructor Class Reference
Inheritance diagram for UI_Constructor:
Collaboration diagram for UI_Constructor:

Public Types

using Frequency = Radio::Frequency
using FrequencyDelta = Radio::FrequencyDelta
using Mode = Modes::Mode

Public Slots

void showSoundInError (const QString &errorMsg)
void showSoundOutError (const QString &errorMsg)
void showStatusMessage (const QString &statusMsg)
void dataSink (qint64 frames)
void guiUpdate ()
void setXIT (int n)
void qsy (int hzDelta)
void onDriftChanged (qint64 new_drift_ms)
void setFreqOffsetForRestore (int freq, bool shouldRestore)
bool tryRestoreFreqOffset ()
void changeFreq (int)
bool hasExistingMessageBufferToMe (int *pOffset)
bool hasExistingMessageBuffer (int submode, int offset, bool drift, int *pPrevOffset)
bool hasClosedExistingMessageBuffer (int offset)
void logCallActivity (CallDetail d, bool spot=true)
void logHeardGraph (QString from, QString to)
QString lookupCallInCompoundCache (QString const &call)
void cacheActivity (QString key)
void restoreActivity (QString key)
void clearActivity ()
void clearBandActivity ()
void clearRXActivity ()
void clearCallActivity ()
void createGroupCallsignTableRows (QTableWidget *table, const QString &selectedCall, bool &showIconColumn)
void displayTextForFreq (QString text, int freq, QDateTime date, bool isTx, bool isNewLine, bool isLast)
void writeNoticeTextToUI (QDateTime date, QString text)
int writeMessageTextToUI (QDateTime date, QString text, int freq, bool isTx, int block=-1)
bool isMessageQueuedForTransmit ()
bool isInDecodeDelayThreshold (int seconds)
void prependMessageText (QString text)
void addMessageText (QString text, bool clear=false, bool selectFirstPlaceholder=false)
void confirmThenEnqueueMessage (int timeout, int priority, QString message, int offset, Callback c)
void enqueueMessage (int priority, QString message, int offset, Callback c)
void resetMessage ()
void resetMessageUI ()
void restoreMessage ()
void initializeDummyData ()
void initializeGroupMessage ()
bool ensureCallsignSet (bool alert=true)
bool ensureKeyNotStuck (QString const &text)
bool ensureNotIdle ()
bool ensureCanTransmit ()
bool ensureCreateMessageReady (const QString &text)
QString createMessage (QString const &text, bool *pDisableTypeahead)
QString appendMessage (QString const &text, bool isData, bool *pDisableTypeahead)
QString createMessageTransmitQueue (QString const &text, bool reset, bool isData, bool *pDisableTypeahead)
void resetMessageTransmitQueue ()
 Resets the frame-level transmission state after a message completes.
QPair< QString, int > popMessageFrame ()
void tryNotify (const QString &key)
void processDecodeEvent (JS8::Event::Variant const &)
void updateCQButtonDisplay ()
void updateHBButtonDisplay ()

Public Member Functions

 UI_Constructor (QString const &program_info, QDir const &temp_directory, bool multiple, MultiSettings *settings, QWidget *parent=nullptr)

Protected Member Functions

void keyPressEvent (QKeyEvent *) override
void closeEvent (QCloseEvent *) override
void childEvent (QChildEvent *) override
bool eventFilter (QObject *, QEvent *) override

Friends

class WSJTXMessageMapper

Constructor & Destructor Documentation

◆ UI_Constructor()

UI_Constructor::UI_Constructor ( QString const & program_info,
QDir const & temp_directory,
bool multiple,
MultiSettings * settings,
QWidget * parent = nullptr )
explicit

Initialize WSJT-X protocol if enabled

Creates and configures the WSJT-X message client and mapper when the WSJT-X protocol is enabled. Sets up signal connections for configuration changes and disables the native JSON client if it conflicts with WSJT-X on the same port/address.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ dataSink

void UI_Constructor::dataSink ( qint64 frames)
slot

Perform real to complex FFT; note that the Fortran code performed this operation in the four2a subroutine, which contains a cache of plans. However, since the FFTW3 library itself caches, this resulted in double caching, so as an experiment we're allowing the library to handle caching.

Note that the FFTW library requires all calls but for the plan execution, i.e., fftwf_execute(), to be serialized. The library doesn't require prescriptive serialization, anything will do so long as the result is one thread at a time.

Providing room for an extra complex value, i.e., a pair of floats, real and imaginary parts, allows us to use the same buffer for the FFT input and output.

While the memory for the FFT can come from anywhere, if we ask the library for it, it'll guarantee that it's aligned for use of SIMD instructions, which will in turn allow it to use them.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ guiUpdate

void UI_Constructor::guiUpdate ( )
slot

The name guiUpdate suggests updating of the views from the models (in MVC terms, but we don't do MVC in this project), animations and stuff. While it indeed does that, this also contains controller code.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processDecodeEvent

void UI_Constructor::processDecodeEvent ( JS8::Event::Variant const & event)
slot

Send decode to WSJT-X protocol

Converts JS8Call decode events to WSJT-X Decode messages and sends them to WSJT-X protocol clients. For HeartBeat messages, ensures the message text includes callsign and grid so clients can properly associate them with grid plots.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetMessageTransmitQueue

void UI_Constructor::resetMessageTransmitQueue ( )
slot

Resets the frame-level transmission state after a message completes.

This function clears the frame queue and resets frame counters, preparing the system for the next message transmission. Importantly, it does NOT clear m_txMessageQueue, which holds pending high-level messages (e.g., queued APRS relay messages) that should be transmitted after the current transmission completes.

Note
Called via resetMessage() -> on_stopTxButton_clicked() when transmission ends.

The documentation for this class was generated from the following files: