JS8Call-Improved master
Loading...
Searching...
No Matches
JSCChecker Class Reference

Helper for checking and suggesting compressed-codewords. More...

#include <JSC_checker.h>

Inheritance diagram for JSCChecker:
Collaboration diagram for JSCChecker:

Public Member Functions

 JSCChecker (QObject *parent=nullptr)
 Construct a checker instance.

Static Public Member Functions

static void checkRange (QTextEdit *edit, int start, int end)
 Check the text in edit between start and end.
static QStringList suggestions (QString word, int n, bool *pFound)
 Generate up to n suggestion words for word.

Detailed Description

Helper for checking and suggesting compressed-codewords.

The class exposes two static convenience methods: one to examine a range inside a QTextEdit and mark or process words, and another to produce suggestion candidates for a single word.

Constructor & Destructor Documentation

◆ JSCChecker()

JSCChecker::JSCChecker ( QObject * parent = nullptr)
explicit

Construct a checker instance.

Construct a new JSCChecker::JSCChecker object.

Parameters
parentOptional parent QObject.
parent

Member Function Documentation

◆ checkRange()

void JSCChecker::checkRange ( QTextEdit * edit,
int start,
int end )
static

Check the text in edit between start and end.

Check the range of text in the QTextEdit for valid JSC callsigns.

Parameters
editThe QTextEdit containing the text to check.
startByte offset (or cursor position) of the range start.
endByte offset (or cursor position) of the range end.

This routine inspects words in the given range and can be used to highlight unknown words or trigger UI updates. Implementation may interact with the UI; call from the GUI thread.

Parameters
edit
start
end
Here is the call graph for this function:

◆ suggestions()

QStringList JSCChecker::suggestions ( QString word,
int n,
bool * pFound )
static

Generate up to n suggestion words for word.

Generate suggestions for the given word.

Parameters
wordThe input word to generate suggestions for.
nMaximum number of suggestions to return.
pFoundOptional output boolean set to true when an exact match is found.
Returns
A list of suggestion strings ordered by relevance.
Parameters
word
n
pFound
Returns
QStringList
Here is the call graph for this function:

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