KConfigWidgets
kstandardaction.h
65 * QAction *newAct = KStandardAction::create(KStandardAction::New, this, &ClassFoo::fileNew, this);
175};
190 * @param parent The QObject that should own the created QAction, or @c nullptr if no parent will
193KCONFIGWIDGETS_EXPORT QAction *create(StandardAction id, const QObject *recvr, const char *slot, QObject *parent);
202 * @note if you use @c OpenRecent as @p id, you should manually connect to the urlSelected(const QUrl &)
203 * signal of the returned KRecentFilesAction instead or use KStandardAction::openRecent(Receiver *, Func).
212inline QAction *create(StandardAction id, const QObject *recvr, Func slot, QObject *parent, std::optional<Qt::ConnectionType> connectionType = std::nullopt)
216create(StandardAction id, const Receiver *recvr, Func slot, QObject *parent, std::optional<Qt::ConnectionType> connectionType = std::nullopt)
221 const Qt::ConnectionType defaultConnectionType = (id == ConfigureToolbars) ? Qt::QueuedConnection : Qt::AutoConnection;
222 QObject::connect(action, &QAction::triggered, recvr, slot, connectionType.value_or(defaultConnectionType));
251KCONFIGWIDGETS_EXPORT KStandardShortcut::StandardShortcut shortcutForActionId(StandardAction id);
254// we have to disable the templated function for const char* as Func, since it is ambiguous otherwise
262 inline typename std::enable_if<!std::is_convertible<Func, const char*>::value, QAction>::type *name(const Receiver *recvr, Func slot, QObject *parent) \
297KCONFIGWIDGETS_EXPORT KRecentFilesAction *openRecent(const QObject *recvr, const char *slot, QObject *parent);
300 * The same as openRecent(const QObject *, const char *, QObject *), but using new-style connect syntax
308inline typename std::enable_if<!std::is_convertible<Func, const char *>::value, KRecentFilesAction>::type *
379KCONFIGWIDGETS_EXPORT QAction *printPreview(const QObject *recvr, const char *slot, QObject *parent);
469 * MyListView( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ) : K3ListView( parent, name, f ) {}
532KCONFIGWIDGETS_EXPORT QAction *selectAll(const QObject *recvr, const char *slot, QObject *parent);
543KCONFIGWIDGETS_EXPORT QAction *deselect(const QObject *recvr, const char *slot, QObject *parent);
565KCONFIGWIDGETS_EXPORT QAction *findNext(const QObject *recvr, const char *slot, QObject *parent);
576KCONFIGWIDGETS_EXPORT QAction *findPrev(const QObject *recvr, const char *slot, QObject *parent);
598KCONFIGWIDGETS_EXPORT QAction *actualSize(const QObject *recvr, const char *slot, QObject *parent);
609KCONFIGWIDGETS_EXPORT QAction *fitToPage(const QObject *recvr, const char *slot, QObject *parent);
620KCONFIGWIDGETS_EXPORT QAction *fitToWidth(const QObject *recvr, const char *slot, QObject *parent);
631KCONFIGWIDGETS_EXPORT QAction *fitToHeight(const QObject *recvr, const char *slot, QObject *parent);
675KCONFIGWIDGETS_EXPORT QAction *redisplay(const QObject *recvr, const char *slot, QObject *parent);
763KCONFIGWIDGETS_EXPORT QAction *gotoPage(const QObject *recvr, const char *slot, QObject *parent);
774KCONFIGWIDGETS_EXPORT QAction *gotoLine(const QObject *recvr, const char *slot, QObject *parent);
785KCONFIGWIDGETS_EXPORT QAction *firstPage(const QObject *recvr, const char *slot, QObject *parent);
796KCONFIGWIDGETS_EXPORT QAction *lastPage(const QObject *recvr, const char *slot, QObject *parent);
807KCONFIGWIDGETS_EXPORT QAction *documentBack(const QObject *recvr, const char *slot, QObject *parent);
818KCONFIGWIDGETS_EXPORT QAction *documentForward(const QObject *recvr, const char *slot, QObject *parent);
829KCONFIGWIDGETS_EXPORT QAction *addBookmark(const QObject *recvr, const char *slot, QObject *parent);
840KCONFIGWIDGETS_EXPORT QAction *editBookmarks(const QObject *recvr, const char *slot, QObject *parent);
851KCONFIGWIDGETS_EXPORT QAction *spelling(const QObject *recvr, const char *slot, QObject *parent);
862KCONFIGWIDGETS_EXPORT KToggleAction *showMenubar(const QObject *recvr, const char *slot, QObject *parent);
865 * The same as showMenubar(const QObject *, const char *, QObject *), but using new-style connect syntax
873inline typename std::enable_if<!std::is_convertible<Func, const char *>::value, KToggleAction>::type *
885KCONFIGWIDGETS_EXPORT KToggleAction *showStatusbar(const QObject *recvr, const char *slot, QObject *parent);
895inline typename std::enable_if<!std::is_convertible<Func, const char *>::value, KToggleAction>::type *
907KCONFIGWIDGETS_EXPORT KToggleFullScreenAction *fullScreen(const QObject *recvr, const char *slot, QWidget *window, QObject *parent);
914inline KToggleFullScreenAction *fullScreen(const QObject *recvr, Func slot, QWidget *window, QObject *parent)
917inline typename std::enable_if<!std::is_convertible<Func, const char *>::value, KToggleFullScreenAction>::type *
933 * KStandardAction::keyBindings(guiFactory(), &KXMLGUIFactory::showConfigureShortcutsDialog, actionCollection());
937KCONFIGWIDGETS_EXPORT QAction *keyBindings(const QObject *recvr, const char *slot, QObject *parent);
949KCONFIGWIDGETS_EXPORT QAction *preferences(const QObject *recvr, const char *slot, QObject *parent);
960KCONFIGWIDGETS_EXPORT QAction *configureToolbars(const QObject *recvr, const char *slot, QObject *parent);
971KCONFIGWIDGETS_EXPORT QAction *configureNotifications(const QObject *recvr, const char *slot, QObject *parent);
983KCONFIGWIDGETS_EXPORT QAction *switchApplicationLanguage(const QObject *recvr, const char *slot, QObject *parent);
994KCONFIGWIDGETS_EXPORT QAction *helpContents(const QObject *recvr, const char *slot, QObject *parent);
1005KCONFIGWIDGETS_EXPORT QAction *whatsThis(const QObject *recvr, const char *slot, QObject *parent);
1016KCONFIGWIDGETS_EXPORT QAction *reportBug(const QObject *recvr, const char *slot, QObject *parent);
1027KCONFIGWIDGETS_EXPORT QAction *aboutApp(const QObject *recvr, const char *slot, QObject *parent);
1038KCONFIGWIDGETS_EXPORT QAction *aboutKDE(const QObject *recvr, const char *slot, QObject *parent);
1050KCONFIGWIDGETS_EXPORT QAction *deleteFile(const QObject *recvr, const char *slot, QObject *parent);
1062KCONFIGWIDGETS_EXPORT QAction *renameFile(const QObject *recvr, const char *slot, QObject *parent);
1074KCONFIGWIDGETS_EXPORT QAction *moveToTrash(const QObject *recvr, const char *slot, QObject *parent);
1098KCONFIGWIDGETS_EXPORT KHamburgerMenu *hamburgerMenu(const QObject *recvr, const char *slot, QObject *parent);
void urlSelected(const QUrl &url)
This signal gets emitted when the user selects an URL.
void setWindow(QWidget *window)
Convenience methods to access all standard KDE actions.
Definition kstandardaction.cpp:23
QAction * goTo(const QObject *recvr, const char *slot, QObject *parent)
Jump to some specific location in the document.
Definition kstandardaction.cpp:537
QAction * up(const QObject *recvr, const char *slot, QObject *parent)
Move up (web style menu).
Definition kstandardaction.cpp:507
QAction * revert(const QObject *recvr, const char *slot, QObject *parent)
Revert the current document to the last saved version (essentially will undo all changes).
Definition kstandardaction.cpp:377
QAction * lastPage(const QObject *recvr, const char *slot, QObject *parent)
Jump to the last page.
Definition kstandardaction.cpp:557
QAction * deleteFile(const QObject *recvr, const char *slot, QObject *parent)
Permanently deletes files or folders.
Definition kstandardaction.cpp:706
QAction * fitToWidth(const QObject *recvr, const char *slot, QObject *parent)
Fit the document view to the width of the current window.
Definition kstandardaction.cpp:477
QAction * home(const QObject *recvr, const char *slot, QObject *parent)
Go to the "Home" position or document.
Definition kstandardaction.cpp:522
QAction * prior(const QObject *recvr, const char *slot, QObject *parent)
Scroll up one page.
Definition kstandardaction.cpp:527
KToggleAction * showMenubar(const QObject *recvr, const char *slot, QObject *parent)
Show/Hide the menubar.
Definition kstandardaction.cpp:633
QAction * preferences(const QObject *recvr, const char *slot, QObject *parent)
Display the preferences/options dialog.
Definition kstandardaction.cpp:661
QAction * paste(const QObject *recvr, const char *slot, QObject *parent)
Paste the contents of clipboard at the current mouse or cursor position.
Definition kstandardaction.cpp:427
QAction * replace(const QObject *recvr, const char *slot, QObject *parent)
Find and replace matches.
Definition kstandardaction.cpp:462
QAction * openNew(const QObject *recvr, const char *slot, QObject *parent)
Create a new document or window.
Definition kstandardaction.cpp:352
QAction * reportBug(const QObject *recvr, const char *slot, QObject *parent)
Open up the Report Bug dialog.
Definition kstandardaction.cpp:686
QAction * fitToHeight(const QObject *recvr, const char *slot, QObject *parent)
Fit the document view to the height of the current window.
Definition kstandardaction.cpp:482
QAction * configureNotifications(const QObject *recvr, const char *slot, QObject *parent)
Display the notifications configuration dialog.
Definition kstandardaction.cpp:671
KRecentFilesAction * openRecent(const QObject *recvr, const char *slot, QObject *parent)
Open a recently used document.
Definition kstandardaction.cpp:362
QAction * zoomIn(const QObject *recvr, const char *slot, QObject *parent)
Zoom in the current document view.
Definition kstandardaction.cpp:487
QAction * close(const QObject *recvr, const char *slot, QObject *parent)
Close the current document.
Definition kstandardaction.cpp:392
QAction * forward(const QObject *recvr, const char *slot, QObject *parent)
Move forward (web style menu).
Definition kstandardaction.cpp:517
QAction * deselect(const QObject *recvr, const char *slot, QObject *parent)
Deselect any selected elements in the current document.
Definition kstandardaction.cpp:442
QAction * _k_createInternal(StandardAction id, QObject *parent)
Definition kstandardaction.cpp:137
QAction * documentForward(const QObject *recvr, const char *slot, QObject *parent)
Move forward (document style menu).
Definition kstandardaction.cpp:567
QAction * cut(const QObject *recvr, const char *slot, QObject *parent)
Cut selected area and store it in the clipboard.
Definition kstandardaction.cpp:417
QAction * undo(const QObject *recvr, const char *slot, QObject *parent)
Undo the last operation.
Definition kstandardaction.cpp:407
QAction * aboutKDE(const QObject *recvr, const char *slot, QObject *parent)
Display the About KDE dialog.
Definition kstandardaction.cpp:701
QString name(StandardAction id)
This will return the internal name of a given standard action.
Definition kstandardaction.cpp:346
QAction * findPrev(const QObject *recvr, const char *slot, QObject *parent)
Find a previous instance of a stored 'find'.
Definition kstandardaction.cpp:457
QAction * fitToPage(const QObject *recvr, const char *slot, QObject *parent)
Fit the document view to the size of the current window.
Definition kstandardaction.cpp:472
QAction * renameFile(const QObject *recvr, const char *slot, QObject *parent)
Renames files or folders.
Definition kstandardaction.cpp:711
QAction * redisplay(const QObject *recvr, const char *slot, QObject *parent)
Redisplay or redraw the document.
Definition kstandardaction.cpp:502
KStandardShortcut::StandardShortcut shortcutForActionId(StandardAction id)
Returns the standardshortcut associated with actionId.
Definition kstandardaction.cpp:67
QAction * create(StandardAction id, const QObject *recvr, const char *slot, QObject *parent)
Creates an action corresponding to one of the KStandardAction::StandardAction actions,...
Definition kstandardaction.cpp:329
QAction * keyBindings(const QObject *recvr, const char *slot, QObject *parent)
Display the configure keyboard shortcuts dialog.
Definition kstandardaction.cpp:656
QAction * copy(const QObject *recvr, const char *slot, QObject *parent)
Copy the selected area into the clipboard.
Definition kstandardaction.cpp:422
QAction * gotoPage(const QObject *recvr, const char *slot, QObject *parent)
Go to a specific page.
Definition kstandardaction.cpp:542
QAction * spelling(const QObject *recvr, const char *slot, QObject *parent)
Pop up the spell checker.
Definition kstandardaction.cpp:582
QAction * zoomOut(const QObject *recvr, const char *slot, QObject *parent)
Zoom out the current document view.
Definition kstandardaction.cpp:492
QList< StandardAction > actionIds()
Returns a list of all actionIds.
Definition kstandardaction.cpp:56
QAction * redo(const QObject *recvr, const char *slot, QObject *parent)
Redo the last operation.
Definition kstandardaction.cpp:412
QAction * selectAll(const QObject *recvr, const char *slot, QObject *parent)
Select all elements in the current document.
Definition kstandardaction.cpp:437
KToggleAction * showStatusbar(const QObject *recvr, const char *slot, QObject *parent)
Show/Hide the statusbar.
Definition kstandardaction.cpp:640
QAction * save(const QObject *recvr, const char *slot, QObject *parent)
Save the current document.
Definition kstandardaction.cpp:367
QAction * back(const QObject *recvr, const char *slot, QObject *parent)
Move back (web style menu).
Definition kstandardaction.cpp:512
QAction * documentBack(const QObject *recvr, const char *slot, QObject *parent)
Move back (document style menu).
Definition kstandardaction.cpp:562
QAction * configureToolbars(const QObject *recvr, const char *slot, QObject *parent)
Display the toolbar configuration dialog.
Definition kstandardaction.cpp:666
@ SwitchApplicationLanguage
Display the Switch Application Language dialog.
Definition kstandardaction.h:169
@ FitToWidth
Fit the document view to the width of the current window.
Definition kstandardaction.h:127
@ Paste
Paste the contents of clipboard at the current mouse or cursor.
Definition kstandardaction.h:117
@ FitToHeight
Fit the document view to the height of the current window.
Definition kstandardaction.h:128
@ ConfigureNotifications
Display the notifications configuration dialog.
Definition kstandardaction.h:166
QAction * firstPage(const QObject *recvr, const char *slot, QObject *parent)
Jump to the first page.
Definition kstandardaction.cpp:552
QAction * moveToTrash(const QObject *recvr, const char *slot, QObject *parent)
Moves files or folders to the trash.
Definition kstandardaction.cpp:716
QAction * printPreview(const QObject *recvr, const char *slot, QObject *parent)
Show a print preview of the current document.
Definition kstandardaction.cpp:387
QAction * next(const QObject *recvr, const char *slot, QObject *parent)
Scroll down one page.
Definition kstandardaction.cpp:532
QAction * mail(const QObject *recvr, const char *slot, QObject *parent)
Send the current document by mail.
Definition kstandardaction.cpp:397
QAction * helpContents(const QObject *recvr, const char *slot, QObject *parent)
Display the handbook of the application.
Definition kstandardaction.cpp:676
QAction * switchApplicationLanguage(const QObject *recvr, const char *slot, QObject *parent)
Display the Switch Application Language dialog.
Definition kstandardaction.cpp:691
QAction * findNext(const QObject *recvr, const char *slot, QObject *parent)
Find the next instance of a stored 'find'.
Definition kstandardaction.cpp:452
KHamburgerMenu * hamburgerMenu(const QObject *recvr, const char *slot, QObject *parent)
Opens a menu that substitutes the menubar.
Definition kstandardaction.cpp:726
QAction * open(const QObject *recvr, const char *slot, QObject *parent)
Open an existing file.
Definition kstandardaction.cpp:357
QAction * actualSize(const QObject *recvr, const char *slot, QObject *parent)
View the document at its actual size.
Definition kstandardaction.cpp:467
QAction * gotoLine(const QObject *recvr, const char *slot, QObject *parent)
Go to a specific line.
Definition kstandardaction.cpp:547
QAction * aboutApp(const QObject *recvr, const char *slot, QObject *parent)
Display the application's About box.
Definition kstandardaction.cpp:696
QAction * find(const QObject *recvr, const char *slot, QObject *parent)
Initiate a 'find' request in the current document.
Definition kstandardaction.cpp:447
QAction * clear(const QObject *recvr, const char *slot, QObject *parent)
Clear the content of the focus widget.
Definition kstandardaction.cpp:432
QAction * donate(const QObject *recvr, const char *slot, QObject *parent)
Open donation page on kde.org.
Definition kstandardaction.cpp:721
QAction * zoom(const QObject *recvr, const char *slot, QObject *parent)
Select the current zoom level.
Definition kstandardaction.cpp:497
KToggleFullScreenAction * fullScreen(const QObject *recvr, const char *slot, QWidget *window, QObject *parent)
Switch to/from full screen mode.
Definition kstandardaction.cpp:647
QAction * saveAs(const QObject *recvr, const char *slot, QObject *parent)
Save the current document under a different name.
Definition kstandardaction.cpp:372
QAction * editBookmarks(const QObject *recvr, const char *slot, QObject *parent)
Edit the application bookmarks.
Definition kstandardaction.cpp:577
QAction * quit(const QObject *recvr, const char *slot, QObject *parent)
Quit the program.
Definition kstandardaction.cpp:402
QAction * addBookmark(const QObject *recvr, const char *slot, QObject *parent)
Add the current page to the bookmarks tree.
Definition kstandardaction.cpp:572
QAction * whatsThis(const QObject *recvr, const char *slot, QObject *parent)
Trigger the What's This cursor.
Definition kstandardaction.cpp:681
QAction * print(const QObject *recvr, const char *slot, QObject *parent)
Print the current document.
Definition kstandardaction.cpp:382
StandardShortcut
void triggered(bool checked)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
ConnectionType
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:18 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:18 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.