delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / khelpcenter / view.h
blob9c89f70a301efd4edb0b31ac627a4d129d4c36a0
1 #ifndef __view_h__
2 #define __view_h__
4 #include <khtml_part.h>
6 #include "glossary.h"
7 #include "navigator.h"
8 //Added by qt3to4:
9 #include <QEvent>
11 class KActionCollection;
13 namespace DOM {
14 class Node;
17 namespace KHC {
19 class Formatter;
21 class View : public KHTMLPart
23 Q_OBJECT
24 public:
25 View( QWidget *parentWidget, QObject *parent, KHTMLPart::GUIProfile prof,
26 KActionCollection *col );
28 ~View();
30 virtual bool openUrl( const KUrl &url );
32 virtual void saveState( QDataStream &stream );
33 virtual void restoreState( QDataStream &stream );
35 enum State { Docu, About, Search };
37 int state() const { return mState; }
38 QString title() const { return mTitle; }
40 static QString langLookup( const QString &fname );
42 void beginSearchResult();
43 void writeSearchResult( const QString & );
44 void endSearchResult();
46 void beginInternal( const KUrl & );
47 KUrl internalUrl() const;
49 int zoomStepping() const { return m_zoomStepping; }
51 Formatter *formatter() const { return mFormatter; }
53 void copySelectedText();
55 public Q_SLOTS:
56 void lastSearch();
57 void slotIncFontSizes();
58 void slotDecFontSizes();
59 void slotReload( const KUrl &url = KUrl() );
60 void slotCopyLink();
61 bool nextPage(bool checkOnly = false);
62 bool prevPage(bool checkOnly = false);
64 Q_SIGNALS:
65 void searchResultCacheAvailable();
67 protected:
68 bool eventFilter( QObject *o, QEvent *e );
70 private Q_SLOTS:
71 void setTitle( const QString &title );
72 void showMenu( const QString& url, const QPoint& pos);
74 private:
75 KUrl urlFromLinkNode( const DOM::Node &n ) const;
77 int mState;
78 QString mTitle;
80 QString mSearchResult;
81 KUrl mInternalUrl;
83 int m_zoomStepping;
85 Formatter *mFormatter;
86 KActionCollection *mActionCollection;
87 QString mCopyURL;
92 #endif
94 // vim:ts=2:sw=2:et