org.kde.koala
public class KStdAction extends Object
KAction newAct = new KAction(i18n("&New"), QIconSet(BarIcon("filenew")), KStdAccel.shortcut(KStdAccel.New), this, SLOT("fileNew()"), actionCollection());You could drop that and replace it with:
KAction newAct = KStdAction.openNew(this, SLOT("fileNew()"), actionCollection());
KStdAction.cut(this, SLOT("editCut()"), actionCollection(), "my_cut");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:
KAction cut = actionCollection().action(KStdAction.stdName(KStdAction.Cut));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:
KStdAction.action(KStdAction.New, this, SLOT("fileNew()"), actionCollection()); KStdAction.action(KStdAction.Cut, this, SLOT("editCut()"), actionCollection());
See Also: ://developer#kde#org/documentation/standards/kde/style/basics/index#html
UNKNOWN: Convenience methods to access all standard KDE actions.
Field Summary | |
---|---|
static int | AboutApp |
static int | AboutKDE |
static int | ActionNone
The standard menubar and toolbar actions. |
static int | ActualSize |
static int | AddBookmark |
static int | Back |
static int | Clear |
static int | Close |
static int | ConfigureNotifications |
static int | ConfigureToolbars |
static int | Copy |
static int | Cut |
static int | Deselect |
static int | EditBookmarks |
static int | Find |
static int | FindNext |
static int | FindPrev |
static int | FirstPage |
static int | FitToHeight |
static int | FitToPage |
static int | FitToWidth |
static int | Forward |
static int | FullScreen |
static int | Goto |
static int | GotoLine |
static int | GotoPage |
static int | Help |
static int | HelpContents |
static int | Home |
static int | KeyBindings |
static int | LastPage |
static int | |
static int | New |
static int | Next |
static int | Open |
static int | OpenRecent |
static int | Paste |
static int | PasteText |
static int | Preferences |
static int | |
static int | PrintPreview |
static int | Prior |
static int | Quit |
static int | Redisplay |
static int | Redo |
static int | Replace |
static int | ReportBug |
static int | Revert |
static int | Save |
static int | SaveAs |
static int | SaveOptions |
static int | SelectAll |
static int | ShowMenubar |
static int | ShowStatusbar |
static int | ShowToolbar |
static int | Spelling |
static int | TipofDay |
static int | Undo |
static int | Up |
static int | WhatsThis |
static int | Zoom |
static int | ZoomIn |
static int | ZoomOut |
Method Summary | |
---|---|
static KAction | aboutApp(QObject recvr, String slot, KActionCollection parent, String name)
Display the application's About box. |
static KAction | aboutApp(QObject recvr, String slot, KActionCollection parent) |
static KAction | aboutKDE(QObject recvr, String slot, KActionCollection parent, String name)
Display the About KDE dialog. |
static KAction | aboutKDE(QObject recvr, String slot, KActionCollection parent) |
static KAction | actualSize(QObject recvr, String slot, KActionCollection parent, String name)
View the document at its actual size. |
static KAction | actualSize(QObject recvr, String slot, KActionCollection parent) |
static KAction | addBookmark(QObject recvr, String slot, KActionCollection parent, String name)
Add the current page to the bookmarks tree. |
static KAction | addBookmark(QObject recvr, String slot, KActionCollection parent) |
static KAction | back(QObject recvr, String slot, KActionCollection parent, String name)
Move back (web style menu). |
static KAction | back(QObject recvr, String slot, KActionCollection parent) |
static KAction | clear(QObject recvr, String slot, KActionCollection parent, String name)
Clear the content of the focus widget |
static KAction | clear(QObject recvr, String slot, KActionCollection parent) |
static KAction | close(QObject recvr, String slot, KActionCollection parent, String name)
Close the current document. |
static KAction | close(QObject recvr, String slot, KActionCollection parent) |
static KAction | configureNotifications(QObject recvr, String slot, KActionCollection parent, String name)
The Configure Notifications dialog. |
static KAction | configureNotifications(QObject recvr, String slot, KActionCollection parent) |
static KAction | configureToolbars(QObject recvr, String slot, KActionCollection parent, String name)
The Customize Toolbar dialog. |
static KAction | configureToolbars(QObject recvr, String slot, KActionCollection parent) |
static KAction | copy(QObject recvr, String slot, KActionCollection parent, String name)
Copy the selected area into the clipboard. |
static KAction | copy(QObject recvr, String slot, KActionCollection parent) |
static KAction | create(int id, String name, QObject recvr, String slot, KActionCollection parent)
Creates an action corresponding to the
KStdAction.StdAction enum. |
static KAction | create(int id, QObject recvr, String slot, KActionCollection parent) |
static KAction | cut(QObject recvr, String slot, KActionCollection parent, String name)
Cut selected area and store it in the clipboard. |
static KAction | cut(QObject recvr, String slot, KActionCollection parent) |
static KAction | deselect(QObject recvr, String slot, KActionCollection parent, String name)
Deselect any selected elements in the current document. |
static KAction | deselect(QObject recvr, String slot, KActionCollection parent) |
static KAction | editBookmarks(QObject recvr, String slot, KActionCollection parent, String name)
Edit the application bookmarks. |
static KAction | editBookmarks(QObject recvr, String slot, KActionCollection parent) |
static KAction | find(QObject recvr, String slot, KActionCollection parent, String name)
Initiate a 'find' request in the current document. |
static KAction | find(QObject recvr, String slot, KActionCollection parent) |
static KAction | findNext(QObject recvr, String slot, KActionCollection parent, String name)
Find the next instance of a stored 'find'. |
static KAction | findNext(QObject recvr, String slot, KActionCollection parent) |
static KAction | findPrev(QObject recvr, String slot, KActionCollection parent, String name)
Find a previous instance of a stored 'find'. |
static KAction | findPrev(QObject recvr, String slot, KActionCollection parent) |
static KAction | firstPage(QObject recvr, String slot, KActionCollection parent, String name)
Jump to the first page. |
static KAction | firstPage(QObject recvr, String slot, KActionCollection parent) |
static KAction | fitToHeight(QObject recvr, String slot, KActionCollection parent, String name)
Fit the document view to the height of the current window. |
static KAction | fitToHeight(QObject recvr, String slot, KActionCollection parent) |
static KAction | fitToPage(QObject recvr, String slot, KActionCollection parent, String name)
Fit the document view to the size of the current window. |
static KAction | fitToPage(QObject recvr, String slot, KActionCollection parent) |
static KAction | fitToWidth(QObject recvr, String slot, KActionCollection parent, String name)
Fit the document view to the width of the current window. |
static KAction | fitToWidth(QObject recvr, String slot, KActionCollection parent) |
static KAction | forward(QObject recvr, String slot, KActionCollection parent, String name)
Move forward (web style menu). |
static KAction | forward(QObject recvr, String slot, KActionCollection parent) |
static KToggleFullScreenAction | fullScreen(QObject recvr, String slot, KActionCollection parent, QWidget window, String name)
Switch to/from full screen mode |
static KToggleFullScreenAction | fullScreen(QObject recvr, String slot, KActionCollection parent, QWidget window) |
static KAction | gotoLine(QObject recvr, String slot, KActionCollection parent, String name)
Go to a specific line (dialog). |
static KAction | gotoLine(QObject recvr, String slot, KActionCollection parent) |
static KAction | gotoPage(QObject recvr, String slot, KActionCollection parent, String name)
Go to a specific page (dialog). |
static KAction | gotoPage(QObject recvr, String slot, KActionCollection parent) |
static KAction | goTo(QObject recvr, String slot, KActionCollection parent, String name)
Go to somewhere in general. |
static KAction | goTo(QObject recvr, String slot, KActionCollection parent) |
static KAction | help(QObject recvr, String slot, KActionCollection parent, String name)
Display the help. |
static KAction | help(QObject recvr, String slot, KActionCollection parent) |
static KAction | helpContents(QObject recvr, String slot, KActionCollection parent, String name)
Display the help contents. |
static KAction | helpContents(QObject recvr, String slot, KActionCollection parent) |
static KAction | home(QObject recvr, String slot, KActionCollection parent, String name)
Go to the "Home" position or document. |
static KAction | home(QObject recvr, String slot, KActionCollection parent) |
static KAction | keyBindings(QObject recvr, String slot, KActionCollection parent, String name)
Display the configure key bindings dialog.
|
static KAction | keyBindings(QObject recvr, String slot, KActionCollection parent) |
static KAction | lastPage(QObject recvr, String slot, KActionCollection parent, String name)
Jump to the last page. |
static KAction | lastPage(QObject recvr, String slot, KActionCollection parent) |
static KAction | mail(QObject recvr, String slot, KActionCollection parent, String name)
Mail this document. |
static KAction | mail(QObject recvr, String slot, KActionCollection parent) |
static String | name(int id)
This will return the internal name of a given standard action. |
static KAction | next(QObject recvr, String slot, KActionCollection parent, String name)
Scroll down one page. |
static KAction | next(QObject recvr, String slot, KActionCollection parent) |
static KAction | open(QObject recvr, String slot, KActionCollection parent, String name)
Open an existing file. |
static KAction | open(QObject recvr, String slot, KActionCollection parent) |
static KAction | openNew(QObject recvr, String slot, KActionCollection parent, String name)
Create a new document or window. |
static KAction | openNew(QObject recvr, String slot, KActionCollection parent) |
static KRecentFilesAction | openRecent(QObject recvr, String slot, KActionCollection parent, String name)
Open a recently used document. |
static KRecentFilesAction | openRecent(QObject recvr, String slot, KActionCollection parent) |
static KAction | paste(QObject recvr, String slot, KActionCollection parent, String name)
Paste the contents of clipboard at the current mouse or cursor
position. |
static KAction | paste(QObject recvr, String slot, KActionCollection parent) |
static KAction | pasteText(QObject recvr, String slot, KActionCollection parent, String name)
Paste the contents of clipboard at the current mouse or cursor
position. |
static KAction | pasteText(QObject recvr, String slot, KActionCollection parent) |
static KAction | preferences(QObject recvr, String slot, KActionCollection parent, String name)
Display the preferences/options dialog. |
static KAction | preferences(QObject recvr, String slot, KActionCollection parent) |
static KAction | print(QObject recvr, String slot, KActionCollection parent, String name)
Print the current document. |
static KAction | print(QObject recvr, String slot, KActionCollection parent) |
static KAction | printPreview(QObject recvr, String slot, KActionCollection parent, String name)
Show a print preview of the current document. |
static KAction | printPreview(QObject recvr, String slot, KActionCollection parent) |
static KAction | prior(QObject recvr, String slot, KActionCollection parent, String name)
Scroll up one page. |
static KAction | prior(QObject recvr, String slot, KActionCollection parent) |
static KAction | quit(QObject recvr, String slot, KActionCollection parent, String name)
Quit the program. |
static KAction | quit(QObject recvr, String slot, KActionCollection parent) |
static KAction | redisplay(QObject recvr, String slot, KActionCollection parent, String name)
Redisplay or redraw the document. |
static KAction | redisplay(QObject recvr, String slot, KActionCollection parent) |
static KAction | redo(QObject recvr, String slot, KActionCollection parent, String name)
Redo the last operation. |
static KAction | redo(QObject recvr, String slot, KActionCollection parent) |
static KAction | replace(QObject recvr, String slot, KActionCollection parent, String name)
Find and replace matches. |
static KAction | replace(QObject recvr, String slot, KActionCollection parent) |
static KAction | reportBug(QObject recvr, String slot, KActionCollection parent, String name)
Open up the Report Bug dialog. |
static KAction | reportBug(QObject recvr, String slot, KActionCollection parent) |
static KAction | revert(QObject recvr, String slot, KActionCollection parent, String name)
Revert the current document to the last saved version
(essentially will undo all changes). |
static KAction | revert(QObject recvr, String slot, KActionCollection parent) |
static KAction | save(QObject recvr, String slot, KActionCollection parent, String name)
Save the current document. |
static KAction | save(QObject recvr, String slot, KActionCollection parent) |
static KAction | saveAs(QObject recvr, String slot, KActionCollection parent, String name)
Save the current document under a different name. |
static KAction | saveAs(QObject recvr, String slot, KActionCollection parent) |
static KAction | saveOptions(QObject recvr, String slot, KActionCollection parent, String name)
Display the save options dialog. |
static KAction | saveOptions(QObject recvr, String slot, KActionCollection parent) |
static KAction | selectAll(QObject recvr, String slot, KActionCollection parent, String name)
Select all elements in the current document. |
static KAction | selectAll(QObject recvr, String slot, KActionCollection parent) |
static KToggleAction | showMenubar(QObject recvr, String slot, KActionCollection parent, String name)
Show/Hide the menubar. |
static KToggleAction | showMenubar(QObject recvr, String slot, KActionCollection parent) |
static KToggleAction | showStatusbar(QObject recvr, String slot, KActionCollection parent, String name)
Show/Hide the statusbar. |
static KToggleAction | showStatusbar(QObject recvr, String slot, KActionCollection parent) |
static KAction | spelling(QObject recvr, String slot, KActionCollection parent, String name)
Pop up the spell checker. |
static KAction | spelling(QObject recvr, String slot, KActionCollection parent) |
static String | stdName(int act_enum) |
static ArrayList | stdNames()
Returns a list of all standard names. |
static KAction | tipOfDay(QObject recvr, String slot, KActionCollection parent, String name)
Display "Tip of the Day" |
static KAction | tipOfDay(QObject recvr, String slot, KActionCollection parent) |
static KAction | undo(QObject recvr, String slot, KActionCollection parent, String name)
Undo the last operation. |
static KAction | undo(QObject recvr, String slot, KActionCollection parent) |
static KAction | up(QObject recvr, String slot, KActionCollection parent, String name)
Move up (web style menu). |
static KAction | up(QObject recvr, String slot, KActionCollection parent) |
static KAction | whatsThis(QObject recvr, String slot, KActionCollection parent, String name)
Trigger the What's This cursor. |
static KAction | whatsThis(QObject recvr, String slot, KActionCollection parent) |
static KAction | zoom(QObject recvr, String slot, KActionCollection parent, String name)
Popup a zoom dialog. |
static KAction | zoom(QObject recvr, String slot, KActionCollection parent) |
static KAction | zoomIn(QObject recvr, String slot, KActionCollection parent, String name)
Zoom in. |
static KAction | zoomIn(QObject recvr, String slot, KActionCollection parent) |
static KAction | zoomOut(QObject recvr, String slot, KActionCollection parent, String name)
Zoom out. |
static KAction | zoomOut(QObject recvr, String slot, KActionCollection parent) |
UNKNOWN: The standard menubar and toolbar actions.
UNKNOWN: Display the application's About box.
UNKNOWN: Display the About KDE dialog.
UNKNOWN: View the document at its actual size.
UNKNOWN: Add the current page to the bookmarks tree.
UNKNOWN: Move back (web style menu).
UNKNOWN: Clear the content of the focus widget
UNKNOWN: Close the current document.
UNKNOWN: The Configure Notifications dialog.
UNKNOWN: The Customize Toolbar dialog.
UNKNOWN: Copy the selected area into the clipboard.
UNKNOWN: Creates an action corresponding to the KStdAction.StdAction enum.
UNKNOWN: Cut selected area and store it in the clipboard.
UNKNOWN: Deselect any selected elements in the current document.
UNKNOWN: Edit the application bookmarks.
UNKNOWN: Initiate a 'find' request in the current document.
UNKNOWN: Find the next instance of a stored 'find'.
UNKNOWN: Find a previous instance of a stored 'find'.
UNKNOWN: Jump to the first page.
UNKNOWN: Fit the document view to the height of the current window.
UNKNOWN: Fit the document view to the size of the current window.
UNKNOWN: Fit the document view to the width of the current window.
UNKNOWN: Move forward (web style menu).
UNKNOWN: Switch to/from full screen mode
UNKNOWN: Go to a specific line (dialog).
UNKNOWN: Go to a specific page (dialog).
UNKNOWN: Go to somewhere in general.
UNKNOWN: Display the help.
UNKNOWN: Display the help contents.
UNKNOWN: Go to the "Home" position or document.
UNKNOWN: Display the configure key bindings dialog.
UNKNOWN: Jump to the last page.
UNKNOWN: Mail this document.
UNKNOWN: This will return the internal name of a given standard action.
UNKNOWN: Scroll down one page.
UNKNOWN: Open an existing file.
UNKNOWN: Create a new document or window.
Parameters: recvr object to receive slot slot The SLOT to invoke when a URL is selected. The slot's signature is slotURLSelected( KURL ). parent parent widget name name of widget
UNKNOWN: Open a recently used document.
UNKNOWN: Paste the contents of clipboard at the current mouse or cursor position.
UNKNOWN: Paste the contents of clipboard at the current mouse or cursor position.
UNKNOWN: Display the preferences/options dialog.
UNKNOWN: Print the current document.
UNKNOWN: Show a print preview of the current document.
UNKNOWN: Scroll up one page.
UNKNOWN: Quit the program.
UNKNOWN: Redisplay or redraw the document.
UNKNOWN: Redo the last operation.
UNKNOWN: Find and replace matches.
UNKNOWN: Open up the Report Bug dialog.
UNKNOWN: Revert the current document to the last saved version (essentially will undo all changes).
UNKNOWN: Save the current document.
UNKNOWN: Save the current document under a different name.
UNKNOWN: Display the save options dialog.
UNKNOWN: Select all elements in the current document.
UNKNOWN: Show/Hide the menubar.
UNKNOWN: Show/Hide the statusbar.
UNKNOWN: Pop up the spell checker.
UNKNOWN: Returns a list of all standard names.
UNKNOWN: Display "Tip of the Day"
UNKNOWN: Undo the last operation.
UNKNOWN: Move up (web style menu).
UNKNOWN: Trigger the What's This cursor.
UNKNOWN: Popup a zoom dialog.
UNKNOWN: Zoom in.
UNKNOWN: Zoom out.