1 /*****************************************************************************
2 * This file is a part of QStarDict, a StarDict clone written using Qt *
3 * multitran.cpp - Plugin for multitran-data (multitran.sf.net) *
4 * Copyright (C) 2008 Nick Shaforostoff *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
16 * You should have received a copy of the GNU General Public License along *
17 * with this program; if not, write to the Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
19 *****************************************************************************/
24 #include "../dictplugin.h"
30 class Multitran: public QObject, public QStarDict::DictPlugin
33 Q_INTERFACES(QStarDict::DictPlugin)
36 Multitran(QObject *parent = 0);
40 { return "multitran"; }
41 QString version() const
43 QString description() const
44 { return "The Multitran plugin"; }
45 QStringList authors() const
46 { return QStringList()
47 << tr("Stanislav Ievlev <inger@altlinux.org>")
48 << tr("Nick Shaforostoff <shaforostoff@kde.ru>"); }
49 Features features() const
50 { return Features(/*SearchSimilar | SettingsDialog*/); }
52 QStringList availableDicts() const;
53 QStringList loadedDicts() const {return QStringList("Multitran");}//{ return m_loadedDicts.keys(); }
54 void setLoadedDicts(const QStringList &loadedDicts);
55 DictInfo dictInfo(const QString &dict);
57 bool isTranslatable(const QString &dict, const QString &word);
58 Translation translate(const QString &dict, const QString &word);
59 virtual QStringList findSimilarWords(const QString &dict, const QString &word);
61 int execSettingsDialog(QWidget *parent);
63 //friend class SettingsDialog;
66 QStringList m_dictDirs;
67 QHash<QString, int> m_loadedDicts;
72 // vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab cindent