2012-05-22 13:09:48 -04:00
|
|
|
#ifndef DISPLAYTEXT_H
|
|
|
|
#define DISPLAYTEXT_H
|
|
|
|
|
|
|
|
#include <QTextBrowser>
|
2013-08-15 08:24:12 -04:00
|
|
|
#include "logbook/logbook.h"
|
2013-08-24 21:48:45 -04:00
|
|
|
#include "decodedtext.h"
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
class DisplayText : public QTextBrowser
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2013-08-15 08:24:12 -04:00
|
|
|
explicit DisplayText(QWidget *parent = 0);
|
2013-08-11 07:45:17 -04:00
|
|
|
|
2013-08-15 08:24:12 -04:00
|
|
|
void setFont(QFont font);
|
2013-08-11 07:45:17 -04:00
|
|
|
|
2013-08-15 08:24:12 -04:00
|
|
|
void insertLineSpacer();
|
2013-08-24 21:48:45 -04:00
|
|
|
void displayDecodedText(DecodedText decodedText, QString myCall, bool displayDXCCEntity, LogBook logBook);
|
|
|
|
void displayTransmittedText(QString text, QString modeTx, qint32 txFreq);
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
signals:
|
2013-08-15 08:24:12 -04:00
|
|
|
void selectCallsign(bool shift, bool ctrl);
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
2013-08-11 07:45:17 -04:00
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
protected:
|
2013-08-15 08:24:12 -04:00
|
|
|
void mouseDoubleClickEvent(QMouseEvent *e);
|
|
|
|
void resizeEvent(QResizeEvent * event);
|
2013-08-11 07:45:17 -04:00
|
|
|
|
|
|
|
private:
|
2013-08-15 08:24:12 -04:00
|
|
|
int _fontWidth;
|
|
|
|
int _maxDisplayedCharacters;
|
2013-08-24 21:48:45 -04:00
|
|
|
void _insertText(const QString text, const QString bg);
|
|
|
|
void _appendDXCCWorkedB4(/*mod*/DecodedText& t1, QString &bg, LogBook logBook);
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DISPLAYTEXT_H
|