#include <QLocale>
#include <QTextStream>
#include <QMessageBox>
+#include <QPalette>
+#include <QBrush>
+#include <QColor>
HelpWindow::HelpWindow(QWidget *parent) :
QWidget(parent),
setHelpText();
+ //format color of help text according to system color scheme
+ QPalette palette;
+ QBrush brush = palette.windowText();
+ QColor color = brush.color();
+ ui->textBrowser->setStyleSheet( "background: transparent; color: " + color.name() + ";" );
}
+
HelpWindow::~HelpWindow()
{
delete ui;
{
//get the current locale name for lacalized help messages
QString locale = QLocale::system().name();
+ QStringList tmp = locale.split("_");
+ locale = tmp.first();
//open help text
QFile help( ":/txt/help_" + locale );
txt += "\n";
} while ( !in.atEnd() );
- ui->textEdit->setText( txt );
+ ui->textBrowser->setText( txt );
}