kstdaction.h
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 1999,2000 Kurt Granroth <granroth@kde.org> 00003 Copyright (C) 2001,2002 Ellis Whitehead <ellis@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 #ifndef KSTDACTION_H 00020 #define KSTDACTION_H 00021 00022 class TQObject; 00023 class TQWidget; 00024 class KAction; 00025 class KActionCollection; 00026 class KRecentFilesAction; 00027 class KToggleAction; 00028 class KToggleToolBarAction; 00029 class KToggleFullScreenAction; 00030 00031 #include <tqstringlist.h> 00032 00033 #include <kdelibs_export.h> 00034 00117 namespace KStdAction 00118 { 00122 enum StdAction { 00123 ActionNone, 00124 00125 // File Menu 00126 New, Open, OpenRecent, Save, SaveAs, Revert, Close, 00127 Print, PrintPreview, Mail, Quit, 00128 00129 // Edit Menu 00130 Undo, Redo, Cut, Copy, Paste, SelectAll, Deselect, Find, FindNext, FindPrev, 00131 Replace, 00132 00133 // View Menu 00134 ActualSize, FitToPage, FitToWidth, FitToHeight, ZoomIn, ZoomOut, 00135 Zoom, Redisplay, 00136 00137 // Go Menu 00138 Up, Back, Forward, Home, Prior, Next, Goto, GotoPage, GotoLine, 00139 FirstPage, LastPage, 00140 00141 // Bookmarks Menu 00142 AddBookmark, EditBookmarks, 00143 00144 // Tools Menu 00145 Spelling, 00146 00147 // Settings Menu 00148 ShowMenubar, ShowToolbar, ShowStatusbar, 00149 SaveOptions, KeyBindings, 00150 Preferences, ConfigureToolbars, 00151 00152 // Help Menu 00153 Help, HelpContents, WhatsThis, ReportBug, AboutApp, AboutKDE, 00154 TipofDay, 00155 00156 // Another settings menu item 00157 ConfigureNotifications, 00158 FullScreen, 00159 Clear, 00160 PasteText, 00161 SwitchApplicationLanguage 00162 }; 00163 00168 KDEUI_EXPORT KAction* create( StdAction id, const char *name, 00169 const TQObject *recvr, const char *slot, 00170 KActionCollection* parent ); 00171 00172 inline KAction* create( StdAction id, 00173 const TQObject *recvr, const char *slot, 00174 KActionCollection* parent ) 00175 { return KStdAction::create( id, 0, recvr, slot, parent ); } 00176 00181 inline KAction *action(StdAction act_enum, 00182 const TQObject *recvr, const char *slot, 00183 KActionCollection *parent, const char *name = 0L ) 00184 { return KStdAction::create( act_enum, name, recvr, slot, parent ); } 00185 00189 KDEUI_EXPORT const char* name( StdAction id ); 00190 00192 inline const char* stdName(StdAction act_enum) { return name( act_enum ); } 00193 00199 KDEUI_EXPORT TQStringList stdNames(); 00200 00204 KDEUI_EXPORT KAction *openNew(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 ); 00205 00209 KDEUI_EXPORT KAction *open(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 ); 00210 00220 KDEUI_EXPORT KRecentFilesAction *openRecent(const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 ); 00221 00225 KDEUI_EXPORT KAction *save(const TQObject *recvr, const char *slot, 00226 KActionCollection* parent, const char *name = 0 ); 00227 00231 KDEUI_EXPORT KAction *saveAs(const TQObject *recvr, const char *slot, 00232 KActionCollection* parent, const char *name = 0 ); 00233 00238 KDEUI_EXPORT KAction *revert(const TQObject *recvr, const char *slot, 00239 KActionCollection* parent, const char *name = 0 ); 00240 00244 KDEUI_EXPORT KAction *close(const TQObject *recvr, const char *slot, 00245 KActionCollection* parent, const char *name = 0 ); 00246 00250 KDEUI_EXPORT KAction *print(const TQObject *recvr, const char *slot, 00251 KActionCollection* parent, const char *name = 0 ); 00252 00256 KDEUI_EXPORT KAction *printPreview(const TQObject *recvr, const char *slot, 00257 KActionCollection* parent, const char *name = 0 ); 00258 00262 KDEUI_EXPORT KAction *mail(const TQObject *recvr, const char *slot, 00263 KActionCollection* parent, const char *name = 0 ); 00264 00268 KDEUI_EXPORT KAction *quit(const TQObject *recvr, const char *slot, 00269 KActionCollection* parent, const char *name = 0 ); 00270 00274 KDEUI_EXPORT KAction *undo(const TQObject *recvr, const char *slot, 00275 KActionCollection* parent, const char *name = 0 ); 00276 00280 KDEUI_EXPORT KAction *redo(const TQObject *recvr, const char *slot, 00281 KActionCollection* parent, const char *name = 0 ); 00282 00286 KDEUI_EXPORT KAction *cut(const TQObject *recvr, const char *slot, 00287 KActionCollection* parent, const char *name = 0 ); 00288 00292 KDEUI_EXPORT KAction *copy(const TQObject *recvr, const char *slot, 00293 KActionCollection* parent, const char *name = 0 ); 00294 00299 KDEUI_EXPORT KAction *paste(const TQObject *recvr, const char *slot, 00300 KActionCollection* parent, const char *name = 0 ); 00301 00308 KDEUI_EXPORT KAction *pasteText(const TQObject *recvr, const char *slot, 00309 KActionCollection* parent, const char *name = 0 ); 00310 00315 KDEUI_EXPORT KAction *clear(const TQObject *recvr, const char *slot, 00316 KActionCollection* parent, const char *name = 0 ); 00317 00321 KDEUI_EXPORT KAction *selectAll(const TQObject *recvr, const char *slot, 00322 KActionCollection* parent, const char *name = 0 ); 00323 00327 KDEUI_EXPORT KAction *deselect(const TQObject *recvr, const char *slot, 00328 KActionCollection* parent, const char *name = 0 ); 00329 00333 KDEUI_EXPORT KAction *find(const TQObject *recvr, const char *slot, 00334 KActionCollection* parent, const char *name = 0 ); 00335 00339 KDEUI_EXPORT KAction *findNext(const TQObject *recvr, const char *slot, 00340 KActionCollection* parent, const char *name = 0 ); 00341 00345 KDEUI_EXPORT KAction *findPrev(const TQObject *recvr, const char *slot, 00346 KActionCollection* parent, const char *name = 0 ); 00347 00351 KDEUI_EXPORT KAction *replace(const TQObject *recvr, const char *slot, 00352 KActionCollection* parent, const char *name = 0 ); 00353 00357 KDEUI_EXPORT KAction *actualSize(const TQObject *recvr, const char *slot, 00358 KActionCollection* parent, const char *name = 0 ); 00359 00363 KDEUI_EXPORT KAction *fitToPage(const TQObject *recvr, const char *slot, 00364 KActionCollection* parent, const char *name = 0 ); 00365 00369 KDEUI_EXPORT KAction *fitToWidth(const TQObject *recvr, const char *slot, 00370 KActionCollection* parent, const char *name = 0 ); 00371 00375 KDEUI_EXPORT KAction *fitToHeight(const TQObject *recvr, const char *slot, 00376 KActionCollection* parent, const char *name = 0 ); 00377 00381 KDEUI_EXPORT KAction *zoomIn(const TQObject *recvr, const char *slot, 00382 KActionCollection* parent, const char *name = 0 ); 00383 00387 KDEUI_EXPORT KAction *zoomOut(const TQObject *recvr, const char *slot, 00388 KActionCollection* parent, const char *name = 0 ); 00389 00393 KDEUI_EXPORT KAction *zoom(const TQObject *recvr, const char *slot, 00394 KActionCollection* parent, const char *name = 0 ); 00395 00399 KDEUI_EXPORT KAction *redisplay(const TQObject *recvr, const char *slot, 00400 KActionCollection* parent, const char *name = 0 ); 00401 00405 KDEUI_EXPORT KAction *up(const TQObject *recvr, const char *slot, 00406 KActionCollection* parent, const char *name = 0 ); 00407 00411 KDEUI_EXPORT KAction *back(const TQObject *recvr, const char *slot, 00412 KActionCollection* parent, const char *name = 0 ); 00413 00417 KDEUI_EXPORT KAction *forward(const TQObject *recvr, const char *slot, 00418 KActionCollection* parent, const char *name = 0 ); 00419 00423 KDEUI_EXPORT KAction *home(const TQObject *recvr, const char *slot, 00424 KActionCollection* parent, const char *name = 0 ); 00425 00429 KDEUI_EXPORT KAction *prior(const TQObject *recvr, const char *slot, 00430 KActionCollection* parent, const char *name = 0 ); 00431 00435 KDEUI_EXPORT KAction *next(const TQObject *recvr, const char *slot, 00436 KActionCollection* parent, const char *name = 0 ); 00437 00441 KDEUI_EXPORT KAction *goTo(const TQObject *recvr, const char *slot, 00442 KActionCollection* parent, const char *name = 0 ); 00443 00444 00448 KDEUI_EXPORT KAction *gotoPage(const TQObject *recvr, const char *slot, 00449 KActionCollection* parent, const char *name = 0 ); 00450 00454 KDEUI_EXPORT KAction *gotoLine(const TQObject *recvr, const char *slot, 00455 KActionCollection* parent, const char *name = 0 ); 00456 00460 KDEUI_EXPORT KAction *firstPage(const TQObject *recvr, const char *slot, 00461 KActionCollection* parent, const char *name = 0 ); 00462 00466 KDEUI_EXPORT KAction *lastPage(const TQObject *recvr, const char *slot, 00467 KActionCollection* parent, const char *name = 0 ); 00468 00472 KDEUI_EXPORT KAction *addBookmark(const TQObject *recvr, const char *slot, 00473 KActionCollection* parent, const char *name = 0 ); 00474 00478 KDEUI_EXPORT KAction *editBookmarks(const TQObject *recvr, const char *slot, 00479 KActionCollection* parent, const char *name = 0 ); 00480 00484 KDEUI_EXPORT KAction *spelling(const TQObject *recvr, const char *slot, 00485 KActionCollection* parent, const char *name = 0 ); 00486 00487 00491 KDEUI_EXPORT KToggleAction *showMenubar(const TQObject *recvr, const char *slot, 00492 KActionCollection* parent, const char *name = 0 ); 00493 00501 KDEUI_EXPORT KToggleAction *showToolbar(const TQObject *recvr, const char *slot, 00502 KActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; 00509 KDEUI_EXPORT KToggleToolBarAction *showToolbar(const char* toolBarName, 00510 KActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; 00511 00515 KDEUI_EXPORT KToggleAction *showStatusbar(const TQObject *recvr, const char *slot, 00516 KActionCollection* parent, const char *name = 0 ); 00517 00522 KDEUI_EXPORT KToggleFullScreenAction *fullScreen(const TQObject *recvr, const char *slot, 00523 KActionCollection* parent, TQWidget* window, const char *name = 0 ); 00524 00528 KDEUI_EXPORT KAction *saveOptions(const TQObject *recvr, const char *slot, 00529 KActionCollection* parent, const char *name = 0 ); 00530 00537 KDEUI_EXPORT KAction *keyBindings(const TQObject *recvr, const char *slot, 00538 KActionCollection* parent, const char *name = 0 ); 00539 00543 KDEUI_EXPORT KAction *preferences(const TQObject *recvr, const char *slot, 00544 KActionCollection* parent, const char *name = 0 ); 00545 00549 KDEUI_EXPORT KAction *configureToolbars(const TQObject *recvr, 00550 const char *slot, 00551 KActionCollection* parent, 00552 const char *name = 0 ); 00553 00558 KDEUI_EXPORT KAction *configureNotifications(const TQObject *recvr, 00559 const char *slot, 00560 KActionCollection *parent, 00561 const char *name = 0); 00562 00566 KDEUI_EXPORT KAction *help(const TQObject *recvr, const char *slot, 00567 KActionCollection* parent, const char *name = 0 ); 00568 00572 KDEUI_EXPORT KAction *helpContents(const TQObject *recvr, const char *slot, 00573 KActionCollection* parent, const char *name = 0 ); 00574 00578 KDEUI_EXPORT KAction *whatsThis(const TQObject *recvr, const char *slot, 00579 KActionCollection* parent, const char *name = 0 ); 00580 00585 KDEUI_EXPORT KAction *tipOfDay(const TQObject *recvr, const char *slot, 00586 KActionCollection* parent, const char *name = 0 ); 00587 00591 KDEUI_EXPORT KAction *reportBug(const TQObject *recvr, const char *slot, 00592 KActionCollection* parent, const char *name = 0 ); 00593 00597 KDEUI_EXPORT KAction *aboutApp(const TQObject *recvr, const char *slot, 00598 KActionCollection* parent, const char *name = 0 ); 00599 00603 KDEUI_EXPORT KAction *aboutKDE(const TQObject *recvr, const char *slot, 00604 KActionCollection* parent, const char *name = 0 ); 00605 00610 KDEUI_EXPORT KAction *switchApplicationLanguage(const TQObject *recvr, const char *slot, 00611 KActionCollection* parent, const char *name = 0 ); 00612 } 00613 00614 #endif // KSTDACTION_H