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

tdecore

  • tdecore
tdeaccel.h
1/* This file is part of the KDE libraries
2 Copyright (C) 2001,2002 Ellis Whitehead <ellis@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef _TDEACCEL_H
21#define _TDEACCEL_H
22
23#include <tqaccel.h>
24#include <tdeshortcut.h>
25#include <tdestdaccel.h>
26#include "tdelibs_export.h"
27
28class TQPopupMenu; // for obsolete insertItem() methods below
29class TQWidget;
30class TDEAccelAction;
31class TDEAccelActions;
32class TDEConfigBase;
33
34class TDEAccelPrivate;
93class TDECORE_EXPORT TDEAccel : public TQAccel
94{
95 TQ_OBJECT
96 public:
104 TDEAccel( TQWidget* pParent, const char* psName = 0 );
105
113 TDEAccel( TQWidget* watch, TQObject* parent, const char* psName = 0 );
114 virtual ~TDEAccel();
115
121 TDEAccelActions& actions();
122
128 const TDEAccelActions& actions() const;
129
134 bool isEnabled();
135
140 void setEnabled( bool bEnabled );
141
152 bool setAutoUpdate( bool bAuto );
153
175 TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
176 const TDEShortcut& cutDef,
177 const TQObject* pObjSlot, const char* psMethodSlot,
178 bool bConfigurable = true, bool bEnabled = true );
183 TDEAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
184 const TDEShortcut& cutDef3, const TDEShortcut& cutDef4,
185 const TQObject* pObjSlot, const char* psMethodSlot,
186 bool bConfigurable = true, bool bEnabled = true );
204 TDEAccelAction* insert( const char* psAction, const TDEShortcut& cutDef,
205 const TQObject* pObjSlot, const char* psMethodSlot,
206 bool bConfigurable = true, bool bEnabled = true );
213 TDEAccelAction* insert( TDEStdAccel::StdAccel id,
214 const TQObject* pObjSlot, const char* psMethodSlot,
215 bool bConfigurable = true, bool bEnabled = true );
216
223 bool remove( const TQString& sAction );
224
233 bool updateConnections();
234
240 const TDEShortcut& shortcut( const TQString& sAction ) const;
241
248 bool setShortcut( const TQString& sAction, const TDEShortcut &shortcut );
249
258 bool setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
265 bool setEnabled( const TQString& sAction, bool bEnabled );
266
272 const TQString& configGroup() const;
273
279 void setConfigGroup( const TQString &name );
280
292 bool readSettings( TDEConfigBase* pConfig = 0 );
301 bool writeSettings( TDEConfigBase* pConfig = 0 ) const;
302
306 void emitKeycodeChanged();
307
308 signals:
312 void keycodeChanged();
313
314#ifndef KDE_NO_COMPAT
315 public:
316 // Source compatibility to KDE 2.x
320 bool insertItem( const TQString& sLabel, const TQString& sAction,
321 const char* psKey,
322 int nIDMenu = 0, TQPopupMenu* pMenu = 0, bool bConfigurable = true ) TDE_DEPRECATED;
326 bool insertItem( const TQString& sLabel, const TQString& sAction,
327 int key,
328 int nIDMenu = 0, TQPopupMenu* pMenu = 0, bool bConfigurable = true ) TDE_DEPRECATED;
332 bool insertStdItem( TDEStdAccel::StdAccel id, const TQString& descr = TQString::null ) TDE_DEPRECATED;
336 bool connectItem( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot, bool bActivate = true ) TDE_DEPRECATED;
341 TDE_DEPRECATED bool connectItem( TDEStdAccel::StdAccel accel, const TQObject* pObjSlot, const char* psMethodSlot )
342 { return insert( accel, pObjSlot, psMethodSlot ); }
346 bool removeItem( const TQString& sAction ) TDE_DEPRECATED;
350 bool setItemEnabled( const TQString& sAction, bool bEnable ) TDE_DEPRECATED;
354 void changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action ) TDE_DEPRECATED;
358 void changeMenuAccel( TQPopupMenu *menu, int id, TDEStdAccel::StdAccel accel ) TDE_DEPRECATED;
362 static int stringToKey( const TQString& ) TDE_DEPRECATED;
363
371 int currentKey( const TQString& action ) const TDE_DEPRECATED;
372
379 TQString findKey( int key ) const TDE_DEPRECATED;
380#endif // !KDE_NO_COMPAT
381
382 protected:
384 virtual void virtual_hook( int id, void* data );
385 private:
386 class TDEAccelPrivate* d;
387 friend class TDEAccelPrivate;
388};
389
390#endif // _TDEACCEL_H
TDEAccel
Handle shortcuts.
Definition: tdeaccel.h:94
TDEAccel::keycodeChanged
void keycodeChanged()
Emitted when one of the key codes has changed.
TDEConfigBase
KDE Configuration Management abstract base class.
Definition: tdeconfigbase.h:71
TDEShortcut
The TDEShortcut class is used to represent a keyboard shortcut to an action.
Definition: tdeshortcut.h:544
TDEStdAccel
Convenient methods for access to the common accelerator keys in the key configuration.
Definition: tdeshortcutlist.h:254
TDEStdAccel::StdAccel
StdAccel
Defines the identifier of all standard accelerators.
Definition: tdestdaccel.h:47

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.