summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Voicu <vladv@rosedu.org>2012-03-04 14:30:51 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-03-09 15:04:06 (GMT)
commit424d19ec5f9c7ab6ca28a532540d140a22fafeb9 (patch)
treeb95864555d98c39bf8ee1fcd540bb2eaaccaba2a /Swift/QtUI/QtSpellCheckerWindow.cpp
parent1c8cd160b79b6bbcec72042bdb104ba530508a93 (diff)
downloadswift-contrib-424d19ec5f9c7ab6ca28a532540d140a22fafeb9.zip
swift-contrib-424d19ec5f9c7ab6ca28a532540d140a22fafeb9.tar.bz2
Added minimal SpellChecker Ui Options
Diffstat (limited to 'Swift/QtUI/QtSpellCheckerWindow.cpp')
-rw-r--r--Swift/QtUI/QtSpellCheckerWindow.cpp30
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);
+}
+
+}