Update app/preferenceeditor.cpp
This commit is contained in:
parent
618c304a87
commit
ed9e7ee558
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user