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 QObject;
00023 class QWidget;
00024 class KAction;
00025 class KActionCollection;
00026 class KRecentFilesAction;
00027 class KToggleAction;
00028 class KToggleToolBarAction;
00029 class KToggleFullScreenAction;
00030 
00031 #include <qstringlist.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         KubuntuGetHelpOnline, KubuntuTranslate,
00162         SwitchApplicationLanguage 
00163     };
00164 
00169     KDEUI_EXPORT KAction* create( StdAction id, const char *name,
00170         const QObject *recvr, const char *slot,
00171         KActionCollection* parent );
00172 
00173     inline KAction* create( StdAction id,
00174         const QObject *recvr, const char *slot,
00175         KActionCollection* parent )
00176         { return KStdAction::create( id, 0, recvr, slot, parent ); }
00177 
00182     inline KAction *action(StdAction act_enum,
00183         const QObject *recvr, const char *slot,
00184         KActionCollection *parent, const char *name = 0L )
00185         { return KStdAction::create( act_enum, name, recvr, slot, parent ); }
00186 
00190     KDEUI_EXPORT const char* name( StdAction id );
00191 
00193     inline const char* stdName(StdAction act_enum) { return name( act_enum ); }
00194 
00200         KDEUI_EXPORT QStringList stdNames();
00201 
00205     KDEUI_EXPORT KAction *openNew(const QObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
00206 
00210     KDEUI_EXPORT KAction *open(const QObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
00211 
00221     KDEUI_EXPORT KRecentFilesAction *openRecent(const QObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0 );
00222 
00226     KDEUI_EXPORT KAction *save(const QObject *recvr, const char *slot,
00227         KActionCollection* parent, const char *name = 0 );
00228 
00232     KDEUI_EXPORT KAction *saveAs(const QObject *recvr, const char *slot,
00233         KActionCollection* parent, const char *name = 0 );
00234 
00239     KDEUI_EXPORT KAction *revert(const QObject *recvr, const char *slot,
00240         KActionCollection* parent, const char *name = 0 );
00241 
00245     KDEUI_EXPORT KAction *close(const QObject *recvr, const char *slot,
00246         KActionCollection* parent, const char *name = 0 );
00247 
00251     KDEUI_EXPORT KAction *print(const QObject *recvr, const char *slot,
00252         KActionCollection* parent, const char *name = 0 );
00253 
00257     KDEUI_EXPORT KAction *printPreview(const QObject *recvr, const char *slot,
00258         KActionCollection* parent, const char *name = 0 );
00259 
00263     KDEUI_EXPORT KAction *mail(const QObject *recvr, const char *slot,
00264         KActionCollection* parent, const char *name = 0 );
00265 
00269     KDEUI_EXPORT KAction *quit(const QObject *recvr, const char *slot,
00270         KActionCollection* parent, const char *name = 0 );
00271 
00275     KDEUI_EXPORT KAction *undo(const QObject *recvr, const char *slot,
00276         KActionCollection* parent, const char *name = 0 );
00277 
00281     KDEUI_EXPORT KAction *redo(const QObject *recvr, const char *slot,
00282         KActionCollection* parent, const char *name = 0 );
00283 
00287     KDEUI_EXPORT KAction *cut(const QObject *recvr, const char *slot,
00288         KActionCollection* parent, const char *name = 0 );
00289 
00293     KDEUI_EXPORT KAction *copy(const QObject *recvr, const char *slot,
00294         KActionCollection* parent, const char *name = 0 );
00295 
00300     KDEUI_EXPORT KAction *paste(const QObject *recvr, const char *slot,
00301         KActionCollection* parent, const char *name = 0 );
00302 
00309     KDEUI_EXPORT KAction *pasteText(const QObject *recvr, const char *slot,
00310         KActionCollection* parent, const char *name = 0 );
00311 
00316     KDEUI_EXPORT KAction *clear(const QObject *recvr, const char *slot,
00317         KActionCollection* parent, const char *name = 0 );
00318 
00322     KDEUI_EXPORT KAction *selectAll(const QObject *recvr, const char *slot,
00323         KActionCollection* parent, const char *name = 0 );
00324 
00328     KDEUI_EXPORT KAction *deselect(const QObject *recvr, const char *slot,
00329         KActionCollection* parent, const char *name = 0 );
00330 
00334     KDEUI_EXPORT KAction *find(const QObject *recvr, const char *slot,
00335         KActionCollection* parent, const char *name = 0 );
00336 
00340     KDEUI_EXPORT KAction *findNext(const QObject *recvr, const char *slot,
00341         KActionCollection* parent, const char *name = 0 );
00342 
00346     KDEUI_EXPORT KAction *findPrev(const QObject *recvr, const char *slot,
00347         KActionCollection* parent, const char *name = 0 );
00348 
00352     KDEUI_EXPORT KAction *replace(const QObject *recvr, const char *slot,
00353         KActionCollection* parent, const char *name = 0 );
00354 
00358     KDEUI_EXPORT KAction *actualSize(const QObject *recvr, const char *slot,
00359         KActionCollection* parent, const char *name = 0 );
00360 
00364     KDEUI_EXPORT KAction *fitToPage(const QObject *recvr, const char *slot,
00365         KActionCollection* parent, const char *name = 0 );
00366 
00370     KDEUI_EXPORT KAction *fitToWidth(const QObject *recvr, const char *slot,
00371         KActionCollection* parent, const char *name = 0 );
00372 
00376     KDEUI_EXPORT KAction *fitToHeight(const QObject *recvr, const char *slot,
00377                     KActionCollection* parent, const char *name = 0 );
00378 
00382     KDEUI_EXPORT KAction *zoomIn(const QObject *recvr, const char *slot,
00383                 KActionCollection* parent, const char *name = 0 );
00384 
00388     KDEUI_EXPORT KAction *zoomOut(const QObject *recvr, const char *slot,
00389                 KActionCollection* parent, const char *name = 0 );
00390 
00394     KDEUI_EXPORT KAction *zoom(const QObject *recvr, const char *slot,
00395                 KActionCollection* parent, const char *name = 0 );
00396 
00400     KDEUI_EXPORT KAction *redisplay(const QObject *recvr, const char *slot,
00401                 KActionCollection* parent, const char *name = 0 );
00402 
00406     KDEUI_EXPORT KAction *up(const QObject *recvr, const char *slot,
00407             KActionCollection* parent, const char *name = 0 );
00408 
00412     KDEUI_EXPORT KAction *back(const QObject *recvr, const char *slot,
00413                 KActionCollection* parent, const char *name = 0 );
00414 
00418     KDEUI_EXPORT KAction *forward(const QObject *recvr, const char *slot,
00419                 KActionCollection* parent, const char *name = 0 );
00420 
00424     KDEUI_EXPORT KAction *home(const QObject *recvr, const char *slot,
00425                 KActionCollection* parent, const char *name = 0 );
00426 
00430     KDEUI_EXPORT KAction *prior(const QObject *recvr, const char *slot,
00431                 KActionCollection* parent, const char *name = 0 );
00432 
00436     KDEUI_EXPORT KAction *next(const QObject *recvr, const char *slot,
00437                 KActionCollection* parent, const char *name = 0 );
00438 
00442     KDEUI_EXPORT KAction *goTo(const QObject *recvr, const char *slot,
00443                 KActionCollection* parent, const char *name = 0 );
00444 
00445 
00449     KDEUI_EXPORT KAction *gotoPage(const QObject *recvr, const char *slot,
00450                 KActionCollection* parent, const char *name = 0 );
00451 
00455     KDEUI_EXPORT KAction *gotoLine(const QObject *recvr, const char *slot,
00456                 KActionCollection* parent, const char *name = 0 );
00457 
00461     KDEUI_EXPORT KAction *firstPage(const QObject *recvr, const char *slot,
00462                 KActionCollection* parent, const char *name = 0 );
00463 
00467     KDEUI_EXPORT KAction *lastPage(const QObject *recvr, const char *slot,
00468                 KActionCollection* parent, const char *name = 0 );
00469 
00473     KDEUI_EXPORT KAction *addBookmark(const QObject *recvr, const char *slot,
00474                     KActionCollection* parent, const char *name = 0 );
00475 
00479     KDEUI_EXPORT KAction *editBookmarks(const QObject *recvr, const char *slot,
00480                     KActionCollection* parent, const char *name = 0 );
00481 
00485     KDEUI_EXPORT KAction *spelling(const QObject *recvr, const char *slot,
00486                     KActionCollection* parent, const char *name = 0 );
00487 
00488 
00492     KDEUI_EXPORT KToggleAction *showMenubar(const QObject *recvr, const char *slot,
00493                     KActionCollection* parent, const char *name = 0 );
00494 
00502     KDEUI_EXPORT KToggleAction *showToolbar(const QObject *recvr, const char *slot,
00503                     KActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED;
00510     KDEUI_EXPORT KToggleToolBarAction *showToolbar(const char* toolBarName,
00511                     KActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED;
00512 
00516     KDEUI_EXPORT KToggleAction *showStatusbar(const QObject *recvr, const char *slot,
00517                     KActionCollection* parent, const char *name = 0 );
00518 
00523     KDEUI_EXPORT KToggleFullScreenAction *fullScreen(const QObject *recvr, const char *slot,
00524                     KActionCollection* parent, QWidget* window, const char *name = 0 );
00525 
00529     KDEUI_EXPORT KAction *saveOptions(const QObject *recvr, const char *slot,
00530                     KActionCollection* parent, const char *name = 0 );
00531 
00538     KDEUI_EXPORT KAction *keyBindings(const QObject *recvr, const char *slot,
00539                     KActionCollection* parent, const char *name = 0 );
00540 
00544     KDEUI_EXPORT KAction *preferences(const QObject *recvr, const char *slot,
00545                     KActionCollection* parent, const char *name = 0 );
00546 
00550     KDEUI_EXPORT KAction *configureToolbars(const QObject *recvr,
00551                     const char *slot,
00552                     KActionCollection* parent,
00553                     const char *name = 0 );
00554 
00559     KDEUI_EXPORT KAction *configureNotifications(const QObject *recvr,
00560                     const char *slot,
00561                     KActionCollection *parent,
00562                     const char *name = 0);
00563 
00567     KDEUI_EXPORT KAction *help(const QObject *recvr, const char *slot,
00568                 KActionCollection* parent, const char *name = 0 );
00569 
00573     KDEUI_EXPORT KAction *helpContents(const QObject *recvr, const char *slot,
00574                     KActionCollection* parent, const char *name = 0 );
00575 
00579     KDEUI_EXPORT KAction *whatsThis(const QObject *recvr, const char *slot,
00580                 KActionCollection* parent, const char *name = 0 );
00581 
00586     KDEUI_EXPORT KAction *tipOfDay(const QObject *recvr, const char *slot,
00587                 KActionCollection* parent, const char *name = 0 );
00588 
00592     KDEUI_EXPORT KAction *reportBug(const QObject *recvr, const char *slot,
00593                 KActionCollection* parent, const char *name = 0 );
00594 
00598     KDEUI_EXPORT KAction *aboutApp(const QObject *recvr, const char *slot,
00599                 KActionCollection* parent, const char *name = 0 );
00600 
00604     KDEUI_EXPORT KAction *aboutKDE(const QObject *recvr, const char *slot,
00605                 KActionCollection* parent, const char *name = 0 );
00606 
00611     KDEUI_EXPORT KAction *switchApplicationLanguage(const QObject *recvr, const char *slot,
00612                 KActionCollection* parent, const char *name = 0 );
00613 
00614     KDEUI_EXPORT KAction *kubuntuTranslate(const QObject *recvr, const char *slot,
00615                 KActionCollection* parent, const char *name = 0 );
00616 
00617     KDEUI_EXPORT KAction *kubuntuGetHelpOnline(const QObject *recvr, const char *slot,
00618                 KActionCollection* parent, const char *name = 0 );
00619 }
00620 
00621 #endif // KSTDACTION_H
KDE Home | KDE Accessibility Home | Description of Access Keys