parley
browserwidget.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef BROWSERWIDGET_H
00017 #define BROWSERWIDGET_H
00018
00019
00020 #include "ui_browserwidget.h"
00021
00022 class KEduVocExpression;
00023 class KHTMLPart;
00024
00025 struct DictionaryProvider {
00026 QString name;
00027 QString url;
00028 QStringList languages;
00029 };
00030
00031 class BrowserWidget : public QWidget, public Ui::BrowserWidget
00032 {
00033 Q_OBJECT
00034 public:
00035 explicit BrowserWidget(QWidget* parent = 0);
00036
00037 public slots:
00043 void setTranslation(KEduVocExpression* entry, int translation);
00044
00045
00046 private slots:
00047 void showCurrentTranslation();
00048 void openUrl(const KUrl& targetUrl);
00049 void providerChanged(int);
00050 private:
00054 void setupProviders();
00055
00057 int m_currentTranslation;
00059 KEduVocExpression* m_entry;
00060
00061 KHTMLPart *m_htmlPart;
00062 QList<DictionaryProvider> m_providers;
00063 int m_currentProvider;
00064 };
00065 #endif