author | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
commit | b9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff) | |
tree | 2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /microkde/kdeui/kstdaction.cpp | |
download | kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2 |
Initial revision
Diffstat (limited to 'microkde/kdeui/kstdaction.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kdeui/kstdaction.cpp | 362 |
1 files changed, 362 insertions, 0 deletions
diff --git a/microkde/kdeui/kstdaction.cpp b/microkde/kdeui/kstdaction.cpp new file mode 100644 index 0000000..cfd7b54 --- a/dev/null +++ b/microkde/kdeui/kstdaction.cpp | |||
@@ -0,0 +1,362 @@ | |||
1 | /* This file is part of the KDE libraries | ||
2 | Copyright (C) 1999,2000 Kurt Granroth <granroth@kde.org> | ||
3 | |||
4 | This library is free software; you can redistribute it and/or | ||
5 | modify it under the terms of the GNU Library General Public | ||
6 | License version 2 as published by the Free Software Foundation. | ||
7 | |||
8 | This library is distributed in the hope that it will be useful, | ||
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
11 | Library General Public License for more details. | ||
12 | |||
13 | You should have received a copy of the GNU Library General Public License | ||
14 | along with this library; see the file COPYING.LIB. If not, write to | ||
15 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
16 | Boston, MA 02111-1307, USA. | ||
17 | */ | ||
18 | |||
19 | #include "kstdaction.h" | ||
20 | |||
21 | #include <qtoolbutton.h> | ||
22 | #include <qwhatsthis.h> | ||
23 | |||
24 | //US #include <kaboutdata.h> | ||
25 | #include <kaction.h> | ||
26 | #include <kapplication.h> | ||
27 | #include <kdebug.h> | ||
28 | #include <kglobal.h> | ||
29 | #include <kiconloader.h> | ||
30 | #include <klocale.h> | ||
31 | //US #include <kstdaccel.h> | ||
32 | //US #include <kmainwindow.h> | ||
33 | |||
34 | namespace KStdAction | ||
35 | { | ||
36 | |||
37 | struct KStdActionInfo | ||
38 | { | ||
39 | StdAction id; | ||
40 | /*USKStdAccel::StdAccel idAccel;*/ | ||
41 | const char* psName; | ||
42 | const char* psLabel; | ||
43 | const char* psWhatsThis; | ||
44 | const char* psIconName; | ||
45 | }; | ||
46 | |||
47 | const KStdActionInfo g_rgActionInfo[] = | ||
48 | { | ||
49 | { New, /*USKStdAccel::New,*/ "file_new", I18N_NOOP("&New"), 0, "filenew" }, | ||
50 | { Open, /*USKStdAccel::Open,*/ "file_open", I18N_NOOP("&Open..."), 0, "fileopen" }, | ||
51 | { OpenRecent, /*USKStdAccel::AccelNone,*/ "file_open_recent", I18N_NOOP("Open &Recent"), 0, 0 }, | ||
52 | { Save, /*USKStdAccel::Save,*/ "file_save", I18N_NOOP("&Save"), 0, "filesave" }, | ||
53 | { SaveAs, /*USKStdAccel::AccelNone,*/ "file_save_as", I18N_NOOP("Save &As..."), 0, "filesaveas" }, | ||
54 | { Revert, /*USKStdAccel::AccelNone,*/ "file_revert", I18N_NOOP("Re&vert"), 0, "revert" }, | ||
55 | { Close, /*USKStdAccel::Close,*/ "file_close", I18N_NOOP("&Close"), 0, "fileclose" }, | ||
56 | { Print, /*USKStdAccel::Print,*/ "file_print", I18N_NOOP("&Print..."), 0, "fileprint" }, | ||
57 | { PrintPreview, /*USKStdAccel::AccelNone,*/ "file_print_preview", I18N_NOOP("Print Previe&w..."), 0, "filequickprint" }, | ||
58 | { Mail, /*USKStdAccel::AccelNone,*/ "file_mail", I18N_NOOP("&Mail..."), 0, "mail_send" }, | ||
59 | { Quit, /*USKStdAccel::Quit,*/ "file_quit", I18N_NOOP("&Exit"), 0, "exit" }, | ||
60 | |||
61 | { Undo, /*USKStdAccel::Undo,*/ "edit_undo", I18N_NOOP("&Undo"), 0, "undo" }, | ||
62 | { Redo, /*USKStdAccel::Redo,*/ "edit_redo", I18N_NOOP("Re&do"), 0, "redo" }, | ||
63 | { Cut, /*USKStdAccel::Cut,*/ "edit_cut", I18N_NOOP("Cu&t"), 0, "editcut" }, | ||
64 | { Copy, /*USKStdAccel::Copy,*/ "edit_copy", I18N_NOOP("&Copy"), 0, "editcopy" }, | ||
65 | { Paste, /*USKStdAccel::Paste,*/ "edit_paste", I18N_NOOP("&Paste"), 0, "editpaste" }, | ||
66 | { SelectAll, /*USKStdAccel::SelectAll,*/ "edit_select_all", I18N_NOOP("Select &All"), 0, 0 }, | ||
67 | { Deselect, /*USKStdAccel::Deselect,*/ "edit_deselect", I18N_NOOP("Dese&lect"), 0, 0 }, | ||
68 | { Find, /*USKStdAccel::Find,*/ "edit_find", I18N_NOOP("&Find..."), 0, "find" }, | ||
69 | { FindNext, /*USKStdAccel::FindNext,*/ "edit_find_next", I18N_NOOP("Find &Next"), 0, "next" }, | ||
70 | // FIXME: rename edit_find_last to edit_find_prev for KDE 4 | ||
71 | { FindPrev, /*USKStdAccel::FindPrev,*/ "edit_find_last", I18N_NOOP("Find Pre&vious"), 0, "previous" }, | ||
72 | { Replace, /*USKStdAccel::Replace,*/ "edit_replace", I18N_NOOP("&Replace..."), 0, 0 }, | ||
73 | |||
74 | { ActualSize, /*USKStdAccel::AccelNone,*/ "view_actual_size", I18N_NOOP("&Actual Size"), 0, 0 }, | ||
75 | { FitToPage, /*USKStdAccel::AccelNone,*/ "view_fit_to_page", I18N_NOOP("&Fit to Page"), 0, 0 }, | ||
76 | { FitToWidth, /*USKStdAccel::AccelNone,*/ "view_fit_to_width", I18N_NOOP("Fit to Page &Width"), 0, 0 }, | ||
77 | { FitToHeight, /*USKStdAccel::AccelNone,*/ "view_fit_to_height", I18N_NOOP("Fit to Page &Height"), 0, 0 }, | ||
78 | { ZoomIn, /*USKStdAccel::ZoomIn,*/ "view_zoom_in", I18N_NOOP("Zoom &In"), 0, "viewmag+" }, | ||
79 | { ZoomOut, /*USKStdAccel::ZoomOut,*/ "view_zoom_out", I18N_NOOP("Zoom &Out"), 0, "viewmag-" }, | ||
80 | { Zoom, /*USKStdAccel::AccelNone,*/ "view_zoom", I18N_NOOP("&Zoom..."), 0, "viewmag" }, | ||
81 | { Redisplay, /*USKStdAccel::AccelNone,*/ "view_redisplay", I18N_NOOP("&Redisplay"), 0, "reload" }, | ||
82 | |||
83 | { Up, /*USKStdAccel::Up,*/ "go_up", I18N_NOOP("&Up"), 0, "up" }, | ||
84 | // The following three have special i18n() needs for sLabel | ||
85 | { Back, /*USKStdAccel::Back,*/ "go_back", 0, 0, "back" }, | ||
86 | { Forward, /*USKStdAccel::Forward,*/ "go_forward", 0, 0, "forward" }, | ||
87 | { Home, /*USKStdAccel::Home,*/ "go_home", 0, 0, "gohome" }, | ||
88 | { Prior, /*USKStdAccel::Prior,*/ "go_previous", I18N_NOOP("&Previous Page"), 0, "previous" }, | ||
89 | { Next, /*USKStdAccel::Next,*/ "go_next", I18N_NOOP("&Next Page"), 0, "next" }, | ||
90 | { Goto, /*USKStdAccel::AccelNone,*/ "go_goto", I18N_NOOP("&Go To..."), 0, 0 }, | ||
91 | { GotoPage, /*USKStdAccel::AccelNone,*/ "go_goto_page", I18N_NOOP("&Go to Page..."), 0, "goto" }, | ||
92 | { GotoLine, /*USKStdAccel::GotoLine,*/ "go_goto_line", I18N_NOOP("&Go to Line..."), 0, 0 }, | ||
93 | { FirstPage, /*USKStdAccel::Home,*/ "go_first", I18N_NOOP("&First Page"), 0, "top" }, | ||
94 | { LastPage, /*USKStdAccel::End,*/ "go_last", I18N_NOOP("&Last Page"), 0, "bottom" }, | ||
95 | |||
96 | { AddBookmark, /*USKStdAccel::AddBookmark,*/ "bookmark_add", I18N_NOOP("&Add Bookmark"), 0, "bookmark_add" }, | ||
97 | { EditBookmarks, /*USKStdAccel::AccelNone,*/ "bookmark_edit", I18N_NOOP("&Edit Bookmarks"), 0, "bookmark" }, | ||
98 | |||
99 | { Spelling, /*USKStdAccel::AccelNone,*/ "tools_spelling", I18N_NOOP("&Spelling..."), 0, "spellcheck" }, | ||
100 | |||
101 | { ShowMenubar, /*USKStdAccel::ShowMenubar,*/ "options_show_menubar", I18N_NOOP("Show &Menubar"), 0, "showmenu" }, | ||
102 | { ShowToolbar, /*USKStdAccel::AccelNone,*/ "options_show_toolbar", I18N_NOOP("Show &Toolbar"), 0, 0 }, | ||
103 | { ShowStatusbar, /*USKStdAccel::AccelNone,*/ "options_show_statusbar", I18N_NOOP("Show St&atusbar"), 0, 0 }, | ||
104 | { SaveOptions, /*USKStdAccel::AccelNone,*/ "options_save_options", I18N_NOOP("&Save Settings"), 0, 0 }, | ||
105 | { KeyBindings, /*USKStdAccel::AccelNone,*/ "options_configure_keybinding", I18N_NOOP("Configure S&hortcuts..."), 0,"configure_shortcuts" }, | ||
106 | { Preferences, /*USKStdAccel::AccelNone,*/ "options_configure", I18N_NOOP("&Configure %1..."), 0, "configure" }, | ||
107 | { ConfigureToolbars, /*USKStdAccel::AccelNone,*/ "options_configure_toolbars", I18N_NOOP("Configure Tool&bars..."), 0,"configure_toolbars" }, | ||
108 | { ConfigureNotifications, /*USKStdAccel::AccelNone,*/ "options_configure_notifications", I18N_NOOP("Configure &Notifications..."), 0, "knotify" }, | ||
109 | |||
110 | { Help, /*USKStdAccel::Help,*/ "help", 0, 0, "help" }, | ||
111 | { HelpContents, /*USKStdAccel::AccelNone,*/ "help_contents", I18N_NOOP("%1 &Handbook"), 0, "contents" }, | ||
112 | { WhatsThis, /*USKStdAccel::WhatsThis,*/ "help_whats_this", I18N_NOOP("What's &This?"), 0, "contexthelp" }, | ||
113 | { TipofDay, /*USKStdAccel::AccelNone,*/ "help_show_tip", I18N_NOOP("Tip of the &Day"), 0, "idea" }, | ||
114 | { ReportBug, /*USKStdAccel::AccelNone,*/ "help_report_bug", I18N_NOOP("&Report Bug..."), 0, 0 }, | ||
115 | { AboutApp, /*USKStdAccel::AccelNone,*/ "help_about_app", I18N_NOOP("&About %1"), 0, 0 }, | ||
116 | { AboutKDE, /*USKStdAccel::AccelNone,*/ "help_about_kde", I18N_NOOP("About &KDE"), 0,"about_kde" }, | ||
117 | { ActionNone, /*USKStdAccel::AccelNone,*/ 0, 0, 0, 0 } | ||
118 | }; | ||
119 | |||
120 | static const KStdActionInfo* infoPtr( StdAction id ) | ||
121 | { | ||
122 | for( uint i = 0; g_rgActionInfo[i].id != ActionNone; i++ ) { | ||
123 | if( g_rgActionInfo[i].id == id ) | ||
124 | return &g_rgActionInfo[i]; | ||
125 | } | ||
126 | return 0; | ||
127 | } | ||
128 | |||
129 | QStringList stdNames() | ||
130 | { | ||
131 | QStringList result; | ||
132 | |||
133 | for( uint i = 0; g_rgActionInfo[i].id != ActionNone; i++ ) | ||
134 | if (g_rgActionInfo[i].psLabel) | ||
135 | result.append(i18n(g_rgActionInfo[i].psLabel)); | ||
136 | return result; | ||
137 | } | ||
138 | |||
139 | KAction* create( StdAction id, const char *name, const QObject *recvr, const char *slot, KActionCollection* parent ) | ||
140 | { | ||
141 | KAction* pAction = 0; | ||
142 | const KStdActionInfo* pInfo = infoPtr( id ); | ||
143 | kdDebug(125) << "KStdAction::create( " << id << "=" << (pInfo ? pInfo->psName : (const char*)0) << ", " << parent << ", " << name << " )" << endl; // ellis | ||
144 | if( pInfo ) { | ||
145 | QString sLabel, iconName = pInfo->psIconName; | ||
146 | switch( id ) { | ||
147 | case Back: sLabel = i18n("go back", "&Back"); | ||
148 | //US if (QApplication::reverseLayout() ) | ||
149 | //US iconName = "forward"; | ||
150 | break; | ||
151 | |||
152 | case Forward: sLabel = i18n("go forward", "&Forward"); | ||
153 | //US if (QApplication::reverseLayout() ) | ||
154 | //US iconName = "back"; | ||
155 | break; | ||
156 | |||
157 | case Home: sLabel = i18n("beginning (of line)", "&Home"); break; | ||
158 | case Help: sLabel = i18n("show help", "&Help"); break; | ||
159 | //US case AboutApp: iconName = kapp->miniIconName(); | ||
160 | case Preferences: | ||
161 | case HelpContents: | ||
162 | { | ||
163 | //US const KAboutData *aboutData = KGlobal::instance()->aboutData(); | ||
164 | //US QString appName = (aboutData) ? aboutData->programName() : QString::fromLatin1(qApp->name()); | ||
165 | QString appName = QString::fromLatin1(KGlobal::getAppName()); | ||
166 | sLabel = i18n(pInfo->psLabel).arg(appName); | ||
167 | } | ||
168 | break; | ||
169 | default: sLabel = i18n(pInfo->psLabel); | ||
170 | } | ||
171 | |||
172 | /*US if (QApplication::reverseLayout()){ | ||
173 | if (id == Prior) iconName = "next"; | ||
174 | if (id == Next ) iconName = "previous"; | ||
175 | } | ||
176 | */ | ||
177 | //US KShortcut cut = KStdAccel::shortcut(pInfo->idAccel); | ||
178 | KShortcut cut; | ||
179 | switch( id ) { | ||
180 | case OpenRecent: | ||
181 | pAction = new KRecentFilesAction( sLabel, cut, | ||
182 | recvr, slot, | ||
183 | parent, (name) ? name : pInfo->psName ); | ||
184 | break; | ||
185 | case ShowMenubar: | ||
186 | case ShowToolbar: | ||
187 | case ShowStatusbar: | ||
188 | KToggleAction *ret; | ||
189 | ret = new KToggleAction( sLabel, pInfo->psIconName, cut, | ||
190 | recvr, slot, | ||
191 | parent, (name) ? name : pInfo->psName ); | ||
192 | ret->setChecked( true ); | ||
193 | pAction = ret; | ||
194 | break; | ||
195 | default: | ||
196 | pAction = new KAction( sLabel, iconName, cut, | ||
197 | recvr, slot, | ||
198 | parent, (name) ? name : pInfo->psName ); | ||
199 | break; | ||
200 | } | ||
201 | } | ||
202 | return pAction; | ||
203 | } | ||
204 | |||
205 | const char* name( StdAction id ) | ||
206 | { | ||
207 | const KStdActionInfo* pInfo = infoPtr( id ); | ||
208 | return (pInfo) ? pInfo->psName : 0; | ||
209 | } | ||
210 | |||
211 | KAction *openNew( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
212 | { return KStdAction::create( New, name, recvr, slot, parent ); } | ||
213 | KAction *open( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
214 | { return KStdAction::create( Open, name, recvr, slot, parent ); } | ||
215 | KRecentFilesAction *openRecent( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
216 | { return (KRecentFilesAction*) KStdAction::create( OpenRecent, name, recvr, slot, parent ); } | ||
217 | KAction *save( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
218 | { return KStdAction::create( Save, name, recvr, slot, parent ); } | ||
219 | KAction *saveAs( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
220 | { return KStdAction::create( SaveAs, name, recvr, slot, parent ); } | ||
221 | KAction *revert( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
222 | { return KStdAction::create( Revert, name, recvr, slot, parent ); } | ||
223 | KAction *print( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
224 | { return KStdAction::create( Print, name, recvr, slot, parent ); } | ||
225 | KAction *printPreview( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
226 | { return KStdAction::create( PrintPreview, name, recvr, slot, parent ); } | ||
227 | KAction *close( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
228 | { return KStdAction::create( Close, name, recvr, slot, parent ); } | ||
229 | KAction *mail( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
230 | { return KStdAction::create( Mail, name, recvr, slot, parent ); } | ||
231 | KAction *quit( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
232 | { return KStdAction::create( Quit, name, recvr, slot, parent ); } | ||
233 | KAction *undo( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
234 | { return KStdAction::create( Undo, name, recvr, slot, parent ); } | ||
235 | KAction *redo( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
236 | { return KStdAction::create( Redo, name, recvr, slot, parent ); } | ||
237 | KAction *cut( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
238 | { return KStdAction::create( Cut, name, recvr, slot, parent ); } | ||
239 | KAction *copy( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
240 | { return KStdAction::create( Copy, name, recvr, slot, parent ); } | ||
241 | KAction *paste( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
242 | { return KStdAction::create( Paste, name, recvr, slot, parent ); } | ||
243 | KAction *selectAll( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
244 | { return KStdAction::create( SelectAll, name, recvr, slot, parent ); } | ||
245 | KAction *deselect( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
246 | { return KStdAction::create( Deselect, name, recvr, slot, parent ); } | ||
247 | KAction *find( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
248 | { return KStdAction::create( Find, name, recvr, slot, parent ); } | ||
249 | KAction *findNext( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
250 | { return KStdAction::create( FindNext, name, recvr, slot, parent ); } | ||
251 | KAction *findPrev( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
252 | { return KStdAction::create( FindPrev, name, recvr, slot, parent ); } | ||
253 | KAction *replace( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
254 | { return KStdAction::create( Replace, name, recvr, slot, parent ); } | ||
255 | KAction *actualSize( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
256 | { return KStdAction::create( ActualSize, name, recvr, slot, parent ); } | ||
257 | KAction *fitToPage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
258 | { return KStdAction::create( FitToPage, name, recvr, slot, parent ); } | ||
259 | KAction *fitToWidth( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
260 | { return KStdAction::create( FitToWidth, name, recvr, slot, parent ); } | ||
261 | KAction *fitToHeight( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
262 | { return KStdAction::create( FitToHeight, name, recvr, slot, parent ); } | ||
263 | KAction *zoomIn( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
264 | { return KStdAction::create( ZoomIn, name, recvr, slot, parent ); } | ||
265 | KAction *zoomOut( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
266 | { return KStdAction::create( ZoomOut, name, recvr, slot, parent ); } | ||
267 | KAction *zoom( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
268 | { return KStdAction::create( Zoom, name, recvr, slot, parent ); } | ||
269 | KAction *redisplay( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
270 | { return KStdAction::create( Redisplay, name, recvr, slot, parent ); } | ||
271 | KAction *up( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
272 | { return KStdAction::create( Up, name, recvr, slot, parent ); } | ||
273 | KAction *back( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
274 | { return KStdAction::create( Back, name, recvr, slot, parent ); } | ||
275 | KAction *forward( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
276 | { return KStdAction::create( Forward, name, recvr, slot, parent ); } | ||
277 | KAction *home( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
278 | { return KStdAction::create( Home, name, recvr, slot, parent ); } | ||
279 | KAction *prior( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
280 | { return KStdAction::create( Prior, name, recvr, slot, parent ); } | ||
281 | KAction *next( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
282 | { return KStdAction::create( Next, name, recvr, slot, parent ); } | ||
283 | KAction *goTo( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
284 | { return KStdAction::create( Goto, name, recvr, slot, parent ); } | ||
285 | KAction *gotoPage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
286 | { return KStdAction::create( GotoPage, name, recvr, slot, parent ); } | ||
287 | KAction *gotoLine( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
288 | { return KStdAction::create( GotoLine, name, recvr, slot, parent ); } | ||
289 | KAction *firstPage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
290 | { return KStdAction::create( FirstPage, name, recvr, slot, parent ); } | ||
291 | KAction *lastPage( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
292 | { return KStdAction::create( LastPage, name, recvr, slot, parent ); } | ||
293 | KAction *addBookmark( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
294 | { return KStdAction::create( AddBookmark, name, recvr, slot, parent ); } | ||
295 | KAction *editBookmarks( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
296 | { return KStdAction::create( EditBookmarks, name, recvr, slot, parent ); } | ||
297 | KAction *spelling( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
298 | { return KStdAction::create( Spelling, name, recvr, slot, parent ); } | ||
299 | |||
300 | KToggleAction *showMenubar( const QObject *recvr, const char *slot, KActionCollection* parent, const char *_name ) | ||
301 | { | ||
302 | KToggleAction *ret; | ||
303 | ret = new KToggleAction(i18n("Show &Menubar"), "showmenu", /*US KStdAccel::shortcut(KStdAccel::ShowMenubar)*/0, recvr, slot, | ||
304 | parent, _name ? _name : name(ShowMenubar)); | ||
305 | ret->setChecked(true); | ||
306 | return ret; | ||
307 | } | ||
308 | |||
309 | KToggleAction *showToolbar( const QObject *recvr, const char *slot, KActionCollection* parent, const char *_name ) | ||
310 | { | ||
311 | KToggleAction *ret; | ||
312 | ret = new KToggleAction(i18n("Show &Toolbar"), 0, recvr, slot, parent, | ||
313 | _name ? _name : name(ShowToolbar)); | ||
314 | ret->setChecked(true); | ||
315 | return ret; | ||
316 | |||
317 | } | ||
318 | |||
319 | KToggleToolBarAction *showToolbar( const char* toolBarName, KActionCollection* parent, const char *_name ) | ||
320 | { | ||
321 | KToggleToolBarAction *ret; | ||
322 | ret = new KToggleToolBarAction(toolBarName, i18n("Show &Toolbar"), parent, | ||
323 | _name ? _name : name(ShowToolbar)); | ||
324 | return ret; | ||
325 | } | ||
326 | |||
327 | KToggleAction *showStatusbar( const QObject *recvr, const char *slot, | ||
328 | KActionCollection* parent, const char *_name ) | ||
329 | { | ||
330 | KToggleAction *ret; | ||
331 | ret = new KToggleAction(i18n("Show St&atusbar"), 0, recvr, slot, parent, | ||
332 | _name ? _name : name(ShowStatusbar)); | ||
333 | ret->setChecked(true); | ||
334 | return ret; | ||
335 | } | ||
336 | |||
337 | KAction *saveOptions( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
338 | { return KStdAction::create( SaveOptions, name, recvr, slot, parent ); } | ||
339 | KAction *keyBindings( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
340 | { return KStdAction::create( KeyBindings, name, recvr, slot, parent ); } | ||
341 | KAction *preferences( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
342 | { return KStdAction::create( Preferences, name, recvr, slot, parent ); } | ||
343 | KAction *configureToolbars( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
344 | { return KStdAction::create( ConfigureToolbars, name, recvr, slot, parent ); } | ||
345 | KAction *configureNotifications( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
346 | { return KStdAction::create( ConfigureNotifications, name, recvr, slot, parent ); } | ||
347 | KAction *help( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
348 | { return KStdAction::create( Help, name, recvr, slot, parent ); } | ||
349 | KAction *helpContents( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
350 | { return KStdAction::create( HelpContents, name, recvr, slot, parent ); } | ||
351 | KAction *whatsThis( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
352 | { return KStdAction::create( WhatsThis, name, recvr, slot, parent ); } | ||
353 | KAction *tipOfDay( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
354 | { return KStdAction::create( TipofDay, name, recvr, slot, parent ); } | ||
355 | KAction *reportBug( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
356 | { return KStdAction::create( ReportBug, name, recvr, slot, parent ); } | ||
357 | KAction *aboutApp( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
358 | { return KStdAction::create( AboutApp, name, recvr, slot, parent ); } | ||
359 | KAction *aboutKDE( const QObject *recvr, const char *slot, KActionCollection* parent, const char *name ) | ||
360 | { return KStdAction::create( AboutKDE, name, recvr, slot, parent ); } | ||
361 | |||
362 | } | ||