From f537c21b68e08f649b1b297bce8f3904603137e0 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:11:21 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- khotkeys/shared/action_data.cpp | 4 ++-- khotkeys/shared/action_data.h | 4 ++-- khotkeys/shared/input.cpp | 14 +++++++------- khotkeys/shared/input.h | 14 +++++++------- khotkeys/shared/khlistview.cpp | 10 +++++----- khotkeys/shared/khlistview.h | 2 +- khotkeys/shared/settings.cpp | 6 +++--- khotkeys/shared/settings.h | 2 +- khotkeys/shared/triggers.cpp | 4 ++-- khotkeys/shared/triggers.h | 10 +++++----- khotkeys/shared/voices.cpp | 2 +- khotkeys/shared/voices.h | 4 ++-- 12 files changed, 38 insertions(+), 38 deletions(-) (limited to 'khotkeys/shared') diff --git a/khotkeys/shared/action_data.cpp b/khotkeys/shared/action_data.cpp index 488a18133..4f481ea59 100644 --- a/khotkeys/shared/action_data.cpp +++ b/khotkeys/shared/action_data.cpp @@ -287,7 +287,7 @@ void Generic_action_data::cfg_write( TDEConfig& cfg_P ) const Command_url_shortcut_action_data::Command_url_shortcut_action_data( Action_data_group* parent_P, const TQString& name_P, const TQString& comment_P, - const KShortcut& shortcut_P, const TQString& command_url_P, bool enabled_P ) + const TDEShortcut& shortcut_P, const TQString& command_url_P, bool enabled_P ) : Simple_action_data< Shortcut_trigger, Command_url_action >( parent_P, name_P, comment_P, enabled_P ) { @@ -307,7 +307,7 @@ void Simple_action_data< Shortcut_trigger, Command_url_action > Menuentry_shortcut_action_data::Menuentry_shortcut_action_data( Action_data_group* parent_P, const TQString& name_P, const TQString& comment_P, - const KShortcut& shortcut_P, const TQString& menuentry_P, bool enabled_P ) + const TDEShortcut& shortcut_P, const TQString& menuentry_P, bool enabled_P ) : Simple_action_data< Shortcut_trigger, Menuentry_action >( parent_P, name_P, comment_P, enabled_P ) { diff --git a/khotkeys/shared/action_data.h b/khotkeys/shared/action_data.h index cf1186263..5d84c6f18 100644 --- a/khotkeys/shared/action_data.h +++ b/khotkeys/shared/action_data.h @@ -165,7 +165,7 @@ class KDE_EXPORT Command_url_shortcut_action_data Command_url_shortcut_action_data( Action_data_group* parent_P, const TQString& name_P, const TQString& comment_P, bool enabled_P = true ); Command_url_shortcut_action_data( Action_data_group* parent_P, const TQString& name_P, - const TQString& comment_P, const KShortcut& shortcut_P, const TQString& command_url_P, + const TQString& comment_P, const TDEShortcut& shortcut_P, const TQString& command_url_P, bool enabled_P = true ); Command_url_shortcut_action_data( TDEConfig& cfg_P, Action_data_group* parent_P ); }; @@ -178,7 +178,7 @@ class KDE_EXPORT Menuentry_shortcut_action_data Menuentry_shortcut_action_data( Action_data_group* parent_P, const TQString& name_P, const TQString& comment_P, bool enabled_P = true ); Menuentry_shortcut_action_data( Action_data_group* parent_P, const TQString& name_P, - const TQString& comment_P, const KShortcut& shortcut_P, const TQString& command_url_P, + const TQString& comment_P, const TDEShortcut& shortcut_P, const TQString& command_url_P, bool enabled_P = true ); Menuentry_shortcut_action_data( TDEConfig& cfg_P, Action_data_group* parent_P ); }; diff --git a/khotkeys/shared/input.cpp b/khotkeys/shared/input.cpp index 25cc1c465..979e31726 100644 --- a/khotkeys/shared/input.cpp +++ b/khotkeys/shared/input.cpp @@ -53,7 +53,7 @@ Kbd::~Kbd() delete kga; } -void Kbd::insert_item( const KShortcut& shortcut_P, Kbd_receiver* receiver_P ) +void Kbd::insert_item( const TDEShortcut& shortcut_P, Kbd_receiver* receiver_P ) { Receiver_data& rcv = receivers[ receiver_P ]; rcv.shortcuts.append( shortcut_P ); @@ -61,7 +61,7 @@ void Kbd::insert_item( const KShortcut& shortcut_P, Kbd_receiver* receiver_P ) grab_shortcut( shortcut_P ); } -void Kbd::remove_item( const KShortcut& shortcut_P, Kbd_receiver* receiver_P ) +void Kbd::remove_item( const TDEShortcut& shortcut_P, Kbd_receiver* receiver_P ) { Receiver_data& rcv = receivers[ receiver_P ]; rcv.shortcuts.remove( shortcut_P ); @@ -77,7 +77,7 @@ void Kbd::activate_receiver( Kbd_receiver* receiver_P ) if( rcv.active ) return; rcv.active = true; - for( TQValueList< KShortcut >::ConstIterator it( rcv.shortcuts.begin()); + for( TQValueList< TDEShortcut >::ConstIterator it( rcv.shortcuts.begin()); it != rcv.shortcuts.end(); ++it ) grab_shortcut( *it ); @@ -89,13 +89,13 @@ void Kbd::deactivate_receiver( Kbd_receiver* receiver_P ) if( !rcv.active ) return; rcv.active = false; - for( TQValueList< KShortcut >::ConstIterator it( rcv.shortcuts.begin()); + for( TQValueList< TDEShortcut >::ConstIterator it( rcv.shortcuts.begin()); it != rcv.shortcuts.end(); ++it ) ungrab_shortcut( *it ); } -void Kbd::grab_shortcut( const KShortcut& shortcut_P ) +void Kbd::grab_shortcut( const TDEShortcut& shortcut_P ) { if( grabs.contains( shortcut_P )) ++grabs[ shortcut_P ]; @@ -115,7 +115,7 @@ void Kbd::grab_shortcut( const KShortcut& shortcut_P ) } } -void Kbd::ungrab_shortcut( const KShortcut& shortcut_P ) +void Kbd::ungrab_shortcut( const TDEShortcut& shortcut_P ) { if( !grabs.contains( shortcut_P )) return; @@ -141,7 +141,7 @@ void Kbd::update_connections() void Kbd::key_slot( TQString key_P ) { kdDebug( 1217 ) << "Key pressed:" << key_P << endl; - KShortcut shortcut( key_P ); + TDEShortcut shortcut( key_P ); if( !grabs.contains( shortcut )) return; for( TQMap< Kbd_receiver*, Receiver_data >::ConstIterator it = receivers.begin(); diff --git a/khotkeys/shared/input.h b/khotkeys/shared/input.h index 08b71b761..ac1f70f65 100644 --- a/khotkeys/shared/input.h +++ b/khotkeys/shared/input.h @@ -29,7 +29,7 @@ namespace KHotKeys class Kbd_receiver { public: - virtual bool handle_key( const KShortcut& shortcut_P ) = 0; + virtual bool handle_key( const TDEShortcut& shortcut_P ) = 0; }; class Kbd @@ -39,15 +39,15 @@ class Kbd public: Kbd( bool grabbing_enabled_P, TQObject* parent_P ); virtual ~Kbd(); - void insert_item( const KShortcut& shortcut_P, Kbd_receiver* receiver_P ); - void remove_item( const KShortcut& shortcut_P, Kbd_receiver* receiver_P ); + void insert_item( const TDEShortcut& shortcut_P, Kbd_receiver* receiver_P ); + void remove_item( const TDEShortcut& shortcut_P, Kbd_receiver* receiver_P ); void activate_receiver( Kbd_receiver* receiver_P ); void deactivate_receiver( Kbd_receiver* receiver_P ); static bool send_macro_key( const KKey& key, Window window_P = InputFocus ); protected: bool x11EventFilter( const XEvent* ); - void grab_shortcut( const KShortcut& shortcut_P ); - void ungrab_shortcut( const KShortcut& shortcut_P ); + void grab_shortcut( const TDEShortcut& shortcut_P ); + void ungrab_shortcut( const TDEShortcut& shortcut_P ); private slots: void key_slot( TQString key_P ); void update_connections(); @@ -55,11 +55,11 @@ class Kbd struct Receiver_data { Receiver_data(); - TQValueList< KShortcut > shortcuts; + TQValueList< TDEShortcut > shortcuts; bool active; }; TQMap< Kbd_receiver*, Receiver_data > receivers; - TQMap< KShortcut, int > grabs; + TQMap< TDEShortcut, int > grabs; TDEGlobalAccel* kga; }; diff --git a/khotkeys/shared/khlistview.cpp b/khotkeys/shared/khlistview.cpp index 2afa9db17..ae348af33 100644 --- a/khotkeys/shared/khlistview.cpp +++ b/khotkeys/shared/khlistview.cpp @@ -22,7 +22,7 @@ namespace KHotKeys { KHListView::KHListView( TQWidget* parent_P, const char* name_P ) - : KListView( parent_P, name_P ), saved_current_item( NULL ), + : TDEListView( parent_P, name_P ), saved_current_item( NULL ), in_clear( false ), ignore( false ), force_select( false ) { connect( this, TQT_SIGNAL( selectionChanged( TQListViewItem* )), @@ -72,7 +72,7 @@ void KHListView::slot_current_changed( TQListViewItem* item_P ) void KHListView::clear() { in_clear = true; - KListView::clear(); + TDEListView::clear(); in_clear = false; slot_selection_changed( NULL ); } @@ -82,7 +82,7 @@ void KHListView::insertItem( TQListViewItem* item_P ) bool set = false; if( !in_clear ) set = childCount() == 0; - KListView::insertItem( item_P ); + TDEListView::insertItem( item_P ); if( set && force_select ) { bool block = signalsBlocked(); @@ -96,7 +96,7 @@ void KHListView::insertItem( TQListViewItem* item_P ) void KHListView::clearSelection() { - KListView::clearSelection(); + TDEListView::clearSelection(); slot_current_changed( currentItem()); } @@ -113,7 +113,7 @@ void KHListView::contentsDropEvent( TQDropEvent* e ) { bool save_ignore = ignore; ignore = true; - KListView::contentsDropEvent( e ); + TDEListView::contentsDropEvent( e ); ignore = save_ignore; } diff --git a/khotkeys/shared/khlistview.h b/khotkeys/shared/khlistview.h index 0a0118a63..619fbb1e7 100644 --- a/khotkeys/shared/khlistview.h +++ b/khotkeys/shared/khlistview.h @@ -20,7 +20,7 @@ namespace KHotKeys { class KDE_EXPORT KHListView - : public KListView + : public TDEListView { Q_OBJECT TQ_PROPERTY( bool forceSelect READ forceSelect WRITE setForceSelect ) diff --git a/khotkeys/shared/settings.cpp b/khotkeys/shared/settings.cpp index 16e071a1e..2820c2c5d 100644 --- a/khotkeys/shared/settings.cpp +++ b/khotkeys/shared/settings.cpp @@ -114,7 +114,7 @@ bool Settings::read_settings( TDEConfig& cfg_P, bool include_disabled_P, ImportT delete gestures_exclude; gestures_exclude = new Windowdef_list( cfg_P ); cfg_P.setGroup( "Voice" ); - voice_shortcut=KShortcut( cfg_P.readEntry("Shortcut" , "") ); + voice_shortcut=TDEShortcut( cfg_P.readEntry("Shortcut" , "") ); return true; } @@ -252,12 +252,12 @@ void Settings::read_settings_v1( TDEConfig& cfg_P ) menuentries->set_conditions( new Condition_list( "", menuentries )); } ( void ) new Menuentry_shortcut_action_data( menuentries, name, "", - KShortcut( shortcut ), run ); + TDEShortcut( shortcut ), run ); } else { ( void ) new Command_url_shortcut_action_data( actions, name, "", - KShortcut( shortcut ), run ); + TDEShortcut( shortcut ), run ); } } } diff --git a/khotkeys/shared/settings.h b/khotkeys/shared/settings.h index c758764b4..c7b16287f 100644 --- a/khotkeys/shared/settings.h +++ b/khotkeys/shared/settings.h @@ -39,7 +39,7 @@ class KDE_EXPORT Settings int gesture_timeout; bool daemon_disabled; Windowdef_list* gestures_exclude; - KShortcut voice_shortcut; + TDEShortcut voice_shortcut; protected: bool read_settings( TDEConfig& cfg_P, bool include_disabled_P, ImportType import_P ); void read_settings_v1( TDEConfig& cfg_P ); diff --git a/khotkeys/shared/triggers.cpp b/khotkeys/shared/triggers.cpp index fe167789b..29cd1025e 100644 --- a/khotkeys/shared/triggers.cpp +++ b/khotkeys/shared/triggers.cpp @@ -117,7 +117,7 @@ void Trigger_list::activate( bool activate_P ) // Shortcut_trigger -Shortcut_trigger::Shortcut_trigger( Action_data* data_P, const KShortcut& shortcut_P ) +Shortcut_trigger::Shortcut_trigger( Action_data* data_P, const TDEShortcut& shortcut_P ) : Trigger( data_P ), _shortcut( shortcut_P ) { keyboard_handler->insert_item( shortcut(), this ); @@ -154,7 +154,7 @@ const TQString Shortcut_trigger::description() const // CHECKME i18n pro toString() ? } -bool Shortcut_trigger::handle_key( const KShortcut& shortcut_P ) +bool Shortcut_trigger::handle_key( const TDEShortcut& shortcut_P ) { if( shortcut() == shortcut_P ) { diff --git a/khotkeys/shared/triggers.h b/khotkeys/shared/triggers.h index cf511f975..c74a3a54a 100644 --- a/khotkeys/shared/triggers.h +++ b/khotkeys/shared/triggers.h @@ -66,17 +66,17 @@ class KDE_EXPORT Shortcut_trigger { typedef Trigger base; public: - Shortcut_trigger( Action_data* data_P, const KShortcut& shortcut_P ); + Shortcut_trigger( Action_data* data_P, const TDEShortcut& shortcut_P ); Shortcut_trigger( TDEConfig& cfg_P, Action_data* data_P ); virtual ~Shortcut_trigger(); virtual void cfg_write( TDEConfig& cfg_P ) const; virtual Shortcut_trigger* copy( Action_data* data_P ) const; virtual const TQString description() const; - const KShortcut& shortcut() const; - virtual bool handle_key( const KShortcut& shortcut_P ); + const TDEShortcut& shortcut() const; + virtual bool handle_key( const TDEShortcut& shortcut_P ); virtual void activate( bool activate_P ); private: - KShortcut _shortcut; + TDEShortcut _shortcut; }; class KDE_EXPORT Window_trigger @@ -206,7 +206,7 @@ const TQString& Trigger_list::comment() const // Shortcut_trigger inline -const KShortcut& Shortcut_trigger::shortcut() const +const TDEShortcut& Shortcut_trigger::shortcut() const { return _shortcut; } diff --git a/khotkeys/shared/voices.cpp b/khotkeys/shared/voices.cpp index 07ab899f6..fd0c759f4 100644 --- a/khotkeys/shared/voices.cpp +++ b/khotkeys/shared/voices.cpp @@ -199,7 +199,7 @@ void Voice::slot_sound_recorded(const Sound &sound_P) */ -void Voice::set_shortcut( const KShortcut &shortcut) +void Voice::set_shortcut( const TDEShortcut &shortcut) { _shortcut = shortcut; if( !_enabled ) diff --git a/khotkeys/shared/voices.h b/khotkeys/shared/voices.h index abb5858b2..145652a9b 100644 --- a/khotkeys/shared/voices.h +++ b/khotkeys/shared/voices.h @@ -40,7 +40,7 @@ class KDE_EXPORT Voice : public TQObject void unregister_handler( Voice_trigger* ); // bool x11Event( XEvent* e ); - void set_shortcut( const KShortcut &k); + void set_shortcut( const TDEShortcut &k); /** * return TQString::null is a new signature is far enough from others signature @@ -69,7 +69,7 @@ class KDE_EXPORT Voice : public TQObject TQValueList _references; SoundRecorder *_recorder; - KShortcut _shortcut; + TDEShortcut _shortcut; TDEGlobalAccel *_kga; TQTimer *_timer; -- cgit v1.2.1