Moved files from old XdxfPlugin directory
authorMateusz Półrola <mateusz.polrola@comarch.pl>
Thu, 5 Aug 2010 13:37:35 +0000 (15:37 +0200)
committerMateusz Półrola <mateusz.polrola@comarch.pl>
Thu, 5 Aug 2010 13:37:35 +0000 (15:37 +0200)
make-plugins
trunk/src/plugins/xdxf/src/XdxfDictDialog.cpp [new file with mode: 0644]
trunk/src/plugins/xdxf/src/XdxfDictDialog.h [new file with mode: 0644]
trunk/src/plugins/xdxf/src/XdxfLoadDialog.cpp [new file with mode: 0644]
trunk/src/plugins/xdxf/src/XdxfLoadDialog.h [new file with mode: 0644]
trunk/src/plugins/xdxf/src/XdxfPlugin.pro
trunk/src/plugins/xdxf/src/XdxfPlugin/XdxfDictDialog.cpp [deleted file]
trunk/src/plugins/xdxf/src/XdxfPlugin/XdxfDictDialog.h [deleted file]
trunk/src/plugins/xdxf/src/XdxfPlugin/XdxfLoadDialog.cpp [deleted file]
trunk/src/plugins/xdxf/src/XdxfPlugin/XdxfLoadDialog.h [deleted file]
trunk/src/plugins/xdxf/src/xdxfplugin.cpp

index 0cbfed9..40377d1 100755 (executable)
@@ -9,7 +9,7 @@ for pro in  *; do
            qmake *.pro
            make clean
            make
-            mv `find . -name "*.so.*" -type f` "../../../base-build-desktop/$pro.so"
+            mv `find . -name "*.so.*" -type f` "../../../base/$pro.so"
             popd
     fi
 done
