summaryrefslogtreecommitdiffstats
path: root/khotkeys/shared
diff options
context:
space:
mode:
Diffstat (limited to 'khotkeys/shared')
-rw-r--r--khotkeys/shared/action_data.cpp10
-rw-r--r--khotkeys/shared/action_data.h16
-rw-r--r--khotkeys/shared/actions.cpp46
-rw-r--r--khotkeys/shared/actions.h43
-rw-r--r--khotkeys/shared/conditions.cpp8
-rw-r--r--khotkeys/shared/conditions.h20
-rw-r--r--khotkeys/shared/gestures.cpp16
-rw-r--r--khotkeys/shared/gestures.h10
-rw-r--r--khotkeys/shared/input.cpp10
-rw-r--r--khotkeys/shared/input.h2
-rw-r--r--khotkeys/shared/khlistbox.cpp16
-rw-r--r--khotkeys/shared/khlistbox.h2
-rw-r--r--khotkeys/shared/khlistview.cpp16
-rw-r--r--khotkeys/shared/khlistview.h6
-rw-r--r--khotkeys/shared/khotkeysglobal.cpp2
-rw-r--r--khotkeys/shared/khotkeysglobal.h10
-rw-r--r--khotkeys/shared/settings.cpp12
-rw-r--r--khotkeys/shared/settings.h3
-rw-r--r--khotkeys/shared/sound.h4
-rw-r--r--khotkeys/shared/soundrecorder.h6
-rw-r--r--khotkeys/shared/triggers.cpp22
-rw-r--r--khotkeys/shared/triggers.h20
-rw-r--r--khotkeys/shared/voices.cpp8
-rw-r--r--khotkeys/shared/voices.h6
-rw-r--r--khotkeys/shared/voicesignature.h4
-rw-r--r--khotkeys/shared/windows.cpp8
-rw-r--r--khotkeys/shared/windows.h12
27 files changed, 195 insertions, 143 deletions
diff --git a/khotkeys/shared/action_data.cpp b/khotkeys/shared/action_data.cpp
index 4f481ea59..7993f1dc8 100644
--- a/khotkeys/shared/action_data.cpp
+++ b/khotkeys/shared/action_data.cpp
@@ -295,7 +295,7 @@ Command_url_shortcut_action_data::Command_url_shortcut_action_data( Action_data_
set_trigger( new Shortcut_trigger( this, shortcut_P ));
}
-template<> KDE_EXPORT
+template<> TDE_EXPORT
void Simple_action_data< Shortcut_trigger, Command_url_action >
::cfg_write( TDEConfig& cfg_P ) const
{
@@ -315,7 +315,7 @@ Menuentry_shortcut_action_data::Menuentry_shortcut_action_data( Action_data_grou
set_trigger( new Shortcut_trigger( this, shortcut_P ));
}
-template<> KDE_EXPORT
+template<> TDE_EXPORT
void Simple_action_data< Shortcut_trigger, Menuentry_action >
::cfg_write( TDEConfig& cfg_P ) const
{
@@ -325,7 +325,7 @@ void Simple_action_data< Shortcut_trigger, Menuentry_action >
// Dcop_shortcut_action_data
-template<> KDE_EXPORT
+template<> TDE_EXPORT
void Simple_action_data< Shortcut_trigger, Dcop_action >
::cfg_write( TDEConfig& cfg_P ) const
{
@@ -335,7 +335,7 @@ void Simple_action_data< Shortcut_trigger, Dcop_action >
// Keyboard_input_shortcut_action_data
-template<> KDE_EXPORT
+template<> TDE_EXPORT
void Simple_action_data< Shortcut_trigger, Keyboard_input_action >
::cfg_write( TDEConfig& cfg_P ) const
{
@@ -345,7 +345,7 @@ void Simple_action_data< Shortcut_trigger, Keyboard_input_action >
// Activate_window_shortcut_action_data
-template<> KDE_EXPORT
+template<> TDE_EXPORT
void Simple_action_data< Shortcut_trigger, Activate_window_action >
::cfg_write( TDEConfig& cfg_P ) const
{
diff --git a/khotkeys/shared/action_data.h b/khotkeys/shared/action_data.h
index 5d84c6f18..a29ef591f 100644
--- a/khotkeys/shared/action_data.h
+++ b/khotkeys/shared/action_data.h
@@ -31,7 +31,7 @@ namespace KHotKeys
class Action_data_group;
-class KDE_EXPORT Action_data_base
+class TDE_EXPORT Action_data_base
{
public:
Action_data_base( Action_data_group* parent_P, const TQString& name_P,
@@ -61,7 +61,7 @@ class KDE_EXPORT Action_data_base
KHOTKEYS_DISABLE_COPY( Action_data_base );
};
-class KDE_EXPORT Action_data_group
+class TDE_EXPORT Action_data_group
: public Action_data_base
{
public:
@@ -88,7 +88,7 @@ class KDE_EXPORT Action_data_group
};
// this one represents a "whole" action, i.e. triggers, resulting actions, etc.
-class KDE_EXPORT Action_data
+class TDE_EXPORT Action_data
: public Action_data_base
{
typedef Action_data_base base;
@@ -121,7 +121,7 @@ class KDE_EXPORT Action_data
#endif
};
-class KDE_EXPORT Generic_action_data
+class TDE_EXPORT Generic_action_data
: public Action_data
{
typedef Action_data base;
@@ -141,7 +141,7 @@ class KDE_EXPORT Generic_action_data
};
template< typename T, typename A >
-class KDE_EXPORT Simple_action_data
+class TDE_EXPORT Simple_action_data
: public Action_data
{
typedef Action_data base;
@@ -157,7 +157,7 @@ class KDE_EXPORT Simple_action_data
virtual void cfg_write( TDEConfig& cfg_P ) const;
};
-class KDE_EXPORT Command_url_shortcut_action_data
+class TDE_EXPORT Command_url_shortcut_action_data
: public Simple_action_data< Shortcut_trigger, Command_url_action >
{
typedef Simple_action_data< Shortcut_trigger, Command_url_action > base;
@@ -170,7 +170,7 @@ class KDE_EXPORT Command_url_shortcut_action_data
Command_url_shortcut_action_data( TDEConfig& cfg_P, Action_data_group* parent_P );
};
-class KDE_EXPORT Menuentry_shortcut_action_data
+class TDE_EXPORT Menuentry_shortcut_action_data
: public Simple_action_data< Shortcut_trigger, Menuentry_action >
{
typedef Simple_action_data< Shortcut_trigger, Menuentry_action > base;
@@ -189,7 +189,7 @@ typedef Simple_action_data< Shortcut_trigger, Keyboard_input_action >
typedef Simple_action_data< Shortcut_trigger, Activate_window_action >
Activate_window_shortcut_action_data;
-class KDE_EXPORT Keyboard_input_gesture_action_data
+class TDE_EXPORT Keyboard_input_gesture_action_data
: public Action_data
{
typedef Action_data base;
diff --git a/khotkeys/shared/actions.cpp b/khotkeys/shared/actions.cpp
index c8590789a..b5e7baa8e 100644
--- a/khotkeys/shared/actions.cpp
+++ b/khotkeys/shared/actions.cpp
@@ -21,14 +21,14 @@
#include <kdebug.h>
#include <kurifilter.h>
#include <tdeglobal.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include <tdeapplication.h>
#include <dcopclient.h>
-#include <kdesktopfile.h>
+#include <tdedesktopfile.h>
#include <tdelocale.h>
#include <tdeaccel.h>
#include <kservice.h>
-#include <kprocess.h>
+#include <tdeprocess.h>
#include <tdemessagebox.h>
#include "windows.h"
@@ -54,7 +54,9 @@ Action* Action::create_cfg_read( TDEConfig& cfg_P, Action_data* data_P )
return new Keyboard_input_action( cfg_P, data_P );
if( type == "ACTIVATE_WINDOW" )
return new Activate_window_action( cfg_P, data_P );
- kdWarning( 1217 ) << "Unknown Action type read from cfg file\n";
+ if( type == "WAITING" )
+ return new Waiting_action( cfg_P, data_P );
+ kdWarning( 1217 ) << "Unknown Action type read from cfg file: " << type << endl;
return NULL;
}
@@ -122,7 +124,7 @@ void Command_url_action::execute()
static bool sm_ready = false;
if( !sm_ready )
{
- kapp->propagateSessionManager();
+ tdeApp->propagateSessionManager();
sm_ready = true;
}
// int space_pos = command_url().find( ' ' );
@@ -147,7 +149,7 @@ void Command_url_action::execute()
}
case KURIFilterData::EXECUTABLE:
{
- if (!kapp->authorize("shell_access"))
+ if (!tdeApp->authorize("shell_access"))
return;
if( !uri.hasArgsAndOptions())
{
@@ -165,7 +167,7 @@ void Command_url_action::execute()
}
case KURIFilterData::SHELL:
{
- if (!kapp->authorize("shell_access"))
+ if (!tdeApp->authorize("shell_access"))
return;
if( !KRun::runCommand(
cmd + ( uri.hasArgsAndOptions() ? uri.argsAndOptions() : "" ),
@@ -452,4 +454,34 @@ Action* Activate_window_action::copy( Action_data* data_P ) const
return new Activate_window_action( data_P, window()->copy());
}
+// Waiting_action
+
+Waiting_action::Waiting_action( TDEConfig& cfg_P, Action_data* data_P )
+ : Action( cfg_P, data_P )
+ {
+ _waiting_time = cfg_P.readNumEntry("Time");
+ }
+
+void Waiting_action::cfg_write( TDEConfig& cfg_P ) const
+ {
+ base::cfg_write( cfg_P );
+ cfg_P.writeEntry( "Type", "WAITING" ); // overwrites value set in base::cfg_write()
+ cfg_P.writeEntry( "Time", _waiting_time);
+ }
+
+void Waiting_action::execute()
+ {
+ usleep(_waiting_time * 1000);
+ }
+
+TQString Waiting_action::description() const
+ {
+ return i18n( "Waiting %1 ms" ).arg(_waiting_time);
+ }
+
+Action* Waiting_action::copy( Action_data* data_P ) const
+ {
+ return new Waiting_action( data_P, _waiting_time);
+ }
+
} // namespace KHotKeys
diff --git a/khotkeys/shared/actions.h b/khotkeys/shared/actions.h
index f381683e1..d2e63db85 100644
--- a/khotkeys/shared/actions.h
+++ b/khotkeys/shared/actions.h
@@ -30,7 +30,7 @@ class Windowdef_list;
// this one is a base for all "real" resulting actions, e.g. running a command,
// Action_data instances usually contain at least one Action
-class KDE_EXPORT Action
+class TDE_EXPORT Action
{
public:
Action( Action_data* data_P );
@@ -46,11 +46,11 @@ class KDE_EXPORT Action
KHOTKEYS_DISABLE_COPY( Action );
};
-class KDE_EXPORT Action_list
+class TDE_EXPORT Action_list
: public TQPtrList< Action >
{
public:
- Action_list( const TQString& comment_P ); // CHECKME nebo i data ?
+ Action_list( const TQString& comment_P );
Action_list( TDEConfig& cfg_P, Action_data* data_P );
void cfg_write( TDEConfig& cfg_P ) const;
typedef TQPtrListIterator< Action > Iterator;
@@ -60,7 +60,7 @@ class KDE_EXPORT Action_list
KHOTKEYS_DISABLE_COPY( Action_list );
};
-class KDE_EXPORT Command_url_action
+class TDE_EXPORT Command_url_action
: public Action
{
typedef Action base;
@@ -78,7 +78,7 @@ class KDE_EXPORT Command_url_action
TQString _command_url;
};
-class KDE_EXPORT Menuentry_action
+class TDE_EXPORT Menuentry_action
: public Command_url_action
{
typedef Command_url_action base;
@@ -94,7 +94,7 @@ class KDE_EXPORT Menuentry_action
KService::Ptr _service;
};
-class KDE_EXPORT Dcop_action
+class TDE_EXPORT Dcop_action
: public Action
{
typedef Action base;
@@ -111,13 +111,13 @@ class KDE_EXPORT Dcop_action
virtual TQString description() const;
virtual Action* copy( Action_data* data_P ) const;
private:
- TQString app; // CHECKME TQCString ?
+ TQString app;
TQString obj;
TQString call;
TQString args;
};
-class KDE_EXPORT Keyboard_input_action
+class TDE_EXPORT Keyboard_input_action
: public Action
{
typedef Action base;
@@ -142,7 +142,7 @@ class KDE_EXPORT Keyboard_input_action
bool _active_window;
};
-class KDE_EXPORT Activate_window_action
+class TDE_EXPORT Activate_window_action
: public Action
{
typedef Action base;
@@ -159,6 +159,21 @@ class KDE_EXPORT Activate_window_action
const Windowdef_list* _window;
};
+class TDE_EXPORT Waiting_action
+ : public Action
+ {
+ typedef Action base;
+ public:
+ Waiting_action( Action_data* data_P, const int waiting_time );
+ Waiting_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;
+
+ int _waiting_time;
+ };
+
//***************************************************************************
// Inline
//***************************************************************************
@@ -300,6 +315,14 @@ const Windowdef_list* Activate_window_action::window() const
return _window;
}
+// Waiting_action
+
+inline
+Waiting_action::Waiting_action( Action_data* data_P, const int waiting_time)
+ : Action( data_P ), _waiting_time(waiting_time)
+ {
+ }
+
} // namespace KHotKeys
-
+
#endif
diff --git a/khotkeys/shared/conditions.cpp b/khotkeys/shared/conditions.cpp
index b09284b44..1d9f37b9c 100644
--- a/khotkeys/shared/conditions.cpp
+++ b/khotkeys/shared/conditions.cpp
@@ -257,8 +257,8 @@ Active_window_condition::Active_window_condition( TDEConfig& cfg_P, Condition_li
void Active_window_condition::init()
{
- connect( windows_handler, TQT_SIGNAL( active_window_changed( WId )),
- this, TQT_SLOT( active_window_changed( WId )));
+ connect( windows_handler, TQ_SIGNAL( active_window_changed( WId )),
+ this, TQ_SLOT( active_window_changed( WId )));
}
bool Active_window_condition::match() const
@@ -323,8 +323,8 @@ Existing_window_condition::Existing_window_condition( TDEConfig& cfg_P, Conditio
void Existing_window_condition::init()
{
- connect( windows_handler, TQT_SIGNAL( window_added( WId )), this, TQT_SLOT( window_added( WId )));
- connect( windows_handler, TQT_SIGNAL( window_removed( WId )), this, TQT_SLOT( window_removed( WId )));
+ connect( windows_handler, TQ_SIGNAL( window_added( WId )), this, TQ_SLOT( window_added( WId )));
+ connect( windows_handler, TQ_SIGNAL( window_removed( WId )), this, TQ_SLOT( window_removed( WId )));
}
bool Existing_window_condition::match() const
diff --git a/khotkeys/shared/conditions.h b/khotkeys/shared/conditions.h
index ff1af7d07..02b43a63c 100644
--- a/khotkeys/shared/conditions.h
+++ b/khotkeys/shared/conditions.h
@@ -30,7 +30,7 @@ class Action_data_base;
class Action_data;
class Condition_list_base;
-class KDE_EXPORT Condition
+class TDE_EXPORT Condition
{
public:
Condition( Condition_list_base* parent_P );
@@ -49,7 +49,7 @@ class KDE_EXPORT Condition
KHOTKEYS_DISABLE_COPY( Condition );
};
-class KDE_EXPORT Condition_list_base
+class TDE_EXPORT Condition_list_base
: public Condition, public TQPtrList< Condition > // inheritance ?
{
typedef Condition base;
@@ -64,7 +64,7 @@ class KDE_EXPORT Condition_list_base
typedef TQPtrListIterator< Condition > Iterator;
};
-class KDE_EXPORT Condition_list
+class TDE_EXPORT Condition_list
: public Condition_list_base
{
typedef Condition_list_base base;
@@ -84,10 +84,10 @@ class KDE_EXPORT Condition_list
Action_data_base* data;
};
-class KDE_EXPORT Active_window_condition
+class TDE_EXPORT Active_window_condition
: public TQObject, public Condition
{
- Q_OBJECT
+ TQ_OBJECT
typedef Condition base;
public:
Active_window_condition( Windowdef_list* window_P, Condition_list_base* parent_P );
@@ -111,10 +111,10 @@ class KDE_EXPORT Active_window_condition
bool is_match;
};
-class KDE_EXPORT Existing_window_condition
+class TDE_EXPORT Existing_window_condition
: public TQObject, public Condition
{
- Q_OBJECT
+ TQ_OBJECT
typedef Condition base;
public:
Existing_window_condition( Windowdef_list* window_P, Condition_list_base* parent_P );
@@ -139,7 +139,7 @@ class KDE_EXPORT Existing_window_condition
bool is_match;
};
-class KDE_EXPORT Not_condition
+class TDE_EXPORT Not_condition
: public Condition_list_base
{
typedef Condition_list_base base;
@@ -154,7 +154,7 @@ class KDE_EXPORT Not_condition
virtual bool accepts_children() const;
};
-class KDE_EXPORT And_condition
+class TDE_EXPORT And_condition
: public Condition_list_base
{
typedef Condition_list_base base;
@@ -167,7 +167,7 @@ class KDE_EXPORT And_condition
virtual const TQString description() const;
};
-class KDE_EXPORT Or_condition
+class TDE_EXPORT Or_condition
: public Condition_list_base
{
typedef Condition_list_base base;
diff --git a/khotkeys/shared/gestures.cpp b/khotkeys/shared/gestures.cpp
index 9933ba74f..d38d4f023 100644
--- a/khotkeys/shared/gestures.cpp
+++ b/khotkeys/shared/gestures.cpp
@@ -49,9 +49,9 @@ Gesture::Gesture( bool /*enabled_P*/, TQObject* parent_P )
(void) new DeleteObject( this, parent_P );
assert( gesture_handler == NULL );
gesture_handler = this;
- connect( &nostroke_timer, TQT_SIGNAL( timeout()), TQT_SLOT( stroke_timeout()));
- connect( windows_handler, TQT_SIGNAL( active_window_changed( WId )),
- TQT_SLOT( active_window_changed( WId )));
+ connect( &nostroke_timer, TQ_SIGNAL( timeout()), TQ_SLOT( stroke_timeout()));
+ connect( windows_handler, TQ_SIGNAL( active_window_changed( WId )),
+ TQ_SLOT( active_window_changed( WId )));
}
Gesture::~Gesture()
@@ -86,15 +86,15 @@ void Gesture::update_grab()
if( _enabled && handlers.count() > 0
&& ( exclude == NULL || !exclude->match( Window_data( windows_handler->active_window()))))
{
- kapp->removeX11EventFilter( this ); // avoid being installed twice
- kapp->installX11EventFilter( this );
+ tdeApp->removeX11EventFilter( this ); // avoid being installed twice
+ tdeApp->installX11EventFilter( this );
// CHECKME at se grabuje jen kdyz je alespon jedno gesto?
grab_mouse( true );
}
else
{
grab_mouse( false );
- kapp->removeX11EventFilter( this );
+ tdeApp->removeX11EventFilter( this );
}
}
@@ -108,7 +108,7 @@ void Gesture::register_handler( TQObject* receiver_P, const char* slot_P )
if( handlers.contains( receiver_P ))
return;
handlers[ receiver_P ] = true;
- connect( this, TQT_SIGNAL( handle_gesture( const TQString&, WId )),
+ connect( this, TQ_SIGNAL( handle_gesture( const TQString&, WId )),
receiver_P, slot_P );
if( handlers.count() == 1 )
update_grab();
@@ -119,7 +119,7 @@ void Gesture::unregister_handler( TQObject* receiver_P, const char* slot_P )
if( !handlers.contains( receiver_P ))
return;
handlers.remove( receiver_P );
- disconnect( this, TQT_SIGNAL( handle_gesture( const TQString&, WId )),
+ disconnect( this, TQ_SIGNAL( handle_gesture( const TQString&, WId )),
receiver_P, slot_P );
if( handlers.count() == 0 )
update_grab();
diff --git a/khotkeys/shared/gestures.h b/khotkeys/shared/gestures.h
index 4f0f3f94c..9f4825f93 100644
--- a/khotkeys/shared/gestures.h
+++ b/khotkeys/shared/gestures.h
@@ -23,9 +23,9 @@ namespace KHotKeys
{
class Gesture;
-KDE_EXPORT extern Gesture* gesture_handler;
+TDE_EXPORT extern Gesture* gesture_handler;
-class KDE_EXPORT Stroke
+class TDE_EXPORT Stroke
{
public:
// maximum number of numbers in stroke
@@ -62,10 +62,10 @@ class KDE_EXPORT Stroke
char ret_val[ MAX_SEQUENCE ];
};
-class KDE_EXPORT Gesture
+class TDE_EXPORT Gesture
: public TQWidget // not TQObject because of x11EventFilter()
{
- Q_OBJECT
+ TQ_OBJECT
public:
Gesture( bool enabled_P, TQObject* parent_P );
virtual ~Gesture();
@@ -103,7 +103,7 @@ class KDE_EXPORT Gesture
class DeleteObject
: public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
DeleteObject( TQWidget* widget_P, TQObject* parent_P )
: TQObject( parent_P ), widget( widget_P ) {}
diff --git a/khotkeys/shared/input.cpp b/khotkeys/shared/input.cpp
index 7b9696c7e..44176ef44 100644
--- a/khotkeys/shared/input.cpp
+++ b/khotkeys/shared/input.cpp
@@ -19,7 +19,7 @@
#include <assert.h>
#include <tqwidget.h>
-#include <kglobalaccel.h>
+#include <tdeglobalaccel.h>
#include <kdebug.h>
#include <tdeapplication.h>
#include <tdeversion.h>
@@ -106,12 +106,12 @@ void Kbd::grab_shortcut( const TDEShortcut& shortcut_P )
// CHECKME ugly ugly hack
TQString name = ' ' + TQString::number( keycode_P );
kga->insertItem( "", name, keycode_P );
- kga->connectItem( name, this, TQT_SLOT( key_slot( int )));
+ kga->connectItem( name, this, TQ_SLOT( key_slot( int )));
#endif
TQString name = ' ' + shortcut_P.toStringInternal();
kga->insert( name, name, TQString::null, shortcut_P, shortcut_P,
- this, TQT_SLOT( key_slot( TQString )));
- TQTimer::singleShot( 0, this, TQT_SLOT( update_connections()));
+ this, TQ_SLOT( key_slot( TQString )));
+ TQTimer::singleShot( 0, this, TQ_SLOT( update_connections()));
}
}
@@ -129,7 +129,7 @@ void Kbd::ungrab_shortcut( const TDEShortcut& shortcut_P )
#endif
kga->remove( ' ' + shortcut_P.toStringInternal());
grabs.remove( shortcut_P );
- TQTimer::singleShot( 0, this, TQT_SLOT( update_connections()));
+ TQTimer::singleShot( 0, this, TQ_SLOT( update_connections()));
}
}
diff --git a/khotkeys/shared/input.h b/khotkeys/shared/input.h
index c6bbdf1e5..e810cea80 100644
--- a/khotkeys/shared/input.h
+++ b/khotkeys/shared/input.h
@@ -35,7 +35,7 @@ class Kbd_receiver
class Kbd
: public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
Kbd( bool grabbing_enabled_P, TQObject* parent_P );
virtual ~Kbd();
diff --git a/khotkeys/shared/khlistbox.cpp b/khotkeys/shared/khlistbox.cpp
index ff6d96221..f0080d6de 100644
--- a/khotkeys/shared/khlistbox.cpp
+++ b/khotkeys/shared/khlistbox.cpp
@@ -25,15 +25,15 @@ KHListBox::KHListBox( TQWidget* parent_P, const char* name_P )
: TQListBox( parent_P, name_P ), saved_current_item( NULL ),
in_clear( false ), force_select( false )
{
- connect( this, TQT_SIGNAL( selectionChanged( TQListBoxItem* )),
- TQT_SLOT( slot_selection_changed( TQListBoxItem* )));
- connect( this, TQT_SIGNAL( currentChanged( TQListBoxItem* )),
- TQT_SLOT( slot_current_changed( TQListBoxItem* )));
+ connect( this, TQ_SIGNAL( selectionChanged( TQListBoxItem* )),
+ TQ_SLOT( slot_selection_changed( TQListBoxItem* )));
+ connect( this, TQ_SIGNAL( currentChanged( TQListBoxItem* )),
+ TQ_SLOT( slot_current_changed( TQListBoxItem* )));
// CHECKME grrr
- connect( this, TQT_SIGNAL( selectionChanged()),
- TQT_SLOT( slot_selection_changed()));
- connect( &insert_select_timer, TQT_SIGNAL( timeout()),
- TQT_SLOT( slot_insert_select()));
+ connect( this, TQ_SIGNAL( selectionChanged()),
+ TQ_SLOT( slot_selection_changed()));
+ connect( &insert_select_timer, TQ_SIGNAL( timeout()),
+ TQ_SLOT( slot_insert_select()));
}
void KHListBox::slot_selection_changed()
diff --git a/khotkeys/shared/khlistbox.h b/khotkeys/shared/khlistbox.h
index d0f9b51ae..8f4a77138 100644
--- a/khotkeys/shared/khlistbox.h
+++ b/khotkeys/shared/khlistbox.h
@@ -21,7 +21,7 @@ namespace KHotKeys
class KHListBox
: public TQListBox
{
- Q_OBJECT
+ TQ_OBJECT
TQ_PROPERTY( bool forceSelect READ forceSelect WRITE setForceSelect )
public:
KHListBox( TQWidget* parent_P, const char* name_P = NULL );
diff --git a/khotkeys/shared/khlistview.cpp b/khotkeys/shared/khlistview.cpp
index ae348af33..a9943996a 100644
--- a/khotkeys/shared/khlistview.cpp
+++ b/khotkeys/shared/khlistview.cpp
@@ -25,15 +25,15 @@ KHListView::KHListView( TQWidget* parent_P, const char* name_P )
: TDEListView( parent_P, name_P ), saved_current_item( NULL ),
in_clear( false ), ignore( false ), force_select( false )
{
- connect( this, TQT_SIGNAL( selectionChanged( TQListViewItem* )),
- TQT_SLOT( slot_selection_changed( TQListViewItem* )));
- connect( this, TQT_SIGNAL( currentChanged( TQListViewItem* )),
- TQT_SLOT( slot_current_changed( TQListViewItem* )));
+ connect( this, TQ_SIGNAL( selectionChanged( TQListViewItem* )),
+ TQ_SLOT( slot_selection_changed( TQListViewItem* )));
+ connect( this, TQ_SIGNAL( currentChanged( TQListViewItem* )),
+ TQ_SLOT( slot_current_changed( TQListViewItem* )));
// CHECKME grrr
- connect( this, TQT_SIGNAL( selectionChanged()),
- TQT_SLOT( slot_selection_changed()));
- connect( &insert_select_timer, TQT_SIGNAL( timeout()),
- TQT_SLOT( slot_insert_select()));
+ connect( this, TQ_SIGNAL( selectionChanged()),
+ TQ_SLOT( slot_selection_changed()));
+ connect( &insert_select_timer, TQ_SIGNAL( timeout()),
+ TQ_SLOT( slot_insert_select()));
}
void KHListView::slot_selection_changed()
diff --git a/khotkeys/shared/khlistview.h b/khotkeys/shared/khlistview.h
index 2cee34617..01fbf9e28 100644
--- a/khotkeys/shared/khlistview.h
+++ b/khotkeys/shared/khlistview.h
@@ -14,15 +14,15 @@
#include <tqtimer.h>
#include <tdelistview.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace KHotKeys
{
-class KDE_EXPORT KHListView
+class TDE_EXPORT KHListView
: public TDEListView
{
- Q_OBJECT
+ TQ_OBJECT
TQ_PROPERTY( bool forceSelect READ forceSelect WRITE setForceSelect )
public:
KHListView( TQWidget* parent_P, const char* name_P = NULL );
diff --git a/khotkeys/shared/khotkeysglobal.cpp b/khotkeys/shared/khotkeysglobal.cpp
index 87fe74c38..123aa8bf9 100644
--- a/khotkeys/shared/khotkeysglobal.cpp
+++ b/khotkeys/shared/khotkeysglobal.cpp
@@ -18,7 +18,7 @@
#include <assert.h>
#include <kdebug.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include <klibloader.h>
#include "input.h"
diff --git a/khotkeys/shared/khotkeysglobal.h b/khotkeys/shared/khotkeysglobal.h
index c97ef1dea..427958936 100644
--- a/khotkeys/shared/khotkeysglobal.h
+++ b/khotkeys/shared/khotkeysglobal.h
@@ -38,17 +38,17 @@ extern Windows* windows_handler;
#define KHOTKEYS_DISABLE_COPY( cls ) private: cls( const cls& ); cls& operator=( const cls& )
// CHECKME hmms :(
-KDE_EXPORT bool khotkeys_active();
-KDE_EXPORT void khotkeys_set_active( bool active_P );
+TDE_EXPORT bool khotkeys_active();
+TDE_EXPORT void khotkeys_set_active( bool active_P );
TQString get_menu_entry_from_path( const TQString& path_P );
-KDE_EXPORT void init_global_data( bool active_P, TQObject* owner_P );
+TDE_EXPORT void init_global_data( bool active_P, TQObject* owner_P );
const char* const MENU_EDITOR_ENTRIES_GROUP_NAME = I18N_NOOP( "Menu Editor entries" );
-KDE_EXPORT bool haveArts();
-KDE_EXPORT void disableArts();
+TDE_EXPORT bool haveArts();
+TDE_EXPORT void disableArts();
//***************************************************************************
// Inline
diff --git a/khotkeys/shared/settings.cpp b/khotkeys/shared/settings.cpp
index 76adac6b9..c4068564e 100644
--- a/khotkeys/shared/settings.cpp
+++ b/khotkeys/shared/settings.cpp
@@ -103,8 +103,6 @@ bool Settings::read_settings( TDEConfig& cfg_P, bool include_disabled_P, ImportT
}
if( import_P != ImportNone )
return true; // don't read global settings
- cfg_P.setGroup( "Main" ); // main group
- daemon_disabled = cfg_P.readBoolEntry( "Disabled", false );
cfg_P.setGroup( "Gestures" );
gestures_disabled_globally = cfg_P.readBoolEntry( "Disabled", true );
gesture_mouse_button = cfg_P.readNumEntry( "MouseButton", 2 );
@@ -132,9 +130,6 @@ void Settings::write_settings()
cfg.writeEntry( "AlreadyImported", already_imported );
cfg.setGroup( "Data" );
int cnt = write_actions_recursively_v2( cfg, actions, true );
- cfg.setGroup( "Main" );
- cfg.writeEntry( "Autostart", cnt != 0 && !daemon_disabled );
- cfg.writeEntry( "Disabled", daemon_disabled );
cfg.setGroup( "Gestures" );
cfg.writeEntry( "Disabled", gestures_disabled_globally );
cfg.writeEntry( "MouseButton", gesture_mouse_button );
@@ -145,15 +140,16 @@ void Settings::write_settings()
gestures_exclude->cfg_write( cfg );
}
else
+ {
cfg.deleteGroup( "GesturesExclude" );
- cfg.setGroup( "Voice" );
- cfg.writeEntry("Shortcut" , voice_shortcut.toStringInternal() );
+ }
+ cfg.setGroup( "Voice" );
+ cfg.writeEntry("Shortcut" , voice_shortcut.toStringInternal() );
}
// 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( TDEConfig& cfg_P, Action_data_group* parent_P, bool enabled_P )
{
int enabled_cnt = 0;
diff --git a/khotkeys/shared/settings.h b/khotkeys/shared/settings.h
index e28502cfe..da4a291c1 100644
--- a/khotkeys/shared/settings.h
+++ b/khotkeys/shared/settings.h
@@ -26,7 +26,7 @@ enum ImportType
ImportSilent // if already imported before, ignore (called from the update script)
};
-class KDE_EXPORT Settings
+class TDE_EXPORT Settings
{
public:
Settings();
@@ -37,7 +37,6 @@ class KDE_EXPORT Settings
bool gestures_disabled_globally;
int gesture_mouse_button;
int gesture_timeout;
- bool daemon_disabled;
Windowdef_list* gestures_exclude;
TDEShortcut voice_shortcut;
protected:
diff --git a/khotkeys/shared/sound.h b/khotkeys/shared/sound.h
index 6453563de..f62eb2855 100644
--- a/khotkeys/shared/sound.h
+++ b/khotkeys/shared/sound.h
@@ -22,12 +22,12 @@
#include <tqmemarray.h>
#include <tqstring.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
/**
@author Olivier Goffart
*/
-class KDE_EXPORT Sound{
+class TDE_EXPORT Sound{
public:
Sound();
~Sound();
diff --git a/khotkeys/shared/soundrecorder.h b/khotkeys/shared/soundrecorder.h
index c7e55fc22..5f0ffe9fe 100644
--- a/khotkeys/shared/soundrecorder.h
+++ b/khotkeys/shared/soundrecorder.h
@@ -22,7 +22,7 @@
#include <tqobject.h>
#include "sound.h"
-#include <kdemacros.h>
+#include <tdemacros.h>
class KLibrary;
@@ -34,9 +34,9 @@ namespace KHotKeys
/**
@author Olivier Goffart
*/
-class KDE_EXPORT SoundRecorder : public TQObject
+class TDE_EXPORT SoundRecorder : public TQObject
{
-Q_OBJECT
+TQ_OBJECT
public:
static SoundRecorder* create( TQObject* parent = 0, const char* name = 0 );
virtual ~SoundRecorder();
diff --git a/khotkeys/shared/triggers.cpp b/khotkeys/shared/triggers.cpp
index 115bc6687..5457d8226 100644
--- a/khotkeys/shared/triggers.cpp
+++ b/khotkeys/shared/triggers.cpp
@@ -16,7 +16,7 @@
#include "triggers.h"
-#include <kglobalaccel.h>
+#include <tdeglobalaccel.h>
#include <tdeconfig.h>
#include <kdebug.h>
#include <twinmodule.h>
@@ -197,13 +197,13 @@ Window_trigger::~Window_trigger()
void Window_trigger::init()
{
kdDebug( 1217 ) << "Window_trigger::init()" << endl;
- connect( windows_handler, TQT_SIGNAL( window_added( WId )), this, TQT_SLOT( window_added( WId )));
- connect( windows_handler, TQT_SIGNAL( window_removed( WId )), this, TQT_SLOT( window_removed( WId )));
+ connect( windows_handler, TQ_SIGNAL( window_added( WId )), this, TQ_SLOT( window_added( WId )));
+ connect( windows_handler, TQ_SIGNAL( window_removed( WId )), this, TQ_SLOT( window_removed( WId )));
if( window_actions & ( WINDOW_ACTIVATES | WINDOW_DEACTIVATES /*| WINDOW_DISAPPEARS*/ ))
- connect( windows_handler, TQT_SIGNAL( active_window_changed( WId )),
- this, TQT_SLOT( active_window_changed( WId )));
- connect( windows_handler, TQT_SIGNAL( window_changed( WId, unsigned int )),
- this, TQT_SLOT( window_changed( WId, unsigned int )));
+ connect( windows_handler, TQ_SIGNAL( active_window_changed( WId )),
+ this, TQ_SLOT( active_window_changed( WId )));
+ connect( windows_handler, TQ_SIGNAL( window_changed( WId, unsigned int )),
+ this, TQ_SLOT( window_changed( WId, unsigned int )));
}
void Window_trigger::activate( bool activate_P )
@@ -277,6 +277,7 @@ void Window_trigger::window_changed( WId window_P, unsigned int dirty_P )
bool matches = windows()->match( Window_data( window_P ));
existing_windows[ window_P ] = matches;
if( active && matches && !was_match )
+ {
if( window_actions & WINDOW_APPEARS )
{
windows_handler->set_action_window( window_P );
@@ -287,6 +288,7 @@ void Window_trigger::window_changed( WId window_P, unsigned int dirty_P )
windows_handler->set_action_window( window_P );
data->execute();
}
+ }
kdDebug( 1217 ) << "Window_trigger::w_changed() : " << was_match << "|" << matches << endl;
}
@@ -333,7 +335,7 @@ Gesture_trigger::Gesture_trigger( TDEConfig& cfg_P, Action_data* data_P )
Gesture_trigger::~Gesture_trigger()
{
- gesture_handler->unregister_handler( this, TQT_SLOT( handle_gesture( const TQString&, WId )));
+ gesture_handler->unregister_handler( this, TQ_SLOT( handle_gesture( const TQString&, WId )));
}
void Gesture_trigger::cfg_write( TDEConfig& cfg_P ) const
@@ -366,9 +368,9 @@ void Gesture_trigger::handle_gesture( const TQString &gesture_P, WId window_P )
void Gesture_trigger::activate( bool activate_P )
{
if( activate_P )
- gesture_handler->register_handler( this, TQT_SLOT( handle_gesture( const TQString&, WId )));
+ gesture_handler->register_handler( this, TQ_SLOT( handle_gesture( const TQString&, WId )));
else
- gesture_handler->unregister_handler( this, TQT_SLOT( handle_gesture( const TQString&, WId )));
+ gesture_handler->unregister_handler( this, TQ_SLOT( handle_gesture( const TQString&, WId )));
}
diff --git a/khotkeys/shared/triggers.h b/khotkeys/shared/triggers.h
index c74a3a54a..681f784b7 100644
--- a/khotkeys/shared/triggers.h
+++ b/khotkeys/shared/triggers.h
@@ -14,7 +14,7 @@
#include <tqptrlist.h>
#include <tqtimer.h>
#include <tqmap.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
#include "khotkeysglobal.h"
#include "voicesignature.h"
@@ -29,7 +29,7 @@ namespace KHotKeys
class Windowdef_list;
class Action_data;
-class KDE_EXPORT Trigger
+class TDE_EXPORT Trigger
{
public:
Trigger( Action_data* data_P );
@@ -45,7 +45,7 @@ class KDE_EXPORT Trigger
KHOTKEYS_DISABLE_COPY( Trigger );
};
-class KDE_EXPORT Trigger_list
+class TDE_EXPORT Trigger_list
: public TQPtrList< Trigger >
{
public:
@@ -61,7 +61,7 @@ class KDE_EXPORT Trigger_list
KHOTKEYS_DISABLE_COPY( Trigger_list );
};
-class KDE_EXPORT Shortcut_trigger
+class TDE_EXPORT Shortcut_trigger
: public Trigger, public Kbd_receiver
{
typedef Trigger base;
@@ -79,10 +79,10 @@ class KDE_EXPORT Shortcut_trigger
TDEShortcut _shortcut;
};
-class KDE_EXPORT Window_trigger
+class TDE_EXPORT Window_trigger
: public TQObject, public Trigger
{
- Q_OBJECT
+ TQ_OBJECT
typedef Trigger base;
public:
enum window_action_t
@@ -121,10 +121,10 @@ class KDE_EXPORT Window_trigger
bool active;
};
-class KDE_EXPORT Gesture_trigger
+class TDE_EXPORT Gesture_trigger
: public TQObject, public Trigger
{
- Q_OBJECT
+ TQ_OBJECT
typedef Trigger base;
public:
Gesture_trigger( Action_data* data_P, const TQString& gesture_P );
@@ -142,10 +142,10 @@ class KDE_EXPORT Gesture_trigger
};
-class KDE_EXPORT Voice_trigger
+class TDE_EXPORT Voice_trigger
: public TQObject, public Trigger
{
- Q_OBJECT
+ TQ_OBJECT
typedef Trigger base;
public:
Voice_trigger( Action_data* data_P, const TQString& Voice_P, const VoiceSignature & signature1_P, const VoiceSignature & signature2_P );
diff --git a/khotkeys/shared/voices.cpp b/khotkeys/shared/voices.cpp
index a31ac8237..693c01044 100644
--- a/khotkeys/shared/voices.cpp
+++ b/khotkeys/shared/voices.cpp
@@ -28,7 +28,7 @@
#include <kxerrorhandler.h>
#include <kkeynative.h>
#include <tqtimer.h>
-#include <kglobalaccel.h>
+#include <tdeglobalaccel.h>
#include <X11/Xlib.h>
@@ -95,7 +95,7 @@ void Voice::record_start()
if(!_recorder)
{
_recorder= SoundRecorder::create(this);
- connect(_recorder, TQT_SIGNAL(recorded(const Sound& )), this, TQT_SLOT(slot_sound_recorded(const Sound& )));
+ connect(_recorder, TQ_SIGNAL(recorded(const Sound& )), this, TQ_SLOT(slot_sound_recorded(const Sound& )));
}
_recorder->start();
@@ -208,7 +208,7 @@ void Voice::set_shortcut( const TDEShortcut &shortcut)
_kga = new TDEGlobalAccel( this );
_kga->remove("voice");
- _kga->insert( "voice", i18n("Voice"), TQString::null, shortcut, 0, this, TQT_SLOT(slot_key_pressed())) ;
+ _kga->insert( "voice", i18n("Voice"), TQString::null, shortcut, 0, this, TQ_SLOT(slot_key_pressed())) ;
_kga->updateConnections();
}
@@ -224,7 +224,7 @@ void Voice::slot_key_pressed()
if(!_timer)
{
_timer=new TQTimer(this);
- connect(_timer, TQT_SIGNAL(timeout()) , this, TQT_SLOT(slot_timeout()));
+ connect(_timer, TQ_SIGNAL(timeout()) , this, TQ_SLOT(slot_timeout()));
}
_timer->start(1000*20,true);
diff --git a/khotkeys/shared/voices.h b/khotkeys/shared/voices.h
index ccd07563f..f5e1127ff 100644
--- a/khotkeys/shared/voices.h
+++ b/khotkeys/shared/voices.h
@@ -28,9 +28,9 @@ class Voice_trigger;
class VoiceSignature;
-class KDE_EXPORT Voice : public TQObject
+class TDE_EXPORT Voice : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
Voice( bool enabled_P, TQObject* parent_P );
virtual ~Voice();
@@ -76,7 +76,7 @@ class KDE_EXPORT Voice : public TQObject
};
-KDE_EXPORT extern Voice* voice_handler;
+TDE_EXPORT extern Voice* voice_handler;
} // namespace KHotKeys
diff --git a/khotkeys/shared/voicesignature.h b/khotkeys/shared/voicesignature.h
index af987cce1..e0f31bb31 100644
--- a/khotkeys/shared/voicesignature.h
+++ b/khotkeys/shared/voicesignature.h
@@ -23,7 +23,7 @@
#include <tqmemarray.h>
#include <tqmap.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
class Sound;
class TDEConfigBase;
@@ -66,7 +66,7 @@ namespace KHotKeys
/**
@author Olivier Goffart
*/
-class KDE_EXPORT VoiceSignature{
+class TDE_EXPORT VoiceSignature{
public:
explicit VoiceSignature(const Sound& s);
diff --git a/khotkeys/shared/windows.cpp b/khotkeys/shared/windows.cpp
index 077bf7b1d..e91e41df3 100644
--- a/khotkeys/shared/windows.cpp
+++ b/khotkeys/shared/windows.cpp
@@ -45,10 +45,10 @@ Windows::Windows( bool enable_signal_P, TQObject* parent_P )
windows_handler = this;
if( signals_enabled )
{
- connect( twin_module, TQT_SIGNAL( windowAdded( WId )), TQT_SLOT( window_added_slot( WId )));
- connect( twin_module, TQT_SIGNAL( windowRemoved( WId )), TQT_SLOT( window_removed_slot( WId )));
- connect( twin_module, TQT_SIGNAL( activeWindowChanged( WId )),
- TQT_SLOT( active_window_changed_slot( WId )));
+ connect( twin_module, TQ_SIGNAL( windowAdded( WId )), TQ_SLOT( window_added_slot( WId )));
+ connect( twin_module, TQ_SIGNAL( windowRemoved( WId )), TQ_SLOT( window_removed_slot( WId )));
+ connect( twin_module, TQ_SIGNAL( activeWindowChanged( WId )),
+ TQ_SLOT( active_window_changed_slot( WId )));
}
}
diff --git a/khotkeys/shared/windows.h b/khotkeys/shared/windows.h
index 4fa403436..05890c435 100644
--- a/khotkeys/shared/windows.h
+++ b/khotkeys/shared/windows.h
@@ -34,10 +34,10 @@ const int SUPPORTED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET
class Windowdef_list;
/*class Action_data_base;*/
-class KDE_EXPORT Windows
+class TDE_EXPORT Windows
: public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
Windows( bool enable_signals_P, TQObject* parent_P );
virtual ~Windows();
@@ -67,7 +67,7 @@ class KDE_EXPORT Windows
WId _action_window;
};
-struct KDE_EXPORT Window_data
+struct TDE_EXPORT Window_data
{
Window_data( WId id_P );
TQString title; // _NET_WM_NAME or WM_NAME
@@ -76,7 +76,7 @@ struct KDE_EXPORT Window_data
NET::WindowType type;
};
-class KDE_EXPORT Windowdef
+class TDE_EXPORT Windowdef
{
public:
Windowdef( const TQString& comment_P );
@@ -93,7 +93,7 @@ class KDE_EXPORT Windowdef
KHOTKEYS_DISABLE_COPY( Windowdef ); // CHECKME asi pak udelat i pro vsechny potomky, at se nezapomene
};
-class KDE_EXPORT Windowdef_list
+class TDE_EXPORT Windowdef_list
: public TQPtrList< Windowdef >
{
public:
@@ -109,7 +109,7 @@ class KDE_EXPORT Windowdef_list
KHOTKEYS_DISABLE_COPY( Windowdef_list );
};
-class KDE_EXPORT Windowdef_simple
+class TDE_EXPORT Windowdef_simple
: public Windowdef
{
typedef Windowdef base;