mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05: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);
|
||||
setWindowTitle (QApplication::applicationName () + " - " + tr ("Active Stations"));
|
||||
ui->ActiveStationsPlainTextEdit->setReadOnly (true);
|
||||
ui->RecentStationsPlainTextEdit->setReadOnly (true);
|
||||
changeFont (font);
|
||||
read_settings ();
|
||||
ui->header_label->setText("Pts Call Grid Az S/N Dial Freq");
|
||||
ui->header_label2->setText(" Call Grid Age Points");
|
||||
|
||||
connect(ui->RecentStationsPlainTextEdit, &QPlainTextEdit::selectionChanged, this, select);
|
||||
}
|
||||
|
||||
@ -34,33 +31,11 @@ ActiveStations::~ActiveStations()
|
||||
|
||||
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->RecentStationsPlainTextEdit->setStyleSheet (font_as_stylesheet (font));
|
||||
// setContentFont (font);
|
||||
|
||||
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 ()
|
||||
{
|
||||
SettingsGroup group {settings_, "ActiveStations"};
|
||||
@ -77,11 +52,6 @@ void ActiveStations::write_settings ()
|
||||
settings_->setValue("MaxAge",ui->sbMaxAge->value());
|
||||
}
|
||||
|
||||
void ActiveStations::displayActiveStations(QString const& t)
|
||||
{
|
||||
ui->ActiveStationsPlainTextEdit->setPlainText(t);
|
||||
}
|
||||
|
||||
void ActiveStations::displayRecentStations(QString const& t)
|
||||
{
|
||||
ui->RecentStationsPlainTextEdit->setPlainText(t);
|
||||
|
@ -19,7 +19,6 @@ class ActiveStations
|
||||
public:
|
||||
explicit ActiveStations(QSettings *, QFont const&, QWidget * parent = 0);
|
||||
~ActiveStations();
|
||||
void displayActiveStations(QString const&);
|
||||
void displayRecentStations(QString const&);
|
||||
void changeFont (QFont const&);
|
||||
int maxRecent();
|
||||
@ -32,7 +31,7 @@ signals:
|
||||
private:
|
||||
void read_settings ();
|
||||
void write_settings ();
|
||||
void setContentFont (QFont const&);
|
||||
// void setContentFont (QFont const&);
|
||||
QSettings * settings_;
|
||||
|
||||
QScopedPointer<Ui::ActiveStations> ui;
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>405</width>
|
||||
<height>529</height>
|
||||
<height>339</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -16,7 +16,7 @@
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="4" column="0">
|
||||
<item row="2" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="sbMaxAge">
|
||||
@ -87,19 +87,6 @@
|
||||
</layout>
|
||||
</item>
|
||||
<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">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
@ -110,16 +97,6 @@
|
||||
</widget>
|
||||
</item>
|
||||
<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">
|
||||
<property name="text">
|
||||
<string>Call Grid Age Points</string>
|
||||
|
Loading…
Reference in New Issue
Block a user