kstdaccel.h
/* This file is part of the KDE libraries
Copyright (C) 1997 Stefan Taferner (taferner@kde.org)
Copyright (C) 2000 Nicolas Hadacek (hadacek@kde.org)
Copyright (C) 2001,2002 Ellis Whitehead (ellis@kde.org)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KSTDACCEL_H
#define KSTDACCEL_H
#include <qstring.h>
#include <kshortcut.h>
#include "kdelibs_export.h"
class QKeyEvent;
class KAccelActions;
namespace KStdAccel
{
// Always add new std-accels to the end of this enum, never in the middle!
enum StdAccel {
AccelNone,
// File menu
Open, New, Close, Save,
// The Print item
Print,
Quit,
// Edit menu
Undo, Redo, Cut, Copy, Paste, SelectAll, Deselect, DeleteWordBack,
DeleteWordForward, Find, FindNext, FindPrev, Replace,
// Navigation
Home, End, Prior, Next, GotoLine, AddBookmark, ZoomIn, ZoomOut,
Up, Back, Forward, Reload, PopupMenuContext, ShowMenubar,
// Help menu
Help, WhatsThis,
// Text completion
TextCompletion, PrevCompletion, NextCompletion, SubstringCompletion,
RotateUp, RotateDown,
// Tabular navigation
TabNext,
TabPrev,
// Full screen mode
FullScreen,
// Text Navigation
BackwardWord,
ForwardWord,
BeginningOfLine,
EndOfLine,
PasteSelection
#ifndef KDE_NO_COMPAT
, WhatThis = WhatsThis
#endif
};
KDECORE_EXPORT const KShortcut& shortcut(StdAccel id);
KDECORE_EXPORT QString name(StdAccel id);
KDECORE_EXPORT QString label(StdAccel id);
KDECORE_EXPORT QString whatsThis(StdAccel id);
KDECORE_EXPORT StdAccel findStdAccel( const KKeySequence &keySeq );
KDECORE_EXPORT KShortcut shortcutDefault(StdAccel id);
KDECORE_EXPORT KShortcut shortcutDefault3(StdAccel id);
KDECORE_EXPORT KShortcut shortcutDefault4(StdAccel id);
KDECORE_EXPORT const KShortcut& open();
KDECORE_EXPORT const KShortcut& openNew();
KDECORE_EXPORT const KShortcut& close();
KDECORE_EXPORT const KShortcut& save();
KDECORE_EXPORT const KShortcut& print();
KDECORE_EXPORT const KShortcut& quit();
KDECORE_EXPORT const KShortcut& undo();
KDECORE_EXPORT const KShortcut& redo();
KDECORE_EXPORT const KShortcut& cut();
KDECORE_EXPORT const KShortcut& copy();
KDECORE_EXPORT const KShortcut& paste();
KDECORE_EXPORT const KShortcut& pasteSelection();
KDECORE_EXPORT const KShortcut& selectAll();
KDECORE_EXPORT const KShortcut& deleteWordBack();
KDECORE_EXPORT const KShortcut& deleteWordForward();
KDECORE_EXPORT const KShortcut& find();
KDECORE_EXPORT const KShortcut& findNext();
KDECORE_EXPORT const KShortcut& findPrev();
KDECORE_EXPORT const KShortcut& replace();
KDECORE_EXPORT const KShortcut& zoomIn();
KDECORE_EXPORT const KShortcut& zoomOut();
KDECORE_EXPORT const KShortcut& insert();
KDECORE_EXPORT const KShortcut& home();
KDECORE_EXPORT const KShortcut& end();
KDECORE_EXPORT const KShortcut& beginningOfLine();
KDECORE_EXPORT const KShortcut& endOfLine();
KDECORE_EXPORT const KShortcut& prior();
KDECORE_EXPORT const KShortcut& next();
KDECORE_EXPORT const KShortcut& gotoLine();
KDECORE_EXPORT const KShortcut& addBookmark();
KDECORE_EXPORT const KShortcut& tabNext();
KDECORE_EXPORT const KShortcut& tabPrev();
KDECORE_EXPORT const KShortcut& fullScreen();
KDECORE_EXPORT const KShortcut& help();
KDECORE_EXPORT const KShortcut& completion();
KDECORE_EXPORT const KShortcut& prevCompletion();
KDECORE_EXPORT const KShortcut& nextCompletion();
KDECORE_EXPORT const KShortcut& substringCompletion();
KDECORE_EXPORT const KShortcut& rotateUp();
KDECORE_EXPORT const KShortcut& rotateDown();
KDECORE_EXPORT const KShortcut& popupMenuContext();
KDECORE_EXPORT const KShortcut& whatsThis();
KDECORE_EXPORT const KShortcut& reload();
KDECORE_EXPORT const KShortcut& up();
KDECORE_EXPORT const KShortcut& back();
KDECORE_EXPORT const KShortcut& forward();
KDECORE_EXPORT const KShortcut& backwardWord();
KDECORE_EXPORT const KShortcut& forwardWord();
KDECORE_EXPORT const KShortcut& showMenubar();
#if !defined(KDE_NO_COMPAT) && !defined(__KSTDACCEL_CPP_)
KDECORE_EXPORT QString action(StdAccel id) KDE_DEPRECATED;
KDECORE_EXPORT QString description(StdAccel id) KDE_DEPRECATED;
KDECORE_EXPORT int key(StdAccel) KDE_DEPRECATED;
KDECORE_EXPORT int defaultKey(StdAccel accel) KDE_DEPRECATED;
KDECORE_EXPORT bool isEqual(const QKeyEvent* pEvent, int keyQt) KDE_DEPRECATED;
#endif // !KDE_NO_COMPAT
}
#endif
KStdAccel::next
const KShortcut & next()
Scroll down one page.
Definition: kstdaccel.cpp:293
KStdAccel::ForwardWord
Definition: kstdaccel.h:75
KStdAccel::deleteWordBack
const KShortcut & deleteWordBack()
Delete a word back from mouse/cursor position.
Definition: kstdaccel.cpp:280
KStdAccel::shortcut
const KShortcut & shortcut(StdAccel id)
Returns the keybinding for accel.
Definition: kstdaccel.cpp:174
KStdAccel::forward
const KShortcut & forward()
Forward.
Definition: kstdaccel.cpp:316
KStdAccel::shortcutDefault
KShortcut shortcutDefault(StdAccel id)
Returns the hardcoded default shortcut for id.
Definition: kstdaccel.cpp:202
KStdAccel::quit
const KShortcut & quit()
Quit the program.
Definition: kstdaccel.cpp:275
KStdAccel::openNew
const KShortcut & openNew()
Create a new document (or whatever).
Definition: kstdaccel.cpp:271
KStdAccel::paste
const KShortcut & paste()
Paste contents of clipboard at mouse/cursor position.
Definition: kstdaccel.cpp:278
KStdAccel::reload
const KShortcut & reload()
Reload.
Definition: kstdaccel.cpp:312
KStdAccel::completion
const KShortcut & completion()
Complete text in input widgets.
Definition: kstdaccel.cpp:304
KStdAccel::findPrev
const KShortcut & findPrev()
Find/search previous.
Definition: kstdaccel.cpp:286
KStdAccel::forwardWord
const KShortcut & forwardWord()
ForwardWord.
Definition: kstdaccel.cpp:295
KStdAccel::shortcutDefault4
KShortcut shortcutDefault4(StdAccel id)
Returns the hardcoded default 4 modifier shortcut for id.
Definition: kstdaccel.cpp:225
KStdAccel::showMenubar
const KShortcut & showMenubar()
Show Menu Bar.
Definition: kstdaccel.cpp:317
KStdAccel::zoomOut
const KShortcut & zoomOut()
Zoom out.
Definition: kstdaccel.cpp:302
KStdAccel::description
QString description(StdAccel id)
Definition: kstdaccel.cpp:381
KStdAccel::cut
const KShortcut & cut()
Cut selected area and store it in the clipboard.
Definition: kstdaccel.cpp:276
KStdAccel::insert
const KShortcut & insert()
Toggle insert/overwrite (with visual feedback, e.g.
KStdAccel::addBookmark
const KShortcut & addBookmark()
Add current page to bookmarks.
Definition: kstdaccel.cpp:297
KStdAccel::gotoLine
const KShortcut & gotoLine()
Go to line.
Definition: kstdaccel.cpp:296
KStdAccel::popupMenuContext
const KShortcut & popupMenuContext()
popup a context menu.
Definition: kstdaccel.cpp:310
KStdAccel::zoomIn
const KShortcut & zoomIn()
Zoom in.
Definition: kstdaccel.cpp:301
KShortcut
The KShortcut class is used to represent a keyboard shortcut to an action.
Definition: kshortcut.h:543
KStdAccel::pasteSelection
const KShortcut & pasteSelection()
Paste the selection at mouse/cursor position.
Definition: kstdaccel.cpp:279
KStdAccel::action
QString action(StdAccel id)
Definition: kstdaccel.cpp:379
KKeySequence
A KKeySequence object holds a sequence of up to 4 keys.
Definition: kshortcut.h:288
KStdAccel::save
const KShortcut & save()
Save current document.
Definition: kstdaccel.cpp:273
KStdAccel::prior
const KShortcut & prior()
Scroll up one page.
Definition: kstdaccel.cpp:292
KStdAccel::isEqual
bool isEqual(const QKeyEvent *ev, int keyQt)
Definition: kstdaccel.cpp:388
KStdAccel::redo
const KShortcut & redo()
Redo.
Definition: kstdaccel.cpp:283
KStdAccel::back
const KShortcut & back()
Back.
Definition: kstdaccel.cpp:315
KStdAccel::label
QString label(StdAccel id)
Returns a localized label for user-visible display.
Definition: kstdaccel.cpp:156
KStdAccel::findStdAccel
StdAccel findStdAccel(const KKeySequence &seq)
Return the StdAccel id of the standard accel action which uses this key sequence, or AccelNone if non...
Definition: kstdaccel.cpp:186
KStdAccel::replace
const KShortcut & replace()
Find and replace matches.
Definition: kstdaccel.cpp:287
KStdAccel::close
const KShortcut & close()
Close current document.
Definition: kstdaccel.cpp:272
KStdAccel::fullScreen
const KShortcut & fullScreen()
Full Screen Mode.
Definition: kstdaccel.cpp:300
KStdAccel::rotateDown
const KShortcut & rotateDown()
Help users iterate through a list of entries.
Definition: kstdaccel.cpp:308
KStdAccel::key
int key(StdAccel id)
Definition: kstdaccel.cpp:383
KStdAccel::shortcutDefault3
KShortcut shortcutDefault3(StdAccel id)
Returns the hardcoded default 3 modifier shortcut for id.
Definition: kstdaccel.cpp:208
KStdAccel::PasteSelection
Definition: kstdaccel.h:79
KStdAccel::selectAll
const KShortcut & selectAll()
Reload.
Definition: kstdaccel.cpp:313
KStdAccel::whatsThis
QString whatsThis(StdAccel)
Returns an extended WhatsThis description for the given accelerator.
Definition: kstdaccel.cpp:165
KStdAccel::EndOfLine
Definition: kstdaccel.h:77
KStdAccel::backwardWord
const KShortcut & backwardWord()
BackwardWord.
Definition: kstdaccel.cpp:294
KStdAccel::FullScreen
Definition: kstdaccel.h:71
KStdAccel::open
const KShortcut & open()
Open file.
Definition: kstdaccel.cpp:270
KStdAccel::prevCompletion
const KShortcut & prevCompletion()
Iterate through a list when completion returns multiple items.
Definition: kstdaccel.cpp:305
KStdAccel::endOfLine
const KShortcut & endOfLine()
Goto end of current line.
Definition: kstdaccel.cpp:291
KStdAccel::nextCompletion
const KShortcut & nextCompletion()
Iterate through a list when completion returns multiple items.
Definition: kstdaccel.cpp:306
KStdAccel::BackwardWord
Definition: kstdaccel.h:74
KStdAccel::TabPrev
Definition: kstdaccel.h:68
KStdAccel::StdAccel
StdAccel
Defines the identifier of all standard accelerators.
Definition: kstdaccel.h:47
KStdAccel::undo
const KShortcut & undo()
Undo last operation.
Definition: kstdaccel.cpp:282
KStdAccel::rotateUp
const KShortcut & rotateUp()
Help users iterate through a list of entries.
Definition: kstdaccel.cpp:307
KStdAccel::home
const KShortcut & home()
Goto beginning of the document.
Definition: kstdaccel.cpp:288
KStdAccel::help
const KShortcut & help()
Help the user in the current situation.
Definition: kstdaccel.cpp:303
KStdAccel::defaultKey
int defaultKey(StdAccel id)
Definition: kstdaccel.cpp:385
KStdAccel::deleteWordForward
const KShortcut & deleteWordForward()
Delete a word forward from mouse/cursor position.
Definition: kstdaccel.cpp:281
KStdAccel::print
const KShortcut & print()
Print current document.
Definition: kstdaccel.cpp:274
KStdAccel::tabPrev
const KShortcut & tabPrev()
Previous Tab.
Definition: kstdaccel.cpp:299
KStdAccel::TabNext
Definition: kstdaccel.h:67
KStdAccel::tabNext
const KShortcut & tabNext()
Next Tab.
Definition: kstdaccel.cpp:298
KStdAccel::up
const KShortcut & up()
Up.
Definition: kstdaccel.cpp:314
KStdAccel::substringCompletion
const KShortcut & substringCompletion()
Find a string within another string or list of strings.
Definition: kstdaccel.cpp:309
KStdAccel::end
const KShortcut & end()
Goto end of the document.
Definition: kstdaccel.cpp:289
KStdAccel::findNext
const KShortcut & findNext()
Find/search next.
Definition: kstdaccel.cpp:285
KStdAccel::find
const KShortcut & find()
Find, search.
Definition: kstdaccel.cpp:284
KStdAccel::copy
const KShortcut & copy()
Copy selected area into the clipboard.
Definition: kstdaccel.cpp:277
KStdAccel::beginningOfLine
const KShortcut & beginningOfLine()
Goto beginning of current line.
Definition: kstdaccel.cpp:290
KStdAccel::name
QString name(StdAccel id)
Returns a unique name for the given accel.
Definition: kstdaccel.cpp:148
KStdAccel::BeginningOfLine
Definition: kstdaccel.h:76

KDE Home | KDE Accessibility Home | Description of Access Keys