New xdxf dialog, one which provides methods to add new or change setting of existing... gui
authorMateusz Półrola <mateusz.polrola@comarch.pl>
Mon, 6 Sep 2010 13:55:06 +0000 (15:55 +0200)
committerMateusz Półrola <mateusz.polrola@comarch.pl>
Mon, 6 Sep 2010 13:55:06 +0000 (15:55 +0200)
Fixed norifications of dialogs

17 files changed:
src/include/CommonDictInterface.h
src/include/DictDialog.h
src/mdictionary/backbone/backbone.cpp
src/mdictionary/backbone/backbone.h
src/mdictionary/gui/DictManagerWidget.cpp
src/mdictionary/gui/DictManagerWidget.h
src/mdictionary/gui/MainWindow.cpp
src/mdictionary/gui/MainWindow.h
src/mdictionary/gui/MenuWidget.cpp
src/mdictionary/gui/MenuWidget.h
src/mdictionary/gui/NotifyManager.cpp
src/mdictionary/gui/NotifyManager.h
src/plugins/xdxf/XdxfDialog.cpp [new file with mode: 0644]
src/plugins/xdxf/XdxfDialog.h [new file with mode: 0644]
src/plugins/xdxf/XdxfDictDialog.cpp
src/plugins/xdxf/xdxf.pro
src/plugins/xdxf/xdxfplugin.cpp

index f09815d..329fd32 100644 (file)
@@ -127,7 +127,7 @@ class CommonDictInterface : public QObject, public AccentsNormalizer {
             different ways
         \param QString text of the notification
     */
-    void notify(Notify::NotifyType, QString);
+    void notify(Notify::NotifyType, QString, QWidget* parent = 0);
     
 
 protected:
index fc83744..f5f5ee0 100644 (file)
@@ -25,6 +25,7 @@
 #define DICTDIALOG_H
 
 #include <QObject>
+#include "Notify.h"
 
 class Settings;
 
@@ -46,6 +47,9 @@ public:
       \param parent parent widget on which dialog will be displayed
       */
     virtual void changeSettings(QWidget *parent = 0) = 0;
+
+Q_SIGNALS:
+    void notify(Notify::NotifyType, QString, QWidget* parent = 0);
 };
 
 #endif // DICTDIALOG_H
index f61266e..36782d6 100644 (file)
@@ -254,8 +254,8 @@ void Backbone::addInternalDictionary(CommonDictInterface* dict, bool active) {
         dict->setHash(++_dictNum); // Hash must be uniqe in every session but not between
         _dicts[dict] = active;
         connect(dict, SIGNAL(settingsChanged()), this, SLOT(dictUpdated()));
-        connect(dict, SIGNAL(notify(Notify::NotifyType,QString)), this,
-            SIGNAL(notify(Notify::NotifyType,QString)));
+        connect(dict, SIGNAL(notify(Notify::NotifyType,QString, QWidget*)), this,
+            SIGNAL(notify(Notify::NotifyType,QString, QWidget*)));
     }
 }
 
@@ -363,6 +363,8 @@ void Backbone::loadPlugins() {
         if(!exists) {
             _plugins.append(plugin);
             plugin->retranslate();
+            connect(plugin, SIGNAL(notify(Notify::NotifyType,QString, QWidget*)),
+                    this, SIGNAL(notify(Notify::NotifyType,QString, QWidget*)));
         }
     }
 }
index 89a9da7..2ef3bc7 100644 (file)
@@ -274,7 +274,7 @@ Q_SIGNALS:
             different ways
         \param QString text of the notification
     */
-    void notify(Notify::NotifyType, QString);
+    void notify(Notify::NotifyType, QString, QWidget*parent = 0);
 
 private Q_SLOTS:
     void bookmarksListReady();
index ba38115..2e96e65 100644 (file)
@@ -27,6 +27,7 @@
 #include "DictTypeSelectDialog.h"
 #include <QDebug>
 #include "../../include/DictDialog.h"
+#include "MenuWidget.h"
 
 DictManagerWidget::DictManagerWidget(GUIInterface *parent) :
     QDialog(parent) {
@@ -175,10 +176,13 @@ void DictManagerWidget::addNewDictButtonClicked() {
     #endif
 
    CommonDictInterface* selectedPlugin =
-           DictTypeSelectDialog::addNewDict(guiInterface->getPlugins(),this);
+           DictTypeSelectDialog::addNewDict(
+                   guiInterface->getPlugins(),
+                   menuWidget->applicationMenu());
+
    if(selectedPlugin != NULL) {
        Settings* settings =
-               selectedPlugin->dictDialog()->addNewDictionary(this);
+               selectedPlugin->dictDialog()->addNewDictionary(menuWidget->applicationMenu());
 
        if(settings != NULL) {
            CommonDictInterface* newDict = selectedPlugin->getNew(settings);
@@ -221,7 +225,7 @@ void DictManagerWidget::settingsButtonClicked() {
     #endif
    QList<QListWidgetItem*> selected = dictListWidget->selectedItems();
    if(selected.count() > 0) {
-       dictsHash[selected[0]]->dictDialog()->changeSettings(this);
+       dictsHash[selected[0]]->dictDialog()->changeSettings(menuWidget->applicationMenu());
    }
    refreshDictsList();
 }
index ada3af8..56e5989 100644 (file)
@@ -28,6 +28,7 @@
 #include <QWidget>
 #include <QtGui>
 #include "../../include/GUIInterface.h"
+#include "MenuWidget.h"
 
 
 //! Implements dictionaries management widget
@@ -48,6 +49,8 @@ public:
     */
     explicit DictManagerWidget(GUIInterface *parent = 0);
 
+    void setMenuWidget(MenuWidget *w) {menuWidget = w;}
+
 protected:
     void showEvent(QShowEvent *e);
     void hideEvent(QHideEvent *e);
@@ -73,6 +76,7 @@ Q_SIGNALS:
 
 
 public Q_SLOTS:
+
     #ifndef Q_WS_MAEMO_5
         void save();
     #endif
@@ -122,6 +126,8 @@ private:
         QPushButton* closeButton;
         bool _save;
     #endif
+
+    MenuWidget* menuWidget;
 };
 
 #endif // DICTMANAGERWIDGET_H
index 16257c6..42bd584 100644 (file)
@@ -123,6 +123,8 @@ void MainWindow::initializeMenu() {
     menuWidget->addSubMenu(tr("About"), aboutWidget);
 
     menuBar->addAction(menuWidget);
+
+    dictManagerWidget->setMenuWidget(menuWidget);
 #else
     dictionariesAction = menuBar->addAction(tr("Dictionaries"));
     connect(dictionariesAction, SIGNAL(triggered()),
@@ -143,6 +145,7 @@ void MainWindow::initializeMenu() {
     aboutAction = menuBar->addAction(tr("About"));
     connect(aboutAction, SIGNAL(triggered()),
             aboutWidget, SLOT(show()));
+
 #endif
 }
 
@@ -371,8 +374,8 @@ Settings* MainWindow::settings() {
 }
 
 
-void MainWindow::showNotification(Notify::NotifyType type, QString text) {
-    notifyManager->showNotification(type, text);
+void MainWindow::showNotification(Notify::NotifyType type, QString text, QWidget* parent) {
+    notifyManager->showNotification(type, text, parent);
 }
 
 void MainWindow::connectBackbone() {
@@ -435,8 +438,8 @@ void MainWindow::connectBackbone() {
     connect(backbone, SIGNAL(searchCanceled()),
             this, SIGNAL(setIdle()));
 
-    connect(backbone, SIGNAL(notify(Notify::NotifyType,QString)),
-            this, SLOT(showNotification(Notify::NotifyType,QString)));
+    connect(backbone, SIGNAL(notify(Notify::NotifyType,QString, QWidget*)),
+            this, SLOT(showNotification(Notify::NotifyType,QString, QWidget*)));
 }
 
 void MainWindow::connectSearchBar() {
index b4738b3..3e7e95c 100644 (file)
@@ -220,7 +220,7 @@ public:
       \param type type of notification
       \param message notification message
     */
-    void showNotification(Notify::NotifyType type, QString message);
+    void showNotification(Notify::NotifyType type, QString message, QWidget *parent=0);
 
 private Q_SLOTS:
     //! Disables menu
index f2d894a..146b765 100644 (file)
@@ -64,9 +64,17 @@ QWidget* MenuWidget::createWidget(QWidget *) {
     its parent to NULL and prevent it from delete, so we can still use this
     widget*/
     return tabWidget;
+}
 
+QWidget* MenuWidget::applicationMenu() {
+    return tabWidget->parentWidget();
 }
 
 void MenuWidget::hideMenu() {
     tabWidget->parentWidget()->hide();
 }
+
+
+void MenuWidget::showMenu() {
+    tabWidget->parentWidget()->show();
+}
index 238bff8..448e31c 100644 (file)
@@ -50,12 +50,16 @@ public:
     */
     void removeSubMenu(QString title);
 
+    QWidget* applicationMenu();
+
 public Q_SLOTS:
     /*!
       Hides menu
       */
     void hideMenu();
 
+    void showMenu();
+
 protected:
     MenuTabWidget* tabWidget;
     QWidget* createWidget(QWidget *parent);
index c054f8d..eeed43b 100644 (file)
@@ -33,6 +33,7 @@
 NotifyManager::NotifyManager(QObject *parent) :
     QObject(parent)
 {
+
 }
 
 
@@ -59,27 +60,33 @@ void NotifyManager::screenChanged() {
     }
 }
 
-void NotifyManager::showNotification(Notify::NotifyType type, QString text) {
+void NotifyManager::showNotification(Notify::NotifyType type, QString text, QWidget* parent) {
     if(activeNotifies.contains(text)) {
         return;
     }
 
+    if(parent == 0)
+        parent = qobject_cast<QWidget*>(this->parent());
     #ifdef Q_WS_MAEMO_5
         QMaemo5InformationBox* mbox =
-                new QMaemo5InformationBox(0);
+                new QMaemo5InformationBox(parent);
 
-        QLabel* infoLabel = new QLabel(text);
+        QLabel* infoLabel = new QLabel(text, mbox);
         infoLabel->setAlignment(Qt::AlignCenter);
         infoLabel->setWordWrap(true);
 
+        infoLabel->setMargin(10);
+
         mbox->setWidget(infoLabel);
+
     #else
         QMessageBox* mbox =
-                new QMessageBox(qobject_cast<QWidget*>(this->parent()));
+                new QMessageBox(parent);
 
     #endif
 
 
+
     switch(type) {
 
     case Notify::Info:
@@ -90,6 +97,7 @@ void NotifyManager::showNotification(Notify::NotifyType type, QString text) {
             mbox->setWindowTitle(tr("Information"));
             mbox->setIcon(QMessageBox::Information);
 
+
         #endif
         break;
 
@@ -111,7 +119,6 @@ void NotifyManager::showNotification(Notify::NotifyType type, QString text) {
         #endif
         break;
     }
-
     activeNotifies.insert(text, mbox);
     connect(mbox, SIGNAL(finished(int)), this, SLOT(notificationClosed()));
     mbox->exec();
index 57bd309..f42645e 100644 (file)
@@ -30,6 +30,7 @@
 #include <QString>
 #include <QDialog>
 #include "../../include/Notify.h"
+#include "MenuWidget.h"
 
 //! Manages notifications in applications
 /*!
@@ -52,7 +53,7 @@ public slots:
         \param text text of notification
         \sa Notify::NotifyType
     */
-    void showNotification(Notify::NotifyType type, QString text);
+    void showNotification(Notify::NotifyType type, QString text, QWidget*parent=0);
 
     //! Refresh all notifications when stacked widgets changes
     void screenChanged();
diff --git a/src/plugins/xdxf/XdxfDialog.cpp b/src/plugins/xdxf/XdxfDialog.cpp
new file mode 100644 (file)
index 0000000..dee28ef
--- /dev/null
@@ -0,0 +1,241 @@
+/*******************************************************************************
+
+    This file is part of mDictionary.
+
+    mDictionary is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    mDictionary is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with mDictionary.  If not, see <http://www.gnu.org/licenses/>.
+
+    Copyright 2010 Comarch S.A.
+
+*******************************************************************************/
+
+//Created by Mateusz Półrola
+
+#include "XdxfDialog.h"
+#include <QDebug>
+
+XdxfDialog::XdxfDialog(XdxfPlugin *plugin,
+                       XdxfDialogType type,
+                       QWidget *parent) :
+    QDialog(parent) {
+    this->plugin = plugin;
+    this->type = type;
+
+    initializeUI();
+
+    connect(cacheCheckBox, SIGNAL(toggled(bool)),
+            this, SLOT(setGenerateCache(bool)));
+
+    connect(accentsCheckBox, SIGNAL(toggled(bool)),
+            this, SLOT(setAccents(bool)));
+
+    connect(accentsInfoToolButton, SIGNAL(clicked()),
+             this, SLOT(showAccentsInfo()));
+
+    connect(cacheInfoToolButton, SIGNAL(clicked()),
+             this, SLOT(showCacheInfo()));
+
+    if(type == New) {
+        connect(browseButton, SIGNAL(clicked()),
+                this, SLOT(selectFile()));
+
+        connect(addButton, SIGNAL(clicked()),
+                this, SLOT(accept()));
+    }
+    else {
+        connect(saveButton, SIGNAL(clicked()),
+                this, SLOT(accept()));
+    }
+}
+
+
+void XdxfDialog::initializeUI() {
+    mainVerticalLayout = new QVBoxLayout;
+    widget = new QWidget;
+    widget->setLayout(mainVerticalLayout);
+
+    if(type == New) {
+        setWindowTitle(tr("Add new XDXF dictionary"));
+
+
+        browseLayout = new QHBoxLayout;
+        browseButton = new QPushButton(tr("Browse"));
+        browseLabel = new QLabel(tr("Dictionary file: not selected"));
+
+        browseLayout->addWidget(browseLabel, 0, Qt::AlignLeft);
+        browseLayout->addWidget(browseButton, 0, Qt::AlignRight);
+
+        mainVerticalLayout->addLayout(browseLayout);
+    }
+    else {
+        setWindowTitle(tr("XDXF Settings"));
+
+
+        infoLabel = new QLabel;
+
+        infoLabel->setText(tr("Plugin: ") + plugin->type().toUpper() +"\n" +
+                       tr("From: ") + plugin->langFrom() + "\n" +
+                       tr("To: ") + plugin->langTo() + "\n" +
+                       tr("Description: ") + plugin->name() + "\n" +
+                       tr("License: ") + plugin->infoNote());
+        infoLabel->setWordWrap(true);
+        mainVerticalLayout->addWidget(infoLabel);
+    }
+
+    accentsCheckBox = new QCheckBox(tr("Strip accents"));
+    accentsInfoToolButton = new QToolButton;
+    accentsInfoToolButton->setIcon(QIcon::fromTheme("general_information"));
+
+    accentsLayout = new QHBoxLayout;
+    accentsLayout->addWidget(accentsCheckBox);
+    accentsLayout->addWidget(accentsInfoToolButton);
+
+
+    cacheCheckBox = new QCheckBox(tr("Optimize for quicker searches"));
+    cacheInfoToolButton = new QToolButton;
+    cacheInfoToolButton->setIcon(QIcon::fromTheme("general_information"));
+
+    cacheLayout = new QHBoxLayout;
+    cacheLayout->addWidget(cacheCheckBox);
+    cacheLayout->addWidget(cacheInfoToolButton);
+
+    mainVerticalLayout->addLayout(cacheLayout);
+    mainVerticalLayout->addLayout(accentsLayout);
+
+
+    //load old setting if exists
+    if(!plugin) {
+        cacheCheckBox->setChecked(true);
+        accentsCheckBox->setChecked(true);
+        accentsCheckBox->setEnabled(false);
+        _generateCache = true;
+        _accents = true;
+        _dictionaryFilePath = "";
+    }
+    else if(plugin && plugin->settings()->value("cached") == "true") {
+        cacheCheckBox->setChecked(true);
+        accentsCheckBox->setChecked(true);
+        accentsCheckBox->setEnabled(false);
+        _generateCache = true;
+        _accents = true;
+    }
+    else {
+        cacheCheckBox->setChecked(false);
+        _generateCache = false;
+
+        if(plugin->settings()->value("strip_accents") == "true") {
+            accentsCheckBox->setChecked(true);
+            _accents = true;
+        }
+        else {
+            accentsCheckBox->setChecked(false);
+            _accents = false;
+        }
+    }
+
+    if(type == New) {
+        addButton = new QPushButton(tr("Add"));
+        mainVerticalLayout->addWidget(addButton);
+    }
+    else {
+        saveButton = new QPushButton(tr("Save settings"));
+        mainVerticalLayout->addWidget(saveButton);
+    }
+
+    scrollArea = new QScrollArea;
+    scrollArea->setWidget(widget);
+    scrollArea->setWidgetResizable(true);
+    scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+
+    layout = new QHBoxLayout;
+    layout->addWidget(scrollArea);
+    setLayout(layout);
+}
+
+
+void XdxfDialog::setAccents(bool accents) {
+    _accents = accents;
+}
+
+void XdxfDialog::setGenerateCache(bool generate) {
+    _generateCache = generate;
+
+    if(generate) {
+        _lastAccents = _accents;
+        accentsCheckBox->setChecked(true);
+    }
+    else
+        accentsCheckBox->setChecked(_lastAccents);
+
+    accentsCheckBox->setEnabled(!generate);
+}
+
+void XdxfDialog::selectFile() {
+    QString fileName = QFileDialog::getOpenFileName(this,
+                                     tr("Select dictionary file"),
+                                     _dictionaryFilePath,
+                                     tr("XDXF Files (*.xdxf)"),
+                                     NULL,
+                                     NULL);
+
+    if (!fileName.isEmpty()) {
+        browseLabel->setText(tr("Dictionary file: %1").arg(fileName));
+        _dictionaryFilePath = fileName;
+    }
+}
+
+void XdxfDialog::saveSettings() {
+    _settings = new Settings;
+    if(plugin) {
+        foreach(QString key, plugin->settings()->keys())
+            _settings->setValue(key, plugin->settings()->value(key));
+    }
+    else {
+        _settings->setValue("path", _dictionaryFilePath);
+    }
+
+    if(_generateCache)
+        _settings->setValue("generateCache", "true");
+    else
+        _settings->setValue("generateCache", "false");
+
+    if(_accents)
+        _settings->setValue("strip_accents", "true");
+    else
+        _settings->setValue("strip_accents", "false");
+}
+
+void XdxfDialog::accept() {
+    if(type == New && _dictionaryFilePath.isEmpty()) {
+        Q_EMIT notify(Notify::Warning, tr("File path is not set"), this);
+
+        return;
+    }
+
+    saveSettings();
+    QDialog::accept();
+}
+
+Settings* XdxfDialog::getSettings() {
+    return _settings;
+}
+
+void XdxfDialog::showCacheInfo() {
+    Q_EMIT notify(Notify::Info, tr("Optimize for quicker searches (may take some time)"), this);
+}
+
+void XdxfDialog::showAccentsInfo() {
+    Q_EMIT notify(Notify::Info, tr("Strip accents (searching takes more "
+                                   "time, but spelling don't have to be exact)"), this);
+}
+
diff --git a/src/plugins/xdxf/XdxfDialog.h b/src/plugins/xdxf/XdxfDialog.h
new file mode 100644 (file)
index 0000000..a9af3d8
--- /dev/null
@@ -0,0 +1,96 @@
+/*******************************************************************************
+
+    This file is part of mDictionary.
+
+    mDictionary is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    mDictionary is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with mDictionary.  If not, see <http://www.gnu.org/licenses/>.
+
+    Copyright 2010 Comarch S.A.
+
+*******************************************************************************/
+
+//Created by Mateusz Półrola
+
+#ifndef XDXFDIALOG_H
+#define XDXFDIALOG_H
+
+#include <QDialog>
+#include "../../include/settings.h"
+#include <QtGui>
+#include "xdxfplugin.h"
+
+class XdxfDialog : public QDialog
+{
+    Q_OBJECT
+public:
+    enum XdxfDialogType {New, Change};
+
+    explicit XdxfDialog(XdxfPlugin* plugin = 0, XdxfDialogType type = New,
+                        QWidget *parent = 0);
+
+    Settings* getSettings();
+
+Q_SIGNALS:
+    void notify(Notify::NotifyType, QString, QWidget*);
+
+public Q_SLOTS:
+    void accept();
+
+private Q_SLOTS:
+    void selectFile();
+    void saveSettings();
+    void setGenerateCache(bool);
+    void setAccents(bool);
+
+    void showCacheInfo();
+    void showAccentsInfo();
+
+
+private:
+    void initializeUI();
+
+    QLabel* browseLabel;
+    QPushButton* browseButton;
+    QHBoxLayout* browseLayout;
+
+    QLabel* infoLabel;
+
+    QCheckBox* cacheCheckBox;
+    QCheckBox* accentsCheckBox;
+    QHBoxLayout* cacheLayout;
+    QHBoxLayout* accentsLayout;
+    QToolButton* cacheInfoToolButton;
+    QToolButton* accentsInfoToolButton;
+
+    QPushButton* saveButton;
+    QPushButton* addButton;
+
+    QString _dictionaryFilePath;
+
+    QScrollArea* scrollArea;
+
+    QWidget* widget;
+    QHBoxLayout* layout;
+
+    QVBoxLayout* mainVerticalLayout;
+    bool _generateCache;
+    bool _accents;
+    bool _lastAccents;
+
+    Settings* _settings;
+
+    XdxfPlugin* plugin;
+    XdxfDialogType type;
+};
+
+#endif // XDXFDIALOG_H
index 2deb306..f1bcad2 100644 (file)
@@ -27,6 +27,8 @@
 #include "XdxfLoadDialog.h"
 #include "XdxfSettingsDialog.h"
 #include "xdxfplugin.h"
+#include "XdxfDialog.h"
+#include <QDebug>
 
 XdxfDictDialog::XdxfDictDialog(XdxfPlugin *plugin, QObject *parent) :
     DictDialog(parent) {
@@ -34,9 +36,25 @@ XdxfDictDialog::XdxfDictDialog(XdxfPlugin *plugin, QObject *parent) :
 }
 
 Settings* XdxfDictDialog::addNewDictionary(QWidget *parent) {
-    return XdxfLoadDialog::getSettings(parent);
+    qDebug()<<parent;
+    XdxfDialog d(0, XdxfDialog::New, parent);
+
+    connect(&d, SIGNAL(notify(Notify::NotifyType,QString, QWidget*)),
+            this, SIGNAL(notify(Notify::NotifyType,QString, QWidget*)));
+
+    if(d.exec() == QDialog::Accepted) {
+        return d.getSettings();
+    }
+    return 0;
 }
 
 void XdxfDictDialog::changeSettings(QWidget * parent) {
-    XdxfSettingsDialog::getSettings(plugin, parent);
+    XdxfDialog d(plugin, XdxfDialog::Change, parent);
+
+    connect(&d, SIGNAL(notify(Notify::NotifyType,QString, QWidget*)),
+            this, SIGNAL(notify(Notify::NotifyType,QString, QWidget*)));
+
+    if(d.exec() == QDialog::Accepted) {
+        plugin->setSettings(d.getSettings());
+    }
 }
index 1fe7ee8..03e714e 100644 (file)
@@ -8,7 +8,8 @@ SOURCES +=  \
     XdxfLoadDialog.cpp \
     XdxfDictDialog.cpp \
     XdxfSettingsDialog.cpp \
-    XdxfCachingDialog.cpp
+    XdxfCachingDialog.cpp \
+    XdxfDialog.cpp
 
 
 HEADERS += \
@@ -21,7 +22,8 @@ HEADERS += \
     ../../include/settings.h \
     ../../include/CommonDictInterface.h \
     XdxfSettingsDialog.h \
-    XdxfCachingDialog.h
+    XdxfCachingDialog.h \
+    XdxfDialog.h
 
 RESOURCES += \
     xdxf.qrc
index 33a15d4..533350b 100644 (file)
 XdxfPlugin::XdxfPlugin(QObject *parent) : CommonDictInterface(parent),
                     _langFrom(""), _langTo(""),_name(""), _infoNote("") {
     _settings = new Settings();
-    _dictDialog = new XdxfDictDialog(this);
+    _dictDialog = new XdxfDictDialog(this, this);
+
+    connect(_dictDialog, SIGNAL(notify(Notify::NotifyType,QString, QWidget*)),
+            this, SIGNAL(notify(Notify::NotifyType,QString, QWidget*)));
+
     cachingDialog = new XdxfCachingDialog(this);
 
+
+
     _settings->setValue("type","xdxf");
     _icon = QIcon("/usr/share/mdictionary/xdxf.png");
     _wordsCount = -1;