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

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • 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 
35 namespace 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
KStandardShortcut::findNext
const KShortcut & findNext()
Find/search next.
Definition: kstandardshortcut.cpp:343
KStandardShortcut::ActualSize
Definition: kstandardshortcut.h:92
KStandardShortcut::FitToHeight
Definition: kstandardshortcut.h:95
KStandardShortcut::deleteWordForward
const KShortcut & deleteWordForward()
Delete a word forward from mouse/cursor position.
Definition: kstandardshortcut.cpp:339
KStandardShortcut::print
const KShortcut & print()
Print current document.
Definition: kstandardshortcut.cpp:332
KStandardShortcut::Back
Definition: kstandardshortcut.h:70
KStandardShortcut::Find
Definition: kstandardshortcut.h:67
KStandardShortcut::next
const KShortcut & next()
Scroll down one page.
Definition: kstandardshortcut.cpp:352
KStandardShortcut::Close
Definition: kstandardshortcut.h:60
KStandardShortcut::SelectAll
Definition: kstandardshortcut.h:66
KStandardShortcut::ShowToolbar
Definition: kstandardshortcut.h:103
KStandardShortcut::up
const KShortcut & up()
Up.
Definition: kstandardshortcut.cpp:372
KStandardShortcut::StandardShortcutCount
Definition: kstandardshortcut.h:118
KStandardShortcut::forwardWord
const KShortcut & forwardWord()
ForwardWord.
Definition: kstandardshortcut.cpp:354
KStandardShortcut::SubstringCompletion
Definition: kstandardshortcut.h:82
KStandardShortcut::redo
const KShortcut & redo()
Redo.
Definition: kstandardshortcut.cpp:341
KStandardShortcut::find
StandardShortcut find(const QKeySequence &seq)
Return the StandardShortcut id of the standard accel action which uses this key sequence, or AccelNone if none of them do.
Definition: kstandardshortcut.cpp:295
KStandardShortcut::Prior
Definition: kstandardshortcut.h:69
KStandardShortcut::ShowStatusbar
Definition: kstandardshortcut.h:104
KStandardShortcut::Spelling
Definition: kstandardshortcut.h:102
KStandardShortcut::BeginningOfLine
Definition: kstandardshortcut.h:72
KStandardShortcut::open
const KShortcut & open()
Open file.
Definition: kstandardshortcut.cpp:328
KStandardShortcut::shortcut
const KShortcut & shortcut(StandardShortcut id)
Returns the keybinding for accel.
Definition: kstandardshortcut.cpp:285
KStandardShortcut::label
QString label(StandardShortcut id)
Returns a localized label for user-visible display.
Definition: kstandardshortcut.cpp:267
KStandardShortcut::undo
const KShortcut & undo()
Undo last operation.
Definition: kstandardshortcut.cpp:340
KStandardShortcut::Cut
Definition: kstandardshortcut.h:65
KStandardShortcut::substringCompletion
const KShortcut & substringCompletion()
Find a string within another string or list of strings.
Definition: kstandardshortcut.cpp:368
KStandardShortcut::Paste
Definition: kstandardshortcut.h:65
KStandardShortcut::selectAll
const KShortcut & selectAll()
Select all.
Definition: kstandardshortcut.cpp:371
KStandardShortcut::Help
Definition: kstandardshortcut.h:80
KStandardShortcut::SaveAs
Definition: kstandardshortcut.h:87
KStandardShortcut::tabPrev
const KShortcut & tabPrev()
Previous Tab.
Definition: kstandardshortcut.cpp:358
KStandardShortcut::back
const KShortcut & back()
Back.
Definition: kstandardshortcut.cpp:373
KStandardShortcut::Replace
Definition: kstandardshortcut.h:67
KStandardShortcut::zoomIn
const KShortcut & zoomIn()
Zoom in.
Definition: kstandardshortcut.cpp:360
kshortcut.h
Defines platform-independent classes for keyboard shortcut handling.
KStandardShortcut::findPrev
const KShortcut & findPrev()
Find/search previous.
Definition: kstandardshortcut.cpp:344
KStandardShortcut::name
QString name(StandardShortcut id)
Returns a unique name for the given accel.
Definition: kstandardshortcut.cpp:262
KStandardShortcut::BackwardWord
Definition: kstandardshortcut.h:73
KStandardShortcut::PasteSelection
Definition: kstandardshortcut.h:65
KStandardShortcut::Next
Definition: kstandardshortcut.h:69
KStandardShortcut::addBookmark
const KShortcut & addBookmark()
Add current page to bookmarks.
Definition: kstandardshortcut.cpp:356
KStandardShortcut::FullScreen
Definition: kstandardshortcut.h:75
KStandardShortcut::SwitchApplicationLanguage
Definition: kstandardshortcut.h:112
KShortcut
Represents a keyboard shortcut.
Definition: kshortcut.h:57
KStandardShortcut::gotoLine
const KShortcut & gotoLine()
Go to line.
Definition: kstandardshortcut.cpp:355
KStandardShortcut::DeleteWordBack
Definition: kstandardshortcut.h:66
KStandardShortcut::ConfigureNotifications
Definition: kstandardshortcut.h:109
KStandardShortcut::TabPrev
Definition: kstandardshortcut.h:78
KStandardShortcut::End
Definition: kstandardshortcut.h:69
KStandardShortcut::zoomOut
const KShortcut & zoomOut()
Zoom out.
Definition: kstandardshortcut.cpp:361
KStandardShortcut::GotoLine
Definition: kstandardshortcut.h:72
KStandardShortcut::Open
Definition: kstandardshortcut.h:60
KStandardShortcut::PrevCompletion
Definition: kstandardshortcut.h:82
KStandardShortcut::tabNext
const KShortcut & tabNext()
Next Tab.
Definition: kstandardshortcut.cpp:357
KStandardShortcut::insert
const KShortcut & insert()
Toggle insert/overwrite (with visual feedback, e.g.
Definition: kstandardguiitem.cpp:264
KStandardShortcut::AddBookmark
Definition: kstandardshortcut.h:75
KStandardShortcut::StandardShortcut
StandardShortcut
Defines the identifier of all standard accelerators.
Definition: kstandardshortcut.h:55
KStandardShortcut::endOfLine
const KShortcut & endOfLine()
Goto end of current line.
Definition: kstandardshortcut.cpp:350
KStandardShortcut::save
const KShortcut & save()
Save current document.
Definition: kstandardshortcut.cpp:331
KStandardShortcut::OpenRecent
Definition: kstandardshortcut.h:86
KStandardShortcut::Copy
Definition: kstandardshortcut.h:65
KStandardShortcut::ReportBug
Definition: kstandardshortcut.h:111
KStandardShortcut::ZoomOut
Definition: kstandardshortcut.h:75
KStandardShortcut::AboutKDE
Definition: kstandardshortcut.h:114
KStandardShortcut::backwardWord
const KShortcut & backwardWord()
BackwardWord.
Definition: kstandardshortcut.cpp:353
KStandardShortcut::beginningOfLine
const KShortcut & beginningOfLine()
Goto beginning of current line.
Definition: kstandardshortcut.cpp:349
KStandardShortcut::EditBookmarks
Definition: kstandardshortcut.h:101
KStandardShortcut::Begin
Definition: kstandardshortcut.h:69
KStandardShortcut::replace
const KShortcut & replace()
Find and replace matches.
Definition: kstandardshortcut.cpp:345
QString
KStandardShortcut::hardcodedDefaultShortcut
KShortcut hardcodedDefaultShortcut(StandardShortcut id)
Returns the hardcoded default shortcut for id.
Definition: kstandardshortcut.cpp:320
KStandardShortcut::Goto
Definition: kstandardshortcut.h:97
KStandardShortcut::Redo
Definition: kstandardshortcut.h:65
KStandardShortcut::help
const KShortcut & help()
Help the user in the current situation.
Definition: kstandardshortcut.cpp:362
KStandardShortcut::reload
const KShortcut & reload()
Reload.
Definition: kstandardshortcut.cpp:370
KStandardShortcut::ForwardWord
Definition: kstandardshortcut.h:73
KStandardShortcut::copy
const KShortcut & copy()
Copy selected area into the clipboard.
Definition: kstandardshortcut.cpp:335
KStandardShortcut::FitToWidth
Definition: kstandardshortcut.h:94
KStandardShortcut::Preferences
Definition: kstandardshortcut.h:107
KStandardShortcut::saveShortcut
void saveShortcut(StandardShortcut id, const KShortcut &newShortcut)
Saves the new shortcut cut for standard accel id.
Definition: kstandardshortcut.cpp:236
KStandardShortcut::Clear
Definition: kstandardshortcut.h:91
KStandardShortcut::forward
const KShortcut & forward()
Forward.
Definition: kstandardshortcut.cpp:374
KStandardShortcut::Home
Definition: kstandardshortcut.h:69
KStandardShortcut::Mail
Definition: kstandardshortcut.h:90
KStandardShortcut::cut
const KShortcut & cut()
Cut selected area and store it in the clipboard.
Definition: kstandardshortcut.cpp:334
KStandardShortcut::Forward
Definition: kstandardshortcut.h:70
KStandardShortcut::FindNext
Definition: kstandardshortcut.h:67
KStandardShortcut::TextCompletion
Definition: kstandardshortcut.h:82
KStandardShortcut::ZoomIn
Definition: kstandardshortcut.h:75
KStandardShortcut::close
const KShortcut & close()
Close current document.
Definition: kstandardshortcut.cpp:330
KStandardShortcut::PrintPreview
Definition: kstandardshortcut.h:89
KStandardShortcut::nextCompletion
const KShortcut & nextCompletion()
Iterate through a list when completion returns multiple items.
Definition: kstandardshortcut.cpp:365
KStandardShortcut::TipofDay
Definition: kstandardshortcut.h:110
KStandardShortcut::deleteWordBack
const KShortcut & deleteWordBack()
Delete a word back from mouse/cursor position.
Definition: kstandardshortcut.cpp:338
KStandardShortcut::FindPrev
Definition: kstandardshortcut.h:67
KStandardShortcut::DocumentBack
Definition: kstandardshortcut.h:99
QKeySequence
KStandardShortcut::KeyBindings
Definition: kstandardshortcut.h:106
KStandardShortcut::prior
const KShortcut & prior()
Scroll up one page.
Definition: kstandardshortcut.cpp:351
KStandardShortcut::pasteSelection
const KShortcut & pasteSelection()
Paste the selection at mouse/cursor position.
Definition: kstandardshortcut.cpp:337
KStandardShortcut::NextCompletion
Definition: kstandardshortcut.h:82
KStandardShortcut::AboutApp
Definition: kstandardshortcut.h:113
KStandardShortcut::whatsThis
QString whatsThis(StandardShortcut)
What's This button.
Definition: kstandardshortcut.cpp:276
KStandardShortcut::prevCompletion
const KShortcut & prevCompletion()
Iterate through a list when completion returns multiple items.
Definition: kstandardshortcut.cpp:364
KStandardShortcut::RotateUp
Definition: kstandardshortcut.h:84
KStandardShortcut::DocumentForward
Definition: kstandardshortcut.h:100
KStandardShortcut::Zoom
Definition: kstandardshortcut.h:96
KStandardShortcut::Quit
Definition: kstandardshortcut.h:63
KStandardShortcut::FitToPage
Definition: kstandardshortcut.h:93
KStandardShortcut::Deselect
Definition: kstandardshortcut.h:66
KStandardShortcut::Print
Definition: kstandardshortcut.h:62
KStandardShortcut::Reload
Definition: kstandardshortcut.h:70
KStandardShortcut::quit
const KShortcut & quit()
Quit the program.
Definition: kstandardshortcut.cpp:333
KStandardShortcut::RotateDown
Definition: kstandardshortcut.h:84
KStandardShortcut::rotateDown
const KShortcut & rotateDown()
Help users iterate through a list of entries.
Definition: kstandardshortcut.cpp:367
KStandardShortcut::Save
Definition: kstandardshortcut.h:60
KStandardShortcut::AccelNone
Definition: kstandardshortcut.h:58
KStandardShortcut::fullScreen
const KShortcut & fullScreen()
Full Screen Mode.
Definition: kstandardshortcut.cpp:359
KStandardShortcut::New
Definition: kstandardshortcut.h:60
KStandardShortcut::DeleteWordForward
Definition: kstandardshortcut.h:66
KStandardShortcut::Up
Definition: kstandardshortcut.h:70
KStandardShortcut::TabNext
Definition: kstandardshortcut.h:78
KStandardShortcut::end
const KShortcut & end()
Goto end of the document.
Definition: kstandardshortcut.cpp:348
KStandardShortcut::rotateUp
const KShortcut & rotateUp()
Help users iterate through a list of entries.
Definition: kstandardshortcut.cpp:366
KStandardShortcut::GotoPage
Definition: kstandardshortcut.h:98
KStandardShortcut::showMenubar
const KShortcut & showMenubar()
Show Menu Bar.
Definition: kstandardshortcut.cpp:375
KStandardShortcut::completion
const KShortcut & completion()
Complete text in input widgets.
Definition: kstandardshortcut.cpp:363
KStandardShortcut::WhatsThis
Definition: kstandardshortcut.h:80
KStandardShortcut::ShowMenubar
Definition: kstandardshortcut.h:76
KStandardShortcut::ConfigureToolbars
Definition: kstandardshortcut.h:108
KStandardShortcut::openNew
const KShortcut & openNew()
Create a new document (or whatever).
Definition: kstandardshortcut.cpp:329
KStandardShortcut::Undo
Definition: kstandardshortcut.h:65
KStandardShortcut::paste
const KShortcut & paste()
Paste contents of clipboard at mouse/cursor position.
Definition: kstandardshortcut.cpp:336
KStandardShortcut::begin
const KShortcut & begin()
Goto beginning of the document.
Definition: kstandardshortcut.cpp:347
KStandardShortcut::SaveOptions
Definition: kstandardshortcut.h:105
KStandardShortcut::Revert
Definition: kstandardshortcut.h:88
KStandardShortcut::home
const KShortcut & home()
Goto home page.
Definition: kstandardshortcut.cpp:346
KStandardShortcut::EndOfLine
Definition: kstandardshortcut.h:72
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 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
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs 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

Search



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