Menu

[c54480]: / showtextdialog.cpp  Maximize  Restore  History

Download this file

46 lines (36 with data), 1.0 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "showtextdialog.h"
#include <QFont>
#include <QString>
#include "settings.h"
extern Settings settings;
ShowTextDialog::ShowTextDialog (QWidget *parent):QDialog (parent)
{
ui.setupUi (this);
ui.textBrowser->show();
ui.textBrowser->setOpenExternalLinks( true );
}
void ShowTextDialog::append (const QString &s)
{
ui.textBrowser->append (s);
}
void ShowTextDialog::setText (const QString &s)
{
ui.textBrowser->setText (s);
}
void ShowTextDialog::setHtml (const QString &s)
{
ui.textBrowser->setHtml (s);
}
void ShowTextDialog::useFixedFont (bool useFixedFont)
{
QFont font;
if (useFixedFont)
font.fromString (settings.value(
"/satellite/noteeditor/fonts/fixedFont",
"Courier,10,-1,5,48,0,0,0,1,0").toString() );
else
font.fromString (settings.value(
"/satellite/noteeditor/fonts/varFont",
"DejaVu Sans Mono,12,-1,0,50,0,0,0,0,0").toString() );
ui.textBrowser->setFont( font );
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.