diff options
Diffstat (limited to 'kdejava/koala/org/kde/koala/KStdAction.java')
-rw-r--r-- | kdejava/koala/org/kde/koala/KStdAction.java | 544 |
1 files changed, 544 insertions, 0 deletions
diff --git a/kdejava/koala/org/kde/koala/KStdAction.java b/kdejava/koala/org/kde/koala/KStdAction.java new file mode 100644 index 00000000..f5eccead --- /dev/null +++ b/kdejava/koala/org/kde/koala/KStdAction.java @@ -0,0 +1,544 @@ +//Auto-generated by kalyptus. DO NOT EDIT. +package org.kde.koala; + +import org.kde.qt.Qt; +import org.kde.qt.QtSupport; +import org.kde.qt.QObject; +import java.util.ArrayList; +import org.kde.qt.QWidget; + +/** + + Convenience methods to access all standard KDE actions. + These actions should be used instead of hardcoding menubar and + toolbar items. Using these actions helps your application easily + conform to the KDE UI Style Guide + All of the documentation for KAction holds for KStdAction + also. When in doubt on how things work, check the KAction + documention first. + <li><b>Simple Example:</b></li> + In general, using standard actions should be a drop in replacement + for regular actions. For example, if you previously had: + <pre> + KAction newAct = new KAction(i18n("&New"), QIconSet(BarIcon("filenew")), + KStdAccel.shortcut(KStdAccel.New), this, + SLOT("fileNew()"), actionCollection()); + </pre> + You could drop that and replace it with: + <pre> + KAction newAct = KStdAction.openNew(this, SLOT("fileNew()"), + actionCollection()); + </pre> + <li><b>Non-standard Usages</b></li> + It is possible to use the standard actions in various + non-recommended ways. Say, for instance, you wanted to have a + standard action (with the associated correct text and icon and + accelerator, etc) but you didn't want it to go in the standard + place (this is not recommended, by the way). One way to do this is + to simply not use the XML UI framework and plug it into wherever + you want. If you do want to use the XML UI framework (good!), then + it is still possible. + Basically, the XML building code matches names in the XML code with + the internal names of the actions. You can find out the internal + names of each of the standard actions by using the stdName + action like so: KStdAction.stdName(KStdAction.Cut) would return + 'edit_cut'. The XML building code will match 'edit_cut' to the + attribute in the global XML file and place your action there. + However, you can change the internal name. In this example, just + do something like: + <pre> + KStdAction.cut(this, SLOT("editCut()"), actionCollection(), "my_cut"); + </pre> + Now, in your local XML resource file (e.g., yourappui.rc), simply + put 'my_cut' where you want it to go. + Another non-standard usage concerns getting a pointer to an + existing action if, say, you want to enable or disable the action. + You could do it the recommended way and just grab a pointer when + you instantiate it as in the the 'openNew' example above... or you + could do it the hard way: + <pre> + KAction cut = actionCollection().action(KStdAction.stdName(KStdAction.Cut)); + </pre> + Another non-standard usage concerns instantiating the action in the + first place. Usually, you would use the member functions as + shown above (e.g., KStdAction.cut(this, SLOT, parent)). You + may, however, do this using the enums provided. This author can't + think of a reason why you would want to, but, hey, if you do, + here's how: + <pre> + KStdAction.action(KStdAction.New, this, SLOT("fileNew()"), actionCollection()); + KStdAction.action(KStdAction.Cut, this, SLOT("editCut()"), actionCollection()); + </pre> + @author Kurt Granroth <granroth@kde.org> + + @short Convenience methods to access all standard KDE actions. + @see #http://developer#kde#org/documentation/standards/kde/style/basics/index#html + +*/ +public class KStdAction { + /** + The standard menubar and toolbar actions. + @short The standard menubar and toolbar actions. + */ + public static final int ActionNone = 0; + public static final int New = 1; + public static final int Open = 2; + public static final int OpenRecent = 3; + public static final int Save = 4; + public static final int SaveAs = 5; + public static final int Revert = 6; + public static final int Close = 7; + public static final int Print = 8; + public static final int PrintPreview = 9; + public static final int Mail = 10; + public static final int Quit = 11; + public static final int Undo = 12; + public static final int Redo = 13; + public static final int Cut = 14; + public static final int Copy = 15; + public static final int Paste = 16; + public static final int SelectAll = 17; + public static final int Deselect = 18; + public static final int Find = 19; + public static final int FindNext = 20; + public static final int FindPrev = 21; + public static final int Replace = 22; + public static final int ActualSize = 23; + public static final int FitToPage = 24; + public static final int FitToWidth = 25; + public static final int FitToHeight = 26; + public static final int ZoomIn = 27; + public static final int ZoomOut = 28; + public static final int Zoom = 29; + public static final int Redisplay = 30; + public static final int Up = 31; + public static final int Back = 32; + public static final int Forward = 33; + public static final int Home = 34; + public static final int Prior = 35; + public static final int Next = 36; + public static final int Goto = 37; + public static final int GotoPage = 38; + public static final int GotoLine = 39; + public static final int FirstPage = 40; + public static final int LastPage = 41; + public static final int AddBookmark = 42; + public static final int EditBookmarks = 43; + public static final int Spelling = 44; + public static final int ShowMenubar = 45; + public static final int ShowToolbar = 46; + public static final int ShowStatusbar = 47; + public static final int SaveOptions = 48; + public static final int KeyBindings = 49; + public static final int Preferences = 50; + public static final int ConfigureToolbars = 51; + public static final int Help = 52; + public static final int HelpContents = 53; + public static final int WhatsThis = 54; + public static final int ReportBug = 55; + public static final int AboutApp = 56; + public static final int AboutKDE = 57; + public static final int TipofDay = 58; + public static final int ConfigureNotifications = 59; + public static final int FullScreen = 60; + public static final int Clear = 61; + public static final int PasteText = 62; + + /** + Creates an action corresponding to the + KStdAction.StdAction enum. + @short Creates an action corresponding to the KStdAction.StdAction enum. + */ + public static native KAction create(int id, String name, QObject recvr, String slot, KActionCollection parent); + public static native KAction create(int id, QObject recvr, String slot, KActionCollection parent); + /** + This will return the internal name of a given standard action. + @short This will return the internal name of a given standard action. + */ + public static native String name(int id); + public static native String stdName(int act_enum); + /** + Returns a list of all standard names. Used by KAccelManager + to give those heigher weight. + @short Returns a list of all standard names. + */ + public static native ArrayList stdNames(); + /** + Create a new document or window. + @short Create a new document or window. + */ + public static native KAction openNew(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction openNew(QObject recvr, String slot, KActionCollection parent); + /** + Open an existing file. + @short Open an existing file. + */ + public static native KAction open(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction open(QObject recvr, String slot, KActionCollection parent); + /** + Open a recently used document. The signature of the slot being called + is of the form slotURLSelected( KURL ). + @param recvr object to receive slot + @param slot The SLOT to invoke when a URL is selected. The slot's + signature is slotURLSelected( KURL ). + @param parent parent widget + @param name name of widget + @short Open a recently used document. + */ + public static native KRecentFilesAction openRecent(QObject recvr, String slot, KActionCollection parent, String name); + public static native KRecentFilesAction openRecent(QObject recvr, String slot, KActionCollection parent); + /** + Save the current document. + @short Save the current document. + */ + public static native KAction save(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction save(QObject recvr, String slot, KActionCollection parent); + /** + Save the current document under a different name. + @short Save the current document under a different name. + */ + public static native KAction saveAs(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction saveAs(QObject recvr, String slot, KActionCollection parent); + /** + Revert the current document to the last saved version + (essentially will undo all changes). + @short Revert the current document to the last saved version (essentially will undo all changes). + */ + public static native KAction revert(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction revert(QObject recvr, String slot, KActionCollection parent); + /** + Close the current document. + @short Close the current document. + */ + public static native KAction close(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction close(QObject recvr, String slot, KActionCollection parent); + /** + Print the current document. + @short Print the current document. + */ + public static native KAction print(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction print(QObject recvr, String slot, KActionCollection parent); + /** + Show a print preview of the current document. + @short Show a print preview of the current document. + */ + public static native KAction printPreview(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction printPreview(QObject recvr, String slot, KActionCollection parent); + /** + Mail this document. + @short Mail this document. + */ + public static native KAction mail(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction mail(QObject recvr, String slot, KActionCollection parent); + /** + Quit the program. + @short Quit the program. + */ + public static native KAction quit(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction quit(QObject recvr, String slot, KActionCollection parent); + /** + Undo the last operation. + @short Undo the last operation. + */ + public static native KAction undo(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction undo(QObject recvr, String slot, KActionCollection parent); + /** + Redo the last operation. + @short Redo the last operation. + */ + public static native KAction redo(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction redo(QObject recvr, String slot, KActionCollection parent); + /** + Cut selected area and store it in the clipboard. + @short Cut selected area and store it in the clipboard. + */ + public static native KAction cut(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction cut(QObject recvr, String slot, KActionCollection parent); + /** + Copy the selected area into the clipboard. + @short Copy the selected area into the clipboard. + */ + public static native KAction copy(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction copy(QObject recvr, String slot, KActionCollection parent); + /** + Paste the contents of clipboard at the current mouse or cursor + position. + @short Paste the contents of clipboard at the current mouse or cursor position. + */ + public static native KAction paste(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction paste(QObject recvr, String slot, KActionCollection parent); + /** + Paste the contents of clipboard at the current mouse or cursor + position. Provide a button on the toolbar with the clipboard history + menu if Klipper is running. + @short Paste the contents of clipboard at the current mouse or cursor position. + */ + public static native KAction pasteText(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction pasteText(QObject recvr, String slot, KActionCollection parent); + /** + Clear the content of the focus widget + @short Clear the content of the focus widget + */ + public static native KAction clear(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction clear(QObject recvr, String slot, KActionCollection parent); + /** + Select all elements in the current document. + @short Select all elements in the current document. + */ + public static native KAction selectAll(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction selectAll(QObject recvr, String slot, KActionCollection parent); + /** + Deselect any selected elements in the current document. + @short Deselect any selected elements in the current document. + */ + public static native KAction deselect(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction deselect(QObject recvr, String slot, KActionCollection parent); + /** + Initiate a 'find' request in the current document. + @short Initiate a 'find' request in the current document. + */ + public static native KAction find(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction find(QObject recvr, String slot, KActionCollection parent); + /** + Find the next instance of a stored 'find'. + @short Find the next instance of a stored 'find'. + */ + public static native KAction findNext(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction findNext(QObject recvr, String slot, KActionCollection parent); + /** + Find a previous instance of a stored 'find'. + @short Find a previous instance of a stored 'find'. + */ + public static native KAction findPrev(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction findPrev(QObject recvr, String slot, KActionCollection parent); + /** + Find and replace matches. + @short Find and replace matches. + */ + public static native KAction replace(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction replace(QObject recvr, String slot, KActionCollection parent); + /** + View the document at its actual size. + @short View the document at its actual size. + */ + public static native KAction actualSize(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction actualSize(QObject recvr, String slot, KActionCollection parent); + /** + Fit the document view to the size of the current window. + @short Fit the document view to the size of the current window. + */ + public static native KAction fitToPage(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction fitToPage(QObject recvr, String slot, KActionCollection parent); + /** + Fit the document view to the width of the current window. + @short Fit the document view to the width of the current window. + */ + public static native KAction fitToWidth(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction fitToWidth(QObject recvr, String slot, KActionCollection parent); + /** + Fit the document view to the height of the current window. + @short Fit the document view to the height of the current window. + */ + public static native KAction fitToHeight(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction fitToHeight(QObject recvr, String slot, KActionCollection parent); + /** + Zoom in. + @short Zoom in. + */ + public static native KAction zoomIn(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction zoomIn(QObject recvr, String slot, KActionCollection parent); + /** + Zoom out. + @short Zoom out. + */ + public static native KAction zoomOut(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction zoomOut(QObject recvr, String slot, KActionCollection parent); + /** + Popup a zoom dialog. + @short Popup a zoom dialog. + */ + public static native KAction zoom(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction zoom(QObject recvr, String slot, KActionCollection parent); + /** + Redisplay or redraw the document. + @short Redisplay or redraw the document. + */ + public static native KAction redisplay(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction redisplay(QObject recvr, String slot, KActionCollection parent); + /** + Move up (web style menu). + @short Move up (web style menu). + */ + public static native KAction up(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction up(QObject recvr, String slot, KActionCollection parent); + /** + Move back (web style menu). + @short Move back (web style menu). + */ + public static native KAction back(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction back(QObject recvr, String slot, KActionCollection parent); + /** + Move forward (web style menu). + @short Move forward (web style menu). + */ + public static native KAction forward(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction forward(QObject recvr, String slot, KActionCollection parent); + /** + Go to the "Home" position or document. + @short Go to the "Home" position or document. + */ + public static native KAction home(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction home(QObject recvr, String slot, KActionCollection parent); + /** + Scroll up one page. + @short Scroll up one page. + */ + public static native KAction prior(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction prior(QObject recvr, String slot, KActionCollection parent); + /** + Scroll down one page. + @short Scroll down one page. + */ + public static native KAction next(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction next(QObject recvr, String slot, KActionCollection parent); + /** + Go to somewhere in general. + @short Go to somewhere in general. + */ + public static native KAction goTo(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction goTo(QObject recvr, String slot, KActionCollection parent); + /** + Go to a specific page (dialog). + @short Go to a specific page (dialog). + */ + public static native KAction gotoPage(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction gotoPage(QObject recvr, String slot, KActionCollection parent); + /** + Go to a specific line (dialog). + @short Go to a specific line (dialog). + */ + public static native KAction gotoLine(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction gotoLine(QObject recvr, String slot, KActionCollection parent); + /** + Jump to the first page. + @short Jump to the first page. + */ + public static native KAction firstPage(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction firstPage(QObject recvr, String slot, KActionCollection parent); + /** + Jump to the last page. + @short Jump to the last page. + */ + public static native KAction lastPage(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction lastPage(QObject recvr, String slot, KActionCollection parent); + /** + Add the current page to the bookmarks tree. + @short Add the current page to the bookmarks tree. + */ + public static native KAction addBookmark(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction addBookmark(QObject recvr, String slot, KActionCollection parent); + /** + Edit the application bookmarks. + @short Edit the application bookmarks. + */ + public static native KAction editBookmarks(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction editBookmarks(QObject recvr, String slot, KActionCollection parent); + /** + Pop up the spell checker. + @short Pop up the spell checker. + */ + public static native KAction spelling(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction spelling(QObject recvr, String slot, KActionCollection parent); + /** + Show/Hide the menubar. + @short Show/Hide the menubar. + */ + public static native KToggleAction showMenubar(QObject recvr, String slot, KActionCollection parent, String name); + public static native KToggleAction showMenubar(QObject recvr, String slot, KActionCollection parent); + /** + Show/Hide the statusbar. + @short Show/Hide the statusbar. + */ + public static native KToggleAction showStatusbar(QObject recvr, String slot, KActionCollection parent, String name); + public static native KToggleAction showStatusbar(QObject recvr, String slot, KActionCollection parent); + /** + Switch to/from full screen mode + @short Switch to/from full screen mode + */ + public static native KToggleFullScreenAction fullScreen(QObject recvr, String slot, KActionCollection parent, QWidget window, String name); + public static native KToggleFullScreenAction fullScreen(QObject recvr, String slot, KActionCollection parent, QWidget window); + /** + Display the save options dialog. + @short Display the save options dialog. + */ + public static native KAction saveOptions(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction saveOptions(QObject recvr, String slot, KActionCollection parent); + /** + Display the configure key bindings dialog. + Note that you might be able to use the pre-built KXMLGUIFactory's fuction: + KStdAction.keyBindings(guiFactory(), SLOT("configureShortcuts()"), actionCollection()); + @short Display the configure key bindings dialog. + */ + public static native KAction keyBindings(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction keyBindings(QObject recvr, String slot, KActionCollection parent); + /** + Display the preferences/options dialog. + @short Display the preferences/options dialog. + */ + public static native KAction preferences(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction preferences(QObject recvr, String slot, KActionCollection parent); + /** + The Customize Toolbar dialog. + @short The Customize Toolbar dialog. + */ + public static native KAction configureToolbars(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction configureToolbars(QObject recvr, String slot, KActionCollection parent); + /** + The Configure Notifications dialog. + @short The Configure Notifications dialog. + */ + public static native KAction configureNotifications(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction configureNotifications(QObject recvr, String slot, KActionCollection parent); + /** + Display the help. + @short Display the help. + */ + public static native KAction help(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction help(QObject recvr, String slot, KActionCollection parent); + /** + Display the help contents. + @short Display the help contents. + */ + public static native KAction helpContents(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction helpContents(QObject recvr, String slot, KActionCollection parent); + /** + Trigger the What's This cursor. + @short Trigger the What's This cursor. + */ + public static native KAction whatsThis(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction whatsThis(QObject recvr, String slot, KActionCollection parent); + /** + Display "Tip of the Day" + @short Display "Tip of the Day" + */ + public static native KAction tipOfDay(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction tipOfDay(QObject recvr, String slot, KActionCollection parent); + /** + Open up the Report Bug dialog. + @short Open up the Report Bug dialog. + */ + public static native KAction reportBug(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction reportBug(QObject recvr, String slot, KActionCollection parent); + /** + Display the application's About box. + @short Display the application's About box. + */ + public static native KAction aboutApp(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction aboutApp(QObject recvr, String slot, KActionCollection parent); + /** + Display the About KDE dialog. + @short Display the About KDE dialog. + */ + public static native KAction aboutKDE(QObject recvr, String slot, KActionCollection parent, String name); + public static native KAction aboutKDE(QObject recvr, String slot, KActionCollection parent); +} |