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 TDEAction; 00025 class TDEActionCollection; 00026 class TDERecentFilesAction; 00027 class TDEToggleAction; 00028 class TDEToggleToolBarAction; 00029 class TDEToggleFullScreenAction; 00030 00031 #include <tqstringlist.h> 00032 00033 #include <tdelibs_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 TDEUI_EXPORT TDEAction* create( StdAction id, const char *name, 00169 const TQObject *recvr, const char *slot, 00170 TDEActionCollection* parent ); 00171 00172 inline TDEAction* create( StdAction id, 00173 const TQObject *recvr, const char *slot, 00174 TDEActionCollection* parent ) 00175 { return KStdAction::create( id, 0, recvr, slot, parent ); } 00176 00181 inline TDEAction *action(StdAction act_enum, 00182 const TQObject *recvr, const char *slot, 00183 TDEActionCollection *parent, const char *name = 0L ) 00184 { return KStdAction::create( act_enum, name, recvr, slot, parent ); } 00185 00189 TDEUI_EXPORT const char* name( StdAction id ); 00190 00192 inline const char* stdName(StdAction act_enum) { return name( act_enum ); } 00193 00199 TDEUI_EXPORT TQStringList stdNames(); 00200 00204 TDEUI_EXPORT TDEAction *openNew(const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name = 0 ); 00205 00209 TDEUI_EXPORT TDEAction *open(const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name = 0 ); 00210 00220 TDEUI_EXPORT TDERecentFilesAction *openRecent(const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name = 0 ); 00221 00225 TDEUI_EXPORT TDEAction *save(const TQObject *recvr, const char *slot, 00226 TDEActionCollection* parent, const char *name = 0 ); 00227 00231 TDEUI_EXPORT TDEAction *saveAs(const TQObject *recvr, const char *slot, 00232 TDEActionCollection* parent, const char *name = 0 ); 00233 00238 TDEUI_EXPORT TDEAction *revert(const TQObject *recvr, const char *slot, 00239 TDEActionCollection* parent, const char *name = 0 ); 00240 00244 TDEUI_EXPORT TDEAction *close(const TQObject *recvr, const char *slot, 00245 TDEActionCollection* parent, const char *name = 0 ); 00246 00250 TDEUI_EXPORT TDEAction *print(const TQObject *recvr, const char *slot, 00251 TDEActionCollection* parent, const char *name = 0 ); 00252 00256 TDEUI_EXPORT TDEAction *printPreview(const TQObject *recvr, const char *slot, 00257 TDEActionCollection* parent, const char *name = 0 ); 00258 00262 TDEUI_EXPORT TDEAction *mail(const TQObject *recvr, const char *slot, 00263 TDEActionCollection* parent, const char *name = 0 ); 00264 00268 TDEUI_EXPORT TDEAction *quit(const TQObject *recvr, const char *slot, 00269 TDEActionCollection* parent, const char *name = 0 ); 00270 00274 TDEUI_EXPORT TDEAction *undo(const TQObject *recvr, const char *slot, 00275 TDEActionCollection* parent, const char *name = 0 ); 00276 00280 TDEUI_EXPORT TDEAction *redo(const TQObject *recvr, const char *slot, 00281 TDEActionCollection* parent, const char *name = 0 ); 00282 00286 TDEUI_EXPORT TDEAction *cut(const TQObject *recvr, const char *slot, 00287 TDEActionCollection* parent, const char *name = 0 ); 00288 00292 TDEUI_EXPORT TDEAction *copy(const TQObject *recvr, const char *slot, 00293 TDEActionCollection* parent, const char *name = 0 ); 00294 00299 TDEUI_EXPORT TDEAction *paste(const TQObject *recvr, const char *slot, 00300 TDEActionCollection* parent, const char *name = 0 ); 00301 00308 TDEUI_EXPORT TDEAction *pasteText(const TQObject *recvr, const char *slot, 00309 TDEActionCollection* parent, const char *name = 0 ); 00310 00315 TDEUI_EXPORT TDEAction *clear(const TQObject *recvr, const char *slot, 00316 TDEActionCollection* parent, const char *name = 0 ); 00317 00321 TDEUI_EXPORT TDEAction *selectAll(const TQObject *recvr, const char *slot, 00322 TDEActionCollection* parent, const char *name = 0 ); 00323 00327 TDEUI_EXPORT TDEAction *deselect(const TQObject *recvr, const char *slot, 00328 TDEActionCollection* parent, const char *name = 0 ); 00329 00333 TDEUI_EXPORT TDEAction *find(const TQObject *recvr, const char *slot, 00334 TDEActionCollection* parent, const char *name = 0 ); 00335 00339 TDEUI_EXPORT TDEAction *findNext(const TQObject *recvr, const char *slot, 00340 TDEActionCollection* parent, const char *name = 0 ); 00341 00345 TDEUI_EXPORT TDEAction *findPrev(const TQObject *recvr, const char *slot, 00346 TDEActionCollection* parent, const char *name = 0 ); 00347 00351 TDEUI_EXPORT TDEAction *replace(const TQObject *recvr, const char *slot, 00352 TDEActionCollection* parent, const char *name = 0 ); 00353 00357 TDEUI_EXPORT TDEAction *actualSize(const TQObject *recvr, const char *slot, 00358 TDEActionCollection* parent, const char *name = 0 ); 00359 00363 TDEUI_EXPORT TDEAction *fitToPage(const TQObject *recvr, const char *slot, 00364 TDEActionCollection* parent, const char *name = 0 ); 00365 00369 TDEUI_EXPORT TDEAction *fitToWidth(const TQObject *recvr, const char *slot, 00370 TDEActionCollection* parent, const char *name = 0 ); 00371 00375 TDEUI_EXPORT TDEAction *fitToHeight(const TQObject *recvr, const char *slot, 00376 TDEActionCollection* parent, const char *name = 0 ); 00377 00381 TDEUI_EXPORT TDEAction *zoomIn(const TQObject *recvr, const char *slot, 00382 TDEActionCollection* parent, const char *name = 0 ); 00383 00387 TDEUI_EXPORT TDEAction *zoomOut(const TQObject *recvr, const char *slot, 00388 TDEActionCollection* parent, const char *name = 0 ); 00389 00393 TDEUI_EXPORT TDEAction *zoom(const TQObject *recvr, const char *slot, 00394 TDEActionCollection* parent, const char *name = 0 ); 00395 00399 TDEUI_EXPORT TDEAction *redisplay(const TQObject *recvr, const char *slot, 00400 TDEActionCollection* parent, const char *name = 0 ); 00401 00405 TDEUI_EXPORT TDEAction *up(const TQObject *recvr, const char *slot, 00406 TDEActionCollection* parent, const char *name = 0 ); 00407 00411 TDEUI_EXPORT TDEAction *back(const TQObject *recvr, const char *slot, 00412 TDEActionCollection* parent, const char *name = 0 ); 00413 00417 TDEUI_EXPORT TDEAction *forward(const TQObject *recvr, const char *slot, 00418 TDEActionCollection* parent, const char *name = 0 ); 00419 00423 TDEUI_EXPORT TDEAction *home(const TQObject *recvr, const char *slot, 00424 TDEActionCollection* parent, const char *name = 0 ); 00425 00429 TDEUI_EXPORT TDEAction *prior(const TQObject *recvr, const char *slot, 00430 TDEActionCollection* parent, const char *name = 0 ); 00431 00435 TDEUI_EXPORT TDEAction *next(const TQObject *recvr, const char *slot, 00436 TDEActionCollection* parent, const char *name = 0 ); 00437 00441 TDEUI_EXPORT TDEAction *goTo(const TQObject *recvr, const char *slot, 00442 TDEActionCollection* parent, const char *name = 0 ); 00443 00444 00448 TDEUI_EXPORT TDEAction *gotoPage(const TQObject *recvr, const char *slot, 00449 TDEActionCollection* parent, const char *name = 0 ); 00450 00454 TDEUI_EXPORT TDEAction *gotoLine(const TQObject *recvr, const char *slot, 00455 TDEActionCollection* parent, const char *name = 0 ); 00456 00460 TDEUI_EXPORT TDEAction *firstPage(const TQObject *recvr, const char *slot, 00461 TDEActionCollection* parent, const char *name = 0 ); 00462 00466 TDEUI_EXPORT TDEAction *lastPage(const TQObject *recvr, const char *slot, 00467 TDEActionCollection* parent, const char *name = 0 ); 00468 00472 TDEUI_EXPORT TDEAction *addBookmark(const TQObject *recvr, const char *slot, 00473 TDEActionCollection* parent, const char *name = 0 ); 00474 00478 TDEUI_EXPORT TDEAction *editBookmarks(const TQObject *recvr, const char *slot, 00479 TDEActionCollection* parent, const char *name = 0 ); 00480 00484 TDEUI_EXPORT TDEAction *spelling(const TQObject *recvr, const char *slot, 00485 TDEActionCollection* parent, const char *name = 0 ); 00486 00487 00491 TDEUI_EXPORT TDEToggleAction *showMenubar(const TQObject *recvr, const char *slot, 00492 TDEActionCollection* parent, const char *name = 0 ); 00493 00501 TDEUI_EXPORT TDEToggleAction *showToolbar(const TQObject *recvr, const char *slot, 00502 TDEActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; 00509 TDEUI_EXPORT TDEToggleToolBarAction *showToolbar(const char* toolBarName, 00510 TDEActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; 00511 00515 TDEUI_EXPORT TDEToggleAction *showStatusbar(const TQObject *recvr, const char *slot, 00516 TDEActionCollection* parent, const char *name = 0 ); 00517 00522 TDEUI_EXPORT TDEToggleFullScreenAction *fullScreen(const TQObject *recvr, const char *slot, 00523 TDEActionCollection* parent, TQWidget* window, const char *name = 0 ); 00524 00528 TDEUI_EXPORT TDEAction *saveOptions(const TQObject *recvr, const char *slot, 00529 TDEActionCollection* parent, const char *name = 0 ); 00530 00537 TDEUI_EXPORT TDEAction *keyBindings(const TQObject *recvr, const char *slot, 00538 TDEActionCollection* parent, const char *name = 0 ); 00539 00543 TDEUI_EXPORT TDEAction *preferences(const TQObject *recvr, const char *slot, 00544 TDEActionCollection* parent, const char *name = 0 ); 00545 00549 TDEUI_EXPORT TDEAction *configureToolbars(const TQObject *recvr, 00550 const char *slot, 00551 TDEActionCollection* parent, 00552 const char *name = 0 ); 00553 00558 TDEUI_EXPORT TDEAction *configureNotifications(const TQObject *recvr, 00559 const char *slot, 00560 TDEActionCollection *parent, 00561 const char *name = 0); 00562 00566 TDEUI_EXPORT TDEAction *help(const TQObject *recvr, const char *slot, 00567 TDEActionCollection* parent, const char *name = 0 ); 00568 00572 TDEUI_EXPORT TDEAction *helpContents(const TQObject *recvr, const char *slot, 00573 TDEActionCollection* parent, const char *name = 0 ); 00574 00578 TDEUI_EXPORT TDEAction *whatsThis(const TQObject *recvr, const char *slot, 00579 TDEActionCollection* parent, const char *name = 0 ); 00580 00585 TDEUI_EXPORT TDEAction *tipOfDay(const TQObject *recvr, const char *slot, 00586 TDEActionCollection* parent, const char *name = 0 ); 00587 00591 TDEUI_EXPORT TDEAction *reportBug(const TQObject *recvr, const char *slot, 00592 TDEActionCollection* parent, const char *name = 0 ); 00593 00597 TDEUI_EXPORT TDEAction *aboutApp(const TQObject *recvr, const char *slot, 00598 TDEActionCollection* parent, const char *name = 0 ); 00599 00603 TDEUI_EXPORT TDEAction *aboutKDE(const TQObject *recvr, const char *slot, 00604 TDEActionCollection* parent, const char *name = 0 ); 00605 00610 TDEUI_EXPORT TDEAction *switchApplicationLanguage(const TQObject *recvr, const char *slot, 00611 TDEActionCollection* parent, const char *name = 0 ); 00612 } 00613 00614 #endif // KSTDACTION_H