Diffstat (limited to 'microkde/kdeui/kmainwindow.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kdeui/kmainwindow.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/microkde/kdeui/kmainwindow.h b/microkde/kdeui/kmainwindow.h index e76e732..2aafb9d 100644 --- a/microkde/kdeui/kmainwindow.h +++ b/microkde/kdeui/kmainwindow.h | |||
@@ -18,127 +18,128 @@ | |||
18 | $Id$ | 18 | $Id$ |
19 | 19 | ||
20 | */ | 20 | */ |
21 | 21 | ||
22 | 22 | ||
23 | 23 | ||
24 | #ifndef KMAINWINDOW_H | 24 | #ifndef KMAINWINDOW_H |
25 | #define KMAINWINDOW_H | 25 | #define KMAINWINDOW_H |
26 | 26 | ||
27 | /*US | 27 | /*US |
28 | #include "kxmlguifactory.h" | 28 | #include "kxmlguifactory.h" |
29 | #include "kxmlguiclient.h" | 29 | #include "kxmlguiclient.h" |
30 | #include "kxmlguibuilder.h" | 30 | #include "kxmlguibuilder.h" |
31 | #include <qmetaobject.h> | 31 | #include <qmetaobject.h> |
32 | 32 | ||
33 | class KPopupMenu; | 33 | class KPopupMenu; |
34 | class KXMLGUIFactory; | 34 | class KXMLGUIFactory; |
35 | class KConfig; | 35 | class KConfig; |
36 | class KHelpMenu; | 36 | class KHelpMenu; |
37 | class KStatusBar; | 37 | class KStatusBar; |
38 | class QStatusBar; | 38 | class QStatusBar; |
39 | class KMenuBar; | 39 | class KMenuBar; |
40 | class KMWSessionManaged; | 40 | class KMWSessionManaged; |
41 | class KAccel; | 41 | class KAccel; |
42 | class KToolBarMenuAction; | 42 | class KToolBarMenuAction; |
43 | */ | 43 | */ |
44 | 44 | ||
45 | class QMenuBar; | 45 | class QMenuBar; |
46 | class QStatusBar; | 46 | class QStatusBar; |
47 | class KMainWindowPrivate; | 47 | class KMainWindowPrivate; |
48 | class KAction; | 48 | class KAction; |
49 | 49 | ||
50 | #include <ktoolbar.h> | 50 | #include <ktoolbar.h> |
51 | #include <ktoolbarhandler.h> | 51 | #include <ktoolbarhandler.h> |
52 | #include <kxmlguiclient.h> | 52 | #include <kxmlguiclient.h> |
53 | #include <qmainwindow.h> | 53 | #include <qmainwindow.h> |
54 | #include <qptrlist.h> | 54 | #include <qptrlist.h> |
55 | 55 | ||
56 | class KActionCollection; | 56 | class KActionCollection; |
57 | 57 | ||
58 | class KMainWindow : public QMainWindow, virtual public KXMLGUIClient | 58 | class KMainWindow : public QMainWindow, virtual public KXMLGUIClient |
59 | { | 59 | { |
60 | Q_OBJECT | 60 | Q_OBJECT |
61 | 61 | ||
62 | private: | 62 | private: |
63 | //US create private defaultconstructor | 63 | //US create private defaultconstructor |
64 | KMainWindow() {;}; | 64 | KMainWindow() {;}; |
65 | 65 | ||
66 | public: | 66 | |
67 | public: | 67 | public: |
68 | /** | 68 | /** |
69 | * Construct a main window. | 69 | * Construct a main window. |
70 | * | 70 | * |
71 | * @param parent The widget parent. This is usually 0 but it may also be the window | 71 | * @param parent The widget parent. This is usually 0 but it may also be the window |
72 | * group leader. In that case, the KMainWindow becomes sort of a | 72 | * group leader. In that case, the KMainWindow becomes sort of a |
73 | * secondary window. | 73 | * secondary window. |
74 | * | 74 | * |
75 | * @param name The object name. For session management and window management to work | 75 | * @param name The object name. For session management and window management to work |
76 | * properly, all main windows in the application should have a | 76 | * properly, all main windows in the application should have a |
77 | * different name. When passing 0 (the default), KMainWindow will create | 77 | * different name. When passing 0 (the default), KMainWindow will create |
78 | * a unique name, but it's recommended to explicitly pass a window name that will | 78 | * a unique name, but it's recommended to explicitly pass a window name that will |
79 | * also describe the type of the window. If there can be several windows of the same | 79 | * also describe the type of the window. If there can be several windows of the same |
80 | * type, append '#' (hash) to the name, and KMainWindow will append numbers to make | 80 | * type, append '#' (hash) to the name, and KMainWindow will append numbers to make |
81 | * the names unique. For example, for a mail client which has one main window showing | 81 | * the names unique. For example, for a mail client which has one main window showing |
82 | * the mails and folders, and which can also have one or more windows for composing | 82 | * the mails and folders, and which can also have one or more windows for composing |
83 | * mails, the name for the folders window should be e.g. "mainwindow" and | 83 | * mails, the name for the folders window should be e.g. "mainwindow" and |
84 | * for the composer windows "composer#". | 84 | * for the composer windows "composer#". |
85 | * | 85 | * |
86 | * @param f Specify the widget flags. The default is | 86 | * @param f Specify the widget flags. The default is |
87 | * WType_TopLevel and WDestructiveClose. TopLevel indicates that a | 87 | * WType_TopLevel and WDestructiveClose. TopLevel indicates that a |
88 | * main window is a toplevel window, regardless of whether it has a | 88 | * main window is a toplevel window, regardless of whether it has a |
89 | * parent or not. DestructiveClose indicates that a main window is | 89 | * parent or not. DestructiveClose indicates that a main window is |
90 | * automatically destroyed when its window is closed. Pass 0 if | 90 | * automatically destroyed when its window is closed. Pass 0 if |
91 | * you do not want this behavior. | 91 | * you do not want this behavior. |
92 | * | 92 | * |
93 | * KMainWindows must be created on the heap with 'new', like: | 93 | * KMainWindows must be created on the heap with 'new', like: |
94 | * <pre> KMainWindow *kmw = new KMainWindow (...</pre> | 94 | * <pre> KMainWindow *kmw = new KMainWindow (...</pre> |
95 | **/ | 95 | **/ |
96 | KMainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); | 96 | //LR remove WDestructiveClose |
97 | KMainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel /*| WDestructiveClose*/ ); | ||
97 | 98 | ||
98 | 99 | ||
99 | /** | 100 | /** |
100 | * Destructor. | 101 | * Destructor. |
101 | * | 102 | * |
102 | * Will also destroy the toolbars, and menubar if | 103 | * Will also destroy the toolbars, and menubar if |
103 | * needed. | 104 | * needed. |
104 | */ | 105 | */ |
105 | virtual ~KMainWindow(); | 106 | virtual ~KMainWindow(); |
106 | 107 | ||
107 | /** | 108 | /** |
108 | * Retrieve the standard help menu. | 109 | * Retrieve the standard help menu. |
109 | * | 110 | * |
110 | * It contains entires for the | 111 | * It contains entires for the |
111 | * help system (activated by F1), an optional "What's This?" entry | 112 | * help system (activated by F1), an optional "What's This?" entry |
112 | * (activated by Shift F1), an application specific dialog box, | 113 | * (activated by Shift F1), an application specific dialog box, |
113 | * and an "About KDE" dialog box. | 114 | * and an "About KDE" dialog box. |
114 | * | 115 | * |
115 | * Example (adding a standard help menu to your application): | 116 | * Example (adding a standard help menu to your application): |
116 | * <pre> | 117 | * <pre> |
117 | * KPopupMenu *help = helpMenu( <myTextString> ); | 118 | * KPopupMenu *help = helpMenu( <myTextString> ); |
118 | * menuBar()->insertItem( i18n("&Help"), help ); | 119 | * menuBar()->insertItem( i18n("&Help"), help ); |
119 | * </pre> | 120 | * </pre> |
120 | * | 121 | * |
121 | * @param aboutAppText The string that is used in the application | 122 | * @param aboutAppText The string that is used in the application |
122 | * specific dialog box. If you leave this string empty the | 123 | * specific dialog box. If you leave this string empty the |
123 | * information in the global @ref KAboutData of the | 124 | * information in the global @ref KAboutData of the |
124 | * application will be used to make a standard dialog box. | 125 | * application will be used to make a standard dialog box. |
125 | * | 126 | * |
126 | * @param showWhatsThis Set this to false if you do not want to include | 127 | * @param showWhatsThis Set this to false if you do not want to include |
127 | * the "What's This" menu entry. | 128 | * the "What's This" menu entry. |
128 | * | 129 | * |
129 | * @return A standard help menu. | 130 | * @return A standard help menu. |
130 | */ | 131 | */ |
131 | //US KPopupMenu* helpMenu( const QString &aboutAppText = QString::null, | 132 | //US KPopupMenu* helpMenu( const QString &aboutAppText = QString::null, |
132 | //US bool showWhatsThis = TRUE ); | 133 | //US bool showWhatsThis = TRUE ); |
133 | 134 | ||
134 | /** | 135 | /** |
135 | * Returns the help menu. Creates a standard help menu if none exists yet. | 136 | * Returns the help menu. Creates a standard help menu if none exists yet. |
136 | * | 137 | * |
137 | * It contains entries for the | 138 | * It contains entries for the |
138 | * help system (activated by F1), an optional "What's This?" entry | 139 | * help system (activated by F1), an optional "What's This?" entry |
139 | * (activated by Shift F1), an application specific dialog box, | 140 | * (activated by Shift F1), an application specific dialog box, |
140 | * and an "About KDE" dialog box. You must create the application | 141 | * and an "About KDE" dialog box. You must create the application |
141 | * specific dialog box yourself. When the "About application" | 142 | * specific dialog box yourself. When the "About application" |
142 | * menu entry is activated, a signal will trigger the | 143 | * menu entry is activated, a signal will trigger the |
143 | * @ref showAboutApplication slot. See @ref showAboutApplication for more | 144 | * @ref showAboutApplication slot. See @ref showAboutApplication for more |
144 | * information. | 145 | * information. |