diff --git a/src/frontend/SettingsDialog.cpp b/src/frontend/SettingsDialog.cpp index 880bfdd7..5a9bb80a 100644 --- a/src/frontend/SettingsDialog.cpp +++ b/src/frontend/SettingsDialog.cpp @@ -27,7 +27,6 @@ SettingsDialog::SettingsDialog(QWidget *parent) : ui->setupUi(this); autoCorrectDialog = new AutoCorrectDialog(this); - this->setFixedSize(QSize(this->width(), this->height())); ui->cmbOrientation->insertItems(0, {"Horizontal", "Vertical"}); implementSignals(); @@ -41,16 +40,14 @@ SettingsDialog::~SettingsDialog() { void SettingsDialog::implementSignals() { // Phonetic Keyboard Layout Group. - connect(ui->btnShowPrevWin, &QPushButton::toggled, [=](bool checked) { - ui->btnShowPrevWin->setText(checked ? "On" : "Off"); + connect(ui->btnSuggestionPhonetic, &QPushButton::toggled, [=](bool checked) { + ui->btnSuggestionPhonetic->setText(checked ? "On" : "Off"); // Control other Preview window related settings. - ui->btnClosePrevWin->setEnabled(checked); - ui->cmbOrientation->setEnabled(checked); ui->btnIncludeEnglishPrevWin->setEnabled(checked); ui->btnACUpdate->setEnabled(checked); }); - connect(ui->btnClosePrevWin, &QPushButton::toggled, [=](bool checked) { - ui->btnClosePrevWin->setText(checked ? "On" : "Off"); + connect(ui->btnEnterClosePW, &QPushButton::toggled, [=](bool checked) { + ui->btnEnterClosePW->setText(checked ? "On" : "Off"); }); connect(ui->btnIncludeEnglishPrevWin, &QPushButton::toggled, [=](bool checked) { ui->btnIncludeEnglishPrevWin->setText(checked ? "On" : "Off"); @@ -60,8 +57,8 @@ void SettingsDialog::implementSignals() { }); // Fixed Keyboard Layout Group. - connect(ui->btnShowPrevWinFixed, &QPushButton::toggled, [=](bool checked) { - ui->btnShowPrevWinFixed->setText(checked ? "On" : "Off"); + connect(ui->btnSuggestionFixed, &QPushButton::toggled, [=](bool checked) { + ui->btnSuggestionFixed->setText(checked ? "On" : "Off"); }); connect(ui->btnAutoVowel, &QPushButton::toggled, [=](bool checked) { ui->btnAutoVowel->setText(checked ? "On" : "Off"); @@ -87,13 +84,13 @@ void SettingsDialog::implementSignals() { void SettingsDialog::updateSettings() { // Phonetic Keyboard Layout Group. - ui->btnClosePrevWin->setChecked(gSettings->getEnterKeyClosesPrevWin()); - ui->btnShowPrevWin->setChecked(gSettings->getShowCWPhonetic()); + ui->btnEnterClosePW->setChecked(gSettings->getEnterKeyClosesPrevWin()); + ui->btnSuggestionPhonetic->setChecked(gSettings->getShowCWPhonetic()); ui->cmbOrientation->setCurrentIndex(gSettings->getCandidateWinHorizontal() ? 0 : 1); ui->btnIncludeEnglishPrevWin->setChecked(gSettings->getIncludeEnglishPrevWin()); // Fixed Keyboard Layout Group. - ui->btnShowPrevWinFixed->setChecked(gSettings->getShowPrevWinFixed()); + ui->btnSuggestionFixed->setChecked(gSettings->getShowPrevWinFixed()); ui->btnAutoVowel->setChecked(gSettings->getAutoVowelFormFixed()); ui->btnAutoChandra->setChecked(gSettings->getAutoChandraPosFixed()); ui->btnOldReph->setChecked(gSettings->getOldReph()); @@ -105,13 +102,13 @@ void SettingsDialog::updateSettings() { void SettingsDialog::on_buttonBox_accepted() { // Phonetic Keyboard Layout Group. - gSettings->setEnterKeyClosesPrevWin(ui->btnClosePrevWin->isChecked()); - gSettings->setShowCWPhonetic(ui->btnShowPrevWin->isChecked()); + gSettings->setEnterKeyClosesPrevWin(ui->btnEnterClosePW->isChecked()); + gSettings->setShowCWPhonetic(ui->btnSuggestionPhonetic->isChecked()); gSettings->setCandidateWinHorizontal((ui->cmbOrientation->currentIndex() == 0)); gSettings->setIncludeEnglishPrevWin(ui->btnIncludeEnglishPrevWin->isChecked()); // Fixed Keyboard Layout Group. - gSettings->setShowPrevWinFixed(ui->btnShowPrevWinFixed->isChecked()); + gSettings->setShowPrevWinFixed(ui->btnSuggestionFixed->isChecked()); gSettings->setAutoVowelFormFixed(ui->btnAutoVowel->isChecked()); gSettings->setAutoChandraPosFixed(ui->btnAutoChandra->isChecked()); gSettings->setOldReph(ui->btnOldReph->isChecked()); diff --git a/src/frontend/SettingsDialog.ui b/src/frontend/SettingsDialog.ui index dbb8c30f..589d67fc 100644 --- a/src/frontend/SettingsDialog.ui +++ b/src/frontend/SettingsDialog.ui @@ -6,8 +6,8 @@ 0 0 - 841 - 332 + 793 + 328 @@ -19,11 +19,231 @@ Settings - + - + + + + + General + + + + + + + 0 + 0 + + + + <html><head/><body><p>Enter key only closes the preview window:</p></body></html> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Off + + + true + + + + + + + + 0 + 0 + + + + <html><head/><body><p>Preview window Orientation:</p></body></html> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + QComboBox::AdjustToContentsOnFirstShow + + + + + + + + 0 + 0 + + + + Automatically Check for Updates: + + + + + + + + 0 + 0 + + + + Off + + + true + + + false + + + + + + + + + + + 0 + 0 + + + + Phonetic Keyboard Layout + + + + QLayout::SetDefaultConstraint + + + + + + 0 + 0 + + + + <html><head/><body><p>Show suggestions:</p></body></html> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Off + + + true + + + + + + + + 0 + 0 + + + + <html><head/><body><p>Include English word in the suggestion list:</p></body></html> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Off + + + true + + + + + + + + 0 + 0 + + + + Auto Correct entries: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Update + + + false + + + + + + + + + + 0 @@ -31,46 +251,18 @@ - Phonetic Keyboard Layout + Fixed Keyboard Layout - - - QLayout::SetDefaultConstraint - - - - - - 0 - 0 - - - - Auto Correct entries: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - - 0 - 0 - - + + + - Update - - - false + <html><head/><body><p>Show suggestions:</p></body></html> - - + + 0 @@ -85,24 +277,8 @@ - - - - - 0 - 0 - - - - <html><head/><body><p>Show Preview Window:</p></body></html> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - + 0 @@ -110,76 +286,12 @@ - <html><head/><body><p>Enter key only closes preview window:</p></body></html> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Automatic Vowel Forming: - - - - 0 - 0 - - - - Off - - - true - - - - - - - - 0 - 0 - - - - Suggestion List Orientation: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - QComboBox::AdjustToContentsOnFirstShow - - - - - - - - 0 - 0 - - - - <html><head/><body><p>Include English word in preview window:</p></body></html> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - + 0 @@ -194,36 +306,8 @@ - - - - - - - - 0 - 0 - - - - Fixed Keyboard Layout - - - - - - - 0 - 0 - - - - Automatic Vowel Forming: - - - - - + + 0 @@ -231,7 +315,7 @@ - Traditional Kar Joining: + Automatic Chandrabindu Position fix: @@ -251,8 +335,8 @@ - - + + 0 @@ -260,7 +344,7 @@ - Automatic Chandrabindu Position fix: + Old Style Reph: @@ -280,24 +364,8 @@ - - - - - 0 - 0 - - - - Off - - - true - - - - - + + 0 @@ -305,12 +373,12 @@ - Bengali in NumberPad: + Traditional Kar Joining: - - + + 0 @@ -325,8 +393,8 @@ - - + + 0 @@ -334,35 +402,12 @@ - Old Style Reph: - - - - - - - - 0 - 0 - - - - Off - - - true - - - - - - - Show Preview Window: + Bengali in NumberPad: - - + + 0 @@ -382,90 +427,6 @@ - - - - QLayout::SetNoConstraint - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 232 - 20 - - - - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - 30 - - - 7 - - - - - - 0 - 0 - - - - Automatically Check for Updates: - - - - - - - - 0 - 0 - - - - Off - - - true - - - false - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 232 - 20 - - - - - -