mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-07-06 11:55:15 -04:00
Clean up the ActiveStations window.
This commit is contained in:
parent
15e33d22af
commit
f3bac687ba
@ -17,13 +17,10 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setWindowTitle (QApplication::applicationName () + " - " + tr ("Active Stations"));
|
setWindowTitle (QApplication::applicationName () + " - " + tr ("Active Stations"));
|
||||||
ui->ActiveStationsPlainTextEdit->setReadOnly (true);
|
|
||||||
ui->RecentStationsPlainTextEdit->setReadOnly (true);
|
ui->RecentStationsPlainTextEdit->setReadOnly (true);
|
||||||
changeFont (font);
|
changeFont (font);
|
||||||
read_settings ();
|
read_settings ();
|
||||||
ui->header_label->setText("Pts Call Grid Az S/N Dial Freq");
|
|
||||||
ui->header_label2->setText(" Call Grid Age Points");
|
ui->header_label2->setText(" Call Grid Age Points");
|
||||||
|
|
||||||
connect(ui->RecentStationsPlainTextEdit, &QPlainTextEdit::selectionChanged, this, select);
|
connect(ui->RecentStationsPlainTextEdit, &QPlainTextEdit::selectionChanged, this, select);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,33 +31,11 @@ ActiveStations::~ActiveStations()
|
|||||||
|
|
||||||
void ActiveStations::changeFont (QFont const& font)
|
void ActiveStations::changeFont (QFont const& font)
|
||||||
{
|
{
|
||||||
ui->header_label->setStyleSheet (font_as_stylesheet (font));
|
|
||||||
ui->ActiveStationsPlainTextEdit->setStyleSheet (font_as_stylesheet (font));
|
|
||||||
setContentFont (font);
|
|
||||||
|
|
||||||
ui->header_label2->setStyleSheet (font_as_stylesheet (font));
|
ui->header_label2->setStyleSheet (font_as_stylesheet (font));
|
||||||
ui->RecentStationsPlainTextEdit->setStyleSheet (font_as_stylesheet (font));
|
ui->RecentStationsPlainTextEdit->setStyleSheet (font_as_stylesheet (font));
|
||||||
// setContentFont (font);
|
|
||||||
|
|
||||||
updateGeometry ();
|
updateGeometry ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActiveStations::setContentFont(QFont const& font)
|
|
||||||
{
|
|
||||||
ui->ActiveStationsPlainTextEdit->setFont (font);
|
|
||||||
QTextCharFormat charFormat;
|
|
||||||
charFormat.setFont (font);
|
|
||||||
ui->ActiveStationsPlainTextEdit->selectAll ();
|
|
||||||
auto cursor = ui->ActiveStationsPlainTextEdit->textCursor ();
|
|
||||||
cursor.mergeCharFormat (charFormat);
|
|
||||||
cursor.clearSelection ();
|
|
||||||
cursor.movePosition (QTextCursor::End);
|
|
||||||
cursor.movePosition (QTextCursor::Up);
|
|
||||||
cursor.movePosition (QTextCursor::StartOfLine);
|
|
||||||
ui->ActiveStationsPlainTextEdit->setTextCursor (cursor);
|
|
||||||
ui->ActiveStationsPlainTextEdit->ensureCursorVisible ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ActiveStations::read_settings ()
|
void ActiveStations::read_settings ()
|
||||||
{
|
{
|
||||||
SettingsGroup group {settings_, "ActiveStations"};
|
SettingsGroup group {settings_, "ActiveStations"};
|
||||||
@ -77,11 +52,6 @@ void ActiveStations::write_settings ()
|
|||||||
settings_->setValue("MaxAge",ui->sbMaxAge->value());
|
settings_->setValue("MaxAge",ui->sbMaxAge->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActiveStations::displayActiveStations(QString const& t)
|
|
||||||
{
|
|
||||||
ui->ActiveStationsPlainTextEdit->setPlainText(t);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ActiveStations::displayRecentStations(QString const& t)
|
void ActiveStations::displayRecentStations(QString const& t)
|
||||||
{
|
{
|
||||||
ui->RecentStationsPlainTextEdit->setPlainText(t);
|
ui->RecentStationsPlainTextEdit->setPlainText(t);
|
||||||
|
@ -19,7 +19,6 @@ class ActiveStations
|
|||||||
public:
|
public:
|
||||||
explicit ActiveStations(QSettings *, QFont const&, QWidget * parent = 0);
|
explicit ActiveStations(QSettings *, QFont const&, QWidget * parent = 0);
|
||||||
~ActiveStations();
|
~ActiveStations();
|
||||||
void displayActiveStations(QString const&);
|
|
||||||
void displayRecentStations(QString const&);
|
void displayRecentStations(QString const&);
|
||||||
void changeFont (QFont const&);
|
void changeFont (QFont const&);
|
||||||
int maxRecent();
|
int maxRecent();
|
||||||
@ -32,7 +31,7 @@ signals:
|
|||||||
private:
|
private:
|
||||||
void read_settings ();
|
void read_settings ();
|
||||||
void write_settings ();
|
void write_settings ();
|
||||||
void setContentFont (QFont const&);
|
// void setContentFont (QFont const&);
|
||||||
QSettings * settings_;
|
QSettings * settings_;
|
||||||
|
|
||||||
QScopedPointer<Ui::ActiveStations> ui;
|
QScopedPointer<Ui::ActiveStations> ui;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>405</width>
|
<width>405</width>
|
||||||
<height>529</height>
|
<height>339</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -16,7 +16,7 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="4" column="0">
|
<item row="2" column="0">
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QSpinBox" name="sbMaxAge">
|
<widget class="QSpinBox" name="sbMaxAge">
|
||||||
@ -87,19 +87,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QPlainTextEdit" name="ActiveStationsPlainTextEdit">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>2</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="lineWrapMode">
|
|
||||||
<enum>QPlainTextEdit::NoWrap</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QPlainTextEdit" name="RecentStationsPlainTextEdit">
|
<widget class="QPlainTextEdit" name="RecentStationsPlainTextEdit">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
@ -110,16 +97,6 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="header_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Points Call Grid AZ SNR Freq Band</string>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="header_label2">
|
<widget class="QLabel" name="header_label2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Call Grid Age Points</string>
|
<string>Call Grid Age Points</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user