summaryrefslogtreecommitdiffstats
path: root/khelpcenter/view.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
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /khelpcenter/view.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.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/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khelpcenter/view.h')
-rw-r--r--khelpcenter/view.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/khelpcenter/view.h b/khelpcenter/view.h
new file mode 100644
index 000000000..9eb1d86b7
--- /dev/null
+++ b/khelpcenter/view.h
@@ -0,0 +1,94 @@
+#ifndef __view_h__
+#define __view_h__
+
+#include <khtml_part.h>
+
+#include "glossary.h"
+#include "navigator.h"
+
+class KActionCollection;
+
+namespace DOM {
+ class Node;
+}
+
+namespace KHC {
+
+class Formatter;
+
+class View : public KHTMLPart
+{
+ Q_OBJECT
+ public:
+ View( QWidget *parentWidget, const char *widgetName,
+ QObject *parent, const char *name, KHTMLPart::GUIProfile prof,
+ KActionCollection *col );
+
+ ~View();
+
+ virtual bool openURL( const KURL &url );
+
+ virtual void saveState( QDataStream &stream );
+ virtual void restoreState( QDataStream &stream );
+
+ enum State { Docu, About, Search };
+
+ int state() const { return mState; }
+ QString title() const { return mTitle; }
+
+ static QString langLookup( const QString &fname );
+
+ void beginSearchResult();
+ void writeSearchResult( const QString & );
+ void endSearchResult();
+
+ void beginInternal( const KURL & );
+ KURL internalUrl() const;
+
+ int zoomStepping() const { return m_zoomStepping; }
+
+ Formatter *formatter() const { return mFormatter; }
+
+ void copySelectedText();
+
+ public slots:
+ void lastSearch();
+ void slotIncFontSizes();
+ void slotDecFontSizes();
+ void slotReload( const KURL &url = KURL() );
+ void slotCopyLink();
+ bool nextPage(bool checkOnly = false);
+ bool prevPage(bool checkOnly = false);
+
+ signals:
+ void searchResultCacheAvailable();
+
+ protected:
+ bool eventFilter( QObject *o, QEvent *e );
+
+ private slots:
+ void setTitle( const QString &title );
+ void showMenu( const QString& url, const QPoint& pos);
+
+ private:
+ void showAboutPage();
+ KURL urlFromLinkNode( const DOM::Node &n ) const;
+
+ int mState;
+ QString mTitle;
+
+ QString mSearchResult;
+ KURL mInternalUrl;
+
+ int m_zoomStepping;
+
+ Formatter *mFormatter;
+ KActionCollection *mActionCollection;
+ QString mCopyURL;
+};
+
+}
+
+#endif
+
+// vim:ts=2:sw=2:et