diff options
author | Leslie Zhai <xiangzhai83@gmail.com> | 2016-08-01 09:27:36 +0800 |
---|---|---|
committer | Leslie Zhai <xiangzhai83@gmail.com> | 2016-08-01 09:27:36 +0800 |
commit | 0fc5d6db714697ff5a3756f315d2177db1b8e354 (patch) | |
tree | 30264cbf8cd95cc7dc0b5c19dbf2fa0d3604b71e /src | |
parent | 364921187d4d3291105fc7b0a4b1cacd41a6aadf (diff) | |
download | kconfig-0fc5d6db714697ff5a3756f315d2177db1b8e354.tar.gz kconfig-0fc5d6db714697ff5a3756f315d2177db1b8e354.tar.bz2 |
Add DeleteFile and RenameFile standard shortcut.
REVIEW: 128517
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kstandardshortcut.cpp | 15 | ||||
-rw-r--r-- | src/gui/kstandardshortcut.h | 24 |
2 files changed, 39 insertions, 0 deletions
diff --git a/src/gui/kstandardshortcut.cpp b/src/gui/kstandardshortcut.cpp index 6be6309d..6d749455 100644 --- a/src/gui/kstandardshortcut.cpp +++ b/src/gui/kstandardshortcut.cpp @@ -164,6 +164,9 @@ static KStandardShortcutInfo g_infoStandardShortcut[] = { { SwitchApplicationLanguage, "SwitchApplicationLanguage", QT_TRANSLATE_NOOP3("KStandardShortcut", "Switch Application Language", "@action"), 0, 0, QList<QKeySequence>(), false }, { AboutApp, "AboutApp", QT_TRANSLATE_NOOP3("KStandardShortcut", "About Application", "@action"), 0, 0, QList<QKeySequence>(), false }, { AboutKDE, "AboutKDE", QT_TRANSLATE_NOOP3("KStandardShortcut", "About KDE", "@action"), 0, 0, QList<QKeySequence>(), false }, + { DeleteFile, "DeleteFile", QT_TRANSLATE_NOOP3("KStandardShortcut", "Delete File", "@action"), SHIFT(Delete), 0, QList<QKeySequence>(), false }, + { RenameFile, "RenameFile", QT_TRANSLATE_NOOP3("KStandardShortcut", "Rename File", "@action"), Qt::Key_F2, 0, QList<QKeySequence>(), false }, + { MoveToTrash, "MoveToTrash", QT_TRANSLATE_NOOP3("KStandardShortcut", "Move to Trash", "@action"), Qt::Key_Delete, 0, QList<QKeySequence>(), false }, //dummy entry to catch simple off-by-one errors. Insert new entries before this line. { AccelNone, 0, {0, 0}, 0, 0, QList<QKeySequence>(), false } @@ -517,5 +520,17 @@ const QList<QKeySequence> &showMenubar() { return shortcut(ShowMenubar); } +const QList<QKeySequence> &deleteFile() +{ + return shortcut(DeleteFile); +} +const QList<QKeySequence> &renameFile() +{ + return shortcut(RenameFile); +} +const QList<QKeySequence> &moveToTrash() +{ + return shortcut(MoveToTrash); +} } diff --git a/src/gui/kstandardshortcut.h b/src/gui/kstandardshortcut.h index 9a2d0d87..a5a7c28f 100644 --- a/src/gui/kstandardshortcut.h +++ b/src/gui/kstandardshortcut.h @@ -114,6 +114,9 @@ enum StandardShortcut { AboutApp, AboutKDE, + DeleteFile, // @since 5.25 + RenameFile, // @since 5.25 + MoveToTrash, // @since 5.25 // Insert new items here! StandardShortcutCount // number of standard shortcuts @@ -472,6 +475,27 @@ KCONFIGGUI_EXPORT const QList<QKeySequence> &forwardWord(); */ KCONFIGGUI_EXPORT const QList<QKeySequence> &showMenubar(); +/** + * Delete File. Default: Shift+Delete + * @return the shortcut of the standard accelerator + * @since 5.25 + */ +KCONFIGGUI_EXPORT const QList<QKeySequence> &deleteFile(); + +/** + * Rename File. Default: F2 + * @return the shortcut of the standard accelerator + * @since 5.25 + */ +KCONFIGGUI_EXPORT const QList<QKeySequence> &renameFile(); + +/** + * Move to Trash. Default: Delete + * @return the shortcut of the standard accelerator + * @since 5.25 + */ +KCONFIGGUI_EXPORT const QList<QKeySequence> &moveToTrash(); + } #endif // KSTANDARDSHORTCUT_H |