mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-26 06:08:42 -05:00
Make addon prefixes & suffixes help window platform independent
Also use a style sheet to set the font as widget level font settings are overriden when the global default font is changed in settings. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5553 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
a524b90f88
commit
05a060c740
@ -18,6 +18,7 @@
|
|||||||
#include <QHostInfo>
|
#include <QHostInfo>
|
||||||
|
|
||||||
#include "revision_utils.hpp"
|
#include "revision_utils.hpp"
|
||||||
|
#include "qt_helpers.hpp"
|
||||||
#include "soundout.h"
|
#include "soundout.h"
|
||||||
#include "plotter.h"
|
#include "plotter.h"
|
||||||
#include "echoplot.h"
|
#include "echoplot.h"
|
||||||
@ -3774,31 +3775,25 @@ void MainWindow::on_actionShort_list_of_add_on_prefixes_and_suffixes_triggered()
|
|||||||
msgBox("Cannot open \"" + f.fileName () + "\" for reading:" + f.errorString ());
|
msgBox("Cannot open \"" + f.fileName () + "\" for reading:" + f.errorString ());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_prefixes.reset (new QTextEdit);
|
m_prefixes.reset (new QLabel {
|
||||||
m_prefixes->setReadOnly(true);
|
QTextStream {&f}.readAll ()
|
||||||
|
, nullptr
|
||||||
|
, Qt::WindowCloseButtonHint | Qt::WindowMinimizeButtonHint
|
||||||
|
});
|
||||||
|
m_prefixes->setWindowTitle(QApplication::applicationName () +
|
||||||
|
" - " + tr ("Prefixes"));
|
||||||
|
m_prefixes->setTextFormat (Qt::PlainText);
|
||||||
|
m_prefixes->setMargin (10);
|
||||||
|
m_prefixes->setBackgroundRole (QPalette::Base);
|
||||||
|
m_prefixes->setAutoFillBackground (true);
|
||||||
|
|
||||||
// Formatting in columns thanks to Sandro, IW3RAB:
|
// Formatting in columns thanks to Sandro, IW3RAB:
|
||||||
m_prefixes->setWordWrapMode (QTextOption::NoWrap);
|
|
||||||
QFont font;
|
QFont font;
|
||||||
font.setFamily("Courier");
|
font.setFamily("Courier");
|
||||||
font.setStyleHint(QFont::Monospace);
|
font.setStyleHint(QFont::Monospace);
|
||||||
font.setFixedPitch(true);
|
font.setFixedPitch(true);
|
||||||
font.setPointSize(10); //as for decoded text
|
font.setPointSize(10); //as for decoded text
|
||||||
m_prefixes->setFont(font);
|
m_prefixes->setStyleSheet (font_as_stylesheet (font));
|
||||||
m_prefixes->setWindowTitle(QApplication::applicationName () +
|
|
||||||
" - " + tr ("Prefixes"));
|
|
||||||
m_prefixes->setGeometry(QRect(45,50,750,450));
|
|
||||||
|
|
||||||
Qt::WindowFlags flags = Qt::WindowCloseButtonHint |
|
|
||||||
Qt::WindowMinimizeButtonHint;
|
|
||||||
m_prefixes->setWindowFlags(flags);
|
|
||||||
QTextStream s(&f);
|
|
||||||
QString t;
|
|
||||||
for(int i=0; i<100; i++) {
|
|
||||||
t=s.readLine();
|
|
||||||
m_prefixes->append(t);
|
|
||||||
if(s.atEnd()) break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
m_prefixes->showNormal();
|
m_prefixes->showNormal();
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@ private:
|
|||||||
QScopedPointer<LogQSO> m_logDlg;
|
QScopedPointer<LogQSO> m_logDlg;
|
||||||
QScopedPointer<Astro> m_astroWidget;
|
QScopedPointer<Astro> m_astroWidget;
|
||||||
QScopedPointer<QTextEdit> m_shortcuts;
|
QScopedPointer<QTextEdit> m_shortcuts;
|
||||||
QScopedPointer<QTextEdit> m_prefixes;
|
QScopedPointer<QLabel> m_prefixes;
|
||||||
QScopedPointer<QTextEdit> m_mouseCmnds;
|
QScopedPointer<QTextEdit> m_mouseCmnds;
|
||||||
QScopedPointer<MessageAveraging> m_msgAvgWidget;
|
QScopedPointer<MessageAveraging> m_msgAvgWidget;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user