summaryrefslogtreecommitdiffstats
path: root/kdict/applet/kdictapplet.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kdict/applet/kdictapplet.h
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdict/applet/kdictapplet.h')
-rw-r--r--kdict/applet/kdictapplet.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/kdict/applet/kdictapplet.h b/kdict/applet/kdictapplet.h
new file mode 100644
index 00000000..a9738148
--- /dev/null
+++ b/kdict/applet/kdictapplet.h
@@ -0,0 +1,101 @@
+/* -------------------------------------------------------------
+
+ kdictapplet.h (part of The KDE Dictionary Client)
+
+ Copyright (C) 2001 Christian Gebauer <gebauer@kde.org>
+
+ The applet is loosely based on the "Run" applet included in KDE.
+ Copyright (c) 2000 Matthias Elter <elter@kde.org> (Artistic License)
+
+ This file is distributed under the Artistic License.
+ See LICENSE for details.
+
+ -------------------------------------------------------------
+
+ PopupBox helper class
+ DictApplet a small kicker-applet
+
+ ------------------------------------------------------------- */
+
+#ifndef _DICTAPPLET_H_
+#define _DICTAPPLET_H_
+
+#include <qhbox.h>
+#include <kpanelapplet.h>
+
+class QLabel;
+class QPushButton;
+class KHistoryCombo;
+
+
+//********* PopupBox ********************************************
+
+class PopupBox : public QHBox
+{
+ Q_OBJECT
+
+public:
+ PopupBox();
+ ~PopupBox();
+
+ bool showBox();
+
+signals:
+ void hidden();
+
+public slots:
+ void enablePopup();
+
+protected:
+ void hideEvent(QHideEvent *);
+
+private:
+ bool popupEnabled;
+
+};
+
+//********* DictApplet ********************************************
+
+class DictApplet : public KPanelApplet
+{
+ Q_OBJECT
+
+public:
+ DictApplet(const QString& configFile, Type t = Stretch, int actions = 0, QWidget *parent = 0, const char *name = 0);
+ virtual ~DictApplet();
+
+ int widthForHeight(int height) const;
+ int heightForWidth(int width) const;
+
+protected:
+ void resizeEvent(QResizeEvent*);
+ bool eventFilter( QObject *, QEvent * );
+
+ void sendCommand(const QCString &fun, const QString &data);
+
+protected slots:
+ void sendDelayedCommand();
+ void startQuery(const QString&);
+ void comboTextChanged(const QString&);
+ void queryClipboard();
+ void startDefine();
+ void startMatch();
+ void showExternalCombo();
+ void externalComboHidden();
+ void updateCompletionMode(KGlobalSettings::Completion mode);
+
+private:
+ KHistoryCombo *internalCombo, *externalCombo;
+ KCompletion *completionObject;
+ QLabel *textLabel, *iconLabel;
+ QPushButton *verticalBtn, *clipboardBtn, *defineBtn, *matchBtn;
+ QWidget *baseWidget;
+ PopupBox *popupBox;
+
+ int waiting;
+ QCString delayedFunc;
+ QString delayedData;
+
+};
+
+#endif