Copyright 2010 Comarch S.A.
*******************************************************************************/
-
/*! \file GoogleDictDialog.cpp
+ \brief Class launches dialog which generates a new dictionary, or changes
+ settings
+
\author Jakub Jaszczynski <j.j.jaszczynski@gmail.com>
*/
#include "GoogleDictDialog.h"
+#include "GoogleDialog.h"
GoogleDictDialog::GoogleDictDialog(GooglePlugin *plugin, QObject *parent) :
DictDialog(parent) {
this->plugin = plugin;
}
+
Settings* GoogleDictDialog::addNewDictionary(QWidget *parent) {
- return GoogleSettingsDialog::getSettings(parent);
+ GoogleDialog d(0, GoogleDialog::New, parent);
+
+ connect(&d, SIGNAL(notify(Notify::NotifyType,QString)),
+ this, SIGNAL(notify(Notify::NotifyType,QString)));
+
+ if(d.exec() == QDialog::Accepted)
+ return d.getSettings();
+ return 0;
}
void GoogleDictDialog::changeSettings(QWidget * parent) {
- GoogleSettingsDialog::changeSettings(plugin,parent);
+ GoogleDialog d(plugin, GoogleDialog::Change, parent);
+
+ connect(&d, SIGNAL(notify(Notify::NotifyType,QString)),
+ this, SIGNAL(notify(Notify::NotifyType,QString)));
+
+ if(d.exec() == QDialog::Accepted)
+ plugin->setSettings(d.getSettings());
}