2014-04-03 15:29:13 -04:00
|
|
|
// -*- Mode: C++ -*-
|
2012-05-22 13:09:48 -04:00
|
|
|
#ifndef DISPLAYTEXT_H
|
|
|
|
#define DISPLAYTEXT_H
|
|
|
|
|
2015-02-13 03:53:02 -05:00
|
|
|
#include <QTextEdit>
|
2017-08-04 14:03:54 -04:00
|
|
|
#include <QFont>
|
|
|
|
|
2013-08-15 08:24:12 -04:00
|
|
|
#include "logbook/logbook.h"
|
2013-08-24 21:48:45 -04:00
|
|
|
#include "decodedtext.h"
|
|
|
|
|
2017-09-16 16:27:33 -04:00
|
|
|
class QAction;
|
|
|
|
|
2017-08-04 14:03:54 -04:00
|
|
|
class DisplayText
|
|
|
|
: public QTextEdit
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2017-08-04 14:03:54 -04:00
|
|
|
Q_OBJECT
|
2012-05-22 13:09:48 -04:00
|
|
|
public:
|
2017-08-04 14:03:54 -04:00
|
|
|
explicit DisplayText(QWidget *parent = 0);
|
2013-08-11 07:45:17 -04:00
|
|
|
|
2017-08-04 14:03:54 -04:00
|
|
|
void setContentFont (QFont const&);
|
|
|
|
void insertLineSpacer(QString const&);
|
2017-08-29 22:27:57 -04:00
|
|
|
void displayDecodedText(DecodedText const& decodedText, QString const& myCall, bool displayDXCCEntity,
|
|
|
|
LogBook const& logBook, QColor color_CQ, QColor color_MyCall,
|
2017-08-04 14:03:54 -04:00
|
|
|
QColor color_DXCC, QColor color_NewCall);
|
|
|
|
void displayTransmittedText(QString text, QString modeTx, qint32 txFreq,
|
|
|
|
QColor color_TxMsg, bool bFastMode);
|
|
|
|
void displayQSY(QString text);
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2017-09-29 09:27:55 -04:00
|
|
|
Q_SIGNAL void selectCallsign (bool shift, bool ctrl, bool alt);
|
2017-09-16 16:27:33 -04:00
|
|
|
Q_SIGNAL void erased ();
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2017-08-04 14:03:54 -04:00
|
|
|
Q_SLOT void appendText (QString const& text, QColor bg = Qt::white);
|
2017-09-16 16:27:33 -04:00
|
|
|
Q_SLOT void erase ();
|
2013-08-11 07:45:17 -04:00
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
protected:
|
2017-08-04 14:03:54 -04:00
|
|
|
void mouseDoubleClickEvent(QMouseEvent *e);
|
2013-08-11 07:45:17 -04:00
|
|
|
|
|
|
|
private:
|
2017-08-29 22:27:57 -04:00
|
|
|
QString appendDXCCWorkedB4(QString message, QString const& callsign, QColor * bg, LogBook const& logBook,
|
2017-08-04 14:03:54 -04:00
|
|
|
QColor color_CQ, QColor color_DXCC, QColor color_NewCall);
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2017-08-04 14:03:54 -04:00
|
|
|
QFont char_font_;
|
2017-09-16 16:27:33 -04:00
|
|
|
QAction * erase_action_;
|
2012-05-22 13:09:48 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DISPLAYTEXT_H
|