• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • shortcuts
kstandardshortcut.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 1997 Stefan Taferner (taferner@kde.org)
3 Copyright (C) 2000 Nicolas Hadacek (hadacek@kde.org)
4 Copyright (C) 2001,2002 Ellis Whitehead (ellis@kde.org)
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20#ifndef KSTANDARDSHORTCUT_H
21#define KSTANDARDSHORTCUT_H
22
23#include <QtCore/QString>
24
25#include "kshortcut.h"
26
27
35namespace KStandardShortcut
36{ // STUFF WILL BREAK IF YOU DON'T READ THIS!!!
37 /*
38 *Always add new std-accels to the end of this enum, never in the middle!
39 *Don't forget to add the corresponding entries in g_infoStandardShortcut[] in kstandardshortcut.cpp, too.
40 *Values of elements here and positions of the corresponding entries in
41 *the big array g_infoStandardShortcut[] ABSOLUTELY MUST BE THE SAME.
42 * !!! !!!! !!!!! !!!!
43 * !!!! !!! !!!! !!!!
44 * Remember to also update kdoctools/genshortcutents.cpp.
45 *
46 * Other Rules:
47 *
48 * - Never change the name of an existing shortcut
49 * - Never translate the name of a shortcut
50 */
51
55 enum StandardShortcut {
56 //C++ requires that the value of an enum symbol be one more than the previous one.
57 //This means that everything will be well-ordered from here on.
58 AccelNone=0,
59 // File menu
60 Open, New, Close, Save,
61 // The Print item
62 Print,
63 Quit,
64 // Edit menu
65 Undo, Redo, Cut, Copy, Paste, PasteSelection,
66 SelectAll, Deselect, DeleteWordBack, DeleteWordForward,
67 Find, FindNext, FindPrev, Replace,
68 // Navigation
69 Home, Begin, End, Prior, Next,
70 Up, Back, Forward, Reload,
71 // Text Navigation
72 BeginningOfLine, EndOfLine, GotoLine,
73 BackwardWord, ForwardWord,
74 // View parameters
75 AddBookmark, ZoomIn, ZoomOut, FullScreen,
76 ShowMenubar,
77 // Tabular navigation
78 TabNext, TabPrev,
79 // Help menu
80 Help, WhatsThis,
81 // Text completion
82 TextCompletion, PrevCompletion, NextCompletion, SubstringCompletion,
83
84 RotateUp, RotateDown,
85
86 OpenRecent,
87 SaveAs,
88 Revert,
89 PrintPreview,
90 Mail,
91 Clear,
92 ActualSize,
93 FitToPage,
94 FitToWidth,
95 FitToHeight,
96 Zoom,
97 Goto,
98 GotoPage,
99 DocumentBack,
100 DocumentForward,
101 EditBookmarks,
102 Spelling,
103 ShowToolbar,
104 ShowStatusbar,
105 SaveOptions,
106 KeyBindings,
107 Preferences,
108 ConfigureToolbars,
109 ConfigureNotifications,
110 TipofDay,
111 ReportBug,
112 SwitchApplicationLanguage,
113 AboutApp,
114 AboutKDE,
115
116 // Insert new items here!
117
118 StandardShortcutCount // number of standard shortcuts
119 };
120
127 KDEUI_EXPORT const KShortcut &shortcut(StandardShortcut id);
128
134 KDEUI_EXPORT QString name(StandardShortcut id);
135
141 KDEUI_EXPORT QString label(StandardShortcut id);
142
148 KDEUI_EXPORT QString whatsThis(StandardShortcut id);
149
158 KDEUI_EXPORT StandardShortcut find(const QKeySequence &keySeq);
159
168 KDEUI_EXPORT StandardShortcut find(const char *keyName);
169
176 KDEUI_EXPORT KShortcut hardcodedDefaultShortcut(StandardShortcut id);
177
181 KDEUI_EXPORT void saveShortcut(StandardShortcut id, const KShortcut &newShortcut);
182
187 KDEUI_EXPORT const KShortcut &open();
188
193 KDEUI_EXPORT const KShortcut &openNew();
194
199 KDEUI_EXPORT const KShortcut &close();
200
205 KDEUI_EXPORT const KShortcut &save();
206
211 KDEUI_EXPORT const KShortcut &print();
212
217 KDEUI_EXPORT const KShortcut &quit();
218
223 KDEUI_EXPORT const KShortcut &undo();
224
229 KDEUI_EXPORT const KShortcut &redo();
230
235 KDEUI_EXPORT const KShortcut &cut();
236
241 KDEUI_EXPORT const KShortcut &copy();
242
247 KDEUI_EXPORT const KShortcut &paste();
248
253 KDEUI_EXPORT const KShortcut &pasteSelection();
254
259 KDEUI_EXPORT const KShortcut &selectAll();
260
265 KDEUI_EXPORT const KShortcut &deleteWordBack();
266
271 KDEUI_EXPORT const KShortcut &deleteWordForward();
272
277 KDEUI_EXPORT const KShortcut &find();
278
283 KDEUI_EXPORT const KShortcut &findNext();
284
289 KDEUI_EXPORT const KShortcut &findPrev();
290
295 KDEUI_EXPORT const KShortcut &replace();
296
301 KDEUI_EXPORT const KShortcut &zoomIn();
302
307 KDEUI_EXPORT const KShortcut &zoomOut();
308
313 KDEUI_EXPORT const KShortcut &insert();
314
319 KDEUI_EXPORT const KShortcut &home();
320
325 KDEUI_EXPORT const KShortcut &begin();
326
331 KDEUI_EXPORT const KShortcut &end();
332
337 KDEUI_EXPORT const KShortcut &beginningOfLine();
338
343 KDEUI_EXPORT const KShortcut &endOfLine();
344
349 KDEUI_EXPORT const KShortcut &prior();
350
355 KDEUI_EXPORT const KShortcut &next();
356
361 KDEUI_EXPORT const KShortcut &gotoLine();
362
367 KDEUI_EXPORT const KShortcut &addBookmark();
368
373 KDEUI_EXPORT const KShortcut &tabNext();
374
379 KDEUI_EXPORT const KShortcut &tabPrev();
380
385 KDEUI_EXPORT const KShortcut &fullScreen();
386
391 KDEUI_EXPORT const KShortcut &help();
392
397 KDEUI_EXPORT const KShortcut &completion();
398
404 KDEUI_EXPORT const KShortcut &prevCompletion();
405
411 KDEUI_EXPORT const KShortcut &nextCompletion();
412
418 KDEUI_EXPORT const KShortcut &substringCompletion();
419
424 KDEUI_EXPORT const KShortcut &rotateUp();
425
430 KDEUI_EXPORT const KShortcut &rotateDown();
431
436 KDEUI_EXPORT const KShortcut &whatsThis();
437
442 KDEUI_EXPORT const KShortcut &reload();
443
448 KDEUI_EXPORT const KShortcut &up();
449
454 KDEUI_EXPORT const KShortcut &back();
455
460 KDEUI_EXPORT const KShortcut &forward();
461
466 KDEUI_EXPORT const KShortcut &backwardWord();
467
472 KDEUI_EXPORT const KShortcut &forwardWord();
473
478 KDEUI_EXPORT const KShortcut &showMenubar();
479
480}
481
482#endif // KSTANDARDSHORTCUT_H
KShortcut
Represents a keyboard shortcut.
Definition kshortcut.h:58
kshortcut.h
Defines platform-independent classes for keyboard shortcut handling.
KStandardShortcut
Convenient methods for access to the common accelerator keys in the key configuration.
Definition kstandardshortcut.cpp:36
KStandardShortcut::label
QString label(StandardShortcut id)
Returns a localized label for user-visible display.
Definition kstandardshortcut.cpp:267
KStandardShortcut::back
const KShortcut & back()
Back.
Definition kstandardshortcut.cpp:373
KStandardShortcut::name
QString name(StandardShortcut id)
Returns a unique name for the given accel.
Definition kstandardshortcut.cpp:262
KStandardShortcut::findPrev
const KShortcut & findPrev()
Find/search previous.
Definition kstandardshortcut.cpp:344
KStandardShortcut::prior
const KShortcut & prior()
Scroll up one page.
Definition kstandardshortcut.cpp:351
KStandardShortcut::addBookmark
const KShortcut & addBookmark()
Add current page to bookmarks.
Definition kstandardshortcut.cpp:356
KStandardShortcut::completion
const KShortcut & completion()
Complete text in input widgets.
Definition kstandardshortcut.cpp:363
KStandardShortcut::find
const KShortcut & find()
Find, search.
Definition kstandardshortcut.cpp:342
KStandardShortcut::undo
const KShortcut & undo()
Undo last operation.
Definition kstandardshortcut.cpp:340
KStandardShortcut::prevCompletion
const KShortcut & prevCompletion()
Iterate through a list when completion returns multiple items.
Definition kstandardshortcut.cpp:364
KStandardShortcut::nextCompletion
const KShortcut & nextCompletion()
Iterate through a list when completion returns multiple items.
Definition kstandardshortcut.cpp:365
KStandardShortcut::forwardWord
const KShortcut & forwardWord()
ForwardWord.
Definition kstandardshortcut.cpp:354
KStandardShortcut::deleteWordBack
const KShortcut & deleteWordBack()
Delete a word back from mouse/cursor position.
Definition kstandardshortcut.cpp:338
KStandardShortcut::zoomIn
const KShortcut & zoomIn()
Zoom in.
Definition kstandardshortcut.cpp:360
KStandardShortcut::insert
const KShortcut & insert()
Toggle insert/overwrite (with visual feedback, e.g.
KStandardShortcut::rotateUp
const KShortcut & rotateUp()
Help users iterate through a list of entries.
Definition kstandardshortcut.cpp:366
KStandardShortcut::home
const KShortcut & home()
Goto home page.
Definition kstandardshortcut.cpp:346
KStandardShortcut::endOfLine
const KShortcut & endOfLine()
Goto end of current line.
Definition kstandardshortcut.cpp:350
KStandardShortcut::tabPrev
const KShortcut & tabPrev()
Previous Tab.
Definition kstandardshortcut.cpp:358
KStandardShortcut::zoomOut
const KShortcut & zoomOut()
Zoom out.
Definition kstandardshortcut.cpp:361
KStandardShortcut::beginningOfLine
const KShortcut & beginningOfLine()
Goto beginning of current line.
Definition kstandardshortcut.cpp:349
KStandardShortcut::print
const KShortcut & print()
Print current document.
Definition kstandardshortcut.cpp:332
KStandardShortcut::saveShortcut
void saveShortcut(StandardShortcut id, const KShortcut &newShortcut)
Saves the new shortcut cut for standard accel id.
Definition kstandardshortcut.cpp:236
KStandardShortcut::rotateDown
const KShortcut & rotateDown()
Help users iterate through a list of entries.
Definition kstandardshortcut.cpp:367
KStandardShortcut::forward
const KShortcut & forward()
Forward.
Definition kstandardshortcut.cpp:374
KStandardShortcut::up
const KShortcut & up()
Up.
Definition kstandardshortcut.cpp:372
KStandardShortcut::showMenubar
const KShortcut & showMenubar()
Show Menu Bar.
Definition kstandardshortcut.cpp:375
KStandardShortcut::shortcut
const KShortcut & shortcut(StandardShortcut id)
Returns the keybinding for accel.
Definition kstandardshortcut.cpp:285
KStandardShortcut::help
const KShortcut & help()
Help the user in the current situation.
Definition kstandardshortcut.cpp:362
KStandardShortcut::open
const KShortcut & open()
Open file.
Definition kstandardshortcut.cpp:328
KStandardShortcut::close
const KShortcut & close()
Close current document.
Definition kstandardshortcut.cpp:330
KStandardShortcut::backwardWord
const KShortcut & backwardWord()
BackwardWord.
Definition kstandardshortcut.cpp:353
KStandardShortcut::begin
const KShortcut & begin()
Goto beginning of the document.
Definition kstandardshortcut.cpp:347
KStandardShortcut::end
const KShortcut & end()
Goto end of the document.
Definition kstandardshortcut.cpp:348
KStandardShortcut::reload
const KShortcut & reload()
Reload.
Definition kstandardshortcut.cpp:370
KStandardShortcut::cut
const KShortcut & cut()
Cut selected area and store it in the clipboard.
Definition kstandardshortcut.cpp:334
KStandardShortcut::paste
const KShortcut & paste()
Paste contents of clipboard at mouse/cursor position.
Definition kstandardshortcut.cpp:336
KStandardShortcut::deleteWordForward
const KShortcut & deleteWordForward()
Delete a word forward from mouse/cursor position.
Definition kstandardshortcut.cpp:339
KStandardShortcut::openNew
const KShortcut & openNew()
Create a new document (or whatever).
Definition kstandardshortcut.cpp:329
KStandardShortcut::copy
const KShortcut & copy()
Copy selected area into the clipboard.
Definition kstandardshortcut.cpp:335
KStandardShortcut::replace
const KShortcut & replace()
Find and replace matches.
Definition kstandardshortcut.cpp:345
KStandardShortcut::save
const KShortcut & save()
Save current document.
Definition kstandardshortcut.cpp:331
KStandardShortcut::findNext
const KShortcut & findNext()
Find/search next.
Definition kstandardshortcut.cpp:343
KStandardShortcut::fullScreen
const KShortcut & fullScreen()
Full Screen Mode.
Definition kstandardshortcut.cpp:359
KStandardShortcut::selectAll
const KShortcut & selectAll()
Select all.
Definition kstandardshortcut.cpp:371
KStandardShortcut::redo
const KShortcut & redo()
Redo.
Definition kstandardshortcut.cpp:341
KStandardShortcut::hardcodedDefaultShortcut
KShortcut hardcodedDefaultShortcut(StandardShortcut id)
Returns the hardcoded default shortcut for id.
Definition kstandardshortcut.cpp:320
KStandardShortcut::next
const KShortcut & next()
Scroll down one page.
Definition kstandardshortcut.cpp:352
KStandardShortcut::tabNext
const KShortcut & tabNext()
Next Tab.
Definition kstandardshortcut.cpp:357
KStandardShortcut::substringCompletion
const KShortcut & substringCompletion()
Find a string within another string or list of strings.
Definition kstandardshortcut.cpp:368
KStandardShortcut::gotoLine
const KShortcut & gotoLine()
Go to line.
Definition kstandardshortcut.cpp:355
KStandardShortcut::pasteSelection
const KShortcut & pasteSelection()
Paste the selection at mouse/cursor position.
Definition kstandardshortcut.cpp:337
KStandardShortcut::whatsThis
const KShortcut & whatsThis()
What's This button.
Definition kstandardshortcut.cpp:369
KStandardShortcut::quit
const KShortcut & quit()
Quit the program.
Definition kstandardshortcut.cpp:333
KStandardShortcut::StandardShortcut
StandardShortcut
Defines the identifier of all standard accelerators.
Definition kstandardshortcut.h:55
KStandardShortcut::SaveOptions
@ SaveOptions
Definition kstandardshortcut.h:105
KStandardShortcut::KeyBindings
@ KeyBindings
Definition kstandardshortcut.h:106
KStandardShortcut::Close
@ Close
Definition kstandardshortcut.h:60
KStandardShortcut::ZoomIn
@ ZoomIn
Definition kstandardshortcut.h:75
KStandardShortcut::TabPrev
@ TabPrev
Definition kstandardshortcut.h:78
KStandardShortcut::Cut
@ Cut
Definition kstandardshortcut.h:65
KStandardShortcut::ConfigureToolbars
@ ConfigureToolbars
Definition kstandardshortcut.h:108
KStandardShortcut::AboutApp
@ AboutApp
Definition kstandardshortcut.h:113
KStandardShortcut::Paste
@ Paste
Definition kstandardshortcut.h:65
KStandardShortcut::Help
@ Help
Definition kstandardshortcut.h:80
KStandardShortcut::Up
@ Up
Definition kstandardshortcut.h:70
KStandardShortcut::Mail
@ Mail
Definition kstandardshortcut.h:90
KStandardShortcut::Quit
@ Quit
Definition kstandardshortcut.h:63
KStandardShortcut::Home
@ Home
Definition kstandardshortcut.h:69
KStandardShortcut::Spelling
@ Spelling
Definition kstandardshortcut.h:102
KStandardShortcut::GotoLine
@ GotoLine
Definition kstandardshortcut.h:72
KStandardShortcut::Zoom
@ Zoom
Definition kstandardshortcut.h:96
KStandardShortcut::DeleteWordBack
@ DeleteWordBack
Definition kstandardshortcut.h:66
KStandardShortcut::FitToWidth
@ FitToWidth
Definition kstandardshortcut.h:94
KStandardShortcut::AccelNone
@ AccelNone
Definition kstandardshortcut.h:58
KStandardShortcut::FitToPage
@ FitToPage
Definition kstandardshortcut.h:93
KStandardShortcut::Begin
@ Begin
Definition kstandardshortcut.h:69
KStandardShortcut::Undo
@ Undo
Definition kstandardshortcut.h:65
KStandardShortcut::ShowMenubar
@ ShowMenubar
Definition kstandardshortcut.h:76
KStandardShortcut::DocumentForward
@ DocumentForward
Definition kstandardshortcut.h:100
KStandardShortcut::Print
@ Print
Definition kstandardshortcut.h:62
KStandardShortcut::Save
@ Save
Definition kstandardshortcut.h:60
KStandardShortcut::EndOfLine
@ EndOfLine
Definition kstandardshortcut.h:72
KStandardShortcut::FitToHeight
@ FitToHeight
Definition kstandardshortcut.h:95
KStandardShortcut::DocumentBack
@ DocumentBack
Definition kstandardshortcut.h:99
KStandardShortcut::SelectAll
@ SelectAll
Definition kstandardshortcut.h:66
KStandardShortcut::AddBookmark
@ AddBookmark
Definition kstandardshortcut.h:75
KStandardShortcut::FullScreen
@ FullScreen
Definition kstandardshortcut.h:75
KStandardShortcut::Revert
@ Revert
Definition kstandardshortcut.h:88
KStandardShortcut::EditBookmarks
@ EditBookmarks
Definition kstandardshortcut.h:101
KStandardShortcut::New
@ New
Definition kstandardshortcut.h:60
KStandardShortcut::PrintPreview
@ PrintPreview
Definition kstandardshortcut.h:89
KStandardShortcut::FindPrev
@ FindPrev
Definition kstandardshortcut.h:67
KStandardShortcut::AboutKDE
@ AboutKDE
Definition kstandardshortcut.h:114
KStandardShortcut::Preferences
@ Preferences
Definition kstandardshortcut.h:107
KStandardShortcut::ShowToolbar
@ ShowToolbar
Definition kstandardshortcut.h:103
KStandardShortcut::FindNext
@ FindNext
Definition kstandardshortcut.h:67
KStandardShortcut::Redo
@ Redo
Definition kstandardshortcut.h:65
KStandardShortcut::RotateDown
@ RotateDown
Definition kstandardshortcut.h:84
KStandardShortcut::RotateUp
@ RotateUp
Definition kstandardshortcut.h:84
KStandardShortcut::Open
@ Open
Definition kstandardshortcut.h:60
KStandardShortcut::WhatsThis
@ WhatsThis
Definition kstandardshortcut.h:80
KStandardShortcut::ReportBug
@ ReportBug
Definition kstandardshortcut.h:111
KStandardShortcut::End
@ End
Definition kstandardshortcut.h:69
KStandardShortcut::Reload
@ Reload
Definition kstandardshortcut.h:70
KStandardShortcut::PasteSelection
@ PasteSelection
Definition kstandardshortcut.h:65
KStandardShortcut::StandardShortcutCount
@ StandardShortcutCount
Definition kstandardshortcut.h:118
KStandardShortcut::NextCompletion
@ NextCompletion
Definition kstandardshortcut.h:82
KStandardShortcut::OpenRecent
@ OpenRecent
Definition kstandardshortcut.h:86
KStandardShortcut::TextCompletion
@ TextCompletion
Definition kstandardshortcut.h:82
KStandardShortcut::Forward
@ Forward
Definition kstandardshortcut.h:70
KStandardShortcut::TipofDay
@ TipofDay
Definition kstandardshortcut.h:110
KStandardShortcut::Next
@ Next
Definition kstandardshortcut.h:69
KStandardShortcut::ShowStatusbar
@ ShowStatusbar
Definition kstandardshortcut.h:104
KStandardShortcut::ActualSize
@ ActualSize
Definition kstandardshortcut.h:92
KStandardShortcut::DeleteWordForward
@ DeleteWordForward
Definition kstandardshortcut.h:66
KStandardShortcut::Back
@ Back
Definition kstandardshortcut.h:70
KStandardShortcut::BackwardWord
@ BackwardWord
Definition kstandardshortcut.h:73
KStandardShortcut::Copy
@ Copy
Definition kstandardshortcut.h:65
KStandardShortcut::SaveAs
@ SaveAs
Definition kstandardshortcut.h:87
KStandardShortcut::ZoomOut
@ ZoomOut
Definition kstandardshortcut.h:75
KStandardShortcut::ForwardWord
@ ForwardWord
Definition kstandardshortcut.h:73
KStandardShortcut::GotoPage
@ GotoPage
Definition kstandardshortcut.h:98
KStandardShortcut::Clear
@ Clear
Definition kstandardshortcut.h:91
KStandardShortcut::Find
@ Find
Definition kstandardshortcut.h:67
KStandardShortcut::SwitchApplicationLanguage
@ SwitchApplicationLanguage
Definition kstandardshortcut.h:112
KStandardShortcut::PrevCompletion
@ PrevCompletion
Definition kstandardshortcut.h:82
KStandardShortcut::BeginningOfLine
@ BeginningOfLine
Definition kstandardshortcut.h:72
KStandardShortcut::ConfigureNotifications
@ ConfigureNotifications
Definition kstandardshortcut.h:109
KStandardShortcut::Goto
@ Goto
Definition kstandardshortcut.h:97
KStandardShortcut::SubstringCompletion
@ SubstringCompletion
Definition kstandardshortcut.h:82
KStandardShortcut::TabNext
@ TabNext
Definition kstandardshortcut.h:78
KStandardShortcut::Replace
@ Replace
Definition kstandardshortcut.h:67
KStandardShortcut::Prior
@ Prior
Definition kstandardshortcut.h:69
KStandardShortcut::Deselect
@ Deselect
Definition kstandardshortcut.h:66
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal