delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / khelpcenter / mainwindow.h
blobc89dbb5e0102456183fed41cdfee0b470c3ed91f
1 #ifndef __mainwindow_h__
2 #define __mainwindow_h__
4 #include <kxmlguiwindow.h>
5 #include <kio/job.h>
6 #include <kurl.h>
7 #include <kparts/browserextension.h>
9 #include "navigator.h"
10 #include "glossary.h"
12 class QSplitter;
14 class LogDialog;
16 namespace KHC {
18 class View;
20 class MainWindow : public KXmlGuiWindow
22 Q_OBJECT
23 Q_CLASSINFO("D-Bus Interface", "org.kde.khelpcenter.khelpcenter")
24 public:
25 MainWindow();
26 ~MainWindow();
28 public Q_SLOTS:
29 Q_SCRIPTABLE void openUrl( const QString &url );
30 Q_SCRIPTABLE void openUrl( const QString &url, const QByteArray& startup_id );
31 Q_SCRIPTABLE void showHome();
32 Q_SCRIPTABLE void lastSearch();
34 public Q_SLOTS:
35 void print();
36 void statusBarMessage(const QString &m);
37 void slotShowHome();
38 void slotLastSearch();
39 void showSearchStderr();
40 /**
41 Show document corresponding to given URL in viewer part.
43 void viewUrl( const QString & );
45 /**
46 Open document corresponding to given URL, i.e. show it in the viewer part
47 and select the corresponding entry in the navigator widget.
49 void openUrl( const KUrl &url );
51 protected:
52 void setupActions();
53 /**
54 Show document corresponding to given URL in viewer part.
56 void viewUrl( const KUrl &url,
57 const KParts::OpenUrlArguments &args = KParts::OpenUrlArguments(),
58 const KParts::BrowserArguments &browserArgs = KParts::BrowserArguments() );
60 virtual void saveProperties( KConfigGroup &config );
61 virtual void readProperties( const KConfigGroup &config );
63 void readConfig();
64 void writeConfig();
66 protected Q_SLOTS:
67 void enableLastSearchAction();
68 void enableCopyTextAction();
70 private:
71 void stop();
73 private Q_SLOTS:
74 void slotGlossSelected(const GlossaryEntry &entry);
75 void slotStarted(KIO::Job *job);
76 void slotInfoMessage(KJob *, const QString &);
77 void goInternalUrl( const KUrl & );
78 /**
79 This function is called when the user clicks on a link in the viewer part.
81 void slotOpenURLRequest( const KUrl &url,
82 const KParts::OpenUrlArguments &args = KParts::OpenUrlArguments(),
83 const KParts::BrowserArguments &browserArgs = KParts::BrowserArguments());
84 void documentCompleted();
85 void slotIncFontSizes();
86 void slotDecFontSizes();
87 void slotConfigureFonts();
88 void slotCopySelectedText();
90 private:
91 void updateZoomActions();
93 QSplitter *mSplitter;
94 View *mDoc;
95 Navigator *mNavigator;
97 QAction *mLastSearchAction;
98 QAction *mCopyText;
99 LogDialog *mLogDialog;
104 #endif
105 // vim:ts=2:sw=2:et