diff options
author | Timothy Pearson <[email protected]> | 2013-01-25 00:30:47 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-01-25 00:30:47 -0600 |
commit | cc74f360bb40da3d79f58048f8e8611804980aa6 (patch) | |
tree | c4385d2c16b904757b1c8bb998a4aec6993373f7 /khotkeys | |
parent | 79b21d47bce1ee428affc97534cd8b257232a871 (diff) | |
download | tdebase-cc74f360bb40da3d79f58048f8e8611804980aa6.tar.gz tdebase-cc74f360bb40da3d79f58048f8e8611804980aa6.zip |
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'khotkeys')
-rw-r--r-- | khotkeys/kcontrol/init.cpp | 2 | ||||
-rw-r--r-- | khotkeys/kcontrol/kcmkhotkeys.cpp | 12 | ||||
-rw-r--r-- | khotkeys/kcontrol/kcmkhotkeys.h | 2 | ||||
-rw-r--r-- | khotkeys/shared/action_data.cpp | 30 | ||||
-rw-r--r-- | khotkeys/shared/action_data.h | 44 | ||||
-rw-r--r-- | khotkeys/shared/actions.cpp | 26 | ||||
-rw-r--r-- | khotkeys/shared/actions.h | 36 | ||||
-rw-r--r-- | khotkeys/shared/conditions.cpp | 34 | ||||
-rw-r--r-- | khotkeys/shared/conditions.h | 36 | ||||
-rw-r--r-- | khotkeys/shared/khotkeysglobal.h | 2 | ||||
-rw-r--r-- | khotkeys/shared/settings.cpp | 16 | ||||
-rw-r--r-- | khotkeys/shared/settings.h | 14 | ||||
-rw-r--r-- | khotkeys/shared/triggers.cpp | 24 | ||||
-rw-r--r-- | khotkeys/shared/triggers.h | 30 | ||||
-rw-r--r-- | khotkeys/shared/voicesignature.cpp | 4 | ||||
-rw-r--r-- | khotkeys/shared/voicesignature.h | 6 | ||||
-rw-r--r-- | khotkeys/shared/windows.cpp | 14 | ||||
-rw-r--r-- | khotkeys/shared/windows.h | 16 | ||||
-rw-r--r-- | khotkeys/update/update.cpp | 2 |
19 files changed, 175 insertions, 175 deletions
diff --git a/khotkeys/kcontrol/init.cpp b/khotkeys/kcontrol/init.cpp index 2278fa038..518e45972 100644 --- a/khotkeys/kcontrol/init.cpp +++ b/khotkeys/kcontrol/init.cpp @@ -24,7 +24,7 @@ extern "C" { KDE_EXPORT void init_khotkeys() { - KConfig cfg( "khotkeysrc", true ); + TDEConfig cfg( "khotkeysrc", true ); cfg.setGroup( "Main" ); if( !cfg.readBoolEntry( "Autostart", false )) return; diff --git a/khotkeys/kcontrol/kcmkhotkeys.cpp b/khotkeys/kcontrol/kcmkhotkeys.cpp index 5f1ca3df3..46f96c9fc 100644 --- a/khotkeys/kcontrol/kcmkhotkeys.cpp +++ b/khotkeys/kcontrol/kcmkhotkeys.cpp @@ -48,7 +48,7 @@ extern "C" { - KDE_EXPORT KCModule* create_khotkeys( TQWidget* parent_P, const char* name_P ) + KDE_EXPORT TDECModule* create_khotkeys( TQWidget* parent_P, const char* name_P ) { // sleep( 20 ); // CHECKME DEBUG TDEGlobal::locale()->insertCatalogue("khotkeys"); @@ -62,7 +62,7 @@ namespace KHotKeys { Module::Module( TQWidget* parent_P, const char* ) - : KCModule( parent_P, "khotkeys" ), _actions_root( NULL ), _current_action_data( NULL ), + : TDECModule( parent_P, "khotkeys" ), _actions_root( NULL ), _current_action_data( NULL ), listview_is_changed( false ), deleting_action( false ) { setButtons( Help | Cancel | Apply | Ok ); @@ -114,7 +114,7 @@ void Module::load() kdDebug( 1217 ) << "actions_root:" << _actions_root << endl; actions_listview_widget->build_up(); tab_widget->load_current_action(); - emit KCModule::changed( false ); // HACK otherwise the module would be changed from the very beginning + emit TDECModule::changed( false ); // HACK otherwise the module would be changed from the very beginning } void Module::save() @@ -142,7 +142,7 @@ void Module::save() kdDebug( 1217 ) << "telling khotkeys daemon to reread configuration" << endl; } } - emit KCModule::changed( false ); + emit TDECModule::changed( false ); } @@ -287,12 +287,12 @@ void Module::import() actions_listview_widget->clear(); actions_listview_widget->build_up(); tab_widget->load_current_action(); - emit KCModule::changed( true ); + emit TDECModule::changed( true ); } void Module::changed() { - emit KCModule::changed( true ); + emit TDECModule::changed( true ); } void Module::init_arts() diff --git a/khotkeys/kcontrol/kcmkhotkeys.h b/khotkeys/kcontrol/kcmkhotkeys.h index b406df8fe..fdc12a8f2 100644 --- a/khotkeys/kcontrol/kcmkhotkeys.h +++ b/khotkeys/kcontrol/kcmkhotkeys.h @@ -28,7 +28,7 @@ class Action_data_base; class Main_buttons_widget; class Module - : public KCModule + : public TDECModule { Q_OBJECT public: diff --git a/khotkeys/shared/action_data.cpp b/khotkeys/shared/action_data.cpp index 472259268..ff56eb99d 100644 --- a/khotkeys/shared/action_data.cpp +++ b/khotkeys/shared/action_data.cpp @@ -36,7 +36,7 @@ Action_data_base::Action_data_base( Action_data_group* parent_P, const TQString& _conditions->set_data( this ); } -Action_data_base::Action_data_base( KConfig& cfg_P, Action_data_group* parent_P ) +Action_data_base::Action_data_base( TDEConfig& cfg_P, Action_data_group* parent_P ) : _parent( parent_P ) { TQString save_cfg_group = cfg_P.group(); @@ -58,7 +58,7 @@ Action_data_base::~Action_data_base() delete _conditions; } -void Action_data_base::cfg_write( KConfig& cfg_P ) const +void Action_data_base::cfg_write( TDEConfig& cfg_P ) const { cfg_P.writeEntry( "Type", "ERROR" ); // derived classes should call with their type cfg_P.writeEntry( "Name", name()); @@ -72,7 +72,7 @@ void Action_data_base::cfg_write( KConfig& cfg_P ) const } -Action_data_base* Action_data_base::create_cfg_read( KConfig& cfg_P, Action_data_group* parent_P ) +Action_data_base* Action_data_base::create_cfg_read( TDEConfig& cfg_P, Action_data_group* parent_P ) { TQString type = cfg_P.readEntry( "Type" ); if( type == "ACTION_DATA_GROUP" ) @@ -110,7 +110,7 @@ Action_data_base* Action_data_base::create_cfg_read( KConfig& cfg_P, Action_data return NULL; } -bool Action_data_base::cfg_is_enabled( KConfig& cfg_P ) +bool Action_data_base::cfg_is_enabled( TDEConfig& cfg_P ) { return cfg_P.readBoolEntry( "Enabled", true ); } @@ -140,7 +140,7 @@ bool Action_data_base::conditions_match() const // Action_data_group -Action_data_group::Action_data_group( KConfig& cfg_P, Action_data_group* parent_P ) +Action_data_group::Action_data_group( TDEConfig& cfg_P, Action_data_group* parent_P ) : Action_data_base( cfg_P, parent_P ) { unsigned int system_group_tmp = cfg_P.readUnsignedNumEntry( "SystemGroup", 0 ); @@ -149,7 +149,7 @@ Action_data_group::Action_data_group( KConfig& cfg_P, Action_data_group* parent_ _system_group = static_cast< system_group_t >( system_group_tmp ); } -void Action_data_group::cfg_write( KConfig& cfg_P ) const +void Action_data_group::cfg_write( TDEConfig& cfg_P ) const { Action_data_base::cfg_write( cfg_P ); cfg_P.writeEntry( "SystemGroup", system_group()); @@ -166,7 +166,7 @@ void Action_data_group::update_triggers() // Action_data -Action_data::Action_data( KConfig& cfg_P, Action_data_group* parent_P ) +Action_data::Action_data( TDEConfig& cfg_P, Action_data_group* parent_P ) : Action_data_base( cfg_P, parent_P ) { TQString save_cfg_group = cfg_P.group(); @@ -185,7 +185,7 @@ Action_data::~Action_data() // CHECKME jeste remove z parenta ? } -void Action_data::cfg_write( KConfig& cfg_P ) const +void Action_data::cfg_write( TDEConfig& cfg_P ) const { Action_data_base::cfg_write( cfg_P ); TQString save_cfg_group = cfg_P.group(); @@ -277,7 +277,7 @@ void Action_data::update_triggers() // Generic_action_data -void Generic_action_data::cfg_write( KConfig& cfg_P ) const +void Generic_action_data::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "GENERIC_ACTION_DATA" ); @@ -297,7 +297,7 @@ Command_url_shortcut_action_data::Command_url_shortcut_action_data( Action_data_ template<> KDE_EXPORT void Simple_action_data< Shortcut_trigger, Command_url_action > - ::cfg_write( KConfig& cfg_P ) const + ::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "COMMAND_URL_SHORTCUT_ACTION_DATA" ); @@ -317,7 +317,7 @@ Menuentry_shortcut_action_data::Menuentry_shortcut_action_data( Action_data_grou template<> KDE_EXPORT void Simple_action_data< Shortcut_trigger, Menuentry_action > - ::cfg_write( KConfig& cfg_P ) const + ::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "MENUENTRY_SHORTCUT_ACTION_DATA" ); @@ -327,7 +327,7 @@ void Simple_action_data< Shortcut_trigger, Menuentry_action > template<> KDE_EXPORT void Simple_action_data< Shortcut_trigger, Dcop_action > - ::cfg_write( KConfig& cfg_P ) const + ::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "DCOP_SHORTCUT_ACTION_DATA" ); @@ -337,7 +337,7 @@ void Simple_action_data< Shortcut_trigger, Dcop_action > template<> KDE_EXPORT void Simple_action_data< Shortcut_trigger, Keyboard_input_action > - ::cfg_write( KConfig& cfg_P ) const + ::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "KEYBOARD_INPUT_SHORTCUT_ACTION_DATA" ); @@ -347,7 +347,7 @@ void Simple_action_data< Shortcut_trigger, Keyboard_input_action > template<> KDE_EXPORT void Simple_action_data< Shortcut_trigger, Activate_window_action > - ::cfg_write( KConfig& cfg_P ) const + ::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "ACTIVATE_WINDOW_SHORTCUT_ACTION_DATA" ); @@ -369,7 +369,7 @@ const Keyboard_input_action* Keyboard_input_gesture_action_data::action() const return static_cast< Keyboard_input_action* >( const_cast< Action_list* >( actions())->first()); } -void Keyboard_input_gesture_action_data::cfg_write( KConfig& cfg_P ) const +void Keyboard_input_gesture_action_data::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "KEYBOARD_INPUT_GESTURE_ACTION_DATA" ); diff --git a/khotkeys/shared/action_data.h b/khotkeys/shared/action_data.h index 4de5e715b..cf1186263 100644 --- a/khotkeys/shared/action_data.h +++ b/khotkeys/shared/action_data.h @@ -17,7 +17,7 @@ #include <kdebug.h> -class KConfig; +class TDEConfig; #include "khotkeysglobal.h" @@ -36,9 +36,9 @@ class KDE_EXPORT Action_data_base public: Action_data_base( Action_data_group* parent_P, const TQString& name_P, const TQString& comment_P, Condition_list* condition_P, bool enabled_P ); - Action_data_base( KConfig& cfg_P, Action_data_group* parent_P ); + Action_data_base( TDEConfig& cfg_P, Action_data_group* parent_P ); virtual ~Action_data_base(); - virtual void cfg_write( KConfig& cfg_P ) const = 0; + virtual void cfg_write( TDEConfig& cfg_P ) const = 0; const Condition_list* conditions() const; Action_data_group* parent() const; void reparent( Action_data_group* new_parent_P ); @@ -48,8 +48,8 @@ class KDE_EXPORT Action_data_base void set_name( const TQString& name_P ); const TQString& comment() const; bool enabled( bool ignore_group_P ) const; - static Action_data_base* create_cfg_read( KConfig& cfg_P, Action_data_group* parent_P ); - static bool cfg_is_enabled( KConfig& cfg_P ); + static Action_data_base* create_cfg_read( TDEConfig& cfg_P, Action_data_group* parent_P ); + static bool cfg_is_enabled( TDEConfig& cfg_P ); protected: void set_conditions( Condition_list* conditions_P ); private: @@ -70,10 +70,10 @@ class KDE_EXPORT Action_data_group Action_data_group( Action_data_group* parent_P, const TQString& name_P, const TQString& comment_P, Condition_list* conditions_P, system_group_t system_group_P, bool enabled_P ); - Action_data_group( KConfig& cfg_P, Action_data_group* parent_P ); + Action_data_group( TDEConfig& cfg_P, Action_data_group* parent_P ); virtual ~Action_data_group(); virtual void update_triggers(); - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; typedef TQPtrListIterator< Action_data_base > Iterator; // CHECKME neni const :( Iterator first_child() const; bool is_system_group() const; @@ -96,10 +96,10 @@ class KDE_EXPORT Action_data Action_data( Action_data_group* parent_P, const TQString& name_P, const TQString& comment_P, Trigger_list* triggers_P, Condition_list* conditions_P, Action_list* actions_P, bool enabled_P = true ); - Action_data( KConfig& cfg_P, Action_data_group* parent_P ); + Action_data( TDEConfig& cfg_P, Action_data_group* parent_P ); virtual ~Action_data(); virtual void update_triggers(); - virtual void cfg_write( KConfig& cfg_P ) const = 0; + virtual void cfg_write( TDEConfig& cfg_P ) const = 0; virtual void execute(); const Trigger_list* triggers() const; const Action_list* actions() const; @@ -129,8 +129,8 @@ class KDE_EXPORT Generic_action_data Generic_action_data( Action_data_group* parent_P, const TQString& name_P, const TQString& comment_P, Trigger_list* triggers_P, Condition_list* conditions_P, Action_list* actions_P, bool enabled_P = true ); - Generic_action_data( KConfig& cfg_P, Action_data_group* parent_P ); - virtual void cfg_write( KConfig& cfg_P ) const; + Generic_action_data( TDEConfig& cfg_P, Action_data_group* parent_P ); + virtual void cfg_write( TDEConfig& cfg_P ) const; using Action_data_base::set_conditions; // make public using Action_data::add_trigger; // make public using Action_data::add_triggers; // make public @@ -148,13 +148,13 @@ class KDE_EXPORT Simple_action_data public: Simple_action_data( Action_data_group* parent_P, const TQString& name_P, const TQString& comment_P, bool enabled_P = true ); - Simple_action_data( KConfig& cfg_P, Action_data_group* parent_P ); + Simple_action_data( TDEConfig& cfg_P, Action_data_group* parent_P ); const A* action() const; const T* trigger() const; // CHECKME kontrola, ze se dava jen jedna akce ? void set_action( A* action_P ); void set_trigger( T* trigger_P ); - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; }; class KDE_EXPORT Command_url_shortcut_action_data @@ -167,7 +167,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, const KShortcut& shortcut_P, const TQString& command_url_P, bool enabled_P = true ); - Command_url_shortcut_action_data( KConfig& cfg_P, Action_data_group* parent_P ); + Command_url_shortcut_action_data( TDEConfig& cfg_P, Action_data_group* parent_P ); }; class KDE_EXPORT Menuentry_shortcut_action_data @@ -180,7 +180,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, const KShortcut& shortcut_P, const TQString& command_url_P, bool enabled_P = true ); - Menuentry_shortcut_action_data( KConfig& cfg_P, Action_data_group* parent_P ); + Menuentry_shortcut_action_data( TDEConfig& cfg_P, Action_data_group* parent_P ); }; typedef Simple_action_data< Shortcut_trigger, Dcop_action > Dcop_shortcut_action_data; @@ -196,13 +196,13 @@ class KDE_EXPORT Keyboard_input_gesture_action_data public: Keyboard_input_gesture_action_data( Action_data_group* parent_P, const TQString& name_P, const TQString& comment_P, bool enabled_P = true ); - Keyboard_input_gesture_action_data( KConfig& cfg_P, Action_data_group* parent_P ); + Keyboard_input_gesture_action_data( TDEConfig& cfg_P, Action_data_group* parent_P ); const Keyboard_input_action* action() const; // CHECKME kontrola, ze se dava jen jedna akce ? void set_action( Keyboard_input_action* action_P ); enum { NUM_TRIGGERS = 3 }; // needs changing code elsewhere using Action_data::set_triggers; // make public // CHECKME kontrola poctu? - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; }; @@ -335,7 +335,7 @@ Generic_action_data::Generic_action_data( Action_data_group* parent_P, const TQS } inline -Generic_action_data::Generic_action_data( KConfig& cfg_P, Action_data_group* parent_P ) +Generic_action_data::Generic_action_data( TDEConfig& cfg_P, Action_data_group* parent_P ) : Action_data( cfg_P, parent_P ) { // CHECKME do nothing ? } @@ -353,7 +353,7 @@ Simple_action_data< T, A >::Simple_action_data( Action_data_group* parent_P, template< typename T, typename A > inline -Simple_action_data< T, A >::Simple_action_data( KConfig& cfg_P, Action_data_group* parent_P ) +Simple_action_data< T, A >::Simple_action_data( TDEConfig& cfg_P, Action_data_group* parent_P ) : Action_data( cfg_P, parent_P ) { // CHECKME nothing ? } @@ -401,7 +401,7 @@ Command_url_shortcut_action_data::Command_url_shortcut_action_data( Action_data_ } inline -Command_url_shortcut_action_data::Command_url_shortcut_action_data( KConfig& cfg_P, +Command_url_shortcut_action_data::Command_url_shortcut_action_data( TDEConfig& cfg_P, Action_data_group* parent_P ) : Simple_action_data< Shortcut_trigger, Command_url_action >( cfg_P, parent_P ) { @@ -418,7 +418,7 @@ Menuentry_shortcut_action_data::Menuentry_shortcut_action_data( Action_data_grou } inline -Menuentry_shortcut_action_data::Menuentry_shortcut_action_data( KConfig& cfg_P, +Menuentry_shortcut_action_data::Menuentry_shortcut_action_data( TDEConfig& cfg_P, Action_data_group* parent_P ) : Simple_action_data< Shortcut_trigger, Menuentry_action >( cfg_P, parent_P ) { @@ -435,7 +435,7 @@ Keyboard_input_gesture_action_data::Keyboard_input_gesture_action_data( } inline -Keyboard_input_gesture_action_data::Keyboard_input_gesture_action_data( KConfig& cfg_P, +Keyboard_input_gesture_action_data::Keyboard_input_gesture_action_data( TDEConfig& cfg_P, Action_data_group* parent_P ) : Action_data( cfg_P, parent_P ) { // CHECKME nothing ? diff --git a/khotkeys/shared/actions.cpp b/khotkeys/shared/actions.cpp index e25b1c359..5ce1e1d5a 100644 --- a/khotkeys/shared/actions.cpp +++ b/khotkeys/shared/actions.cpp @@ -40,7 +40,7 @@ namespace KHotKeys // Action -Action* Action::create_cfg_read( KConfig& cfg_P, Action_data* data_P ) +Action* Action::create_cfg_read( TDEConfig& cfg_P, Action_data* data_P ) { TQString type = cfg_P.readEntry( "Type" ); if( type == "COMMAND_URL" ) @@ -57,14 +57,14 @@ Action* Action::create_cfg_read( KConfig& cfg_P, Action_data* data_P ) return NULL; } -void Action::cfg_write( KConfig& cfg_P ) const +void Action::cfg_write( TDEConfig& cfg_P ) const { cfg_P.writeEntry( "Type", "ERROR" ); // derived classes should call with their type } // Action_list -Action_list::Action_list( KConfig& cfg_P, Action_data* data_P ) +Action_list::Action_list( TDEConfig& cfg_P, Action_data* data_P ) : TQPtrList< Action >() { setAutoDelete( true ); @@ -82,7 +82,7 @@ Action_list::Action_list( KConfig& cfg_P, Action_data* data_P ) cfg_P.setGroup( save_cfg_group ); } -void Action_list::cfg_write( KConfig& cfg_P ) const +void Action_list::cfg_write( TDEConfig& cfg_P ) const { TQString save_cfg_group = cfg_P.group(); int i = 0; @@ -99,13 +99,13 @@ void Action_list::cfg_write( KConfig& cfg_P ) const // Command_url_action -Command_url_action::Command_url_action( KConfig& cfg_P, Action_data* data_P ) +Command_url_action::Command_url_action( TDEConfig& cfg_P, Action_data* data_P ) : Action( cfg_P, data_P ) { _command_url = cfg_P.readEntry( "CommandURL" ); } -void Command_url_action::cfg_write( KConfig& cfg_P ) const +void Command_url_action::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "CommandURL", command_url()); @@ -188,7 +188,7 @@ Action* Command_url_action::copy( Action_data* data_P ) const // Menuentry_action -void Menuentry_action::cfg_write( KConfig& cfg_P ) const +void Menuentry_action::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "MENUENTRY" ); // overwrites value set in base::cfg_write() @@ -225,7 +225,7 @@ Action* Menuentry_action::copy( Action_data* data_P ) const // Dcop_action -Dcop_action::Dcop_action( KConfig& cfg_P, Action_data* data_P ) +Dcop_action::Dcop_action( TDEConfig& cfg_P, Action_data* data_P ) : Action( cfg_P, data_P ) { app = cfg_P.readEntry( "RemoteApp" ); @@ -234,7 +234,7 @@ Dcop_action::Dcop_action( KConfig& cfg_P, Action_data* data_P ) args = cfg_P.readEntry( "Arguments" ); } -void Dcop_action::cfg_write( KConfig& cfg_P ) const +void Dcop_action::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "DCOP" ); // overwrites value set in base::cfg_write() @@ -311,7 +311,7 @@ Action* Dcop_action::copy( Action_data* data_P ) const // Keyboard_input_action -Keyboard_input_action::Keyboard_input_action( KConfig& cfg_P, Action_data* data_P ) +Keyboard_input_action::Keyboard_input_action( TDEConfig& cfg_P, Action_data* data_P ) : Action( cfg_P, data_P ) { _input = cfg_P.readEntry( "Input" ); @@ -335,7 +335,7 @@ Keyboard_input_action::~Keyboard_input_action() delete _dest_window; } -void Keyboard_input_action::cfg_write( KConfig& cfg_P ) const +void Keyboard_input_action::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "KEYBOARD_INPUT" ); // overwrites value set in base::cfg_write() @@ -404,7 +404,7 @@ Action* Keyboard_input_action::copy( Action_data* data_P ) const // Activate_window_action -Activate_window_action::Activate_window_action( KConfig& cfg_P, Action_data* data_P ) +Activate_window_action::Activate_window_action( TDEConfig& cfg_P, Action_data* data_P ) : Action( cfg_P, data_P ) { TQString save_cfg_group = cfg_P.group(); @@ -418,7 +418,7 @@ Activate_window_action::~Activate_window_action() delete _window; } -void Activate_window_action::cfg_write( KConfig& cfg_P ) const +void Activate_window_action::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "ACTIVATE_WINDOW" ); // overwrites value set in base::cfg_write() diff --git a/khotkeys/shared/actions.h b/khotkeys/shared/actions.h index 828bbdb70..f381683e1 100644 --- a/khotkeys/shared/actions.h +++ b/khotkeys/shared/actions.h @@ -18,7 +18,7 @@ #include <kservice.h> -class KConfig; +class TDEConfig; #include "khotkeysglobal.h" @@ -34,13 +34,13 @@ class KDE_EXPORT Action { public: Action( Action_data* data_P ); - Action( KConfig& cfg_P, Action_data* data_P ); + Action( TDEConfig& cfg_P, Action_data* data_P ); virtual ~Action(); virtual void execute() = 0; virtual TQString description() const = 0; - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; virtual Action* copy( Action_data* data_P ) const = 0; - static Action* create_cfg_read( KConfig& cfg_P, Action_data* data_P ); + static Action* create_cfg_read( TDEConfig& cfg_P, Action_data* data_P ); protected: Action_data* const data; KHOTKEYS_DISABLE_COPY( Action ); @@ -51,8 +51,8 @@ class KDE_EXPORT Action_list { public: Action_list( const TQString& comment_P ); // CHECKME nebo i data ? - Action_list( KConfig& cfg_P, Action_data* data_P ); - void cfg_write( KConfig& cfg_P ) const; + Action_list( TDEConfig& cfg_P, Action_data* data_P ); + void cfg_write( TDEConfig& cfg_P ) const; typedef TQPtrListIterator< Action > Iterator; const TQString& comment() const; private: @@ -66,8 +66,8 @@ class KDE_EXPORT Command_url_action typedef Action base; public: Command_url_action( Action_data* data_P, const TQString& command_url_P ); - Command_url_action( KConfig& cfg_P, Action_data* data_P ); - virtual void cfg_write( KConfig& cfg_P ) const; + Command_url_action( TDEConfig& cfg_P, Action_data* data_P ); + virtual void cfg_write( TDEConfig& cfg_P ) const; virtual void execute(); virtual TQString description() const; const TQString& command_url() const; @@ -84,8 +84,8 @@ class KDE_EXPORT Menuentry_action typedef Command_url_action base; public: Menuentry_action( Action_data* data_P, const TQString& menuentry_P ); - Menuentry_action( KConfig& cfg_P, Action_data* data_P ); - virtual void cfg_write( KConfig& cfg_P ) const; + Menuentry_action( TDEConfig& cfg_P, Action_data* data_P ); + virtual void cfg_write( TDEConfig& cfg_P ) const; virtual void execute(); virtual TQString description() const; virtual Action* copy( Action_data* data_P ) const; @@ -101,8 +101,8 @@ class KDE_EXPORT Dcop_action public: Dcop_action( Action_data* data_P, const TQString& app_P, const TQString& obj_P, const TQString& call_P, const TQString& args_P ); - Dcop_action( KConfig& cfg_P, Action_data* data_P ); - virtual void cfg_write( KConfig& cfg_P ) const; + Dcop_action( TDEConfig& cfg_P, Action_data* data_P ); + virtual void cfg_write( TDEConfig& cfg_P ) const; virtual void execute(); const TQString& remote_application() const; const TQString& remote_object() const; @@ -124,9 +124,9 @@ class KDE_EXPORT Keyboard_input_action public: Keyboard_input_action( Action_data* data_P, const TQString& input_P, const Windowdef_list* dest_window_P, bool active_window_P ); - Keyboard_input_action( KConfig& cfg_P, Action_data* data_P ); + Keyboard_input_action( TDEConfig& cfg_P, Action_data* data_P ); virtual ~Keyboard_input_action(); - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; virtual void execute(); const TQString& input() const; // send to specific window: dest_window != NULL @@ -148,9 +148,9 @@ class KDE_EXPORT Activate_window_action typedef Action base; public: Activate_window_action( Action_data* data_P, const Windowdef_list* window_P ); - Activate_window_action( KConfig& cfg_P, Action_data* data_P ); + Activate_window_action( TDEConfig& cfg_P, Action_data* data_P ); virtual ~Activate_window_action(); - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; virtual void execute(); const Windowdef_list* window() const; virtual TQString description() const; @@ -172,7 +172,7 @@ Action::Action( Action_data* data_P ) } inline -Action::Action( KConfig&, Action_data* data_P ) +Action::Action( TDEConfig&, Action_data* data_P ) : data( data_P ) { } @@ -220,7 +220,7 @@ Menuentry_action::Menuentry_action( Action_data* data_P, const TQString& menuent } inline -Menuentry_action::Menuentry_action( KConfig& cfg_P, Action_data* data_P ) +Menuentry_action::Menuentry_action( TDEConfig& cfg_P, Action_data* data_P ) : Command_url_action( cfg_P, data_P ) { } diff --git a/khotkeys/shared/conditions.cpp b/khotkeys/shared/conditions.cpp index fb819f6c7..3132fa01d 100644 --- a/khotkeys/shared/conditions.cpp +++ b/khotkeys/shared/conditions.cpp @@ -42,14 +42,14 @@ Condition::Condition( Condition_list_base* parent_P ) _parent->append( this ); } -Condition::Condition( KConfig&, Condition_list_base* parent_P ) +Condition::Condition( TDEConfig&, Condition_list_base* parent_P ) : _parent( parent_P ) { if( _parent ) _parent->append( this ); } -Condition* Condition::create_cfg_read( KConfig& cfg_P, Condition_list_base* parent_P ) +Condition* Condition::create_cfg_read( TDEConfig& cfg_P, Condition_list_base* parent_P ) { TQString type = cfg_P.readEntry( "Type" ); if( type == "ACTIVE_WINDOW" ) @@ -73,7 +73,7 @@ Condition::~Condition() } -void Condition::cfg_write( KConfig& cfg_P ) const +void Condition::cfg_write( TDEConfig& cfg_P ) const { cfg_P.writeEntry( "Type", "ERROR" ); } @@ -118,7 +118,7 @@ void Condition::debug_list( const TQPtrList< Condition >& list_P, int depth_P ) // Condition_list_base -Condition_list_base::Condition_list_base( KConfig& cfg_P, Condition_list_base* parent_P ) +Condition_list_base::Condition_list_base( TDEConfig& cfg_P, Condition_list_base* parent_P ) : Condition( parent_P ) { TQString save_cfg_group = cfg_P.group(); @@ -143,7 +143,7 @@ Condition_list_base::~Condition_list_base() } } -void Condition_list_base::cfg_write( KConfig& cfg_P ) const +void Condition_list_base::cfg_write( TDEConfig& cfg_P ) const { TQString save_cfg_group = cfg_P.group(); int i = 0; @@ -180,13 +180,13 @@ void Condition_list_base::debug( int depth_P ) // Condition_list -Condition_list::Condition_list( KConfig& cfg_P, Action_data_base* data_P ) +Condition_list::Condition_list( TDEConfig& cfg_P, Action_data_base* data_P ) : Condition_list_base( cfg_P, NULL ), data( data_P ) { _comment = cfg_P.readEntry( "Comment" ); } -void Condition_list::cfg_write( KConfig& cfg_P ) const +void Condition_list::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Comment", comment()); @@ -244,7 +244,7 @@ Condition_list* Condition_list::copy( Condition_list_base* ) const // Active_window_condition -Active_window_condition::Active_window_condition( KConfig& cfg_P, Condition_list_base* parent_P ) +Active_window_condition::Active_window_condition( TDEConfig& cfg_P, Condition_list_base* parent_P ) : Condition( cfg_P, parent_P ) { TQString save_cfg_group = cfg_P.group(); @@ -273,7 +273,7 @@ void Active_window_condition::set_match() updated(); } -void Active_window_condition::cfg_write( KConfig& cfg_P ) const +void Active_window_condition::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); TQString save_cfg_group = cfg_P.group(); @@ -310,7 +310,7 @@ Active_window_condition::~Active_window_condition() // Existing_window_condition -Existing_window_condition::Existing_window_condition( KConfig& cfg_P, Condition_list_base* parent_P ) +Existing_window_condition::Existing_window_condition( TDEConfig& cfg_P, Condition_list_base* parent_P ) : Condition( cfg_P, parent_P ) { TQString save_cfg_group = cfg_P.group(); @@ -342,7 +342,7 @@ void Existing_window_condition::set_match( WId w_P ) updated(); } -void Existing_window_condition::cfg_write( KConfig& cfg_P ) const +void Existing_window_condition::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); TQString save_cfg_group = cfg_P.group(); @@ -384,7 +384,7 @@ Existing_window_condition::~Existing_window_condition() // Not_condition -Not_condition::Not_condition( KConfig& cfg_P, Condition_list_base* parent_P ) +Not_condition::Not_condition( TDEConfig& cfg_P, Condition_list_base* parent_P ) : Condition_list_base( cfg_P, parent_P ) { // CHECKME kontrola poctu ? @@ -395,7 +395,7 @@ bool Not_condition::match() const return condition() ? !condition()->match() : false; } -void Not_condition::cfg_write( KConfig& cfg_P ) const +void Not_condition::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "NOT" ); // overwrites value set in base::cfg_write() @@ -421,7 +421,7 @@ bool Not_condition::accepts_children() const // And_condition -And_condition::And_condition( KConfig& cfg_P, Condition_list_base* parent_P ) +And_condition::And_condition( TDEConfig& cfg_P, Condition_list_base* parent_P ) : Condition_list_base( cfg_P, parent_P ) { // CHECKME kontrola poctu ? @@ -437,7 +437,7 @@ bool And_condition::match() const return true; // all true (or empty) } -void And_condition::cfg_write( KConfig& cfg_P ) const +void And_condition::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "AND" ); // overwrites value set in base::cfg_write() @@ -460,7 +460,7 @@ const TQString And_condition::description() const // Or_condition -Or_condition::Or_condition( KConfig& cfg_P, Condition_list_base* parent_P ) +Or_condition::Or_condition( TDEConfig& cfg_P, Condition_list_base* parent_P ) : Condition_list_base( cfg_P, parent_P ) { // CHECKME kontrola poctu ? @@ -478,7 +478,7 @@ bool Or_condition::match() const return false; } -void Or_condition::cfg_write( KConfig& cfg_P ) const +void Or_condition::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "OR" ); // overwrites value set in base::cfg_write() diff --git a/khotkeys/shared/conditions.h b/khotkeys/shared/conditions.h index bc0ca5d6e..ff1af7d07 100644 --- a/khotkeys/shared/conditions.h +++ b/khotkeys/shared/conditions.h @@ -21,7 +21,7 @@ #include <X11/Xlib.h> #include <fixx11h.h> -class KConfig; +class TDEConfig; namespace KHotKeys { @@ -34,16 +34,16 @@ class KDE_EXPORT Condition { public: Condition( Condition_list_base* parent_P ); - Condition( KConfig& cfg_P, Condition_list_base* parent_P ); + Condition( TDEConfig& cfg_P, Condition_list_base* parent_P ); virtual ~Condition(); virtual bool match() const = 0; virtual void updated() const; // called when the condition changes - virtual void cfg_write( KConfig& cfg_P ) const = 0; + virtual void cfg_write( TDEConfig& cfg_P ) const = 0; virtual const TQString description() const = 0; virtual Condition* copy( Condition_list_base* parent_P ) const = 0; const Condition_list_base* parent() const; Condition_list_base* parent(); - static Condition* create_cfg_read( KConfig& cfg_P, Condition_list_base* parent_P ); + static Condition* create_cfg_read( TDEConfig& cfg_P, Condition_list_base* parent_P ); protected: Condition_list_base* const _parent; KHOTKEYS_DISABLE_COPY( Condition ); @@ -57,9 +57,9 @@ class KDE_EXPORT Condition_list_base Condition_list_base( Condition_list_base* parent_P ); Condition_list_base( const TQPtrList< Condition >& children_P, Condition_list_base* parent_P ); - Condition_list_base( KConfig& cfg_P, Condition_list_base* parent_P ); + Condition_list_base( TDEConfig& cfg_P, Condition_list_base* parent_P ); virtual ~Condition_list_base(); - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; virtual bool accepts_children() const; typedef TQPtrListIterator< Condition > Iterator; }; @@ -70,8 +70,8 @@ class KDE_EXPORT Condition_list typedef Condition_list_base base; public: Condition_list( const TQString& comment_P, Action_data_base* data_P ); - Condition_list( KConfig& cfg_P, Action_data_base* data_P ); - void cfg_write( KConfig& cfg_P ) const; + Condition_list( TDEConfig& cfg_P, Action_data_base* data_P ); + void cfg_write( TDEConfig& cfg_P ) const; Condition_list* copy( Action_data_base* data_P ) const; virtual bool match() const; const TQString& comment() const; @@ -91,10 +91,10 @@ class KDE_EXPORT Active_window_condition typedef Condition base; public: Active_window_condition( Windowdef_list* window_P, Condition_list_base* parent_P ); - Active_window_condition( KConfig& cfg_P, Condition_list_base* parent_P ); + Active_window_condition( TDEConfig& cfg_P, Condition_list_base* parent_P ); virtual ~Active_window_condition(); virtual bool match() const; - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; const Windowdef_list* window() const; #ifndef COVARIANT_RETURN_BROKEN virtual Active_window_condition* copy( Condition_list_base* parent_P ) const; @@ -118,10 +118,10 @@ class KDE_EXPORT Existing_window_condition typedef Condition base; public: Existing_window_condition( Windowdef_list* window_P, Condition_list_base* parent_P ); - Existing_window_condition( KConfig& cfg_P, Condition_list_base* parent_P ); + Existing_window_condition( TDEConfig& cfg_P, Condition_list_base* parent_P ); virtual ~Existing_window_condition(); virtual bool match() const; - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; const Windowdef_list* window() const; #ifndef COVARIANT_RETURN_BROKEN virtual Existing_window_condition* copy( Condition_list_base* parent_P ) const; @@ -145,9 +145,9 @@ class KDE_EXPORT Not_condition typedef Condition_list_base base; public: Not_condition( Condition_list_base* parent_P ); - Not_condition( KConfig& cfg_P, Condition_list_base* parent_P ); + Not_condition( TDEConfig& cfg_P, Condition_list_base* parent_P ); virtual bool match() const; - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; virtual Not_condition* copy( Condition_list_base* parent_P ) const; virtual const TQString description() const; const Condition* condition() const; @@ -160,9 +160,9 @@ class KDE_EXPORT And_condition typedef Condition_list_base base; public: And_condition( Condition_list_base* parent_P ); - And_condition( KConfig& cfg_P, Condition_list_base* parent_P ); + And_condition( TDEConfig& cfg_P, Condition_list_base* parent_P ); virtual bool match() const; - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; virtual And_condition* copy( Condition_list_base* parent_P ) const; virtual const TQString description() const; }; @@ -173,9 +173,9 @@ class KDE_EXPORT Or_condition typedef Condition_list_base base; public: Or_condition( Condition_list_base* parent_P ); - Or_condition( KConfig& cfg_P, Condition_list_base* parent_P ); + Or_condition( TDEConfig& cfg_P, Condition_list_base* parent_P ); virtual bool match() const; - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; virtual Or_condition* copy( Condition_list_base* parent_P ) const; virtual const TQString description() const; }; diff --git a/khotkeys/shared/khotkeysglobal.h b/khotkeys/shared/khotkeysglobal.h index 53be7c039..92dba09b6 100644 --- a/khotkeys/shared/khotkeysglobal.h +++ b/khotkeys/shared/khotkeysglobal.h @@ -22,7 +22,7 @@ #include <klocale.h> -class KConfig; +class TDEConfig; class TQObject; namespace KHotKeys diff --git a/khotkeys/shared/settings.cpp b/khotkeys/shared/settings.cpp index fdab2be56..9481ff762 100644 --- a/khotkeys/shared/settings.cpp +++ b/khotkeys/shared/settings.cpp @@ -39,16 +39,16 @@ Settings::Settings() bool Settings::read_settings( bool include_disabled_P ) { - KConfig cfg( KHOTKEYS_CONFIG_FILE, true ); + TDEConfig cfg( KHOTKEYS_CONFIG_FILE, true ); return read_settings( cfg, include_disabled_P, ImportNone ); } -bool Settings::import( KConfig& cfg_P, bool ask_P ) +bool Settings::import( TDEConfig& cfg_P, bool ask_P ) { return read_settings( cfg_P, true, ask_P ? ImportAsk : ImportSilent ); } -bool Settings::read_settings( KConfig& cfg_P, bool include_disabled_P, ImportType import_P ) +bool Settings::read_settings( TDEConfig& cfg_P, bool include_disabled_P, ImportType import_P ) { if( actions == NULL ) actions = new Action_data_group( NULL, "should never see", "should never see", @@ -120,7 +120,7 @@ bool Settings::read_settings( KConfig& cfg_P, bool include_disabled_P, ImportTyp void Settings::write_settings() { - KConfig cfg( KHOTKEYS_CONFIG_FILE, false ); + TDEConfig cfg( KHOTKEYS_CONFIG_FILE, false ); // CHECKME smazat stare sekce ? TQStringList groups = cfg.groupList(); for( TQStringList::ConstIterator it = groups.begin(); @@ -154,7 +154,7 @@ void Settings::write_settings() // return value means the number of enabled actions written in the cfg file // i.e. 'Autostart' for value > 0 should be on -int Settings::write_actions_recursively_v2( KConfig& cfg_P, Action_data_group* parent_P, bool enabled_P ) +int Settings::write_actions_recursively_v2( TDEConfig& cfg_P, Action_data_group* parent_P, bool enabled_P ) { int enabled_cnt = 0; TQString save_cfg_group = cfg_P.group(); @@ -177,13 +177,13 @@ int Settings::write_actions_recursively_v2( KConfig& cfg_P, Action_data_group* p return enabled_cnt; } -void Settings::read_settings_v2( KConfig& cfg_P, bool include_disabled_P ) +void Settings::read_settings_v2( TDEConfig& cfg_P, bool include_disabled_P ) { cfg_P.setGroup( "Data" ); read_actions_recursively_v2( cfg_P, actions, include_disabled_P ); } -void Settings::read_actions_recursively_v2( KConfig& cfg_P, Action_data_group* parent_P, +void Settings::read_actions_recursively_v2( TDEConfig& cfg_P, Action_data_group* parent_P, bool include_disabled_P ) { TQString save_cfg_group = cfg_P.group(); @@ -205,7 +205,7 @@ void Settings::read_actions_recursively_v2( KConfig& cfg_P, Action_data_group* p } // backward compatibility -void Settings::read_settings_v1( KConfig& cfg_P ) +void Settings::read_settings_v1( TDEConfig& cfg_P ) { int sections = cfg_P.readNumEntry( "Num_Sections", 0 ); Action_data_group* menuentries = NULL; diff --git a/khotkeys/shared/settings.h b/khotkeys/shared/settings.h index fa6754160..c758764b4 100644 --- a/khotkeys/shared/settings.h +++ b/khotkeys/shared/settings.h @@ -14,7 +14,7 @@ #include "actions.h" #include <kshortcut.h> -class KConfig; +class TDEConfig; namespace KHotKeys { @@ -32,7 +32,7 @@ class KDE_EXPORT Settings Settings(); bool read_settings( bool include_disabled_P ); void write_settings(); - bool import( KConfig& cfg_P, bool ask_P ); + bool import( TDEConfig& cfg_P, bool ask_P ); Action_data_group* actions; bool gestures_disabled_globally; int gesture_mouse_button; @@ -41,11 +41,11 @@ class KDE_EXPORT Settings Windowdef_list* gestures_exclude; KShortcut voice_shortcut; protected: - bool read_settings( KConfig& cfg_P, bool include_disabled_P, ImportType import_P ); - void read_settings_v1( KConfig& cfg_P ); - void read_settings_v2( KConfig& cfg_P, bool include_disabled_P ); - int write_actions_recursively_v2( KConfig& cfg_P, Action_data_group* parent_P, bool enabled_P ); - void read_actions_recursively_v2( KConfig& cfg_P, Action_data_group* parent_P, + bool read_settings( TDEConfig& cfg_P, bool include_disabled_P, ImportType import_P ); + void read_settings_v1( TDEConfig& cfg_P ); + void read_settings_v2( TDEConfig& cfg_P, bool include_disabled_P ); + int write_actions_recursively_v2( TDEConfig& cfg_P, Action_data_group* parent_P, bool enabled_P ); + void read_actions_recursively_v2( TDEConfig& cfg_P, Action_data_group* parent_P, bool include_disabled_P ); private: TQStringList already_imported; diff --git a/khotkeys/shared/triggers.cpp b/khotkeys/shared/triggers.cpp index cf9b99c6c..27736ed0b 100644 --- a/khotkeys/shared/triggers.cpp +++ b/khotkeys/shared/triggers.cpp @@ -39,12 +39,12 @@ namespace KHotKeys // Trigger -void Trigger::cfg_write( KConfig& cfg_P ) const +void Trigger::cfg_write( TDEConfig& cfg_P ) const { cfg_P.writeEntry( "Type", "ERROR" ); } -Trigger* Trigger::create_cfg_read( KConfig& cfg_P, Action_data* data_P ) +Trigger* Trigger::create_cfg_read( TDEConfig& cfg_P, Action_data* data_P ) { TQString type = cfg_P.readEntry( "Type" ); if( type == "SHORTCUT" || type == "SINGLE_SHORTCUT" ) @@ -62,7 +62,7 @@ Trigger* Trigger::create_cfg_read( KConfig& cfg_P, Action_data* data_P ) // Trigger_list -Trigger_list::Trigger_list( KConfig& cfg_P, Action_data* data_P ) +Trigger_list::Trigger_list( TDEConfig& cfg_P, Action_data* data_P ) : TQPtrList< Trigger >() { setAutoDelete( true ); @@ -81,7 +81,7 @@ Trigger_list::Trigger_list( KConfig& cfg_P, Action_data* data_P ) cfg_P.setGroup( save_cfg_group ); } -void Trigger_list::cfg_write( KConfig& cfg_P ) const +void Trigger_list::cfg_write( TDEConfig& cfg_P ) const { cfg_P.writeEntry( "Comment", comment()); TQString save_cfg_group = cfg_P.group(); @@ -123,7 +123,7 @@ Shortcut_trigger::Shortcut_trigger( Action_data* data_P, const KShortcut& shortc keyboard_handler->insert_item( shortcut(), this ); } -Shortcut_trigger::Shortcut_trigger( KConfig& cfg_P, Action_data* data_P ) +Shortcut_trigger::Shortcut_trigger( TDEConfig& cfg_P, Action_data* data_P ) : Trigger( cfg_P, data_P ), _shortcut( cfg_P.readEntry( "Key", 0 )) { keyboard_handler->insert_item( shortcut(), this ); @@ -134,7 +134,7 @@ Shortcut_trigger::~Shortcut_trigger() keyboard_handler->remove_item( shortcut(), this ); } -void Shortcut_trigger::cfg_write( KConfig& cfg_P ) const +void Shortcut_trigger::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Key", _shortcut.toStringInternal()); @@ -175,7 +175,7 @@ void Shortcut_trigger::activate( bool activate_P ) // Window_trigger -Window_trigger::Window_trigger( KConfig& cfg_P, Action_data* data_P ) +Window_trigger::Window_trigger( TDEConfig& cfg_P, Action_data* data_P ) : Trigger( cfg_P, data_P ), active( false ) { // kdDebug( 1217 ) << "Window_trigger" << endl; @@ -290,7 +290,7 @@ void Window_trigger::window_changed( WId window_P, unsigned int dirty_P ) kdDebug( 1217 ) << "Window_trigger::w_changed() : " << was_match << "|" << matches << endl; } -void Window_trigger::cfg_write( KConfig& cfg_P ) const +void Window_trigger::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); TQString save_cfg_group = cfg_P.group(); @@ -325,7 +325,7 @@ Gesture_trigger::Gesture_trigger( Action_data* data_P, const TQString &gestureco { } -Gesture_trigger::Gesture_trigger( KConfig& cfg_P, Action_data* data_P ) +Gesture_trigger::Gesture_trigger( TDEConfig& cfg_P, Action_data* data_P ) : Trigger( cfg_P, data_P ) { _gesturecode = cfg_P.readEntry( "Gesture" ); @@ -336,7 +336,7 @@ Gesture_trigger::~Gesture_trigger() gesture_handler->unregister_handler( this, TQT_SLOT( handle_gesture( const TQString&, WId ))); } -void Gesture_trigger::cfg_write( KConfig& cfg_P ) const +void Gesture_trigger::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Gesture", gesturecode()); @@ -381,7 +381,7 @@ void Gesture_trigger::activate( bool activate_P ) _voicesignature[1]=signature2_P; } -Voice_trigger::Voice_trigger( KConfig& cfg_P, Action_data* data_P ) +Voice_trigger::Voice_trigger( TDEConfig& cfg_P, Action_data* data_P ) : Trigger( cfg_P, data_P ) { _voicecode = cfg_P.readEntry( "Name" ); @@ -394,7 +394,7 @@ Voice_trigger::~Voice_trigger() voice_handler->unregister_handler( this ); } -void Voice_trigger::cfg_write( KConfig& cfg_P ) const +void Voice_trigger::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Name", voicecode()); diff --git a/khotkeys/shared/triggers.h b/khotkeys/shared/triggers.h index 9a8fe6bee..cf511f975 100644 --- a/khotkeys/shared/triggers.h +++ b/khotkeys/shared/triggers.h @@ -21,7 +21,7 @@ #include "input.h" -class KConfig; +class TDEConfig; namespace KHotKeys { @@ -33,12 +33,12 @@ class KDE_EXPORT Trigger { public: Trigger( Action_data* data_P ); - Trigger( KConfig& cfg_P, Action_data* data_P ); + Trigger( TDEConfig& cfg_P, Action_data* data_P ); virtual ~Trigger(); - virtual void cfg_write( KConfig& cfg_P ) const = 0; + virtual void cfg_write( TDEConfig& cfg_P ) const = 0; virtual Trigger* copy( Action_data* data_P ) const = 0; virtual const TQString description() const = 0; - static Trigger* create_cfg_read( KConfig& cfg_P, Action_data* data_P ); + static Trigger* create_cfg_read( TDEConfig& cfg_P, Action_data* data_P ); virtual void activate( bool activate_P ) = 0; protected: Action_data* const data; @@ -50,9 +50,9 @@ class KDE_EXPORT Trigger_list { public: Trigger_list( const TQString& comment_P ); // CHECKME nebo i data ? - Trigger_list( KConfig& cfg_P, Action_data* data_P ); + Trigger_list( TDEConfig& cfg_P, Action_data* data_P ); void activate( bool activate_P ); - void cfg_write( KConfig& cfg_P ) const; + void cfg_write( TDEConfig& cfg_P ) const; typedef TQPtrListIterator< Trigger > Iterator; const TQString& comment() const; Trigger_list* copy( Action_data* data_P ) const; @@ -67,9 +67,9 @@ class KDE_EXPORT Shortcut_trigger typedef Trigger base; public: Shortcut_trigger( Action_data* data_P, const KShortcut& shortcut_P ); - Shortcut_trigger( KConfig& cfg_P, Action_data* data_P ); + Shortcut_trigger( TDEConfig& cfg_P, Action_data* data_P ); virtual ~Shortcut_trigger(); - virtual void cfg_write( KConfig& cfg_P ) const; + 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; @@ -93,9 +93,9 @@ class KDE_EXPORT Window_trigger WINDOW_DEACTIVATES = ( 1 << 3 ) }; Window_trigger( Action_data* data_P, Windowdef_list* windows_P, int window_actions_P ); - Window_trigger( KConfig& cfg_P, Action_data* data_P ); + Window_trigger( TDEConfig& cfg_P, Action_data* data_P ); virtual ~Window_trigger(); - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; #ifndef COVARIANT_RETURN_BROKEN // stupid gcc, it doesn't even warn it can't do this virtual Window_trigger* copy( Action_data* data_P ) const; #else @@ -128,9 +128,9 @@ class KDE_EXPORT Gesture_trigger typedef Trigger base; public: Gesture_trigger( Action_data* data_P, const TQString& gesture_P ); - Gesture_trigger( KConfig& cfg_P, Action_data* data_P ); + Gesture_trigger( TDEConfig& cfg_P, Action_data* data_P ); virtual ~Gesture_trigger(); - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; virtual Trigger* copy( Action_data* data_P ) const; virtual const TQString description() const; const TQString& gesturecode() const; @@ -149,9 +149,9 @@ class KDE_EXPORT Voice_trigger typedef Trigger base; public: Voice_trigger( Action_data* data_P, const TQString& Voice_P, const VoiceSignature & signature1_P, const VoiceSignature & signature2_P ); - Voice_trigger( KConfig& cfg_P, Action_data* data_P ); + Voice_trigger( TDEConfig& cfg_P, Action_data* data_P ); virtual ~Voice_trigger(); - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; virtual Trigger* copy( Action_data* data_P ) const; virtual const TQString description() const; const TQString& voicecode() const; @@ -178,7 +178,7 @@ Trigger::Trigger( Action_data* data_P ) } inline -Trigger::Trigger( KConfig&, Action_data* data_P ) +Trigger::Trigger( TDEConfig&, Action_data* data_P ) : data( data_P ) { } diff --git a/khotkeys/shared/voicesignature.cpp b/khotkeys/shared/voicesignature.cpp index 8ef817933..054f66827 100644 --- a/khotkeys/shared/voicesignature.cpp +++ b/khotkeys/shared/voicesignature.cpp @@ -398,7 +398,7 @@ TQMap<int, TQMap<int, double> > VoiceSignature::pond; -void VoiceSignature::write(KConfigBase *cfg, const TQString &key) const +void VoiceSignature::write(TDEConfigBase *cfg, const TQString &key) const { TQStringList sl; for(int x=0;x<WINDOW_NUMBER;x++) @@ -409,7 +409,7 @@ void VoiceSignature::write(KConfigBase *cfg, const TQString &key) const cfg->writeEntry(key,sl); } -void VoiceSignature::read(KConfigBase *cfg, const TQString &key) +void VoiceSignature::read(TDEConfigBase *cfg, const TQString &key) { TQStringList sl=cfg->readListEntry(key); for(int x=0;x<WINDOW_NUMBER;x++) diff --git a/khotkeys/shared/voicesignature.h b/khotkeys/shared/voicesignature.h index 82556864f..af987cce1 100644 --- a/khotkeys/shared/voicesignature.h +++ b/khotkeys/shared/voicesignature.h @@ -26,7 +26,7 @@ #include <kdemacros.h> class Sound; -class KConfigBase; +class TDEConfigBase; #define WINDOW_MINIMUM 0.10 @@ -87,8 +87,8 @@ public: static TQMemArray<double> fft(const Sound& sound, unsigned int start, unsigned int stop); static bool window(const Sound& sound, unsigned int *start, unsigned int *stop); - void write(KConfigBase *cfg, const TQString &key) const; - void read(KConfigBase *cfg, const TQString &key); + void write(TDEConfigBase *cfg, const TQString &key) const; + void read(TDEConfigBase *cfg, const TQString &key); inline bool isNull() const { diff --git a/khotkeys/shared/windows.cpp b/khotkeys/shared/windows.cpp index 4b009ace3..ddfc612e2 100644 --- a/khotkeys/shared/windows.cpp +++ b/khotkeys/shared/windows.cpp @@ -201,18 +201,18 @@ Window_data::Window_data( WId id_P ) // Windowdef -void Windowdef::cfg_write( KConfig& cfg_P ) const +void Windowdef::cfg_write( TDEConfig& cfg_P ) const { cfg_P.writeEntry( "Type", "ERROR" ); cfg_P.writeEntry( "Comment", comment()); } -Windowdef::Windowdef( KConfig& cfg_P ) +Windowdef::Windowdef( TDEConfig& cfg_P ) { _comment = cfg_P.readEntry( "Comment" ); } -Windowdef* Windowdef::create_cfg_read( KConfig& cfg_P ) +Windowdef* Windowdef::create_cfg_read( TDEConfig& cfg_P ) { TQString type = cfg_P.readEntry( "Type" ); if( type == "SIMPLE" ) @@ -223,7 +223,7 @@ Windowdef* Windowdef::create_cfg_read( KConfig& cfg_P ) // Windowdef_list -Windowdef_list::Windowdef_list( KConfig& cfg_P ) +Windowdef_list::Windowdef_list( TDEConfig& cfg_P ) : TQPtrList< Windowdef >() { setAutoDelete( true ); @@ -242,7 +242,7 @@ Windowdef_list::Windowdef_list( KConfig& cfg_P ) cfg_P.setGroup( save_cfg_group ); } -void Windowdef_list::cfg_write( KConfig& cfg_P ) const +void Windowdef_list::cfg_write( TDEConfig& cfg_P ) const { TQString save_cfg_group = cfg_P.group(); int i = 0; @@ -292,7 +292,7 @@ Windowdef_simple::Windowdef_simple( const TQString& comment_P, const TQString& t { } -Windowdef_simple::Windowdef_simple( KConfig& cfg_P ) +Windowdef_simple::Windowdef_simple( TDEConfig& cfg_P ) : Windowdef( cfg_P ) { _title = cfg_P.readEntry( "Title" ); @@ -304,7 +304,7 @@ Windowdef_simple::Windowdef_simple( KConfig& cfg_P ) _window_types = cfg_P.readNumEntry( "WindowTypes" ); } -void Windowdef_simple::cfg_write( KConfig& cfg_P ) const +void Windowdef_simple::cfg_write( TDEConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Title", title()); diff --git a/khotkeys/shared/windows.h b/khotkeys/shared/windows.h index 5c491acbf..4fa403436 100644 --- a/khotkeys/shared/windows.h +++ b/khotkeys/shared/windows.h @@ -21,7 +21,7 @@ #include "khotkeysglobal.h" -class KConfig; +class TDEConfig; class KWinModule; namespace KHotKeys @@ -80,12 +80,12 @@ class KDE_EXPORT Windowdef { public: Windowdef( const TQString& comment_P ); - Windowdef( KConfig& cfg_P ); + Windowdef( TDEConfig& cfg_P ); virtual ~Windowdef(); const TQString& comment() const; virtual bool match( const Window_data& window_P ) = 0; - static Windowdef* create_cfg_read( KConfig& cfg_P/*, Action_data_base* data_P*/ ); - virtual void cfg_write( KConfig& cfg_P ) const = 0; + static Windowdef* create_cfg_read( TDEConfig& cfg_P/*, Action_data_base* data_P*/ ); + virtual void cfg_write( TDEConfig& cfg_P ) const = 0; virtual Windowdef* copy( /*Action_data_base* data_P*/ ) const = 0; virtual const TQString description() const = 0; private: @@ -98,8 +98,8 @@ class KDE_EXPORT Windowdef_list { public: Windowdef_list( const TQString& comment_P ); - Windowdef_list( KConfig& cfg_P/*, Action_data_base* data_P*/ ); - void cfg_write( KConfig& cfg_P ) const; + Windowdef_list( TDEConfig& cfg_P/*, Action_data_base* data_P*/ ); + void cfg_write( TDEConfig& cfg_P ) const; bool match( const Window_data& window_P ) const; Windowdef_list* copy( /*Action_data_base* data_P*/ ) const; typedef TQPtrListIterator< Windowdef > Iterator; @@ -136,9 +136,9 @@ class KDE_EXPORT Windowdef_simple Windowdef_simple( const TQString& comment_P, const TQString& title_P, substr_type_t title_type_P, const TQString& wclass_P, substr_type_t wclass_type_P, const TQString& role_P, substr_type_t role_type_P, int window_types_P ); - Windowdef_simple( KConfig& cfg_P ); + Windowdef_simple( TDEConfig& cfg_P ); virtual bool match( const Window_data& window_P ); - virtual void cfg_write( KConfig& cfg_P ) const; + virtual void cfg_write( TDEConfig& cfg_P ) const; const TQString& title() const; substr_type_t title_match_type() const; const TQString& wclass() const; diff --git a/khotkeys/update/update.cpp b/khotkeys/update/update.cpp index 00649d854..1d4f26b45 100644 --- a/khotkeys/update/update.cpp +++ b/khotkeys/update/update.cpp @@ -49,7 +49,7 @@ int main( int argc, char* argv[] ) init_global_data( false, TQT_TQOBJECT(&app) ); Settings settings; settings.read_settings( true ); - KConfig cfg( file, true ); + TDEConfig cfg( file, true ); if( !settings.import( cfg, false )) { kdWarning() << "Import of " << id << " failed!" << endl; |