Changeset View
Changeset View
Standalone View
Standalone View
mainwindow.h
Show All 18 Lines | |||||
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef KHC_MAINWINDOW_H | 22 | #ifndef KHC_MAINWINDOW_H | ||
23 | #define KHC_MAINWINDOW_H | 23 | #define KHC_MAINWINDOW_H | ||
24 | 24 | | |||
25 | #include <KXmlGuiWindow> | 25 | #include <KXmlGuiWindow> | ||
26 | 26 | | |||
27 | #include <KParts/BrowserExtension> | | |||
28 | | ||||
29 | #include "glossary.h" | 27 | #include "glossary.h" | ||
30 | 28 | | |||
31 | class QSplitter; | 29 | class QSplitter; | ||
32 | 30 | | |||
33 | class LogDialog; | 31 | class LogDialog; | ||
32 | class KJob; | ||||
34 | 33 | | |||
35 | namespace KIO { | 34 | namespace KIO { | ||
36 | 35 | | |||
37 | class Job; | 36 | class Job; | ||
38 | 37 | | |||
39 | } | 38 | } | ||
40 | 39 | | |||
41 | namespace KHC { | 40 | namespace KHC { | ||
Show All 11 Lines | 46 | { | |||
53 | 52 | | |||
54 | public Q_SLOTS: | 53 | public Q_SLOTS: | ||
55 | Q_SCRIPTABLE void openUrl( const QString &url ); | 54 | Q_SCRIPTABLE void openUrl( const QString &url ); | ||
56 | Q_SCRIPTABLE void openUrl( const QString &url, const QByteArray& startup_id ); | 55 | Q_SCRIPTABLE void openUrl( const QString &url, const QByteArray& startup_id ); | ||
57 | Q_SCRIPTABLE void showHome(); | 56 | Q_SCRIPTABLE void showHome(); | ||
58 | Q_SCRIPTABLE void lastSearch(); | 57 | Q_SCRIPTABLE void lastSearch(); | ||
59 | 58 | | |||
60 | public Q_SLOTS: | 59 | public Q_SLOTS: | ||
61 | void print(); | | |||
62 | void statusBarRichTextMessage(const QString &m); | 60 | void statusBarRichTextMessage(const QString &m); | ||
63 | void statusBarMessage(const QString &m); | 61 | void statusBarMessage(const QString &m); | ||
64 | void slotShowHome(); | 62 | void slotShowHome(); | ||
65 | void slotLastSearch(); | 63 | void slotLastSearch(); | ||
66 | void showSearchStderr(); | 64 | void showSearchStderr(); | ||
67 | /** | 65 | /** | ||
68 | Show document corresponding to given URL in viewer part. | 66 | Show document corresponding to given URL in viewer part. | ||
69 | */ | 67 | */ | ||
70 | void viewUrl( const QString & ); | 68 | void viewUrl( const QString & ); | ||
71 | 69 | | |||
72 | /** | 70 | /** | ||
73 | Open document corresponding to given URL, i.e. show it in the viewer part | 71 | Open document corresponding to given URL, i.e. show it in the viewer part | ||
74 | and select the corresponding entry in the navigator widget. | 72 | and select the corresponding entry in the navigator widget. | ||
75 | */ | 73 | */ | ||
76 | void openUrl( const QUrl &url ); | 74 | void openUrl( const QUrl &url ); | ||
77 | 75 | | |||
78 | protected: | 76 | protected: | ||
79 | void setupActions(); | 77 | void setupActions(); | ||
80 | void setupBookmarks(); | 78 | void setupBookmarks(); | ||
81 | /** | 79 | /** | ||
82 | Show document corresponding to given URL in viewer part. | 80 | Show document corresponding to given URL in viewer part. | ||
83 | */ | 81 | */ | ||
84 | void viewUrl( const QUrl &url, | 82 | void viewUrl( const QUrl &url); | ||
85 | const KParts::OpenUrlArguments &args = KParts::OpenUrlArguments(), | | |||
86 | const KParts::BrowserArguments &browserArgs = KParts::BrowserArguments() ); | | |||
87 | 83 | | |||
88 | void saveProperties( KConfigGroup &config ) override; | 84 | void saveProperties( KConfigGroup &config ) override; | ||
89 | void readProperties( const KConfigGroup &config ) override; | 85 | void readProperties( const KConfigGroup &config ) override; | ||
90 | 86 | | |||
91 | void readConfig(); | 87 | void readConfig(); | ||
92 | void writeConfig(); | 88 | void writeConfig(); | ||
93 | 89 | | |||
94 | protected Q_SLOTS: | 90 | protected Q_SLOTS: | ||
95 | void enableLastSearchAction(); | 91 | void enableLastSearchAction(); | ||
96 | void enableCopyTextAction(); | 92 | void enableCopyTextAction(); | ||
97 | 93 | | |||
98 | private: | 94 | private: | ||
99 | void stop(); | 95 | void stop(); | ||
100 | 96 | | |||
101 | private Q_SLOTS: | 97 | private Q_SLOTS: | ||
102 | void slotGlossSelected(const GlossaryEntry &entry); | 98 | void slotGlossSelected(const GlossaryEntry &entry); | ||
103 | void slotStarted(KIO::Job *job); | 99 | void slotStarted(); | ||
104 | void slotInfoMessage(KJob *, const QString &); | 100 | void slotInfoMessage(KJob *, const QString &); | ||
105 | void goInternalUrl( const QUrl & ); | 101 | void goInternalUrl( const QUrl & ); | ||
106 | /** | 102 | /** | ||
107 | This function is called when the user clicks on a link in the viewer part. | 103 | This function is called when the user clicks on a link in the viewer part. | ||
108 | */ | 104 | */ | ||
109 | void slotOpenURLRequest( const QUrl &url, | 105 | void slotOpenURLRequest( const QUrl &url); | ||
110 | const KParts::OpenUrlArguments &args = KParts::OpenUrlArguments(), | | |||
111 | const KParts::BrowserArguments &browserArgs = KParts::BrowserArguments()); | | |||
112 | void documentCompleted(); | 106 | void documentCompleted(); | ||
113 | void slotIncFontSizes(); | | |||
114 | void slotDecFontSizes(); | | |||
115 | void slotConfigureFonts(); | | |||
116 | void slotCopySelectedText(); | 107 | void slotCopySelectedText(); | ||
117 | 108 | | |||
118 | private: | 109 | private: | ||
119 | void updateFontScaleActions(); | 110 | void updateFontScaleActions(); | ||
120 | 111 | | |||
121 | QSplitter *mSplitter; | 112 | QSplitter *mSplitter; | ||
122 | View *mDoc; | 113 | View *mDoc; | ||
123 | Navigator *mNavigator; | 114 | Navigator *mNavigator; | ||
Show All 10 Lines |