manage hound queue; add ability to add hound to top with ALT-double-click; show/manipulate hound QSOs in progress

This commit is contained in:
Brian Moran
2022-11-12 17:23:21 -08:00
parent d789beaa82
commit 2b08cd9e4b
6 changed files with 4189 additions and 90 deletions
+10 -9
View File
@@ -86,7 +86,7 @@ void DisplayText::mouseDoubleClickEvent(QMouseEvent *e)
void DisplayText::insertLineSpacer(QString const& line)
{
appendText (line, "#d3d3d3");
insertText (line, "#d3d3d3");
}
namespace
@@ -123,11 +123,11 @@ namespace
}
}
void DisplayText::appendText(QString const& text, QColor bg, QColor fg
, QString const& call1, QString const& call2)
void DisplayText::insertText(QString const& text, QColor bg, QColor fg
, QString const& call1, QString const& call2, QTextCursor::MoveOperation location)
{
auto cursor = textCursor ();
cursor.movePosition (QTextCursor::End);
cursor.movePosition (location);
auto block_format = cursor.blockFormat ();
auto format = cursor.blockCharFormat ();
format.setFont (char_font_);
@@ -484,7 +484,7 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
}
}
appendText (message.trimmed (), bg, fg, decodedText.call (), dxCall);
insertText (message.trimmed (), bg, fg, decodedText.call (), dxCall);
}
@@ -516,18 +516,19 @@ void DisplayText::displayTransmittedText(QString text, QString modeTx, qint32 tx
QColor fg;
highlight_types types {Highlight::Tx};
set_colours (m_config, &bg, &fg, types);
appendText (t, bg, fg);
insertText (t, bg, fg);
}
void DisplayText::displayQSY(QString text)
{
QString t = QDateTime::currentDateTimeUtc().toString("hhmmss") + " " + text;
appendText (t, "hotpink");
insertText (t, "hotpink");
}
void DisplayText::displayFoxToBeCalled(QString t, QColor bg, QColor fg)
void DisplayText::displayHoundToBeCalled(QString t, bool bAtTop, QColor bg, QColor fg)
{
appendText (t, bg, fg);
if (bAtTop) t = t + "\n"; // need a newline when insertion at top
insertText(t, bg, fg, "", "", bAtTop ? QTextCursor::Start : QTextCursor::End);
}
namespace