2021-06-21 16:25:21 +08:00
|
|
|
#include "editorsymbolcompletionwidget.h"
|
|
|
|
#include "ui_editorsymbolcompletionwidget.h"
|
2021-06-21 22:01:35 +08:00
|
|
|
#include "../settings.h"
|
2021-06-21 16:25:21 +08:00
|
|
|
|
|
|
|
EditorSymbolCompletionWidget::EditorSymbolCompletionWidget(const QString& name, const QString& group, QWidget *parent) :
|
|
|
|
SettingsWidget(name,group,parent),
|
|
|
|
ui(new Ui::EditorSymbolCompletionWidget)
|
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
EditorSymbolCompletionWidget::~EditorSymbolCompletionWidget()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|
2021-06-21 22:01:35 +08:00
|
|
|
|
|
|
|
void EditorSymbolCompletionWidget::doLoad()
|
|
|
|
{
|
|
|
|
ui->grpCompleSymbols->setChecked(pSettings->editor().completeSymbols());
|
|
|
|
ui->chkCompleteBrace->setChecked(pSettings->editor().completeBrace());
|
|
|
|
ui->chkCompleteBracket->setChecked(pSettings->editor().completeBracket());
|
|
|
|
ui->chkCompleteComments->setChecked(pSettings->editor().completeComment());
|
|
|
|
ui->chkCompleteDoubleQuotation->setChecked(pSettings->editor().completeDoubleQuote());
|
|
|
|
ui->chkCompleteGlobalInclude->setChecked(pSettings->editor().completeGlobalInclude());
|
|
|
|
ui->chkCompleteParenthesis->setChecked(pSettings->editor().completeParenthese());
|
|
|
|
ui->chkCompleteSingleQuotation->setChecked(pSettings->editor().completeSingleQuote());
|
2021-06-23 08:55:56 +08:00
|
|
|
ui->chkRemoveSymbolPairs->setChecked(pSettings->editor().removeSymbolPairs());
|
2021-06-21 22:01:35 +08:00
|
|
|
ui->chkSkipMathingSymbols->setChecked(pSettings->editor().overwriteSymbols());
|
|
|
|
}
|
|
|
|
|
|
|
|
void EditorSymbolCompletionWidget::doSave()
|
|
|
|
{
|
|
|
|
pSettings->editor().setCompleteSymbols(ui->grpCompleSymbols->isChecked());
|
|
|
|
pSettings->editor().setCompleteBrace(ui->chkCompleteBrace->isChecked());
|
|
|
|
pSettings->editor().setCompleteBracket(ui->chkCompleteBracket->isChecked());
|
|
|
|
pSettings->editor().setCompleteComment(ui->chkCompleteComments->isChecked());
|
|
|
|
pSettings->editor().setCompleteDoubleQuote(ui->chkCompleteDoubleQuotation->isChecked());
|
|
|
|
pSettings->editor().setCompleteGlobalInclude(ui->chkCompleteGlobalInclude->isChecked());
|
|
|
|
pSettings->editor().setCompleteParenthese(ui->chkCompleteParenthesis->isChecked());
|
|
|
|
pSettings->editor().setCompleteSingleQuote(ui->chkCompleteSingleQuotation->isChecked());
|
2021-06-23 08:55:56 +08:00
|
|
|
pSettings->editor().setRemoveSymbolPairs(ui->chkRemoveSymbolPairs->isChecked());
|
2021-06-21 22:01:35 +08:00
|
|
|
pSettings->editor().setOverwriteSymbols(ui->chkSkipMathingSymbols->isChecked());
|
|
|
|
|
|
|
|
pSettings->editor().save();
|
|
|
|
}
|