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
--- /dev/null
+/*******************************************************************************
+
+ 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 *) {
+
+}
--- /dev/null
+/*******************************************************************************
+
+ 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
--- /dev/null
+/*******************************************************************************
+
+ 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;
+}
+
+
--- /dev/null
+/*******************************************************************************
+
+ 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
TranslationXdxf.h \
XdxfLoadDialog.h \
../../../includes/DictDialog.h \
- XdxfDictDialog.h
+ XdxfDictDialog.h \
../../../includes/translation.h \
../../../includes/settings.h \
../../../includes/CommonDictInterface.h \
+++ /dev/null
-/*******************************************************************************
-
- 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 *) {
-
-}
+++ /dev/null
-/*******************************************************************************
-
- 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
+++ /dev/null
-/*******************************************************************************
-
- 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;
-}
-
-
+++ /dev/null
-/*******************************************************************************
-
- 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
#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("")),