summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Voicu <vladv@rosedu.org>2012-03-04 14:30:51 (GMT)
committervlad <vlad@tyrion.(none)>2012-10-13 13:55:45 (GMT)
commit49834785cbf3ca1246fef5a7f939d5b182b437eb (patch)
treefe428095fbf0e5a3fec3008e3136935a08e36675 /Swift/QtUI/QtSpellCheckerWindow.cpp
parentb21e43357c66df6824536793bf41bbd1cbdf1a72 (diff)
downloadswift-contrib-49834785cbf3ca1246fef5a7f939d5b182b437eb.zip
swift-contrib-49834785cbf3ca1246fef5a7f939d5b182b437eb.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);
+}
+
+}