mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-24 19:19:58 +00:00
refactoring of the configuration interface
This commit is contained in:
@ -52,6 +52,7 @@ void SettingsWindow::createActions()
|
||||
{
|
||||
if (debug) qDebug() << "[SettingsWindow]" << "[createActions]";
|
||||
|
||||
connect(ui->treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(changePage(QTreeWidgetItem *, QTreeWidgetItem *)));
|
||||
connect(ui->comboBox_language, SIGNAL(currentIndexChanged(int)), ui->label_info, SLOT(show()));
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked(bool)), this, SLOT(close()));
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Reset), SIGNAL(clicked(bool)), this, SLOT(setDefault()));
|
||||
@ -90,6 +91,19 @@ void SettingsWindow::addLanguages()
|
||||
}
|
||||
|
||||
|
||||
void SettingsWindow::changePage(QTreeWidgetItem *current, QTreeWidgetItem *previous)
|
||||
{
|
||||
Q_UNUSED(previous)
|
||||
if (debug) qDebug() << "[SettingsWindow]" << "[changePage]";
|
||||
|
||||
for (int i=0; i<ui->treeWidget->topLevelItemCount(); i++)
|
||||
if (current == ui->treeWidget->topLevelItem(i)) {
|
||||
ui->stackedWidget->setCurrentIndex(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SettingsWindow::saveSettings()
|
||||
{
|
||||
if (debug) qDebug() << "[SettingsWindow]" << "[saveSettings]";
|
||||
|
Reference in New Issue
Block a user