WSJT-X/displaytext.h
Bill Somerville 3327625346 Bring colour settings into line with general configuration strategy
Colours behave  like other  configuration items  and changes  are only
applied when the Settings UI is dismissed via the "OK" button.

Simplified font settings and use  style sheets consistently to set the
application and decoded  text fonts. This is necessary  because any UI
widget that  has a style  sheet applied does not  honor a font  set by
QWidget::setFont()  even if  there is  no  font setting  in the  style
sheet, this is broken behaviour IMHO  but that is the way Qt currently
works.

Use a  style sheet to style  the frequency display and  clock. This is
necessary to  allow fonts to  be cascaded through parent  style sheets
and still be overridden on these widgets.

Simplify  the decoded  text  widgets,  there is  no  need  to use  the
QTextBrowser  as a  super class  since  the simpler  QTextEdit set  as
read-only is sufficient. Also removed  colour setting via a background
brush  as it  doesn't  work  and the  HTML  'bgcolor' attribute  works
correctly.

Change  to  UI  properties  of  the  decoded  text  widgets  to  allow
horizontal scrolling if required, this  allows larger fonts to be used
without truncating decoded messages.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4957 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2015-02-13 08:53:02 +00:00

40 lines
1.0 KiB
C++

// -*- Mode: C++ -*-
#ifndef DISPLAYTEXT_H
#define DISPLAYTEXT_H
#include <QTextEdit>
#include "logbook/logbook.h"
#include "decodedtext.h"
class DisplayText : public QTextEdit
{
Q_OBJECT
public:
explicit DisplayText(QWidget *parent = 0);
void insertLineSpacer();
void displayDecodedText(DecodedText decodedText, QString myCall, bool displayDXCCEntity,
LogBook logBook, QColor color_CQ, QColor color_MyCall,
QColor color_DXCC, QColor color_NewCall);
void displayTransmittedText(QString text, QString modeTx, qint32 txFreq,
QColor color_TxMsg);
signals:
void selectCallsign(bool shift, bool ctrl);
public slots:
protected:
void mouseDoubleClickEvent(QMouseEvent *e);
private:
void _insertText(const QString text, const QString bg);
void _appendDXCCWorkedB4(/*mod*/DecodedText& t1, QString &bg, LogBook logBook,
QColor color_CQ, QColor color_DXCC, QColor color_NewCall);
};
#endif // DISPLAYTEXT_H