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

kdecore

  • kdecore
kaccelbase.cpp
1 /*
2  Copyright (C) 1997-2000 Nicolas Hadacek <hadacek@kde.org>
3  Copyright (C) 1998 Mark Donohoe <donohoe@kde.org>
4  Copyright (C) 1998 Matthias Ettrich <ettrich@kde.org>
5  Copyright (c) 2001,2002 Ellis Whitehead <ellis@kde.org>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 #include "kaccelbase.h"
24 
25 #include <tqkeycode.h>
26 #include <tqlabel.h>
27 #include <tqpopupmenu.h>
28 
29 #include <kconfig.h>
30 #include "kckey.h"
31 #include <kdebug.h>
32 #include <kglobal.h>
33 #include <kkeynative.h>
34 #include "kkeyserver.h"
35 #include <klocale.h>
36 #include "kshortcutmenu.h"
37 
38 //---------------------------------------------------------------------
39 // class KAccelBase::ActionInfo
40 //---------------------------------------------------------------------
41 
42 //---------------------------------------------------------------------
43 // class KAccelBase
44 //---------------------------------------------------------------------
45 
46 KAccelBase::KAccelBase( int fInitCode )
47 : m_rgActions( this )
48 {
49  kdDebug(125) << "KAccelBase(): this = " << this << endl;
50  m_bNativeKeys = fInitCode & NATIVE_KEYS;
51  m_bEnabled = true;
52  m_sConfigGroup = "Shortcuts";
53  m_bConfigIsGlobal = false;
54  m_bAutoUpdate = false;
55  mtemp_pActionRemoving = 0;
56 }
57 
58 KAccelBase::~KAccelBase()
59 {
60  kdDebug(125) << "~KAccelBase(): this = " << this << endl;
61 }
62 
63 uint KAccelBase::actionCount() const { return m_rgActions.count(); }
64 KAccelActions& KAccelBase::actions() { return m_rgActions; }
65 bool KAccelBase::isEnabled() const { return m_bEnabled; }
66 // see KGlobalAccel::blockShortcuts() stuff - it's to temporarily block
67 // all global shortcuts, so that the key grabs are released, but from the app's
68 // point of view the KGlobalAccel is still enabled, so KGlobalAccel needs
69 // to disable key grabbing even if enabled
70 bool KAccelBase::isEnabledInternal() const { return isEnabled(); }
71 
72 KAccelAction* KAccelBase::actionPtr( const TQString& sAction )
73  { return m_rgActions.actionPtr( sAction ); }
74 
75 const KAccelAction* KAccelBase::actionPtr( const TQString& sAction ) const
76  { return m_rgActions.actionPtr( sAction ); }
77 
78 KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key )
79 {
80  if( !m_mapKeyToAction.contains( key ) )
81  return 0;
82  // Note: If more than one action is connected to a single key, nil will be returned.
83  return m_mapKeyToAction[key].pAction;
84 }
85 
86 KAccelAction* KAccelBase::actionPtr( const KKey& key )
87 {
88  KKeyServer::Key k2;
89  k2.init( key, !m_bNativeKeys );
90  return actionPtr( k2 );
91 }
92 
93 void KAccelBase::setConfigGroup( const TQString& sConfigGroup )
94  { m_sConfigGroup = sConfigGroup; }
95 
96 void KAccelBase::setConfigGlobal( bool global )
97  { m_bConfigIsGlobal = global; }
98 
99 bool KAccelBase::setActionEnabled( const TQString& sAction, bool bEnable )
100 {
101  KAccelAction* pAction = actionPtr( sAction );
102  if( pAction ) {
103  if( pAction->m_bEnabled != bEnable ) {
104  kdDebug(125) << "KAccelBase::setActionEnabled( " << sAction << ", " << bEnable << " )" << endl;
105  pAction->m_bEnabled = bEnable;
106  if( m_bAutoUpdate ) {
107  // FIXME: the action may already have it's connections inserted!
108  if( bEnable )
109  insertConnection( pAction );
110  else if( pAction->isConnected() )
111  removeConnection( pAction );
112  }
113  }
114  return true;
115  }
116  return false;
117 }
118 
119 bool KAccelBase::setAutoUpdate( bool bAuto )
120 {
121  kdDebug(125) << "KAccelBase::setAutoUpdate( " << bAuto << " ): m_bAutoUpdate on entrance = " << m_bAutoUpdate << endl;
122  bool b = m_bAutoUpdate;
123  if( !m_bAutoUpdate && bAuto )
124  updateConnections();
125  m_bAutoUpdate = bAuto;
126  return b;
127 }
128 
129 KAccelAction* KAccelBase::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
130  const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
131  const TQObject* pObjSlot, const char* psMethodSlot,
132  bool bConfigurable, bool bEnabled )
133 {
134  //kdDebug(125) << "KAccelBase::insert() begin" << endl;
135  KAccelAction* pAction = m_rgActions.insert(
136  sAction, sDesc, sHelp,
137  rgCutDefaults3, rgCutDefaults4,
138  pObjSlot, psMethodSlot,
139  bConfigurable, bEnabled );
140 
141  if( pAction && m_bAutoUpdate )
142  insertConnection( pAction );
143 
144  //kdDebug(125) << "KAccelBase::insert() end" << endl;
145  return pAction;
146 }
147 
148 KAccelAction* KAccelBase::insert( const TQString& sName, const TQString& sDesc )
149  { return m_rgActions.insert( sName, sDesc ); }
150 
151 bool KAccelBase::remove( const TQString& sAction )
152 {
153  return m_rgActions.remove( sAction );
154 }
155 
156 void KAccelBase::slotRemoveAction( KAccelAction* pAction )
157 {
158  removeConnection( pAction );
159 }
160 
161 bool KAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
162 {
163  kdDebug(125) << "KAccelBase::setActionSlot( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )\n";
164  KAccelAction* pAction = m_rgActions.actionPtr( sAction );
165  if( pAction ) {
166  // If there was a previous connection, remove it.
167  if( m_bAutoUpdate && pAction->isConnected() ) {
168  kdDebug(125) << "\tm_pObjSlot = " << pAction->m_pObjSlot << " m_psMethodSlot = " << pAction->m_psMethodSlot << endl;
169  removeConnection( pAction );
170  }
171 
172  pAction->m_pObjSlot = pObjSlot;
173  pAction->m_psMethodSlot = psMethodSlot;
174 
175  // If we're setting a connection,
176  if( m_bAutoUpdate && pObjSlot && psMethodSlot )
177  insertConnection( pAction );
178 
179  return true;
180  } else
181  return false;
182 }
183 
184 /*
185 KAccelBase
186  Run Command=Meta+Enter;Alt+F2
187  KAccelAction = "Run Command"
188  1) KAccelKeySeries = "Meta+Enter"
189  1a) Meta+Enter
190  1b) Meta+Keypad_Enter
191  2) KAccelKeySeries = "Alt+F2"
192  1a) Alt+F2
193 
194  Konqueror=Meta+I,I
195  KAccelAction = "Konqueror"
196  1) KAccelKeySeries = "Meta+I,I"
197  1a) Meta+I
198  2a) I
199 
200  Something=Meta+Asterisk,X
201  KAccelAction = "Something"
202  1) KAccelKeySeries = "Meta+Asterisk,X"
203  1a) Meta+Shift+8
204  1b) Meta+Keypad_8
205  2a) X
206 
207 read in a config entry
208  split by ';'
209  find key sequences to disconnect
210  find new key sequences to connect
211 check for conflicts with implicit keys
212  disconnect conflicting implicit keys
213 connect new key sequences
214 */
215 /*
216 {
217  For {
218  for( KAccelAction::iterator itAction = m_rgActions.begin(); itAction != m_rgActions.end(); ++itAction ) {
219  KAccelAction& action = *itAction;
220  for( KAccelSeries::iterator itSeries = action.m_rgSeries.begin(); itSeries != action.m_rgSeries.end(); ++itSeries ) {
221  KAccelSeries& series = *itSeries;
222  if(
223  }
224  }
225  }
226  Sort by: iVariation, iSequence, iSeries, iAction
227 
228  1) KAccelAction = "Run Command"
229  1) KAccelKeySeries = "Meta+Enter"
230  1a) Meta+Enter
231  1b) Meta+Keypad_Enter
232  2) KAccelKeySeries = "Alt+F2"
233  1a) Alt+F2
234 
235  2) KAccelAction = "Enter Calculation"
236  1) KAccelKeySeries = "Meta+Keypad_Enter"
237  1a) Meta+Keypad_Enter
238 
239  List =
240  Meta+Enter -> 1, 1, 1a
241  Meta+Keypad_Enter -> 2, 1, 1a
242  Alt+F2 -> 1, 2, 1a
243  [Meta+Keypad_Enter] -> [1, 1, 1b]
244 
245 }
246 */
247 
248 #ifdef Q_WS_X11
249 struct KAccelBase::X
250 {
251  uint iAction, iSeq, iVari;
252  KKeyServer::Key key;
253 
254  X() {}
255  X( uint _iAction, uint _iSeq, uint _iVari, const KKeyServer::Key& _key )
256  { iAction = _iAction; iSeq = _iSeq; iVari = _iVari; key = _key; }
257 
258  int compare( const X& x )
259  {
260  int n = key.compare( x.key );
261  if( n != 0 ) return n;
262  if( iVari != x.iVari ) return iVari - x.iVari;
263  if( iSeq != x.iSeq ) return iSeq - x.iSeq;
264  return 0;
265  }
266 
267  bool operator <( const X& x ) { return compare( x ) < 0; }
268  bool operator >( const X& x ) { return compare( x ) > 0; }
269  bool operator <=( const X& x ) { return compare( x ) <= 0; }
270 };
271 #endif //Q_WS_X11
272 
273 /*
274 #1 Ctrl+A
275 #2 Ctrl+A
276 #3 Ctrl+B
277  ------
278  Ctrl+A => Null
279  Ctrl+B => #3
280 
281 #1 Ctrl+A
282 #1 Ctrl+B;Ctrl+A
283  ------
284  Ctrl+A => #1
285  Ctrl+B => #2
286 
287 #1 Ctrl+A
288 #1 Ctrl+B,C
289 #1 Ctrl+B,D
290  ------
291  Ctrl+A => #1
292  Ctrl+B => Null
293 
294 #1 Ctrl+A
295 #2 Ctrl+Plus(Ctrl+KP_Add)
296  ------
297  Ctrl+A => #1
298  Ctrl+Plus => #2
299  Ctrl+KP_Add => #2
300 
301 #1 Ctrl+Plus(Ctrl+KP_Add)
302 #2 Ctrl+KP_Add
303  ------
304  Ctrl+Plus => #1
305  Ctrl+KP_Add => #2
306 
307 #1 Ctrl+Plus(Ctrl+KP_Add)
308 #2 Ctrl+A;Ctrl+KP_Add
309  ------
310  Ctrl+A => #2
311  Ctrl+Plus => #1
312  Ctrl+KP_Add => #2
313 */
314 
315 bool KAccelBase::updateConnections()
316 {
317 #ifdef Q_WS_X11
318  kdDebug(125) << "KAccelBase::updateConnections() this = " << this << endl;
319  // Retrieve the list of keys to be connected, sorted by priority.
320  // (key, variation, seq)
321  TQValueVector<X> rgKeys;
322  createKeyList( rgKeys );
323  m_rgActionsNonUnique.clear();
324 
325  KKeyToActionMap mapKeyToAction;
326  for( uint i = 0; i < rgKeys.size(); i++ ) {
327  X& x = rgKeys[i];
328  KKeyServer::Key& key = x.key;
329  ActionInfo info;
330  bool bNonUnique = false;
331 
332  info.pAction = m_rgActions.actionPtr( x.iAction );
333  info.iSeq = x.iSeq;
334  info.iVariation = x.iVari;
335 
336  // If this is a multi-key shortcut,
337  if( info.pAction->shortcut().seq(info.iSeq).count() > 1 )
338  bNonUnique = true;
339  // If this key is requested by more than one action,
340  else if( i < rgKeys.size() - 1 && key == rgKeys[i+1].key ) {
341  // If multiple actions requesting this key
342  // have the same priority as the first one,
343  if( info.iVariation == rgKeys[i+1].iVari && info.iSeq == rgKeys[i+1].iSeq )
344  bNonUnique = true;
345 
346  kdDebug(125) << "key conflict = " << key.key().toStringInternal()
347  << " action1 = " << info.pAction->name()
348  << " action2 = " << m_rgActions.actionPtr( rgKeys[i+1].iAction )->name()
349  << " non-unique = " << bNonUnique << endl;
350 
351  // Skip over the other records with this same key.
352  while( i < rgKeys.size() - 1 && key == rgKeys[i+1].key )
353  i++;
354  }
355 
356  if( bNonUnique ) {
357  // Remove connection to single action if there is one
358  if( m_mapKeyToAction.contains( key ) ) {
359  KAccelAction* pAction = m_mapKeyToAction[key].pAction;
360  if( pAction ) {
361  m_mapKeyToAction.remove( key );
362  disconnectKey( *pAction, key );
363  pAction->decConnections();
364  m_rgActionsNonUnique.append( pAction );
365  }
366  }
367  // Indicate that no single action is associated with this key.
368  m_rgActionsNonUnique.append( info.pAction );
369  info.pAction = 0;
370  }
371 
372  //kdDebug(125) << "mapKeyToAction[" << key.toStringInternal() << "] = " << info.pAction << endl;
373  mapKeyToAction[key] = info;
374  }
375 
376  // Disconnect keys which no longer have bindings:
377  for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it ) {
378  const KKeyServer::Key& key = it.key();
379  KAccelAction* pAction = (*it).pAction;
380  // If this key is longer used or it points to a different action now,
381  if( !mapKeyToAction.contains( key ) || mapKeyToAction[key].pAction != pAction ) {
382  if( pAction ) {
383  disconnectKey( *pAction, key );
384  pAction->decConnections();
385  } else
386  disconnectKey( key );
387  }
388  }
389 
390  // Connect any unconnected keys:
391  // In other words, connect any keys which are present in the
392  // new action map, but which are _not_ present in the old one.
393  for( KKeyToActionMap::iterator it = mapKeyToAction.begin(); it != mapKeyToAction.end(); ++it ) {
394  const KKeyServer::Key& key = it.key();
395  KAccelAction* pAction = (*it).pAction;
396  if( !m_mapKeyToAction.contains( key ) || m_mapKeyToAction[key].pAction != pAction ) {
397  // TODO: Decide what to do if connect fails.
398  // Probably should remove this item from map.
399  if( pAction ) {
400  if( connectKey( *pAction, key ) )
401  pAction->incConnections();
402  } else
403  connectKey( key );
404  }
405  }
406 
407  // Store new map.
408  m_mapKeyToAction = mapKeyToAction;
409 
410 #ifndef NDEBUG
411  for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it ) {
412  kdDebug(125) << "Key: " << it.key().key().toStringInternal() << " => '"
413  << (((*it).pAction) ? (*it).pAction->name() : TQString::null) << "'" << endl;
414  }
415 #endif
416 #endif //Q_WS_X11
417  return true;
418 }
419 
420 #ifdef Q_WS_X11
421 // Construct a list of keys to be connected, sorted highest priority first.
422 void KAccelBase::createKeyList( TQValueVector<struct X>& rgKeys )
423 {
424  //kdDebug(125) << "KAccelBase::createKeyList()" << endl;
425  if( !isEnabledInternal())
426  return;
427 
428  // create the list
429  // For each action
430  for( uint iAction = 0; iAction < m_rgActions.count(); iAction++ ) {
431  KAccelAction* pAction = m_rgActions.actionPtr( iAction );
432  if( pAction && pAction->m_pObjSlot && pAction->m_psMethodSlot && pAction != mtemp_pActionRemoving ) {
433  // For each key sequence associated with action
434  for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) {
435  const KKeySequence& seq = pAction->shortcut().seq(iSeq);
436  if( seq.count() > 0 ) {
437  KKeyServer::Variations vars;
438  vars.init( seq.key(0), !m_bNativeKeys );
439  for( uint iVari = 0; iVari < vars.count(); iVari++ ) {
440  if( vars.key(iVari).code() && vars.key(iVari).sym() )
441  rgKeys.push_back( X( iAction, iSeq, iVari, vars.key( iVari ) ) );
442  //kdDebug(125) << "\t" << pAction->name() << ": " << vars.key(iVari).toStringInternal() << endl;
443  }
444  }
445  //else
446  // kdDebug(125) << "\t*" << pAction->name() << ":" << endl;
447  }
448  }
449  }
450 
451  // sort by priority: iVariation[of first key], iSequence, iAction
452  qHeapSort( rgKeys.begin(), rgKeys.end() );
453 }
454 #endif //Q_WS_X11
455 
456 bool KAccelBase::insertConnection( KAccelAction* pAction )
457 {
458  if( !pAction->m_pObjSlot || !pAction->m_psMethodSlot )
459  return true;
460 
461  kdDebug(125) << "KAccelBase::insertConnection( " << pAction << "=\"" << pAction->m_sName << "\"; shortcut = " << pAction->shortcut().toStringInternal() << " ) this = " << this << endl;
462 
463  // For each sequence associated with the given action:
464  for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) {
465  // Get the first key of the sequence.
466  KKeyServer::Variations vars;
467  vars.init( pAction->shortcut().seq(iSeq).key(0), !m_bNativeKeys );
468  for( uint iVari = 0; iVari < vars.count(); iVari++ ) {
469  const KKeyServer::Key& key = vars.key( iVari );
470 
471  //if( !key.isNull() ) {
472  if( key.sym() ) {
473  if( !m_mapKeyToAction.contains( key ) ) {
474  // If this is a single-key shortcut,
475  if( pAction->shortcut().seq(iSeq).count() == 1 ) {
476  m_mapKeyToAction[key] = ActionInfo( pAction, iSeq, iVari );
477  if( connectKey( *pAction, key ) )
478  pAction->incConnections();
479  }
480  // Else this is a multi-key shortcut,
481  else {
482  m_mapKeyToAction[key] = ActionInfo( 0, 0, 0 );
483  // Insert into non-unique list if it's not already there.
484  if( m_rgActionsNonUnique.findIndex( pAction ) == -1 )
485  m_rgActionsNonUnique.append( pAction );
486  if( connectKey( key ) )
487  pAction->incConnections();
488  }
489  } else {
490  // There is a key conflict. A full update
491  // check is necessary.
492  // TODO: make this more efficient where possible.
493  if( m_mapKeyToAction[key].pAction != pAction
494  && m_mapKeyToAction[key].pAction != 0 ) {
495  kdDebug(125) << "Key conflict with action = " << m_mapKeyToAction[key].pAction->name()
496  << " key = " << key.key().toStringInternal() << " : call updateConnections()" << endl;
497  return updateConnections();
498  }
499  }
500  }
501  }
502  }
503 
504  //kdDebug(125) << "\tActions = " << m_rgActions.size() << endl;
505  //for( KAccelActions::const_iterator it = m_rgActions.begin(); it != m_rgActions.end(); ++it ) {
506  // kdDebug(125) << "\t" << &(*it) << " '" << (*it).m_sName << "'" << endl;
507  //}
508 
509  //kdDebug(125) << "\tKeys = " << m_mapKeyToAction.size() << endl;
510  //for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it ) {
511  // //kdDebug(125) << "\tKey: " << it.key().toString() << " => '" << (*it)->m_sName << "'" << endl;
512  // kdDebug(125) << "\tKey: " << it.key().toString() << " => '" << *it << "'" << endl;
513  // kdDebug(125) << "\t\t'" << (*it)->m_sName << "'" << endl;
514  //}
515 
516  return true;
517 }
518 
519 bool KAccelBase::removeConnection( KAccelAction* pAction )
520 {
521  kdDebug(125) << "KAccelBase::removeConnection( " << pAction << " = \"" << pAction->m_sName << "\"; shortcut = " << pAction->m_cut.toStringInternal() << " ): this = " << this << endl;
522 
523  //for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it )
524  // kdDebug(125) << "\tKey: " << it.key().toString() << " => '" << (*it)->m_sName << "'" << " " << *it << endl;
525 
526  if( m_rgActionsNonUnique.findIndex( pAction ) >= 0 ) {
527  mtemp_pActionRemoving = pAction;
528  bool b = updateConnections();
529  mtemp_pActionRemoving = 0;
530  return b;
531  }
532 
533  KKeyToActionMap::iterator it = m_mapKeyToAction.begin();
534  while( it != m_mapKeyToAction.end() ) {
535  KKeyServer::Key key = it.key();
536  ActionInfo* pInfo = &(*it);
537 
538  // If the given action is connected to this key,
539  if( pAction == pInfo->pAction ) {
540  disconnectKey( *pAction, key );
541  pAction->decConnections();
542 
543  KKeyToActionMap::iterator itRemove = it++;
544  m_mapKeyToAction.remove( itRemove );
545  } else
546  ++it;
547  }
548  return true;
549 }
550 
551 bool KAccelBase::setShortcut( const TQString& sAction, const KShortcut& cut )
552 {
553  KAccelAction* pAction = actionPtr( sAction );
554  if( pAction ) {
555  if( m_bAutoUpdate )
556  removeConnection( pAction );
557 
558  pAction->setShortcut( cut );
559 
560  if( m_bAutoUpdate && !pAction->shortcut().isNull() )
561  insertConnection( pAction );
562  return true;
563  } else
564  return false;
565 }
566 
567 void KAccelBase::readSettings( KConfigBase* pConfig )
568 {
569  m_rgActions.readActions( m_sConfigGroup, pConfig );
570  if( m_bAutoUpdate )
571  updateConnections();
572 }
573 
574 void KAccelBase::writeSettings( KConfigBase* pConfig ) const
575 {
576  m_rgActions.writeActions( m_sConfigGroup, pConfig, m_bConfigIsGlobal, m_bConfigIsGlobal );
577 }
578 
579 TQPopupMenu* KAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence& seq )
580 {
581  KShortcutMenu* pMenu = new KShortcutMenu( pParent, &actions(), seq );
582 
583  bool bActionInserted = false;
584  bool bInsertSeparator = false;
585  for( uint i = 0; i < actionCount(); i++ ) {
586  const KAccelAction* pAction = actions().actionPtr( i );
587 
588  if( !pAction->isEnabled() )
589  continue;
590 
591  // If an action has already been inserted into the menu
592  // and we have a label instead of an action here,
593  // then indicate that we should insert a separator before the next menu entry.
594  if( bActionInserted && !pAction->isConfigurable() && pAction->name().contains( ':' ) )
595  bInsertSeparator = true;
596 
597  for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) {
598  const KKeySequence& seqAction = pAction->shortcut().seq(iSeq);
599  if( seqAction.startsWith( seq ) ) {
600  if( bInsertSeparator ) {
601  pMenu->insertSeparator();
602  bInsertSeparator = false;
603  }
604 
605  pMenu->insertAction( i, seqAction );
606 
607  //kdDebug(125) << "sLabel = " << sLabel << ", seq = " << (TQString)seqMenu.qt() << ", i = " << i << endl;
608  //kdDebug(125) << "pMenu->accel(" << i << ") = " << (TQString)pMenu->accel(i) << endl;
609  bActionInserted = true;
610  break;
611  }
612  }
613  }
614  pMenu->updateShortcuts();
615  return pMenu;
616 }

kdecore

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

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |