1
0
forked from blue/squawk
squawk/ui/widgets/settings/settings.cpp

25 lines
508 B
C++

#include "settings.h"
#include "ui_settings.h"
Settings::Settings(QWidget* parent):
QWidget(parent),
m_ui(new Ui::Settings())
{
m_ui->setupUi(this);
connect(m_ui->list, &QListWidget::currentItemChanged, this, &Settings::onCurrentPageChanged);
}
Settings::~Settings()
{
}
void Settings::onCurrentPageChanged(QListWidgetItem* current)
{
if (current != nullptr) {
m_ui->header->setText(current->text());
m_ui->content->setCurrentIndex(m_ui->list->currentRow());
}
}