diff --git a/trunk/src/plugins/xdxf/src/XdxfDictDialog.cpp b/trunk/src/plugins/xdxf/src/XdxfDictDialog.cpp
new file mode 100644 (file)
index 0000000..0e672ce
--- /dev/null
@@ -0,0 +1,39 @@
+/*******************************************************************************
+
+    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 "XdxfDictDialog.h"
+#include "XdxfLoadDialog.h"
+
+XdxfDictDialog::XdxfDictDialog(QObject *parent) :
+    DictDialog(parent) {
+
+}
+
+
+Settings* XdxfDictDialog::addNewDictionary(QWidget *parent) {
+    return XdxfLoadDialog::getSettings(parent);
+}
+
+void XdxfDictDialog::changeSettings(QWidget *) {
+
+}
diff --git a/trunk/src/plugins/xdxf/src/XdxfDictDialog.h b/trunk/src/plugins/xdxf/src/XdxfDictDialog.h
new file mode 100644 (file)
index 0000000..4384fcd
--- /dev/null
@@ -0,0 +1,50 @@
+/*******************************************************************************
+
+    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 XDXFDICTDIALOG_H
+#define XDXFDICTDIALOG_H
+
+#include "../../../includes/DictDialog.h"
+#include "XdxfLoadDialog.h"
+
+
+//! Implementation of DictDialog interface for xdxf plugin
+class XdxfDictDialog : public DictDialog {
+    Q_OBJECT
+public:
+    explicit XdxfDictDialog(QObject *parent = 0);
+
+    /*!
+      Shows add new xdxf dictionary dialog and returns settings of new dict
+      \param parent parent widget on which will be displayed dialog
+      */
+    Settings* addNewDictionary(QWidget *parent);
+
+    /*!
+      Shows settings dialog and save new settings in plugin
+      \param parent parent widget on which will be displayed dialog
+      */
+    void changeSettings(QWidget *parent);
+};
+
+#endif // XDXFDICTDIALOG_H
diff --git a/trunk/src/plugins/xdxf/src/XdxfLoadDialog.cpp b/trunk/src/plugins/xdxf/src/XdxfLoadDialog.cpp
new file mode 100644 (file)
index 0000000..2666ffa
--- /dev/null
@@ -0,0 +1,110 @@
+/*******************************************************************************
+
+    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 "XdxfLoadDialog.h"
+
+XdxfLoadDialog::XdxfLoadDialog(QWidget *parent) :
+    QDialog(parent) {
+    verticalLayout = new QVBoxLayout;
+    setLayout(verticalLayout);
+
+    setWindowTitle(tr("Add new XDXF dictionary"));
+
+    browseLayout = new QHBoxLayout;
+    verticalLayout->addLayout(browseLayout);
+
+    browseButton =  new QPushButton(tr("Browse"));
+    browseLabel = new QLabel(tr("Dictionary file: not selected"));
+
+    browseLayout->addWidget(browseLabel);
+    browseLayout->addWidget(browseButton,0, Qt::AlignRight);
+
+
+    cacheLayout = new QHBoxLayout;
+    verticalLayout->addLayout(cacheLayout);
+
+    cacheCheckBox = new QCheckBox(tr("Optimize for quicker searches (may take some time)"));
+    cacheCheckBox->setChecked(true);
+    cacheLayout->addWidget(cacheCheckBox);
+
+    addButton = new QPushButton(tr("Add"));
+
+    verticalLayout->addWidget(addButton);
+
+    setModal(true);
+
+    connect(browseButton, SIGNAL(clicked()),
+            this, SLOT(selectFile()));
+
+    connect(addButton, SIGNAL(clicked()),
+            this, SLOT(addDictionary()));
+
+    _dicitonaryFilePath = QString();
+}
+
+void XdxfLoadDialog::selectFile() {
+    QString fileName = QFileDialog::getOpenFileName(this,
+                                     tr("Select dictionary file"),
+                                     "",
+                                     tr("XDXF Files (*.xdxf)"),
+                                     NULL,
+                                     NULL);
+    if (!fileName.isEmpty()) {
+        browseLabel->setText(tr("Dictionary file: ") + fileName);
+        _dicitonaryFilePath = fileName;
+    }
+}
+
+void XdxfLoadDialog::addDictionary() {
+    _generateCache = cacheCheckBox->isChecked();
+    accept();
+}
+
+QString XdxfLoadDialog::dicitonaryFilePath() {
+    return _dicitonaryFilePath;
+}
+
+bool XdxfLoadDialog::generateCache() {
+    return _generateCache;
+}
+
+Settings* XdxfLoadDialog::getSettings(QWidget *parent) {
+    XdxfLoadDialog loadDialog(parent);
+    Settings* settings = new Settings;
+
+    if(loadDialog.exec()==QDialog::Accepted) {
+        settings->setValue("dictionaryFile", loadDialog.dicitonaryFilePath());
+        if(loadDialog.generateCache()) {
+            settings->setValue("cache", "1");
+        }
+        else {
+            settings->setValue("cache", "0");
+        }
+
+        return settings;
+    }
+
+    return NULL;
+}
+
+
diff --git a/trunk/src/plugins/xdxf/src/XdxfLoadDialog.h b/trunk/src/plugins/xdxf/src/XdxfLoadDialog.h
new file mode 100644 (file)
index 0000000..3b102fc
--- /dev/null
@@ -0,0 +1,70 @@
+/*******************************************************************************
+
+    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 XDXFLOADDIALOG_H
+#define XDXFLOADDIALOG_H
+
+#include <QDialog>
+#include <QtGui>
+#include "../../../includes/settings.h"
+
+//! Displays dialog which allow user to add new xdxf dictionary
+class XdxfLoadDialog : public QDialog {
+    Q_OBJECT
+public:
+    explicit XdxfLoadDialog(QWidget *parent = 0);
+
+    /*! Displays dialog and returns settings of new dictionary
+        \return Setting object containing new dictionary settings or NULL in
+        case which user cancel dialog
+    */
+    static Settings* getSettings(QWidget *parent);
+
+    //! Returns choosen by user dictionary file path
+    QString dicitonaryFilePath();
+
+    //! Returns if user want to cache dictionary
+    bool generateCache();
+
+signals:
+
+public slots:
+
+private Q_SLOTS:
+    void selectFile();
+    void addDictionary();
+
+private:
+    QPushButton* addButton;
+    QPushButton* browseButton;
+    QLabel* browseLabel;
+    QCheckBox* cacheCheckBox;
+    QVBoxLayout* verticalLayout;
+    QHBoxLayout* browseLayout;
+    QHBoxLayout* cacheLayout;
+    QString _dicitonaryFilePath;
+    bool _generateCache;
+
+};
+
+#endif // XDXFLOADDIALOG_H
index c82bc62..0c4b06b 100644 (file)
@@ -22,7 +22,7 @@ HEADERS += \
     TranslationXdxf.h \
     XdxfLoadDialog.h \
     ../../../includes/DictDialog.h \
