mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-15 08:31:57 -05:00
dfe037423f
UDP servers can request that WSJT-X clients highlight a specified callsign in the Band Activity decodes window. Either the last occurrence of the callsign may be highlighted or all past and future occurrences can be highlighted. The latter case WSJT-X will remember the callsign and requested highlighting options so that future occurrences can be correctly highlighted. Either or both of the text background color and the text foreground color may be specified. A further UDP message may be sent to change the persistent color highlighting for a given callsign, including reseting persistent highlighting by passing an invalid color value. Thanks to Alex, VE3NEA, for this contribution. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8589 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
55 lines
1.6 KiB
C++
55 lines
1.6 KiB
C++
// -*- Mode: C++ -*-
|
|
#ifndef DISPLAYTEXT_H
|
|
#define DISPLAYTEXT_H
|
|
|
|
#include <QTextEdit>
|
|
#include <QFont>
|
|
#include <QHash>
|
|
#include <QPair>
|
|
#include <QString>
|
|
|
|
#include "logbook/logbook.h"
|
|
#include "decodedtext.h"
|
|
|
|
class QAction;
|
|
|
|
class DisplayText
|
|
: public QTextEdit
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit DisplayText(QWidget *parent = 0);
|
|
|
|
void setContentFont (QFont const&);
|
|
void insertLineSpacer(QString const&);
|
|
void displayDecodedText(DecodedText const& decodedText, QString const& myCall, bool displayDXCCEntity,
|
|
LogBook const& logBook, QColor color_CQ, QColor color_MyCall,
|
|
QColor color_DXCC, QColor color_NewCall, bool ppfx, bool bCQonly=false);
|
|
void displayTransmittedText(QString text, QString modeTx, qint32 txFreq,
|
|
QColor color_TxMsg, bool bFastMode);
|
|
void displayQSY(QString text);
|
|
void displayFoxToBeCalled(QString t, QColor bg);
|
|
|
|
Q_SIGNAL void selectCallsign (Qt::KeyboardModifiers);
|
|
Q_SIGNAL void erased ();
|
|
|
|
Q_SLOT void appendText (QString const& text, QColor bg = Qt::white
|
|
, QString const& call1 = QString {}, QString const& call2 = QString {});
|
|
Q_SLOT void erase ();
|
|
Q_SLOT void highlight_callsign (QString const& callsign, QColor const& bg, QColor const& fg, bool last_only);
|
|
|
|
protected:
|
|
void mouseDoubleClickEvent(QMouseEvent *e);
|
|
|
|
private:
|
|
bool m_bPrincipalPrefix;
|
|
QString appendDXCCWorkedB4(QString message, QString const& callsign, QColor * bg, LogBook const& logBook,
|
|
QColor color_CQ, QColor color_DXCC, QColor color_NewCall);
|
|
|
|
QFont char_font_;
|
|
QAction * erase_action_;
|
|
QHash<QString, QPair<QColor, QColor>> highlighted_calls_;
|
|
};
|
|
|
|
#endif // DISPLAYTEXT_H
|