2022-01-16 19:54:57 +00:00
|
|
|
#include "settings.h"
|
|
|
|
#include "ui_settings.h"
|
|
|
|
|
|
|
|
Settings::Settings(QWidget* parent):
|
|
|
|
QWidget(parent),
|
|
|
|
m_ui(new Ui::Settings())
|
|
|
|
{
|
|
|
|
m_ui->setupUi(this);
|
2022-01-19 20:46:42 +00:00
|
|
|
|
|
|
|
connect(m_ui->list, &QListWidget::currentItemChanged, this, &Settings::onCurrentPageChanged);
|
2022-01-16 19:54:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Settings::~Settings()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-01-19 20:46:42 +00:00
|
|
|
void Settings::onCurrentPageChanged(QListWidgetItem* current)
|
|
|
|
{
|
|
|
|
if (current != nullptr) {
|
|
|
|
m_ui->header->setText(current->text());
|
|
|
|
|
|
|
|
m_ui->content->setCurrentIndex(m_ui->list->currentRow());
|
|
|
|
}
|
|
|
|
}
|