• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
tdestdaccel.cpp
1/* This file is part of the KDE libraries
2 Copyright (C) 1997 Stefan Taferner (taferner@alpin.or.at)
3 Copyright (C) 2000 Nicolas Hadacek (haadcek@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#define __KSTDACCEL_CPP_ 1
21
22#include "tdestdaccel.h"
23
24#include "tdeaccelaction.h"
25#include "tdeaccelbase.h"
26#include <tdeconfig.h>
27#include <kdebug.h>
28#include <tdeglobal.h>
29#include <tdelocale.h>
30#include <tdeshortcut.h>
31#include <tdeshortcutlist.h>
32
33namespace TDEStdAccel
34{
35
36struct TDEStdAccelInfo
37{
38 StdAccel id;
39 const char* psName;
40 const char* psDesc;
41 int cutDefault, cutDefault4, cutDefault3B, cutDefault4B;
42 TDEShortcut cut;
43 bool bInitialized;
44};
45
50static TDEStdAccelInfo g_infoStdAccel[] =
51{
52 {AccelNone, "Group:File", I18N_NOOP("File"), 0, 0, 0, 0, TDEShortcut(), false },
53 { Open, I18N_NOOP("Open"), 0, TQt::CTRL+TQt::Key_O, 0, 0, 0, TDEShortcut(), false },
54 { New, I18N_NOOP("New"), 0, TQt::CTRL+TQt::Key_N, 0, 0, 0, TDEShortcut(), false },
55 { Close, I18N_NOOP("Close"), 0, TQt::CTRL+TQt::Key_W, TQt::CTRL+TQt::Key_Escape, 0, TQt::CTRL+TQt::Key_W, TDEShortcut(), false },
56 { Save, I18N_NOOP("Save"), 0, TQt::CTRL+TQt::Key_S, 0, 0, 0, TDEShortcut(), false },
57 { Print, I18N_NOOP("Print"), 0, TQt::CTRL+TQt::Key_P, 0, 0, 0, TDEShortcut(), false },
58 { Quit, I18N_NOOP("Quit"), 0, TQt::CTRL+TQt::Key_Q, 0, 0, 0, TDEShortcut(), false },
59 {AccelNone, "Group:Edit", I18N_NOOP("Edit"), 0, 0, 0, 0, TDEShortcut(), false },
60 { Undo, I18N_NOOP("Undo"), 0, TQt::CTRL+TQt::Key_Z, 0, 0, 0, TDEShortcut(), false },
61 { Redo, I18N_NOOP("Redo"), 0, TQt::CTRL+TQt::SHIFT+TQt::Key_Z, 0, 0, 0, TDEShortcut(), false },
62 { Cut, I18N_NOOP("Cut"), 0, TQt::CTRL+TQt::Key_X, 0, TQt::SHIFT+TQt::Key_Delete, 0, TDEShortcut(), false },
63 { Copy, I18N_NOOP("Copy"), 0, TQt::CTRL+TQt::Key_C, 0, TQt::CTRL+TQt::Key_Insert, 0, TDEShortcut(), false },
64 { Paste, I18N_NOOP("Paste"), 0, TQt::CTRL+TQt::Key_V, 0, TQt::SHIFT+TQt::Key_Insert, 0, TDEShortcut(), false },
65 { PasteSelection, I18N_NOOP("Paste Selection"), 0, 0, 0, TQt::CTRL+TQt::SHIFT+TQt::Key_Insert, 0, TDEShortcut(), false },
66 { SelectAll, "SelectAll", I18N_NOOP("Select All"), TQt::CTRL+TQt::Key_A, 0, 0, 0, TDEShortcut(), false },
67 { Deselect, I18N_NOOP("Deselect"), 0, TQt::CTRL+TQt::SHIFT+TQt::Key_A, 0, 0, 0, TDEShortcut(), false },
68 { DeleteWordBack, "DeleteWordBack", I18N_NOOP("Delete Word Backwards"), TQt::CTRL+TQt::Key_Backspace, 0, 0, 0, TDEShortcut(), false },
69 { DeleteWordForward, "DeleteWordForward", I18N_NOOP("Delete Word Forward"), TQt::CTRL+TQt::Key_Delete, 0, 0, 0, TDEShortcut(), false },
70 { Find, I18N_NOOP("Find"), 0, TQt::CTRL+TQt::Key_F, 0, 0, 0, TDEShortcut(), false },
71 { FindNext, "FindNext", I18N_NOOP("Find Next"), TQt::Key_F3, 0, 0, 0, TDEShortcut(), false },
72 { FindPrev, "FindPrev", I18N_NOOP("Find Prev"), TQt::SHIFT+TQt::Key_F3, 0, 0, 0, TDEShortcut(), false },
73 { Replace, I18N_NOOP("Replace"), 0, TQt::CTRL+TQt::Key_R, 0, 0, 0, TDEShortcut(), false },
74 {AccelNone, "Group:Navigation", I18N_NOOP("Navigation"), 0, 0, 0, 0, TDEShortcut(), false },
75 { Home, I18N_NOOP2("Opposite to End","Home"), 0, TQt::CTRL+TQt::Key_Home, 0, TQt::Key_HomePage, 0, TDEShortcut(), false },
76 { End, I18N_NOOP("End"), 0, TQt::CTRL+TQt::Key_End, 0, 0, 0, TDEShortcut(), false },
77 { BeginningOfLine, "BeginningOfLine", I18N_NOOP("Beginning of Line"), TQt::Key_Home, 0, 0, 0, TDEShortcut(), false},
78 { EndOfLine, "EndOfLine", I18N_NOOP("End of Line"), TQt::Key_End, 0, 0, 0, TDEShortcut(), false},
79 { Prior, I18N_NOOP("Prior"), 0, TQt::Key_Prior, 0, 0, 0, TDEShortcut(), false },
80 { Next, I18N_NOOP2("Opposite to Prior","Next"), 0, TQt::Key_Next, 0, 0, 0, TDEShortcut(), false },
81 { GotoLine, "GotoLine", I18N_NOOP("Go to Line"), TQt::CTRL+TQt::Key_G, 0, 0, 0, TDEShortcut(), false },
82 { AddBookmark, "AddBookmark", I18N_NOOP("Add Bookmark"), TQt::CTRL+TQt::Key_B, 0, 0, 0, TDEShortcut(), false },
83 { ZoomIn, "ZoomIn", I18N_NOOP("Zoom In"), TQt::CTRL+TQt::Key_Plus, 0, 0, 0, TDEShortcut(), false },
84 { ZoomOut, "ZoomOut", I18N_NOOP("Zoom Out"), TQt::CTRL+TQt::Key_Minus, 0, 0, 0, TDEShortcut(), false },
85 { Up, I18N_NOOP("Up"), 0, TQt::ALT+TQt::Key_Up, 0, 0, 0, TDEShortcut(), false },
86 { Back, I18N_NOOP("Back"), 0, TQt::ALT+TQt::Key_Left, 0, TQt::Key_Back, 0, TDEShortcut(), false },
87 { Forward, I18N_NOOP("Forward"), 0, TQt::ALT+TQt::Key_Right, 0, TQt::Key_Forward, 0, TDEShortcut(), false },
88 { Reload, I18N_NOOP("Reload"), 0, TQt::Key_F5, 0, TQt::Key_Refresh, 0, TDEShortcut(), false },
89 { PopupMenuContext, "PopupMenuContext", I18N_NOOP("Popup Menu Context"), TQt::Key_Menu, 0, 0, 0, TDEShortcut(), false },
90 { ShowMenubar, "ShowMenubar", I18N_NOOP("Show Menu Bar"), TQt::CTRL+TQt::Key_M, 0, 0, 0, TDEShortcut(), false },
91 { BackwardWord, "BackwardWord", I18N_NOOP("Backward Word"), TQt::CTRL+TQt::Key_Left, 0, 0, 0, TDEShortcut(), false },
92 { ForwardWord, "ForwardWord", I18N_NOOP("Forward Word"), TQt::CTRL+TQt::Key_Right, 0, 0, 0, TDEShortcut(), false },
93 { TabNext, I18N_NOOP("Activate Next Tab"), 0, TQt::CTRL+TQt::Key_Period, 0, TQt::CTRL+TQt::Key_BracketRight, 0, TDEShortcut(), false },
94 { TabPrev, I18N_NOOP("Activate Previous Tab"), 0, TQt::CTRL+TQt::Key_Comma, 0, TQt::CTRL+TQt::Key_BracketLeft, 0, TDEShortcut(), false },
95 { FullScreen, "FullScreen", I18N_NOOP("Full Screen Mode"), TQt::CTRL+TQt::SHIFT+TQt::Key_F, 0, 0, 0, TDEShortcut(), false },
96 {AccelNone, "Group:Help", I18N_NOOP("Help"), 0, 0, 0, 0, TDEShortcut(), false },
97 { Help, I18N_NOOP("Help"), 0, TQt::Key_F1, 0, 0, 0, TDEShortcut(), false },
98 { WhatsThis, "WhatsThis", I18N_NOOP("What's This"), TQt::SHIFT+TQt::Key_F1, 0, 0, 0, TDEShortcut(), false },
99 {AccelNone, "Group:TextCompletion", I18N_NOOP("Text Completion"), 0, 0, 0, 0, TDEShortcut(), false },
100 { TextCompletion, "TextCompletion", I18N_NOOP("Text Completion"), TQt::CTRL+TQt::Key_E, 0, 0, 0, TDEShortcut(), false },
101 { PrevCompletion, "PrevCompletion", I18N_NOOP("Previous Completion Match"), TQt::CTRL+TQt::Key_Up, 0, 0, 0, TDEShortcut(), false },
102 { NextCompletion, "NextCompletion", I18N_NOOP("Next Completion Match"), TQt::CTRL+TQt::Key_Down, 0, 0, 0, TDEShortcut(), false },
103 { SubstringCompletion, "SubstringCompletion", I18N_NOOP("Substring Completion"), TQt::CTRL+TQt::Key_T, 0, 0, 0, TDEShortcut(), false },
104 { RotateUp, "RotateUp", I18N_NOOP("Previous Item in List"), TQt::Key_Up, 0, 0, 0, TDEShortcut(), false },
105 { RotateDown, "RotateDown", I18N_NOOP("Next Item in List"), TQt::Key_Down, 0, 0, 0, TDEShortcut(), false },
106 { AccelNone, 0, 0, 0, 0, 0, 0, TDEShortcut(), false }
107};
108
110static TDEStdAccelInfo* infoPtr( StdAccel id )
111{
112 if( id != AccelNone ) {
113 // Linear search. Changing the data structure doesn't seem possible
114 // (since we need groups for the config stuff), but maybe a little
115 // additional hashtable wouldn't hurt.
116 for( uint i = 0; g_infoStdAccel[i].psName != 0; i++ ) {
117 if( g_infoStdAccel[i].id == id )
118 return &g_infoStdAccel[i];
119 }
120 }
121 return 0;
122}
123
127static void initialize( StdAccel id )
128{
129 TDEConfigGroupSaver saver( TDEGlobal::config(), "Shortcuts" );
130 TDEStdAccelInfo* pInfo = infoPtr( id );
131
132 if( !pInfo ) {
133 kdWarning(125) << "TDEStdAccel: id not found!" << endl; // -- ellis
134 return;
135 }
136
137 if( saver.config()->hasKey( pInfo->psName ) ) {
138 TQString s = saver.config()->readEntry( pInfo->psName );
139 if( s != "none" )
140 pInfo->cut.init( s );
141 else
142 pInfo->cut.clear();
143 } else
144 pInfo->cut = shortcutDefault( id );
145 pInfo->bInitialized = true;
146}
147
148TQString name( StdAccel id )
149{
150 TDEStdAccelInfo* pInfo = infoPtr( id );
151 if( !pInfo )
152 return TQString::null;
153 return pInfo->psName;
154}
155
156TQString label( StdAccel id )
157{
158 TDEStdAccelInfo* pInfo = infoPtr( id );
159 if( !pInfo )
160 return TQString::null;
161 return i18n((pInfo->psDesc) ? pInfo->psDesc : pInfo->psName);
162}
163
164// TODO: Add psWhatsThis entry to TDEStdAccelInfo
165TQString whatsThis( StdAccel /*id*/ )
166{
167// TDEStdAccelInfo* pInfo = infoPtr( id );
168// if( pInfo && pInfo->psWhatsThis )
169// return i18n(pInfo->psWhatsThis);
170// else
171 return TQString::null;
172}
173
174const TDEShortcut& shortcut( StdAccel id )
175{
176 TDEStdAccelInfo* pInfo = infoPtr( id );
177 if( !pInfo )
178 return TDEShortcut::null();
179
180 if( !pInfo->bInitialized )
181 initialize( id );
182
183 return pInfo->cut;
184}
185
186StdAccel findStdAccel( const KKeySequence& seq )
187{
188 if( !seq.isNull() ) {
189 for( uint i = 0; g_infoStdAccel[i].psName != 0; i++ ) {
190 StdAccel id = g_infoStdAccel[i].id;
191 if( id != AccelNone ) {
192 if( !g_infoStdAccel[i].bInitialized )
193 initialize( id );
194 if( g_infoStdAccel[i].cut.contains( seq ) )
195 return id;
196 }
197 }
198 }
199 return AccelNone;
200}
201
202TDEShortcut shortcutDefault( StdAccel id )
203{
204 return (TDEAccelAction::useFourModifierKeys())
205 ? shortcutDefault4(id) : shortcutDefault3(id);
206}
207
208TDEShortcut shortcutDefault3( StdAccel id )
209{
210 TDEShortcut cut;
211
212 TDEStdAccelInfo* pInfo = infoPtr( id );
213 if( pInfo ) {
214 if( pInfo->cutDefault )
215 cut.init( pInfo->cutDefault );
216 // FIXME: if there is no cutDefault, then this we be made the primary
217 // instead of alternate shortcut.
218 if( pInfo->cutDefault3B )
219 cut.append( KKey(pInfo->cutDefault3B) );
220 }
221
222 return cut;
223}
224
225TDEShortcut shortcutDefault4( StdAccel id )
226{
227 TDEShortcut cut;
228
229 TDEStdAccelInfo* pInfo = infoPtr( id );
230 if( pInfo ) {
231 TDEStdAccelInfo& info = *pInfo;
232 KKeySequence key2;
233
234 cut.init( (info.cutDefault4) ?
235 TQKeySequence(info.cutDefault) : TQKeySequence(info.cutDefault4) );
236
237 if( info.cutDefault4B )
238 key2.init( TQKeySequence(info.cutDefault4B) );
239 else if( info.cutDefault3B )
240 key2.init( TQKeySequence(info.cutDefault3B) );
241
242 if( key2.count() )
243 cut.append( key2 );
244 }
245
246 return cut;
247}
248
249#if 0 // unused
250void createAccelActions( TDEAccelActions& actions )
251{
252 actions.clear();
253
254 for( uint i = 0; g_infoStdAccel[i].psName != 0; i++ ) {
255 StdAccel id = g_infoStdAccel[i].id;
256 TDEStdAccelInfo* pInfo = &g_infoStdAccel[i];
257
258 if( id != AccelNone ) {
259 actions.insert( pInfo->psName,
260 i18n((pInfo->psDesc) ? pInfo->psDesc : pInfo->psName),
261 TQString::null, // pInfo->psWhatsThis,
262 shortcutDefault3(id),
263 shortcutDefault4(id) );
264 } else
265 actions.insert( pInfo->psName, i18n(pInfo->psDesc) );
266 }
267}
268#endif
269
270const TDEShortcut& open() { return shortcut( Open ); }
271const TDEShortcut& openNew() { return shortcut( New ); }
272const TDEShortcut& close() { return shortcut( Close ); }
273const TDEShortcut& save() { return shortcut( Save ); }
274const TDEShortcut& print() { return shortcut( Print ); }
275const TDEShortcut& quit() { return shortcut( Quit ); }
276const TDEShortcut& cut() { return shortcut( Cut ); }
277const TDEShortcut& copy() { return shortcut( Copy ); }
278const TDEShortcut& paste() { return shortcut( Paste ); }
279const TDEShortcut& pasteSelection() { return shortcut( PasteSelection ); }
280const TDEShortcut& deleteWordBack() { return shortcut( DeleteWordBack ); }
281const TDEShortcut& deleteWordForward() { return shortcut( DeleteWordForward ); }
282const TDEShortcut& undo() { return shortcut( Undo ); }
283const TDEShortcut& redo() { return shortcut( Redo ); }
284const TDEShortcut& find() { return shortcut( Find ); }
285const TDEShortcut& findNext() { return shortcut( FindNext ); }
286const TDEShortcut& findPrev() { return shortcut( FindPrev ); }
287const TDEShortcut& replace() { return shortcut( Replace ); }
288const TDEShortcut& home() { return shortcut( Home ); }
289const TDEShortcut& end() { return shortcut( End ); }
290const TDEShortcut& beginningOfLine() { return shortcut( BeginningOfLine ); }
291const TDEShortcut& endOfLine() { return shortcut( EndOfLine ); }
292const TDEShortcut& prior() { return shortcut( Prior ); }
293const TDEShortcut& next() { return shortcut( Next ); }
294const TDEShortcut& backwardWord() { return shortcut( BackwardWord ); }
295const TDEShortcut& forwardWord() { return shortcut( ForwardWord ); }
296const TDEShortcut& gotoLine() { return shortcut( GotoLine ); }
297const TDEShortcut& addBookmark() { return shortcut( AddBookmark ); }
298const TDEShortcut& tabNext() { return shortcut( TabNext ); }
299const TDEShortcut& tabPrev() { return shortcut( TabPrev ); }
300const TDEShortcut& fullScreen() { return shortcut( FullScreen ); }
301const TDEShortcut& zoomIn() { return shortcut( ZoomIn ); }
302const TDEShortcut& zoomOut() { return shortcut( ZoomOut ); }
303const TDEShortcut& help() { return shortcut( Help ); }
304const TDEShortcut& completion() { return shortcut( TextCompletion ); }
305const TDEShortcut& prevCompletion() { return shortcut( PrevCompletion ); }
306const TDEShortcut& nextCompletion() { return shortcut( NextCompletion ); }
307const TDEShortcut& rotateUp() { return shortcut( RotateUp ); }
308const TDEShortcut& rotateDown() { return shortcut( RotateDown ); }
309const TDEShortcut& substringCompletion() { return shortcut( SubstringCompletion ); }
310const TDEShortcut& popupMenuContext() { return shortcut( PopupMenuContext ); }
311const TDEShortcut& whatsThis() { return shortcut( WhatsThis ); }
312const TDEShortcut& reload() { return shortcut( Reload ); }
313const TDEShortcut& selectAll() { return shortcut( SelectAll ); }
314const TDEShortcut& up() { return shortcut( Up ); }
315const TDEShortcut& back() { return shortcut( Back ); }
316const TDEShortcut& forward() { return shortcut( Forward ); }
317const TDEShortcut& showMenubar() { return shortcut( ShowMenubar ); }
318
319//---------------------------------------------------------------------
320// ShortcutList
321//---------------------------------------------------------------------
322
323ShortcutList::ShortcutList()
324 { }
325
326ShortcutList::~ShortcutList()
327 { }
328
329uint ShortcutList::count() const
330{
331 static uint g_nAccels = 0;
332 if( g_nAccels == 0 ) {
333 for( ; g_infoStdAccel[g_nAccels].psName != 0; g_nAccels++ )
334 ;
335 }
336 return g_nAccels;
337}
338
339TQString ShortcutList::name( uint i ) const
340 { return g_infoStdAccel[i].psName; }
341
342TQString ShortcutList::label( uint i ) const
343 { return i18n((g_infoStdAccel[i].psDesc) ? g_infoStdAccel[i].psDesc : g_infoStdAccel[i].psName); }
344
345TQString ShortcutList::whatsThis( uint ) const
346 { return TQString::null; }
347
348const TDEShortcut& ShortcutList::shortcut( uint i ) const
349{
350 if( !g_infoStdAccel[i].bInitialized )
351 initialize( g_infoStdAccel[i].id );
352 return g_infoStdAccel[i].cut;
353}
354
355const TDEShortcut& ShortcutList::shortcutDefault( uint i ) const
356{
357 static TDEShortcut cut;
358 cut = TDEStdAccel::shortcutDefault( g_infoStdAccel[i].id );
359 return cut;
360}
361
362bool ShortcutList::isConfigurable( uint i ) const
363 { return (g_infoStdAccel[i].id != AccelNone); }
364
365bool ShortcutList::setShortcut( uint i, const TDEShortcut& cut )
366 { g_infoStdAccel[i].cut = cut; return true; }
367
368TQVariant ShortcutList::getOther( Other, uint ) const
369 { return TQVariant(); }
370
371bool ShortcutList::setOther( Other, uint, TQVariant )
372 { return false; }
373
374bool ShortcutList::save() const
375{
376 return writeSettings( TQString::null, 0, false, true );
377}
378
379TDECORE_EXPORT TQString action(StdAccel id)
380 { return name(id); }
381TDECORE_EXPORT TQString description(StdAccel id)
382 { return label(id); }
383TDECORE_EXPORT int key(StdAccel id)
384 { return shortcut(id).keyCodeQt(); }
385TDECORE_EXPORT int defaultKey(StdAccel id)
386 { return shortcutDefault(id).keyCodeQt(); }
387
388TDECORE_EXPORT bool isEqual(const TQKeyEvent* ev, int keyQt)
389{
390 KKey key1( ev ), key2( keyQt );
391 return key1 == key2;
392}
393
394}
395
396#undef __KSTDACCEL_CPP_
KKeySequence
A KKeySequence object holds a sequence of up to 4 keys.
Definition: tdeshortcut.h:289
KKeySequence::isNull
bool isNull() const
Returns true if the key sequence is null (after clear() or empty constructor).
Definition: tdeshortcut.cpp:316
KKeySequence::count
uint count() const
Returns the number of key strokes of this sequence.
Definition: tdeshortcut.cpp:289
KKeySequence::init
bool init(const TQKeySequence &keySeq)
Copies the given qt key sequence over this key sequence.
Definition: tdeshortcut.cpp:227
KKey
A KKey object represents a single key with possible modifiers (Shift, Ctrl, Alt, Win).
Definition: tdeshortcut.h:41
TDEConfigBase::readEntry
TQString readEntry(const TQString &pKey, const TQString &aDefault=TQString::null) const
Reads the value of an entry specified by pKey in the current group.
Definition: tdeconfigbase.cpp:221
TDEConfigBase::hasKey
bool hasKey(const TQString &key) const
Checks whether the key has an entry in the currently active group.
Definition: tdeconfigbase.cpp:109
TDEConfigGroupSaver
Helper class to facilitate working with TDEConfig / KSimpleConfig groups.
Definition: tdeconfigbase.h:2083
TDEGlobal::config
static TDEConfig * config()
Returns the general config object.
Definition: tdeglobal.cpp:65
TDEShortcutList::writeSettings
virtual bool writeSettings(const TQString &sConfigGroup=TQString::null, TDEConfigBase *pConfig=0, bool bWriteAll=false, bool bGlobal=false) const
Writes the shortcuts to the given configuration file.
Definition: tdeshortcutlist.cpp:109
TDEShortcut
The TDEShortcut class is used to represent a keyboard shortcut to an action.
Definition: tdeshortcut.h:544
TDEShortcut::keyCodeQt
int keyCodeQt() const
Returns the key code of the first key sequence, or null if there is no first key sequence.
Definition: tdeshortcut.cpp:510
TDEShortcut::clear
void clear()
Clears the shortcut.
Definition: tdeshortcut.cpp:416
TDEShortcut::contains
bool contains(const KKey &key) const
Checks whether this shortcut contains a sequence that starts with the given key.
Definition: tdeshortcut.cpp:532
TDEShortcut::null
static TDEShortcut & null()
Returns a null shortcut.
Definition: tdeshortcut.cpp:667
TDEShortcut::init
bool init(int keyQt)
Initializes the shortcut with the given Qt key code as the only key sequence.
Definition: tdeshortcut.cpp:421
TDEShortcut::append
bool append(const KKeySequence &keySeq)
Appends the given key sequence.
Definition: tdeshortcut.cpp:587
TDEStdAccel::ShortcutList::isConfigurable
virtual bool isConfigurable(uint index) const
Checks whether the shortcut with the given index is configurable.
Definition: tdestdaccel.cpp:362
TDEStdAccel::ShortcutList::whatsThis
virtual TQString whatsThis(uint index) const
Returns the (i18n'd) What's This text of the shortcut with the given index.
Definition: tdestdaccel.cpp:345
TDEStdAccel::ShortcutList::save
virtual bool save() const
Save the shortcut list.
Definition: tdestdaccel.cpp:374
TDEStdAccel::ShortcutList::name
virtual TQString name(uint index) const
Returns the name of the shortcut with the given index.
Definition: tdestdaccel.cpp:339
TDEStdAccel::ShortcutList::shortcut
virtual const TDEShortcut & shortcut(uint index) const
Returns the shortcut with the given index.
Definition: tdestdaccel.cpp:348
TDEStdAccel::ShortcutList::label
virtual TQString label(uint index) const
Returns the (i18n'd) label of the shortcut with the given index.
Definition: tdestdaccel.cpp:342
TDEStdAccel::ShortcutList::shortcutDefault
virtual const TDEShortcut & shortcutDefault(uint index) const
Returns default shortcut with the given index.
Definition: tdestdaccel.cpp:355
TDEStdAccel::ShortcutList::count
virtual uint count() const
Returns the number of entries.
Definition: tdestdaccel.cpp:329
TDEStdAccel::ShortcutList::setShortcut
virtual bool setShortcut(uint index, const TDEShortcut &shortcut)
Sets the shortcut of the given entry.
Definition: tdestdaccel.cpp:365
TDEStdAccel::ShortcutList::ShortcutList
ShortcutList()
Creates a new ShortcutList.
Definition: tdestdaccel.cpp:323
endl
kndbgstream & endl(kndbgstream &s)
Does nothing.
Definition: kdebug.h:583
TDEStdAccel
Convenient methods for access to the common accelerator keys in the key configuration.
Definition: tdeshortcutlist.h:254
TDEStdAccel::copy
const TDEShortcut & copy()
Copy selected area into the clipboard.
Definition: tdestdaccel.cpp:277
TDEStdAccel::initialize
static void initialize(StdAccel id)
Initialize the accelerator id by checking if it is overridden in the configuration file (and if it is...
Definition: tdestdaccel.cpp:127
TDEStdAccel::endOfLine
const TDEShortcut & endOfLine()
Goto end of current line.
Definition: tdestdaccel.cpp:291
TDEStdAccel::StdAccel
StdAccel
Defines the identifier of all standard accelerators.
Definition: tdestdaccel.h:47
TDEStdAccel::FullScreen
@ FullScreen
Definition: tdestdaccel.h:71
TDEStdAccel::BackwardWord
@ BackwardWord
Definition: tdestdaccel.h:74
TDEStdAccel::TabNext
@ TabNext
Definition: tdestdaccel.h:67
TDEStdAccel::EndOfLine
@ EndOfLine
Definition: tdestdaccel.h:77
TDEStdAccel::ForwardWord
@ ForwardWord
Definition: tdestdaccel.h:75
TDEStdAccel::PasteSelection
@ PasteSelection
Definition: tdestdaccel.h:79
TDEStdAccel::TabPrev
@ TabPrev
Definition: tdestdaccel.h:68
TDEStdAccel::BeginningOfLine
@ BeginningOfLine
Definition: tdestdaccel.h:76
TDEStdAccel::openNew
const TDEShortcut & openNew()
Create a new document (or whatever).
Definition: tdestdaccel.cpp:271
TDEStdAccel::next
const TDEShortcut & next()
Scroll down one page.
Definition: tdestdaccel.cpp:293
TDEStdAccel::shortcutDefault3
TDEShortcut shortcutDefault3(StdAccel id)
Returns the hardcoded default 3 modifier shortcut for id.
Definition: tdestdaccel.cpp:208
TDEStdAccel::forward
const TDEShortcut & forward()
Forward.
Definition: tdestdaccel.cpp:316
TDEStdAccel::paste
const TDEShortcut & paste()
Paste contents of clipboard at mouse/cursor position.
Definition: tdestdaccel.cpp:278
TDEStdAccel::key
int key(StdAccel id)
Definition: tdestdaccel.cpp:383
TDEStdAccel::isEqual
bool isEqual(const TQKeyEvent *ev, int keyQt)
Definition: tdestdaccel.cpp:388
TDEStdAccel::shortcutDefault4
TDEShortcut shortcutDefault4(StdAccel id)
Returns the hardcoded default 4 modifier shortcut for id.
Definition: tdestdaccel.cpp:225
TDEStdAccel::infoPtr
static TDEStdAccelInfo * infoPtr(StdAccel id)
Search for the TDEStdAccelInfo object associated with the given id.
Definition: tdestdaccel.cpp:110
TDEStdAccel::prior
const TDEShortcut & prior()
Scroll up one page.
Definition: tdestdaccel.cpp:292
TDEStdAccel::name
TQString name(StdAccel id)
Returns a unique name for the given accel.
Definition: tdestdaccel.cpp:148
TDEStdAccel::findPrev
const TDEShortcut & findPrev()
Find/search previous.
Definition: tdestdaccel.cpp:286
TDEStdAccel::cut
const TDEShortcut & cut()
Cut selected area and store it in the clipboard.
Definition: tdestdaccel.cpp:276
TDEStdAccel::end
const TDEShortcut & end()
Goto end of the document.
Definition: tdestdaccel.cpp:289
TDEStdAccel::redo
const TDEShortcut & redo()
Redo.
Definition: tdestdaccel.cpp:283
TDEStdAccel::forwardWord
const TDEShortcut & forwardWord()
ForwardWord.
Definition: tdestdaccel.cpp:295
TDEStdAccel::description
TQString description(StdAccel id)
Definition: tdestdaccel.cpp:381
TDEStdAccel::defaultKey
int defaultKey(StdAccel id)
Definition: tdestdaccel.cpp:385
TDEStdAccel::shortcutDefault
TDEShortcut shortcutDefault(StdAccel id)
Returns the hardcoded default shortcut for id.
Definition: tdestdaccel.cpp:202
TDEStdAccel::substringCompletion
const TDEShortcut & substringCompletion()
Find a string within another string or list of strings.
Definition: tdestdaccel.cpp:309
TDEStdAccel::addBookmark
const TDEShortcut & addBookmark()
Add current page to bookmarks.
Definition: tdestdaccel.cpp:297
TDEStdAccel::completion
const TDEShortcut & completion()
Complete text in input widgets.
Definition: tdestdaccel.cpp:304
TDEStdAccel::beginningOfLine
const TDEShortcut & beginningOfLine()
Goto beginning of current line.
Definition: tdestdaccel.cpp:290
TDEStdAccel::zoomIn
const TDEShortcut & zoomIn()
Zoom in.
Definition: tdestdaccel.cpp:301
TDEStdAccel::quit
const TDEShortcut & quit()
Quit the program.
Definition: tdestdaccel.cpp:275
TDEStdAccel::rotateUp
const TDEShortcut & rotateUp()
Help users iterate through a list of entries.
Definition: tdestdaccel.cpp:307
TDEStdAccel::deleteWordBack
const TDEShortcut & deleteWordBack()
Delete a word back from mouse/cursor position.
Definition: tdestdaccel.cpp:280
TDEStdAccel::close
const TDEShortcut & close()
Close current document.
Definition: tdestdaccel.cpp:272
TDEStdAccel::save
const TDEShortcut & save()
Save current document.
Definition: tdestdaccel.cpp:273
TDEStdAccel::g_infoStdAccel
static TDEStdAccelInfo g_infoStdAccel[]
Array of predefined TDEStdAccelInfo objects, which cover all the "standard" accelerators.
Definition: tdestdaccel.cpp:50
TDEStdAccel::find
const TDEShortcut & find()
Find, search.
Definition: tdestdaccel.cpp:284
TDEStdAccel::rotateDown
const TDEShortcut & rotateDown()
Help users iterate through a list of entries.
Definition: tdestdaccel.cpp:308
TDEStdAccel::help
const TDEShortcut & help()
Help the user in the current situation.
Definition: tdestdaccel.cpp:303
TDEStdAccel::nextCompletion
const TDEShortcut & nextCompletion()
Iterate through a list when completion returns multiple items.
Definition: tdestdaccel.cpp:306
TDEStdAccel::undo
const TDEShortcut & undo()
Undo last operation.
Definition: tdestdaccel.cpp:282
TDEStdAccel::back
const TDEShortcut & back()
Back.
Definition: tdestdaccel.cpp:315
TDEStdAccel::home
const TDEShortcut & home()
Goto beginning of the document.
Definition: tdestdaccel.cpp:288
TDEStdAccel::print
const TDEShortcut & print()
Print current document.
Definition: tdestdaccel.cpp:274
TDEStdAccel::replace
const TDEShortcut & replace()
Find and replace matches.
Definition: tdestdaccel.cpp:287
TDEStdAccel::action
TQString action(StdAccel id)
Definition: tdestdaccel.cpp:379
TDEStdAccel::gotoLine
const TDEShortcut & gotoLine()
Go to line.
Definition: tdestdaccel.cpp:296
TDEStdAccel::backwardWord
const TDEShortcut & backwardWord()
BackwardWord.
Definition: tdestdaccel.cpp:294
TDEStdAccel::pasteSelection
const TDEShortcut & pasteSelection()
Paste the selection at mouse/cursor position.
Definition: tdestdaccel.cpp:279
TDEStdAccel::deleteWordForward
const TDEShortcut & deleteWordForward()
Delete a word forward from mouse/cursor position.
Definition: tdestdaccel.cpp:281
TDEStdAccel::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: tdestdaccel.cpp:186
TDEStdAccel::reload
const TDEShortcut & reload()
Reload.
Definition: tdestdaccel.cpp:312
TDEStdAccel::whatsThis
TQString whatsThis(StdAccel)
Returns an extended WhatsThis description for the given accelerator.
Definition: tdestdaccel.cpp:165
TDEStdAccel::tabPrev
const TDEShortcut & tabPrev()
Previous Tab.
Definition: tdestdaccel.cpp:299
TDEStdAccel::label
TQString label(StdAccel id)
Returns a localized label for user-visible display.
Definition: tdestdaccel.cpp:156
TDEStdAccel::findNext
const TDEShortcut & findNext()
Find/search next.
Definition: tdestdaccel.cpp:285
TDEStdAccel::popupMenuContext
const TDEShortcut & popupMenuContext()
popup a context menu.
Definition: tdestdaccel.cpp:310
TDEStdAccel::fullScreen
const TDEShortcut & fullScreen()
Full Screen Mode.
Definition: tdestdaccel.cpp:300
TDEStdAccel::zoomOut
const TDEShortcut & zoomOut()
Zoom out.
Definition: tdestdaccel.cpp:302
TDEStdAccel::showMenubar
const TDEShortcut & showMenubar()
Show Menu Bar.
Definition: tdestdaccel.cpp:317
TDEStdAccel::selectAll
const TDEShortcut & selectAll()
Reload.
Definition: tdestdaccel.cpp:313
TDEStdAccel::prevCompletion
const TDEShortcut & prevCompletion()
Iterate through a list when completion returns multiple items.
Definition: tdestdaccel.cpp:305
TDEStdAccel::shortcut
const TDEShortcut & shortcut(StdAccel id)
Returns the keybinding for accel.
Definition: tdestdaccel.cpp:174
TDEStdAccel::up
const TDEShortcut & up()
Up.
Definition: tdestdaccel.cpp:314
TDEStdAccel::tabNext
const TDEShortcut & tabNext()
Next Tab.
Definition: tdestdaccel.cpp:298
TDEStdAccel::open
const TDEShortcut & open()
Open file.
Definition: tdestdaccel.cpp:270
tdelocale.h

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.