-    XdxfDictDialog.h
+    XdxfDictDialog.h \
     ../../../includes/translation.h \
     ../../../includes/settings.h \
     ../../../includes/CommonDictInterface.h \
diff --git a/trunk/src/plugins/xdxf/src/XdxfPlugin/XdxfDictDialog.cpp b/trunk/src/plugins/xdxf/src/XdxfPlugin/XdxfDictDialog.cpp
deleted file mode 100644 (file)
index 0e672ce..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
-
-    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 "XdxfDictDialog.h"
-#include "XdxfLoadDialog.h"
-
-XdxfDictDialog::XdxfDictDialog(QObject *parent) :
-    DictDialog(parent) {
-
-}
-
-
-Settings* XdxfDictDialog::addNewDictionary(QWidget *parent) {
-    return XdxfLoadDialog::getSettings(parent);
-}
-
-void XdxfDictDialog::changeSettings(QWidget *) {
-
-}
diff --git a/trunk/src/plugins/xdxf/src/XdxfPlugin/XdxfDictDialog.h b/trunk/src/plugins/xdxf/src/XdxfPlugin/XdxfDictDialog.h
deleted file mode 100644 (file)
index b9292f6..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
-
-    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 XDXFDICTDIALOG_H
-#define XDXFDICTDIALOG_H
-
-#include "../../../../includes/DictDialog.h"
-#include "XdxfLoadDialog.h"
-
-
-//! Implementation of DictDialog interface for xdxf plugin
-class XdxfDictDialog : public DictDialog {
-    Q_OBJECT
-public:
-    explicit XdxfDictDialog(QObject *parent = 0);
-
-    /*!
-      Shows add new xdxf dictionary dialog and returns settings of new dict
-      \param parent parent widget on which will be displayed dialog
-      */
-    Settings* addNewDictionary(QWidget *parent);
-
-    /*!
-      Shows settings dialog and save new settings in plugin
-      \param parent parent widget on which will be displayed dialog
-      */
-    void changeSettings(QWidget *parent);
-};
-
-#endif // XDXFDICTDIALOG_H
diff --git a/trunk/src/plugins/xdxf/src/XdxfPlugin/XdxfLoadDialog.cpp b/trunk/src/plugins/xdxf/src/XdxfPlugin/XdxfLoadDialog.cpp
deleted file mode 100644 (file)
index 2666ffa..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
-
-    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 "XdxfLoadDialog.h"
-
-XdxfLoadDialog::XdxfLoadDialog(QWidget *parent) :
-    QDialog(parent) {
-    verticalLayout = new QVBoxLayout;
-    setLayout(verticalLayout);
-
-    setWindowTitle(tr("Add new XDXF dictionary"));
-
-    browseLayout = new QHBoxLayout;
-    verticalLayout->addLayout(browseLayout);
-
-    browseButton =  new QPushButton(tr("Browse"));
-    browseLabel = new QLabel(tr("Dictionary file: not selected"));
-
-    browseLayout->addWidget(browseLabel);
-    browseLayout->addWidget(browseButton,0, Qt::AlignRight);
-
-
-    cacheLayout = new QHBoxLayout;
-    verticalLayout->addLayout(cacheLayout);
-
-    cacheCheckBox = new QCheckBox(tr("Optimize for quicker searches (may take some time)"));
-    cacheCheckBox->setChecked(true);
-    cacheLayout->addWidget(cacheCheckBox);
-
-    addButton = new QPushButton(tr("Add"));
-
-    verticalLayout->addWidget(addButton);
-
-    setModal(true);
-
-    connect(browseButton, SIGNAL(clicked()),
-            this, SLOT(selectFile()));
-
-    connect(addButton, SIGNAL(clicked()),
-            this, SLOT(addDictionary()));
-
-    _dicitonaryFilePath = QString();
-}
-
-void XdxfLoadDialog::selectFile() {
-    QString fileName = QFileDialog::getOpenFileName(this,
-                                     tr("Select dictionary file"),
-                                     "",
-                                     tr("XDXF Files (*.xdxf)"),
-                                     NULL,
-                                     NULL);
-    if (!fileName.isEmpty()) {
-        browseLabel->setText(tr("Dictionary file: ") + fileName);
-        _dicitonaryFilePath = fileName;
-    }
-}
-
-void XdxfLoadDialog::addDictionary() {
-    _generateCache = cacheCheckBox->isChecked();
-    accept();
-}
-
-QString XdxfLoadDialog::dicitonaryFilePath() {
-    return _dicitonaryFilePath;
-}
-
-bool XdxfLoadDialog::generateCache() {
-    return _generateCache;
-}
-
-Settings* XdxfLoadDialog::getSettings(QWidget *parent) {
-    XdxfLoadDialog loadDialog(parent);
-    Settings* settings = new Settings;
-
-    if(loadDialog.exec()==QDialog::Accepted) {
-        settings->setValue("dictionaryFile", loadDialog.dicitonaryFilePath());
-        if(loadDialog.generateCache()) {
-            settings->setValue("cache", "1");
-        }
-        else {
-            settings->setValue("cache", "0");
-        }
-
-        return settings;
-    }
-
-    return NULL;
-}
-
-
diff --git a/trunk/src/plugins/xdxf/src/XdxfPlugin/XdxfLoadDialog.h b/trunk/src/plugins/xdxf/src/XdxfPlugin/XdxfLoadDialog.h
deleted file mode 100644 (file)
index fd367e5..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
-
-    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 XDXFLOADDIALOG_H
-#define XDXFLOADDIALOG_H
-
-#include <QDialog>
-#include <QtGui>
-#include "../../../../includes/settings.h"
-
-//! Displays dialog which allow user to add new xdxf dictionary
-class XdxfLoadDialog : public QDialog {
-    Q_OBJECT
-public:
-    explicit XdxfLoadDialog(QWidget *parent = 0);
-
-    /*! Displays dialog and returns settings of new dictionary
-        \return Setting object containing new dictionary settings or NULL in
-        case which user cancel dialog
-    */
-    static Settings* getSettings(QWidget *parent);
-
-    //! Returns choosen by user dictionary file path
-    QString dicitonaryFilePath();
-
-    //! Returns if user want to cache dictionary
-    bool generateCache();
-
-signals:
-
-public slots:
-
-private Q_SLOTS:
-    void selectFile();
-    void addDictionary();
-
-private:
-    QPushButton* addButton;
-    QPushButton* browseButton;
-    QLabel* browseLabel;
-    QCheckBox* cacheCheckBox;
-    QVBoxLayout* verticalLayout;
-    QHBoxLayout* browseLayout;
-    QHBoxLayout* cacheLayout;
-    QString _dicitonaryFilePath;
-    bool _generateCache;
-
-};
-
-#endif // XDXFLOADDIALOG_H
index b06bca5..c1c161f 100644 (file)
@@ -4,7 +4,7 @@
 #include <QXmlStreamReader>
 #include <QtPlugin>
 #include "TranslationXdxf.h"
-#include "../../../../includes/settings.h"
+#include "../../../includes/settings.h"
 
 XdxfPlugin::XdxfPlugin(QObject *parent) : CommonDictInterface(parent),
                     _langFrom(tr("")), _langTo(tr("")),_name(tr("")),