1 /*****************************************************************************
2 * web.h - QStarDict, a StarDict clone written with using Qt *
3 * Copyright (C) 2008 Alexander Rodin *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License along *
16 * with this program; if not, write to the Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
18 *****************************************************************************/
23 #include "../dictplugin.h"
27 class Web: public QObject, public QStarDict::DictPlugin
30 Q_INTERFACES(QStarDict::DictPlugin)
33 Web(QObject *parent = 0);
37 QString version() const
39 QString description() const
40 { return tr("An experimental plugin for WEB dictionaries.<br><b><font color=red>Warning:</font></b> now this plugin is unstable"); }
41 QStringList authors() const
42 { return QStringList("Alexander Rodin <rodin.alexander@gmail.com>"); }
43 Features features() const
44 { return Features(SettingsDialog); }
46 QStringList availableDicts() const;
47 QStringList loadedDicts() const
48 { return m_loadedDicts.keys(); }
49 void setLoadedDicts(const QStringList &dicts);
50 DictInfo dictInfo(const QString &dict);
52 bool isTranslatable(const QString &dict, const QString &word);
53 Translation translate(const QString &dict, const QString &word);
55 int execSettingsDialog(QWidget *parent);
57 friend class SettingsDialog;
64 QHash<QString, QueryStruct> m_loadedDicts;
69 // vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab cindent