diff --git a/app/preferenceeditor.cpp b/app/preferenceeditor.cpp index 44b0ae1..03b3237 100644 --- a/app/preferenceeditor.cpp +++ b/app/preferenceeditor.cpp @@ -1,35 +1,35 @@ -#include "preferenceeditor.h" -#include "ui_preferenceeditor.h" - -PreferenceEditor::PreferenceEditor(QWidget *parent) - : QDialog(parent) - , ui(new Ui::PreferenceEditor) -{ - ui->setupUi(this); - - ui->frame_View->show(); - ui->frame_TreeWidget->hide(); - ui->frame_FileEditors->hide(); - - connect(ui->listWidget_Categories, &QListWidget::itemSelectionChanged, this, [this]() { - const QString itemText = ui->listWidget_Categories->selectedItems().first()->text(); - if (itemText == "View") { - ui->frame_View->show(); - ui->frame_TreeWidget->hide(); - ui->frame_FileEditors->hide(); - } else if (itemText == "Tree Widget") { - ui->frame_View->hide(); - ui->frame_TreeWidget->show(); - ui->frame_FileEditors->hide(); - } else if (itemText == "File Editors") { - ui->frame_View->hide(); - ui->frame_TreeWidget->hide(); - ui->frame_FileEditors->show(); - } - }); -} - -PreferenceEditor::~PreferenceEditor() -{ - delete ui; -} +#include "preferenceeditor.h" +#include "ui_preferenceeditor.h" + +PreferenceEditor::PreferenceEditor(QWidget *parent) + : QDialog(parent) + , ui(new Ui::PreferenceEditor) +{ + ui->setupUi(this); + + ui->frame_View->show(); + ui->frame_TreeWidget->hide(); + ui->frame_FileEditors->hide(); + + connect(ui->listWidget_Categories, &QListWidget::itemSelectionChanged, this, [this]() { + const QString itemText = ui->listWidget_Categories->selectedItems().first()->text(); + if (itemText == "View") { + ui->frame_View->show(); + ui->frame_TreeWidget->hide(); + ui->frame_FileEditors->hide(); + } else if (itemText == "Tree Widget") { + ui->frame_View->hide(); + ui->frame_TreeWidget->show(); + ui->frame_FileEditors->hide(); + } else if (itemText == "File Editors") { + ui->frame_View->hide(); + ui->frame_TreeWidget->hide(); + ui->frame_FileEditors->show(); + } + }); +} + +PreferenceEditor::~PreferenceEditor() +{ + delete ui; +}