diff options
Diffstat (limited to 'Swift/QtUI/QtSpellCheckerWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtSpellCheckerWindow.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Swift/QtUI/QtSpellCheckerWindow.cpp b/Swift/QtUI/QtSpellCheckerWindow.cpp new file mode 100644 index 0000000..45aa32f --- /dev/null +++ b/Swift/QtUI/QtSpellCheckerWindow.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2011 Vlad Voicu + * Licensed under the Simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#include "Swift/QtUI/QtSpellCheckerWindow.h" + +#include <Swift/Controllers/Settings/SettingsProvider.h> +#include <Swift/Controllers/SettingConstants.h> +#include <Swift/QtUI/QtUISettingConstants.h> + +#include <QCoreApplication> +#include <QFileDialog> + +namespace Swift { + +QtSpellCheckerWindow::QtSpellCheckerWindow(SettingsProvider* settings, QWidget* parent) : QDialog(parent) { + settings_ = settings; + ui_.setupUi(this); + connect(ui_.spellCheckerEnabled, SIGNAL(toggled(bool)), this, SLOT(handleChecker(bool))); + ui_.spellCheckerEnabled->setChecked(settings_->getSetting(SettingConstants::SPELL_CHECKER)); + //QString filename = QFileDialog::getOpenFileName(this, tr("Select Dictionaries"), "/home", tr("Images (*.aff, *.dic")); +} + +void QtSpellCheckerWindow::handleChecker(bool state) { + settings_->storeSetting(SettingConstants::SPELL_CHECKER, state); +} + +} |