diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
commit | c663b6440964f6ac48027143ac9e63298991f9d0 (patch) | |
tree | 6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /khotkeys | |
parent | a061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff) | |
download | tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khotkeys')
95 files changed, 1136 insertions, 1136 deletions
diff --git a/khotkeys/app/app.cpp b/khotkeys/app/app.cpp index 612977aed..3391ca1aa 100644 --- a/khotkeys/app/app.cpp +++ b/khotkeys/app/app.cpp @@ -39,7 +39,7 @@ namespace KHotKeys KHotKeysApp::KHotKeysApp() : KUniqueApplication( false, true ), // no styles - delete_helper( new QObject ) + delete_helper( new TQObject ) { init_global_data( true, delete_helper ); // grab keys // CHECKME triggery a dalsi vytvaret az tady za inicializaci @@ -51,9 +51,9 @@ KHotKeysApp::~KHotKeysApp() { // CHECKME triggery a dalsi rusit uz tady pred cleanupem delete actions_root; -// Many global data should be destroyed while the QApplication object still +// Many global data should be destroyed while the TQApplication object still // exists, and therefore 'this' cannot be the parent, as ~Object -// for 'this' would be called after ~QApplication - use proxy object +// for 'this' would be called after ~TQApplication - use proxy object delete delete_helper; } @@ -96,7 +96,7 @@ int KDE_EXPORT kdemain( int argc, char** argv ) { { // multiheaded hotkeys - QCString multiHead = getenv("KDE_MULTIHEAD"); + TQCString multiHead = getenv("KDE_MULTIHEAD"); if (multiHead.lower() == "true") { Display *dpy = XOpenDisplay(NULL); if (! dpy) { @@ -108,14 +108,14 @@ int KDE_EXPORT kdemain( int argc, char** argv ) int number_of_screens = ScreenCount(dpy); khotkeys_screen_number = DefaultScreen(dpy); int pos; - QCString displayname = XDisplayString(dpy); + TQCString displayname = XDisplayString(dpy); XCloseDisplay(dpy); dpy = 0; if ((pos = displayname.findRev('.')) != -1) displayname.remove(pos, 10); - QCString env; + TQCString env; if (number_of_screens != 1) { for (int i = 0; i < number_of_screens; i++) { if (i != khotkeys_screen_number && fork() == 0) { @@ -137,7 +137,7 @@ int KDE_EXPORT kdemain( int argc, char** argv ) } } - QCString appname; + TQCString appname; if (khotkeys_screen_number == 0) appname = "khotkeys"; else diff --git a/khotkeys/app/app.h b/khotkeys/app/app.h index 6166276cb..e23edfcb1 100644 --- a/khotkeys/app/app.h +++ b/khotkeys/app/app.h @@ -31,7 +31,7 @@ class KHotKeysApp virtual ~KHotKeysApp(); private: Action_data_group* actions_root; - QObject* delete_helper; + TQObject* delete_helper; }; //*************************************************************************** diff --git a/khotkeys/app/kded.cpp b/khotkeys/app/kded.cpp index 08c9bb487..3ebb55575 100644 --- a/khotkeys/app/kded.cpp +++ b/khotkeys/app/kded.cpp @@ -34,7 +34,7 @@ #include <voices.h> extern "C" -KDE_EXPORT KDEDModule *create_khotkeys( const QCString& obj ) +KDE_EXPORT KDEDModule *create_khotkeys( const TQCString& obj ) { return new KHotKeys::KHotKeysModule( obj ); } @@ -44,7 +44,7 @@ namespace KHotKeys // KhotKeysModule -KHotKeysModule::KHotKeysModule( const QCString& obj ) +KHotKeysModule::KHotKeysModule( const TQCString& obj ) : KDEDModule( obj ) { for( int i = 0; @@ -53,8 +53,8 @@ KHotKeysModule::KHotKeysModule( const QCString& obj ) { if( kapp->dcopClient()->isApplicationRegistered( "khotkeys" )) { - QByteArray data, replyData; - QCString reply; + TQByteArray data, replyData; + TQCString reply; // wait for it to finish kapp->dcopClient()->call( "khotkeys*", "khotkeys", "quit()", data, reply, replyData ); sleep( 1 ); diff --git a/khotkeys/app/kded.h b/khotkeys/app/kded.h index f136cd6a0..c0a1526ee 100644 --- a/khotkeys/app/kded.h +++ b/khotkeys/app/kded.h @@ -28,7 +28,7 @@ class KHotKeysModule ASYNC reread_configuration(); ASYNC quit(); public: - KHotKeysModule( const QCString& obj ); + KHotKeysModule( const TQCString& obj ); virtual ~KHotKeysModule(); private: Action_data_group* actions_root; diff --git a/khotkeys/arts/soundrecorder_arts.cpp b/khotkeys/arts/soundrecorder_arts.cpp index 2b1563787..e600e1730 100644 --- a/khotkeys/arts/soundrecorder_arts.cpp +++ b/khotkeys/arts/soundrecorder_arts.cpp @@ -32,7 +32,7 @@ #include <kdebug.h> #include <klocale.h> -#include <qtimer.h> +#include <tqtimer.h> #define FS 11025 @@ -42,7 +42,7 @@ extern "C" KDE_EXPORT -KHotKeys::SoundRecorder* khotkeys_soundrecorder_create( QObject* parent, const char* name ) +KHotKeys::SoundRecorder* khotkeys_soundrecorder_create( TQObject* parent, const char* name ) { return new KHotKeys::SoundRecorderArts( parent, name ); } @@ -51,7 +51,7 @@ namespace KHotKeys { -SoundRecorderArts::SoundRecorderArts(QObject *parent, const char *name) +SoundRecorderArts::SoundRecorderArts(TQObject *parent, const char *name) : SoundRecorder(parent, name) , m_dis(new KArtsDispatcher( this) ), m_server( new KArtsServer( this ) ) , @@ -61,7 +61,7 @@ SoundRecorderArts::SoundRecorderArts(QObject *parent, const char *name) ( void ) check; m_recStream->usePolling( false ); - connect( m_recStream, SIGNAL(data (QByteArray &)), this, SLOT(slotDataReceived(QByteArray& ))); + connect( m_recStream, TQT_SIGNAL(data (TQByteArray &)), this, TQT_SLOT(slotDataReceived(TQByteArray& ))); } SoundRecorderArts::~SoundRecorderArts() @@ -80,7 +80,7 @@ void SoundRecorderArts::start() void SoundRecorderArts::stop() { m_recStream->stop(); - QTimer::singleShot(400,this,SLOT(slotEmitSignal())); + TQTimer::singleShot(400,this,TQT_SLOT(slotEmitSignal())); } void SoundRecorderArts::abort() @@ -95,7 +95,7 @@ Sound SoundRecorderArts::sound() Sound s; uint BytePS=BITS/8; uint length=m_data.size()/BytePS; - QMemArray<Q_INT32> da(length); + TQMemArray<Q_INT32> da(length); s.max=0; s._fs=FS; for(uint f=0;f<length; f++) @@ -119,7 +119,7 @@ Sound SoundRecorderArts::sound() return s; } -void SoundRecorderArts::slotDataReceived(QByteArray & data) +void SoundRecorderArts::slotDataReceived(TQByteArray & data) { uint pos=m_data.size(); m_data.resize(pos + data.size()); diff --git a/khotkeys/arts/soundrecorder_arts.h b/khotkeys/arts/soundrecorder_arts.h index da11ce04b..72e901832 100644 --- a/khotkeys/arts/soundrecorder_arts.h +++ b/khotkeys/arts/soundrecorder_arts.h @@ -22,7 +22,7 @@ #define RECORDER_ARTS_H #include "soundrecorder.h" -#include <qmemarray.h> +#include <tqmemarray.h> #include "sound.h" class KAudioRecordStream ; @@ -40,7 +40,7 @@ class SoundRecorderArts : public SoundRecorder { Q_OBJECT public: - SoundRecorderArts(QObject *parent = 0, const char *name = 0); + SoundRecorderArts(TQObject *parent = 0, const char *name = 0); virtual ~SoundRecorderArts(); virtual void start(); @@ -49,12 +49,12 @@ public: virtual Sound sound(); private slots: - void slotDataReceived(QByteArray &data); + void slotDataReceived(TQByteArray &data); void slotEmitSignal(); private: - QByteArray m_data; - QObject *m_dis; + TQByteArray m_data; + TQObject *m_dis; KArtsServer *m_server; KAudioRecordStream *m_recStream; }; diff --git a/khotkeys/arts/voicerecorder_arts.cpp b/khotkeys/arts/voicerecorder_arts.cpp index 39cd38cfa..8b5c752ad 100644 --- a/khotkeys/arts/voicerecorder_arts.cpp +++ b/khotkeys/arts/voicerecorder_arts.cpp @@ -8,8 +8,8 @@ ****************************************************************************/ -#include <qcolor.h> -#include <qevent.h> +#include <tqcolor.h> +#include <tqevent.h> #ifdef HAVE_CONFIG_H #include <config.h> @@ -26,7 +26,7 @@ extern "C" KDE_EXPORT -void khotkeys_voicerecorder_arts_play( const QString& file ) +void khotkeys_voicerecorder_arts_play( const TQString& file ) { KHotKeys::VoiceRecorder::arts_play_fun check = khotkeys_voicerecorder_arts_play; // check the type matches ( void ) check; diff --git a/khotkeys/kcontrol/action_group_tab.cpp b/khotkeys/kcontrol/action_group_tab.cpp index fbe681555..8a297b933 100644 --- a/khotkeys/kcontrol/action_group_tab.cpp +++ b/khotkeys/kcontrol/action_group_tab.cpp @@ -16,8 +16,8 @@ #include "action_group_tab.h" -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kmessagebox.h> @@ -31,23 +31,23 @@ namespace KHotKeys { -Action_group_tab::Action_group_tab( QWidget* parent_P , const char* name_P ) +Action_group_tab::Action_group_tab( TQWidget* parent_P , const char* name_P ) : Action_group_tab_ui( parent_P, name_P ) { clear_data(); // KHotKeys::Module::changed() - connect( action_name_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); - connect( disable_checkbox, SIGNAL( clicked()), - module, SLOT( changed())); - connect( comment_multilineedit, SIGNAL( textChanged()), - module, SLOT( changed())); + connect( action_name_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); + connect( disable_checkbox, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( comment_multilineedit, TQT_SIGNAL( textChanged()), + module, TQT_SLOT( changed())); } void Action_group_tab::clear_data() { - disconnect( action_name_lineedit, SIGNAL( textChanged( const QString& )), this, - SLOT( action_group_name_changed( const QString& ))); + disconnect( action_name_lineedit, TQT_SIGNAL( textChanged( const TQString& )), this, + TQT_SLOT( action_group_name_changed( const TQString& ))); action_name_lineedit->clear(); action_name_lineedit->setReadOnly( false ); disable_checkbox->setChecked( false ); @@ -71,20 +71,20 @@ void Action_group_tab::set_data( const Action_data_group* data_P ) else disable_checkbox->setText( i18n( "&Disable" )); comment_multilineedit->setText( data_P->comment()); - connect( action_name_lineedit, SIGNAL( textChanged( const QString& )), this, - SLOT( action_group_name_changed( const QString& ))); + connect( action_name_lineedit, TQT_SIGNAL( textChanged( const TQString& )), this, + TQT_SLOT( action_group_name_changed( const TQString& ))); system_group = data_P->system_group(); } Action_data_group* Action_group_tab::get_data( Action_data_group* parent_P, Condition_list* conditions_P ) const { - QString name = action_name_lineedit->text(); + TQString name = action_name_lineedit->text(); return new Action_data_group( parent_P, name, comment_multilineedit->text(), conditions_P, system_group, !disable_checkbox->isChecked()); } -void Action_group_tab::action_group_name_changed( const QString& name_P ) +void Action_group_tab::action_group_name_changed( const TQString& name_P ) { module->action_name_changed( name_P ); } diff --git a/khotkeys/kcontrol/action_group_tab.h b/khotkeys/kcontrol/action_group_tab.h index aa5237073..970f16379 100644 --- a/khotkeys/kcontrol/action_group_tab.h +++ b/khotkeys/kcontrol/action_group_tab.h @@ -25,14 +25,14 @@ class Action_group_tab { Q_OBJECT public: - Action_group_tab( QWidget* parent_P = NULL, const char* name_P = NULL ); + Action_group_tab( TQWidget* parent_P = NULL, const char* name_P = NULL ); void set_data( const Action_data_group* data_P ); Action_data_group* get_data( Action_data_group* parent_P, Condition_list* conditions_P ) const; public slots: void clear_data(); protected slots: - virtual void action_group_name_changed( const QString& name_P ); + virtual void action_group_name_changed( const TQString& name_P ); protected: Action_data_group::system_group_t system_group; }; diff --git a/khotkeys/kcontrol/action_list_widget.cpp b/khotkeys/kcontrol/action_list_widget.cpp index c12a2df86..b32daca1f 100644 --- a/khotkeys/kcontrol/action_list_widget.cpp +++ b/khotkeys/kcontrol/action_list_widget.cpp @@ -17,10 +17,10 @@ #include "action_list_widget.h" #include <assert.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qheader.h> -#include <qlineedit.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqheader.h> +#include <tqlineedit.h> #include <klocale.h> #include <kdebug.h> @@ -39,16 +39,16 @@ namespace KHotKeys // Action_list_widget -Action_list_widget::Action_list_widget( QWidget* parent_P, const char* name_P ) +Action_list_widget::Action_list_widget( TQWidget* parent_P, const char* name_P ) : Action_list_widget_ui( parent_P, name_P ), selected_item( NULL ) { - QPopupMenu* popup = new QPopupMenu; // CHECKME looks like setting parent doesn't work + TQPopupMenu* popup = new QPopupMenu; // CHECKME looks like setting parent doesn't work popup->insertItem( i18n( "Command/URL..." ), TYPE_COMMAND_URL_ACTION ); popup->insertItem( i18n( "K-Menu Entry..." ), TYPE_MENUENTRY_ACTION ); popup->insertItem( i18n( "DCOP Call..." ), TYPE_DCOP_ACTION ); popup->insertItem( i18n( "Keyboard Input..." ), TYPE_KEYBOARD_INPUT_ACTION ); popup->insertItem( i18n( "Activate Window..." ), TYPE_ACTIVATE_WINDOW_ACTION ); - connect( popup, SIGNAL( activated( int )), SLOT( new_selected( int ))); + connect( popup, TQT_SIGNAL( activated( int )), TQT_SLOT( new_selected( int ))); new_button->setPopup( popup ); actions_listview->header()->hide(); actions_listview->addColumn( "" ); @@ -58,20 +58,20 @@ Action_list_widget::Action_list_widget( QWidget* parent_P, const char* name_P ) modify_button->setEnabled( false ); delete_button->setEnabled( false ); clear_data(); - connect( actions_listview, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int ) ), - this, SLOT( modify_pressed() ) ); + connect( actions_listview, TQT_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( modify_pressed() ) ); // KHotKeys::Module::changed() - connect( new_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( copy_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( modify_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( delete_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( comment_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); + connect( new_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( copy_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( modify_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( delete_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( comment_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); } Action_list_widget::~Action_list_widget() @@ -105,7 +105,7 @@ Action_list* Action_list_widget::get_data( Action_data* data_P ) const { // CHECKME TODO hmm, tady to bude chtit asi i children :( Action_list* list = new Action_list( comment_lineedit->text()); - for( QListViewItem* pos = actions_listview->firstChild(); + for( TQListViewItem* pos = actions_listview->firstChild(); pos != NULL; pos = pos->nextSibling()) list->append( static_cast< Action_list_item* >( pos )->action()->copy( data_P )); @@ -168,7 +168,7 @@ void Action_list_widget::modify_pressed() edit_listview_item( selected_item ); } -void Action_list_widget::current_changed( QListViewItem* item_P ) +void Action_list_widget::current_changed( TQListViewItem* item_P ) { // if( item_P == selected_item ) // return; @@ -180,7 +180,7 @@ void Action_list_widget::current_changed( QListViewItem* item_P ) } Action_list_item* Action_list_widget::create_listview_item( Action* action_P, - QListView* parent1_P, QListViewItem* parent2_P, QListViewItem* after_P, bool copy_P ) + TQListView* parent1_P, TQListViewItem* parent2_P, TQListViewItem* after_P, bool copy_P ) { Action* new_win = copy_P ? action_P->copy( NULL ) : action_P; // CHECKME uz by nemelo byt treba @@ -229,9 +229,9 @@ void Action_list_widget::edit_listview_item( Action_list_item* item_P ) // Action_list_item -QString Action_list_item::text( int column_P ) const +TQString Action_list_item::text( int column_P ) const { - return column_P == 0 ? action()->description() : QString::null; + return column_P == 0 ? action()->description() : TQString::null; } Action_list_item::~Action_list_item() diff --git a/khotkeys/kcontrol/action_list_widget.h b/khotkeys/kcontrol/action_list_widget.h index f1f965db6..b49a1315a 100644 --- a/khotkeys/kcontrol/action_list_widget.h +++ b/khotkeys/kcontrol/action_list_widget.h @@ -11,7 +11,7 @@ #ifndef _ACTION_LIST_WIDGET_H_ #define _ACTION_LIST_WIDGET_H_ -#include <qlistview.h> +#include <tqlistview.h> #include <actions.h> #include <kdialogbase.h> @@ -36,15 +36,15 @@ class Action_list_widget { Q_OBJECT public: - Action_list_widget( QWidget* parent_P = NULL, const char* name_P = NULL ); + Action_list_widget( TQWidget* parent_P = NULL, const char* name_P = NULL ); virtual ~Action_list_widget(); void set_data( const Action_list* data_P ); Action_list* get_data( Action_data* data_P ) const; public slots: void clear_data(); protected: - Action_list_item* create_listview_item( Action* action_P, QListView* parent1_P, - QListViewItem* parent2_P, QListViewItem* after_P, bool copy_P ); + Action_list_item* create_listview_item( Action* action_P, TQListView* parent1_P, + TQListViewItem* parent2_P, TQListViewItem* after_P, bool copy_P ); void edit_listview_item( Action_list_item* item_P ); enum type_t { TYPE_COMMAND_URL_ACTION, TYPE_MENUENTRY_ACTION, TYPE_DCOP_ACTION, TYPE_KEYBOARD_INPUT_ACTION, TYPE_ACTIVATE_WINDOW_ACTION }; @@ -53,7 +53,7 @@ class Action_list_widget virtual void copy_pressed(); virtual void delete_pressed(); virtual void modify_pressed(); - virtual void current_changed( QListViewItem* item_P ); + virtual void current_changed( TQListViewItem* item_P ); protected: Action_list_item* selected_item; }; @@ -64,12 +64,12 @@ class Action_list_item : public QListViewItem { public: - Action_list_item( QListView* parent_P, Action* action_P ); - Action_list_item( QListViewItem* parent_P, Action* action_P ); - Action_list_item( QListView* parent_P, QListViewItem* after_P, Action* action_P ); - Action_list_item( QListViewItem* parent_P, QListViewItem* after_P, Action* action_P ); + Action_list_item( TQListView* parent_P, Action* action_P ); + Action_list_item( TQListViewItem* parent_P, Action* action_P ); + Action_list_item( TQListView* parent_P, TQListViewItem* after_P, Action* action_P ); + Action_list_item( TQListViewItem* parent_P, TQListViewItem* after_P, Action* action_P ); virtual ~Action_list_item(); - virtual QString text( int column_P ) const; + virtual TQString text( int column_P ) const; Action* action() const; void set_action( Action* action_P ); protected: @@ -155,28 +155,28 @@ class Activate_window_action_dialog // Action_list_item inline -Action_list_item::Action_list_item( QListView* parent_P, Action* action_P ) - : QListViewItem( parent_P ), _action( action_P ) +Action_list_item::Action_list_item( TQListView* parent_P, Action* action_P ) + : TQListViewItem( parent_P ), _action( action_P ) { } inline -Action_list_item::Action_list_item( QListViewItem* parent_P, Action* action_P ) - : QListViewItem( parent_P ), _action( action_P ) +Action_list_item::Action_list_item( TQListViewItem* parent_P, Action* action_P ) + : TQListViewItem( parent_P ), _action( action_P ) { } inline -Action_list_item::Action_list_item( QListView* parent_P, QListViewItem* after_P, +Action_list_item::Action_list_item( TQListView* parent_P, TQListViewItem* after_P, Action* action_P ) - : QListViewItem( parent_P, after_P ), _action( action_P ) + : TQListViewItem( parent_P, after_P ), _action( action_P ) { } inline -Action_list_item::Action_list_item( QListViewItem* parent_P, QListViewItem* after_P, +Action_list_item::Action_list_item( TQListViewItem* parent_P, TQListViewItem* after_P, Action* action_P ) - : QListViewItem( parent_P, after_P ), _action( action_P ) + : TQListViewItem( parent_P, after_P ), _action( action_P ) { } diff --git a/khotkeys/kcontrol/actions_listview_widget.cpp b/khotkeys/kcontrol/actions_listview_widget.cpp index 4d0534e9d..5048289df 100644 --- a/khotkeys/kcontrol/actions_listview_widget.cpp +++ b/khotkeys/kcontrol/actions_listview_widget.cpp @@ -16,11 +16,11 @@ #include "actions_listview_widget.h" -#include <qheader.h> +#include <tqheader.h> #include <klocale.h> #include <kdebug.h> -#include <qdragobject.h> +#include <tqdragobject.h> #include <khlistview.h> #include <actions.h> @@ -31,7 +31,7 @@ namespace KHotKeys { -Actions_listview_widget::Actions_listview_widget( QWidget* parent_P, const char* name_P ) +Actions_listview_widget::Actions_listview_widget( TQWidget* parent_P, const char* name_P ) : Actions_listview_widget_ui( parent_P, name_P ), recent_item( NULL ), saved_current_item( NULL ) { @@ -39,14 +39,14 @@ Actions_listview_widget::Actions_listview_widget( QWidget* parent_P, const char* actions_listview->header()->hide(); actions_listview->addColumn( "" ); actions_listview->setRootIsDecorated( true ); // CHECKME - connect( actions_listview, SIGNAL( current_changed( QListViewItem* )), - SLOT( current_changed( QListViewItem* ))); - connect( actions_listview, SIGNAL( moved( QListViewItem*, QListViewItem*, QListViewItem* )), - SLOT( item_moved( QListViewItem*, QListViewItem*, QListViewItem* ))); + connect( actions_listview, TQT_SIGNAL( current_changed( TQListViewItem* )), + TQT_SLOT( current_changed( TQListViewItem* ))); + connect( actions_listview, TQT_SIGNAL( moved( TQListViewItem*, TQListViewItem*, TQListViewItem* )), + TQT_SLOT( item_moved( TQListViewItem*, TQListViewItem*, TQListViewItem* ))); // KHotKeys::Module::changed() } -void Actions_listview_widget::action_name_changed( const QString& ) +void Actions_listview_widget::action_name_changed( const TQString& ) { current_action()->widthChanged( 0 ); actions_listview->repaintItem( current_action()); @@ -63,7 +63,7 @@ void Actions_listview_widget::set_action_data( Action_data_base* data_P, bool re saved_current_item->set_data( data_P ); } -void Actions_listview_widget::current_changed( QListViewItem* item_P ) +void Actions_listview_widget::current_changed( TQListViewItem* item_P ) { kdDebug( 1217 ) << "current_changed:" << item_P << endl; set_current_action( static_cast< Action_listview_item* >( item_P )); @@ -86,7 +86,7 @@ void Actions_listview_widget::set_current_action( Action_listview_item* item_P ) void Actions_listview_widget::new_action( Action_data_base* data_P ) { - QListViewItem* parent = NULL; + TQListViewItem* parent = NULL; if( current_action() != NULL ) { if( dynamic_cast< Action_data_group* >( current_action()->data()) != NULL ) @@ -104,9 +104,9 @@ void Actions_listview_widget::new_action( Action_data_base* data_P ) void Actions_listview_widget::delete_action() { -// while( QListViewItem* child = current_action()->firstChild()) +// while( TQListViewItem* child = current_action()->firstChild()) // delete child; -// QListViewItem* nw = current_action()->itemAbove(); +// TQListViewItem* nw = current_action()->itemAbove(); // if( nw == NULL ) // nw = current_action()->itemBelow(); delete saved_current_item; @@ -121,7 +121,7 @@ void Actions_listview_widget::delete_action() // saved_current_item = NULL; } -void Actions_listview_widget::item_moved( QListViewItem* item_P, QListViewItem*, QListViewItem* ) +void Actions_listview_widget::item_moved( TQListViewItem* item_P, TQListViewItem*, TQListViewItem* ) { Action_listview_item* item = static_cast< Action_listview_item* >( item_P ); Action_listview_item* parent = static_cast< Action_listview_item* >( item->parent()); @@ -154,8 +154,8 @@ void Actions_listview_widget::build_up_recursively( Action_data_group* parent_P, } } -Action_listview_item* Actions_listview_widget::create_item( QListViewItem* parent_P, - QListViewItem* after_P, Action_data_base* data_P ) +Action_listview_item* Actions_listview_widget::create_item( TQListViewItem* parent_P, + TQListViewItem* after_P, Action_data_base* data_P ) { if( parent_P != NULL ) return new Action_listview_item( parent_P, after_P, data_P ); @@ -165,7 +165,7 @@ Action_listview_item* Actions_listview_widget::create_item( QListViewItem* paren // Actions_listview -Actions_listview::Actions_listview( QWidget* parent_P, const char* name_P ) +Actions_listview::Actions_listview( TQWidget* parent_P, const char* name_P ) : KHListView( parent_P, name_P ), _widget( static_cast< Actions_listview_widget* >( parent_P->parent())) { // this relies on the way designer creates the .cpp file from .ui (yes, I'm lazy) @@ -177,9 +177,9 @@ Actions_listview::Actions_listview( QWidget* parent_P, const char* name_P ) // Action_listview_item -QString Action_listview_item::text( int column_P ) const +TQString Action_listview_item::text( int column_P ) const { - return column_P == 0 ? data()->name() : QString::null; + return column_P == 0 ? data()->name() : TQString::null; } // CHECKME poradne tohle zkontrolovat po tom prekopani diff --git a/khotkeys/kcontrol/actions_listview_widget.h b/khotkeys/kcontrol/actions_listview_widget.h index 4b0d937a3..b2d35c693 100644 --- a/khotkeys/kcontrol/actions_listview_widget.h +++ b/khotkeys/kcontrol/actions_listview_widget.h @@ -30,25 +30,25 @@ class Actions_listview_widget { Q_OBJECT public: - Actions_listview_widget( QWidget* parent_P = NULL, const char* name_P = NULL ); + Actions_listview_widget( TQWidget* parent_P = NULL, const char* name_P = NULL ); Action_listview_item* current_action() const; void set_current_action( Action_listview_item* item ); Action_data_base* current_action_data() const; void set_action_data( Action_data_base* data_P, bool recent_action_P = false ); - void action_name_changed( const QString& name_P ); + void action_name_changed( const TQString& name_P ); void clear(); void build_up(); void new_action( Action_data_base* data_P ); void delete_action(); private: - Action_listview_item* create_item( QListViewItem* parent_P, QListViewItem* after_P, Action_data_base* data_P ); + Action_listview_item* create_item( TQListViewItem* parent_P, TQListViewItem* after_P, Action_data_base* data_P ); void build_up_recursively( Action_data_group* parent_P, Action_listview_item* item_parent_P ); Action_listview_item* recent_item; Action_listview_item* saved_current_item; private slots: - void item_moved( QListViewItem* item_P, QListViewItem* was_after_P, QListViewItem* after_P ); - void current_changed( QListViewItem* item_P ); + void item_moved( TQListViewItem* item_P, TQListViewItem* was_after_P, TQListViewItem* after_P ); + void current_changed( TQListViewItem* item_P ); signals: void current_action_changed(); }; @@ -58,7 +58,7 @@ class Actions_listview { Q_OBJECT public: - Actions_listview( QWidget* parent_P = NULL, const char* name_P = NULL ); + Actions_listview( TQWidget* parent_P = NULL, const char* name_P = NULL ); Actions_listview_widget* widget(); private: Actions_listview_widget* _widget; @@ -69,12 +69,12 @@ class Action_listview_item : public QListViewItem { public: - virtual QString text( int column_P ) const; + virtual TQString text( int column_P ) const; Action_data_base* data() const; void set_data( Action_data_base* data_P ); - Action_listview_item( QListView* parent_P, QListViewItem* after_P, + Action_listview_item( TQListView* parent_P, TQListViewItem* after_P, Action_data_base* data_P ); - Action_listview_item( QListViewItem* parent_P, QListViewItem* after_P, + Action_listview_item( TQListViewItem* parent_P, TQListViewItem* after_P, Action_data_base* data_P ); protected: Action_data_base* _data; // CHECKME doesn't own !!! @@ -117,18 +117,18 @@ Actions_listview_widget* Actions_listview::widget() // Action_listview_item inline -Action_listview_item::Action_listview_item( QListView* parent_P, QListViewItem* after_P, +Action_listview_item::Action_listview_item( TQListView* parent_P, TQListViewItem* after_P, Action_data_base* data_P ) - : QListViewItem( parent_P, after_P ), _data( data_P ) + : TQListViewItem( parent_P, after_P ), _data( data_P ) { if( dynamic_cast< Action_data_group* >( data_P )) setExpandable( true ); } inline -Action_listview_item::Action_listview_item( QListViewItem* parent_P, QListViewItem* after_P, +Action_listview_item::Action_listview_item( TQListViewItem* parent_P, TQListViewItem* after_P, Action_data_base* data_P ) - : QListViewItem( parent_P, after_P ), _data( data_P ) + : TQListViewItem( parent_P, after_P ), _data( data_P ) { if( dynamic_cast< Action_data_group* >( data_P )) setExpandable( true ); diff --git a/khotkeys/kcontrol/command_url_widget.cpp b/khotkeys/kcontrol/command_url_widget.cpp index 936ceca99..133913360 100644 --- a/khotkeys/kcontrol/command_url_widget.cpp +++ b/khotkeys/kcontrol/command_url_widget.cpp @@ -16,11 +16,11 @@ #include "command_url_widget.h" -#include <qpushbutton.h> -#include <qlineedit.h> +#include <tqpushbutton.h> +#include <tqlineedit.h> #include <klineedit.h> -#include <qcheckbox.h> -#include <qgroupbox.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> #include <kurlrequester.h> #include <actions.h> @@ -32,13 +32,13 @@ namespace KHotKeys { -Command_url_widget::Command_url_widget( QWidget* parent_P, const char* name_P ) +Command_url_widget::Command_url_widget( TQWidget* parent_P, const char* name_P ) : Command_url_widget_ui( parent_P, name_P ) { clear_data(); // KHotKeys::Module::changed() - connect( command_url_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); + connect( command_url_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); } void Command_url_widget::clear_data() diff --git a/khotkeys/kcontrol/command_url_widget.h b/khotkeys/kcontrol/command_url_widget.h index cc7e7430d..af9a9dc2a 100644 --- a/khotkeys/kcontrol/command_url_widget.h +++ b/khotkeys/kcontrol/command_url_widget.h @@ -24,7 +24,7 @@ class Command_url_widget { Q_OBJECT public: - Command_url_widget( QWidget* parent_P = NULL, const char* name_P = NULL ); + Command_url_widget( TQWidget* parent_P = NULL, const char* name_P = NULL ); void set_data( const Command_url_action* data_P ); Command_url_action* get_data( Action_data* data_P ) const; public slots: diff --git a/khotkeys/kcontrol/condition_list_widget.cpp b/khotkeys/kcontrol/condition_list_widget.cpp index 407798d58..0cce085ec 100644 --- a/khotkeys/kcontrol/condition_list_widget.cpp +++ b/khotkeys/kcontrol/condition_list_widget.cpp @@ -17,10 +17,10 @@ #include "condition_list_widget.h" #include <assert.h> -#include <qpushbutton.h> -#include <qheader.h> -#include <qlineedit.h> -#include <qpopupmenu.h> +#include <tqpushbutton.h> +#include <tqheader.h> +#include <tqlineedit.h> +#include <tqpopupmenu.h> #include <kdebug.h> #include <klocale.h> @@ -39,20 +39,20 @@ namespace KHotKeys // Condition_list_widget -Condition_list_widget::Condition_list_widget( QWidget* parent_P, const char* name_P ) +Condition_list_widget::Condition_list_widget( TQWidget* parent_P, const char* name_P ) : Condition_list_widget_ui( parent_P, name_P ), selected_item( NULL ) { conditions.setAutoDelete( true ); - QPopupMenu* popup = new QPopupMenu; // CHECKME looks like setting parent doesn't work + TQPopupMenu* popup = new QPopupMenu; // CHECKME looks like setting parent doesn't work popup->insertItem( i18n( "Active Window..." ), TYPE_ACTIVE_WINDOW ); popup->insertItem( i18n( "Existing Window..." ), TYPE_EXISTING_WINDOW ); popup->insertItem( i18n( "Not_condition", "Not" ), TYPE_NOT ); popup->insertItem( i18n( "And_condition", "And" ), TYPE_AND ); popup->insertItem( i18n( "Or_condition", "Or" ), TYPE_OR ); - connect( conditions_listview, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int ) ), - this, SLOT( modify_pressed() ) ); + connect( conditions_listview, TQT_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( modify_pressed() ) ); - connect( popup, SIGNAL( activated( int )), SLOT( new_selected( int ))); + connect( popup, TQT_SIGNAL( activated( int )), TQT_SLOT( new_selected( int ))); new_button->setPopup( popup ); conditions_listview->header()->hide(); conditions_listview->addColumn( "" ); @@ -64,16 +64,16 @@ Condition_list_widget::Condition_list_widget( QWidget* parent_P, const char* nam delete_button->setEnabled( false ); clear_data(); // KHotKeys::Module::changed() - connect( new_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( copy_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( modify_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( delete_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( comment_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); + connect( new_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( copy_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( modify_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( delete_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( comment_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); } Condition_list_widget::~Condition_list_widget() @@ -106,7 +106,7 @@ void Condition_list_widget::set_data( const Condition_list* data_P ) } void Condition_list_widget::insert_listview_items( const Condition_list_base* parent_P, - QListView* parent1_P, Condition_list_item* parent2_P ) + TQListView* parent1_P, Condition_list_item* parent2_P ) { Condition_list_item* prev = NULL; for( Condition_list_base::Iterator it( *parent_P ); @@ -132,10 +132,10 @@ Condition_list* Condition_list_widget::get_data( Action_data_base* data_P ) cons } void Condition_list_widget::get_listview_items( Condition_list_base* list_P, - QListViewItem* first_item_P ) const + TQListViewItem* first_item_P ) const { list_P->clear(); - for( QListViewItem* pos = first_item_P; + for( TQListViewItem* pos = first_item_P; pos != NULL; pos = pos->nextSibling()) { @@ -156,7 +156,7 @@ void Condition_list_widget::new_selected( int type_P ) if( tmp && tmp->accepts_children()) { int ret = KMessageBox::questionYesNoCancel( NULL, - i18n( "A group is selected.\nAdd the new condition in this selected group?" ), QString::null, i18n("Add in Group"), i18n("Ignore Group")); + i18n( "A group is selected.\nAdd the new condition in this selected group?" ), TQString::null, i18n("Add in Group"), i18n("Ignore Group")); if( ret == KMessageBox::Cancel ) return; else if( ret == KMessageBox::Yes ) @@ -239,7 +239,7 @@ void Condition_list_widget::modify_pressed() edit_listview_item( selected_item ); } -void Condition_list_widget::current_changed( QListViewItem* item_P ) +void Condition_list_widget::current_changed( TQListViewItem* item_P ) { // if( item_P == selected_item ) // return; @@ -263,7 +263,7 @@ void Condition_list_widget::current_changed( QListViewItem* item_P ) } Condition_list_item* Condition_list_widget::create_listview_item( Condition* condition_P, - QListView* parent1_P, Condition_list_item* parent2_P, QListViewItem* after_P, bool copy_P ) + TQListView* parent1_P, Condition_list_item* parent2_P, TQListViewItem* after_P, bool copy_P ) { #ifdef KHOTKEYS_DEBUG kdDebug( 1217 ) << "Condition_list_widget::create_listview_item():" << endl; @@ -339,9 +339,9 @@ void Condition_list_widget::edit_listview_item( Condition_list_item* item_P ) // Condition_list_item -QString Condition_list_item::text( int column_P ) const +TQString Condition_list_item::text( int column_P ) const { - return column_P == 0 ? condition()->description() : QString::null; + return column_P == 0 ? condition()->description() : TQString::null; } // Active_window_condition_dialog diff --git a/khotkeys/kcontrol/condition_list_widget.h b/khotkeys/kcontrol/condition_list_widget.h index e24739763..9dd441ae3 100644 --- a/khotkeys/kcontrol/condition_list_widget.h +++ b/khotkeys/kcontrol/condition_list_widget.h @@ -11,8 +11,8 @@ #ifndef _CONDITIONS_LIST_WIDGET_H_ #define _CONDITIONS_LIST_WIDGET_H_ -#include <qlistview.h> -#include <qptrlist.h> +#include <tqlistview.h> +#include <tqptrlist.h> #include <kdialogbase.h> @@ -32,15 +32,15 @@ class Condition_list_widget { Q_OBJECT public: - Condition_list_widget( QWidget* parent_P = NULL, const char* name_P = NULL ); + Condition_list_widget( TQWidget* parent_P = NULL, const char* name_P = NULL ); virtual ~Condition_list_widget(); void set_data( const Condition_list* data_P ); Condition_list* get_data( Action_data_base* data_P ) const; public slots: void clear_data(); protected: - Condition_list_item* create_listview_item( Condition* condition_P, QListView* parent1_P, - Condition_list_item* parent2_P, QListViewItem* after_P, bool copy_P ); + Condition_list_item* create_listview_item( Condition* condition_P, TQListView* parent1_P, + Condition_list_item* parent2_P, TQListViewItem* after_P, bool copy_P ); void edit_listview_item( Condition_list_item* item_P ); enum type_t { TYPE_ACTIVE_WINDOW, TYPE_EXISTING_WINDOW, TYPE_NOT, TYPE_AND, TYPE_OR }; protected slots: @@ -48,13 +48,13 @@ class Condition_list_widget virtual void copy_pressed(); virtual void delete_pressed(); virtual void modify_pressed(); - virtual void current_changed( QListViewItem* item_P ); + virtual void current_changed( TQListViewItem* item_P ); private: void insert_listview_items( const Condition_list_base* parent_P, - QListView* parent1_P, Condition_list_item* parent2_P ); - void get_listview_items( Condition_list_base* list_P, QListViewItem* first_item_P ) const; + TQListView* parent1_P, Condition_list_item* parent2_P ); + void get_listview_items( Condition_list_base* list_P, TQListViewItem* first_item_P ) const; Condition_list_item* selected_item; - QPtrList< Condition > conditions; + TQPtrList< Condition > conditions; }; typedef Condition_list_widget Condition_list_tab; @@ -63,12 +63,12 @@ class Condition_list_item : public QListViewItem { public: - Condition_list_item( QListView* parent_P, Condition* condition_P ); - Condition_list_item( QListViewItem* parent_P, Condition* condition_P ); - Condition_list_item( QListView* parent_P, QListViewItem* after_P, Condition* condition_P ); - Condition_list_item( QListViewItem* parent_P, QListViewItem* after_P, + Condition_list_item( TQListView* parent_P, Condition* condition_P ); + Condition_list_item( TQListViewItem* parent_P, Condition* condition_P ); + Condition_list_item( TQListView* parent_P, TQListViewItem* after_P, Condition* condition_P ); + Condition_list_item( TQListViewItem* parent_P, TQListViewItem* after_P, Condition* condition_P ); - virtual QString text( int column_P ) const; + virtual TQString text( int column_P ) const; Condition* condition() const; void set_condition( Condition* condition_P ); protected: @@ -116,28 +116,28 @@ class Existing_window_condition_dialog // Condition_list_item inline -Condition_list_item::Condition_list_item( QListView* parent_P, Condition* condition_P ) - : QListViewItem( parent_P ), _condition( condition_P ) +Condition_list_item::Condition_list_item( TQListView* parent_P, Condition* condition_P ) + : TQListViewItem( parent_P ), _condition( condition_P ) { } inline -Condition_list_item::Condition_list_item( QListViewItem* parent_P, Condition* condition_P ) - : QListViewItem( parent_P ), _condition( condition_P ) +Condition_list_item::Condition_list_item( TQListViewItem* parent_P, Condition* condition_P ) + : TQListViewItem( parent_P ), _condition( condition_P ) { } inline -Condition_list_item::Condition_list_item( QListView* parent_P, QListViewItem* after_P, +Condition_list_item::Condition_list_item( TQListView* parent_P, TQListViewItem* after_P, Condition* condition_P ) - : QListViewItem( parent_P, after_P ), _condition( condition_P ) + : TQListViewItem( parent_P, after_P ), _condition( condition_P ) { } inline -Condition_list_item::Condition_list_item( QListViewItem* parent_P, QListViewItem* after_P, +Condition_list_item::Condition_list_item( TQListViewItem* parent_P, TQListViewItem* after_P, Condition* condition_P ) - : QListViewItem( parent_P, after_P ), _condition( condition_P ) + : TQListViewItem( parent_P, after_P ), _condition( condition_P ) { } diff --git a/khotkeys/kcontrol/dcop_widget.cpp b/khotkeys/kcontrol/dcop_widget.cpp index 6cc8773a1..a410109fd 100644 --- a/khotkeys/kcontrol/dcop_widget.cpp +++ b/khotkeys/kcontrol/dcop_widget.cpp @@ -16,8 +16,8 @@ #include "dcop_widget.h" -#include <qlineedit.h> -#include <qpushbutton.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> #include <krun.h> #include <kmessagebox.h> @@ -30,20 +30,20 @@ namespace KHotKeys { -Dcop_widget::Dcop_widget( QWidget* parent_P, const char* name_P ) +Dcop_widget::Dcop_widget( TQWidget* parent_P, const char* name_P ) : Dcop_widget_ui( parent_P, name_P ) { clear_data(); try_button->setText( i18n( "to try", "&Try" )); // Qt designer can't do this // KHotKeys::Module::changed() - connect( remote_app_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); - connect( remote_object_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); - connect( called_function_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); - connect( arguments_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); + connect( remote_app_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); + connect( remote_object_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); + connect( called_function_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); + connect( arguments_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); } void Dcop_widget::clear_data() diff --git a/khotkeys/kcontrol/dcop_widget.h b/khotkeys/kcontrol/dcop_widget.h index 83cb6fabe..43523f00d 100644 --- a/khotkeys/kcontrol/dcop_widget.h +++ b/khotkeys/kcontrol/dcop_widget.h @@ -24,7 +24,7 @@ class Dcop_widget { Q_OBJECT public: - Dcop_widget( QWidget* parent_P = NULL, const char* name_P = NULL ); + Dcop_widget( TQWidget* parent_P = NULL, const char* name_P = NULL ); void set_data( const Dcop_action* data_P ); Dcop_action* get_data( Action_data* data_P ) const; public slots: diff --git a/khotkeys/kcontrol/general_settings_tab.cpp b/khotkeys/kcontrol/general_settings_tab.cpp index 77a262a31..cf2337446 100644 --- a/khotkeys/kcontrol/general_settings_tab.cpp +++ b/khotkeys/kcontrol/general_settings_tab.cpp @@ -16,19 +16,19 @@ #include "general_settings_tab.h" -#include <qcheckbox.h> +#include <tqcheckbox.h> #include "kcmkhotkeys.h" namespace KHotKeys { -General_settings_tab::General_settings_tab( QWidget* parent_P, const char* name_P ) +General_settings_tab::General_settings_tab( TQWidget* parent_P, const char* name_P ) : General_settings_tab_ui( parent_P, name_P ) { // KHotKeys::Module::changed() - connect( disable_daemon_checkbox, SIGNAL( clicked()), - module, SLOT( changed())); + connect( disable_daemon_checkbox, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); } void General_settings_tab::import_clicked() diff --git a/khotkeys/kcontrol/general_settings_tab.h b/khotkeys/kcontrol/general_settings_tab.h index 5140b1110..8bcd5cd21 100644 --- a/khotkeys/kcontrol/general_settings_tab.h +++ b/khotkeys/kcontrol/general_settings_tab.h @@ -21,7 +21,7 @@ class General_settings_tab { Q_OBJECT public: - General_settings_tab( QWidget* parent = NULL, const char* name = NULL ); + General_settings_tab( TQWidget* parent = NULL, const char* name = NULL ); void read_data(); void write_data() const; public slots: diff --git a/khotkeys/kcontrol/general_tab.cpp b/khotkeys/kcontrol/general_tab.cpp index 8c7025e69..dcc4301b5 100644 --- a/khotkeys/kcontrol/general_tab.cpp +++ b/khotkeys/kcontrol/general_tab.cpp @@ -16,9 +16,9 @@ #include "general_tab.h" -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qcombobox.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> #include <klocale.h> #include <kdebug.h> @@ -33,7 +33,7 @@ namespace KHotKeys { -General_tab::General_tab( QWidget* parent_P, const char* name_P ) +General_tab::General_tab( TQWidget* parent_P, const char* name_P ) : General_tab_ui( parent_P, name_P ) { for( Tab_widget::action_type_t i = Tab_widget::TYPE_FIRST; @@ -73,22 +73,22 @@ General_tab::General_tab( QWidget* parent_P, const char* name_P ) } clear_data(); // KHotKeys::Module::changed() - connect( action_name_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); - connect( disable_checkbox, SIGNAL( clicked()), - module, SLOT( changed())); - connect( comment_multilineedit, SIGNAL( textChanged()), - module, SLOT( changed())); - connect( action_type_combo, SIGNAL( activated( int )), - module, SLOT( changed())); + connect( action_name_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); + connect( disable_checkbox, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( comment_multilineedit, TQT_SIGNAL( textChanged()), + module, TQT_SLOT( changed())); + connect( action_type_combo, TQT_SIGNAL( activated( int )), + module, TQT_SLOT( changed())); } void General_tab::clear_data() { - disconnect( action_name_lineedit, SIGNAL( textChanged( const QString& )), - this, SLOT( action_name_changed( const QString& ))); - disconnect( action_type_combo, SIGNAL( activated( int )), - this, SIGNAL( action_type_changed( int ))); // CHECKME neodpoji to sloty od nej ? + disconnect( action_name_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + this, TQT_SLOT( action_name_changed( const TQString& ))); + disconnect( action_type_combo, TQT_SIGNAL( activated( int )), + this, TQT_SIGNAL( action_type_changed( int ))); // CHECKME neodpoji to sloty od nej ? action_name_lineedit->clear(); disable_checkbox->setChecked( false ); disable_checkbox->setText( i18n( "&Disable" )); @@ -113,20 +113,20 @@ void General_tab::set_data( const Action_data* data_P ) comment_multilineedit->setText( data_P->comment()); action_type_combo->setCurrentItem( Tab_widget::type( data_P )); // module->set_action_type( data_P->type()); - connect( action_name_lineedit, SIGNAL( textChanged( const QString& )), - SLOT( action_name_changed( const QString& ))); - connect( action_type_combo, SIGNAL( activated( int )), - SIGNAL( action_type_changed( int ))); + connect( action_name_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + TQT_SLOT( action_name_changed( const TQString& ))); + connect( action_type_combo, TQT_SIGNAL( activated( int )), + TQT_SIGNAL( action_type_changed( int ))); } -void General_tab::get_data( QString& name_O, QString& comment_O, bool& enabled_O ) +void General_tab::get_data( TQString& name_O, TQString& comment_O, bool& enabled_O ) { name_O = action_name_lineedit->text(); comment_O = comment_multilineedit->text(); enabled_O = !disable_checkbox->isChecked(); } -void General_tab::action_name_changed( const QString& name_P ) +void General_tab::action_name_changed( const TQString& name_P ) { module->action_name_changed( name_P ); } diff --git a/khotkeys/kcontrol/general_tab.h b/khotkeys/kcontrol/general_tab.h index f9096b3ad..58f670a68 100644 --- a/khotkeys/kcontrol/general_tab.h +++ b/khotkeys/kcontrol/general_tab.h @@ -27,15 +27,15 @@ class General_tab { Q_OBJECT public: - General_tab( QWidget* parent_P = NULL, const char* name_P = NULL ); + General_tab( TQWidget* parent_P = NULL, const char* name_P = NULL ); void set_data( const Action_data* data_P ); - void get_data( QString& name_O, QString& comment_O, bool& enabled_O ); + void get_data( TQString& name_O, TQString& comment_O, bool& enabled_O ); public slots: void clear_data(); signals: void action_type_changed( int type_P ); protected slots: - void action_name_changed( const QString& name_P ); + void action_name_changed( const TQString& name_P ); }; //*************************************************************************** diff --git a/khotkeys/kcontrol/gesture_triggers_tab.cpp b/khotkeys/kcontrol/gesture_triggers_tab.cpp index bfcad0295..b00f60963 100644 --- a/khotkeys/kcontrol/gesture_triggers_tab.cpp +++ b/khotkeys/kcontrol/gesture_triggers_tab.cpp @@ -16,8 +16,8 @@ #include "gesture_triggers_tab.h" -#include <qpushbutton.h> -#include <qlineedit.h> +#include <tqpushbutton.h> +#include <tqlineedit.h> #include <triggers.h> #include <actions.h> @@ -30,28 +30,28 @@ namespace KHotKeys { -Gesture_triggers_tab::Gesture_triggers_tab( QWidget* parent_P, const char* name_P ) +Gesture_triggers_tab::Gesture_triggers_tab( TQWidget* parent_P, const char* name_P ) : Gesture_triggers_tab_ui( parent_P, name_P ) { clear_data(); // KHotKeys::Module::changed() - connect( gesture_edit_button1, SIGNAL( clicked()), - module, SLOT( changed())); - connect( gesture_edit_button2, SIGNAL( clicked()), - module, SLOT( changed())); - connect( gesture_edit_button3, SIGNAL( clicked()), - module, SLOT( changed())); + connect( gesture_edit_button1, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( gesture_edit_button2, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( gesture_edit_button3, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); } void Gesture_triggers_tab::clear_data() { - gesture1 = gesture2 = gesture3 = QString::null; + gesture1 = gesture2 = gesture3 = TQString::null; gesture_lineedit1->clear(); gesture_lineedit2->clear(); gesture_lineedit3->clear(); - gesture_drawer1->setData( QString::null ); - gesture_drawer2->setData( QString::null ); - gesture_drawer3->setData( QString::null ); + gesture_drawer1->setData( TQString::null ); + gesture_drawer2->setData( TQString::null ); + gesture_drawer3->setData( TQString::null ); } void Gesture_triggers_tab::set_data( const Trigger_list* triggers_P ) @@ -70,7 +70,7 @@ void Gesture_triggers_tab::set_data( const Trigger_list* triggers_P ) } else trig = NULL; - gesture1 = trig ? trig->gesturecode() : QString::null; + gesture1 = trig ? trig->gesturecode() : TQString::null; gesture_lineedit1->setText( gesture1 ); gesture_drawer1->setData( gesture1 ); ++it; @@ -81,7 +81,7 @@ void Gesture_triggers_tab::set_data( const Trigger_list* triggers_P ) } else trig = NULL; - gesture2 = trig ? trig->gesturecode() : QString::null; + gesture2 = trig ? trig->gesturecode() : TQString::null; gesture_lineedit2->setText( gesture2 ); gesture_drawer2->setData( gesture2 ); ++it; @@ -92,7 +92,7 @@ void Gesture_triggers_tab::set_data( const Trigger_list* triggers_P ) } else trig = NULL; - gesture3 = trig ? trig->gesturecode() : QString::null; + gesture3 = trig ? trig->gesturecode() : TQString::null; gesture_lineedit3->setText( gesture3 ); gesture_drawer3->setData( gesture3 ); } @@ -135,20 +135,20 @@ void Gesture_triggers_tab::edit_gesture_pressed3() // Gesture_edit_dialog -Gesture_edit_dialog::Gesture_edit_dialog( const QString& gesture_P ) +Gesture_edit_dialog::Gesture_edit_dialog( const TQString& gesture_P ) : KDialogBase( NULL, NULL, true, "", Ok | Cancel ), // CHECKME caption _gesture( gesture_P ), _page( NULL ) { _page = new GestureRecordPage( _gesture, this, "GestureRecordPage"); -// connect(_page, SIGNAL(gestureRecorded(bool)), // allow clearing the gesture -// this, SLOT(enableButtonOK(bool))); +// connect(_page, TQT_SIGNAL(gestureRecorded(bool)), // allow clearing the gesture +// this, TQT_SLOT(enableButtonOK(bool))); setMainWidget( _page ); } -QString Gesture_edit_dialog::edit_gesture() +TQString Gesture_edit_dialog::edit_gesture() { if( exec()) return _page->getGesture(); diff --git a/khotkeys/kcontrol/gesture_triggers_tab.h b/khotkeys/kcontrol/gesture_triggers_tab.h index 1bdaaf694..c11787d03 100644 --- a/khotkeys/kcontrol/gesture_triggers_tab.h +++ b/khotkeys/kcontrol/gesture_triggers_tab.h @@ -13,7 +13,7 @@ #include <gesture_triggers_tab_ui.h> -#include <qstring.h> +#include <tqstring.h> #include <kdialogbase.h> @@ -28,7 +28,7 @@ class Gesture_triggers_tab { Q_OBJECT public: - Gesture_triggers_tab( QWidget* parent_P = NULL, const char* name_P = NULL ); + Gesture_triggers_tab( TQWidget* parent_P = NULL, const char* name_P = NULL ); void set_data( const Trigger_list* triggers_P ); Trigger_list* get_data( Action_data* data_P ) const; protected: @@ -38,7 +38,7 @@ class Gesture_triggers_tab public slots: void clear_data(); private: - QString gesture1, gesture2, gesture3; + TQString gesture1, gesture2, gesture3; }; class GestureRecordPage; @@ -48,11 +48,11 @@ class Gesture_edit_dialog { Q_OBJECT public: - Gesture_edit_dialog( const QString& gesture_P ); - QString edit_gesture(); + Gesture_edit_dialog( const TQString& gesture_P ); + TQString edit_gesture(); private: // CHECKME accept() ? - QString _gesture; + TQString _gesture; GestureRecordPage *_page; }; diff --git a/khotkeys/kcontrol/gesturedrawer.cpp b/khotkeys/kcontrol/gesturedrawer.cpp index 646d2e469..817eeab89 100644 --- a/khotkeys/kcontrol/gesturedrawer.cpp +++ b/khotkeys/kcontrol/gesturedrawer.cpp @@ -9,19 +9,19 @@ ****************************************************************************/ -#include <qcolor.h> -#include <qpainter.h> +#include <tqcolor.h> +#include <tqpainter.h> #include "gesturedrawer.h" namespace KHotKeys { -GestureDrawer::GestureDrawer(QWidget *parent, const char *name) - : QFrame(parent, name), _data(QString::null) +GestureDrawer::GestureDrawer(TQWidget *parent, const char *name) + : TQFrame(parent, name), _data(TQString::null) { setBackgroundColor( colorGroup().base()); - setFrameStyle(QFrame::Panel | QFrame::Sunken); + setFrameStyle(TQFrame::Panel | TQFrame::Sunken); setMinimumSize(30, 30); } @@ -29,31 +29,31 @@ GestureDrawer::~GestureDrawer() { } -void GestureDrawer::setData(const QString &data) +void GestureDrawer::setData(const TQString &data) { _data = data; repaint(); } -void GestureDrawer::paintEvent(QPaintEvent *ev) +void GestureDrawer::paintEvent(TQPaintEvent *ev) { // Iterate through the data points and draw a line to each of them Q_UINT32 startCell = 0; Q_UINT32 endCell = 0; - QPoint startPoint; - QPoint endPoint; + TQPoint startPoint; + TQPoint endPoint; - QPainter p(this); + TQPainter p(this); if (_data.length() > 0) { - startCell = QString(_data[0]).toUInt(); + startCell = TQString(_data[0]).toUInt(); } for (Q_UINT32 index = 1; index < _data.length(); ++index) { - endCell = QString(_data[index]).toUInt(); + endCell = TQString(_data[index]).toUInt(); startPoint = lookupCellCoords(startCell); endPoint = lookupCellCoords(endCell); @@ -63,7 +63,7 @@ void GestureDrawer::paintEvent(QPaintEvent *ev) // Draw something to show the starting point p.drawRect(startPoint.x()-2, startPoint.y()-2, 4, 4); p.fillRect(startPoint.x()-2, startPoint.y()-2, 4, 4, - QBrush(black)); + TQBrush(black)); } p.drawLine(startPoint, endPoint); @@ -74,10 +74,10 @@ void GestureDrawer::paintEvent(QPaintEvent *ev) p.end(); - QFrame::paintEvent(ev); + TQFrame::paintEvent(ev); } -QPoint GestureDrawer::lookupCellCoords(Q_UINT32 cell) +TQPoint GestureDrawer::lookupCellCoords(Q_UINT32 cell) { // First divide the widget into thirds, horizontally and vertically Q_UINT32 w = width(); @@ -89,38 +89,38 @@ QPoint GestureDrawer::lookupCellCoords(Q_UINT32 cell) switch(cell) { case 1: - return QPoint(wThird/2, 2*hThird+hThird/2); + return TQPoint(wThird/2, 2*hThird+hThird/2); case 2: - return QPoint(wThird+wThird/2, 2*hThird+hThird/2); + return TQPoint(wThird+wThird/2, 2*hThird+hThird/2); case 3: - return QPoint(2*wThird+wThird/2, 2*hThird+hThird/2); + return TQPoint(2*wThird+wThird/2, 2*hThird+hThird/2); case 4: - return QPoint(wThird/2, hThird+hThird/2); + return TQPoint(wThird/2, hThird+hThird/2); case 5: - return QPoint(wThird+wThird/2, hThird+hThird/2); + return TQPoint(wThird+wThird/2, hThird+hThird/2); case 6: - return QPoint(2*wThird+wThird/2, hThird+hThird/2); + return TQPoint(2*wThird+wThird/2, hThird+hThird/2); case 7: - return QPoint(wThird/2, hThird/2); + return TQPoint(wThird/2, hThird/2); case 8: - return QPoint(wThird+wThird/2, hThird/2); + return TQPoint(wThird+wThird/2, hThird/2); case 9: - return QPoint(2*wThird+wThird/2, hThird/2); + return TQPoint(2*wThird+wThird/2, hThird/2); } - return QPoint(0, 0); + return TQPoint(0, 0); } -void GestureDrawer::drawArrowHead(QPoint &start, QPoint &end, - QPainter &p) +void GestureDrawer::drawArrowHead(TQPoint &start, TQPoint &end, + TQPainter &p) { int deltaX = end.x() - start.x(); int deltaY = end.y() - start.y(); @@ -134,8 +134,8 @@ void GestureDrawer::drawArrowHead(QPoint &start, QPoint &end, else offset = 3; - p.drawLine(QPoint(end.x()+offset, end.y()+2), end); - p.drawLine(QPoint(end.x()+offset, end.y()-2), end); + p.drawLine(TQPoint(end.x()+offset, end.y()+2), end); + p.drawLine(TQPoint(end.x()+offset, end.y()-2), end); } else if (deltaX == 0) { @@ -146,8 +146,8 @@ void GestureDrawer::drawArrowHead(QPoint &start, QPoint &end, else offset = +3; - p.drawLine(QPoint(end.x()+2, end.y()+offset), end); - p.drawLine(QPoint(end.x()-2, end.y()+offset), end); + p.drawLine(TQPoint(end.x()+2, end.y()+offset), end); + p.drawLine(TQPoint(end.x()-2, end.y()+offset), end); } else { diff --git a/khotkeys/kcontrol/gesturedrawer.h b/khotkeys/kcontrol/gesturedrawer.h index bcc8ba7e8..50fe5db67 100644 --- a/khotkeys/kcontrol/gesturedrawer.h +++ b/khotkeys/kcontrol/gesturedrawer.h @@ -12,12 +12,12 @@ #ifndef GESTURE_DRAWER_H #define GESTURE_DRAWER_H -#include <qframe.h> -#include <qstring.h> -#include <qevent.h> -#include <qpoint.h> -#include <qwidget.h> -#include <qsize.h> +#include <tqframe.h> +#include <tqstring.h> +#include <tqevent.h> +#include <tqpoint.h> +#include <tqwidget.h> +#include <tqsize.h> namespace KHotKeys { @@ -26,23 +26,23 @@ class GestureDrawer : public QFrame { Q_OBJECT public: - GestureDrawer(QWidget *parent, const char *name); + GestureDrawer(TQWidget *parent, const char *name); ~GestureDrawer(); - void setData(const QString &data); + void setData(const TQString &data); - virtual QSize sizeHint() const { return QSize(30, 30); } + virtual TQSize sizeHint() const { return TQSize(30, 30); } protected: - void paintEvent(QPaintEvent *ev); + void paintEvent(TQPaintEvent *ev); private: - QPoint lookupCellCoords(Q_UINT32 cell); - void drawArrowHead(QPoint &start, QPoint &end, - QPainter &p); + TQPoint lookupCellCoords(Q_UINT32 cell); + void drawArrowHead(TQPoint &start, TQPoint &end, + TQPainter &p); - QString _data; + TQString _data; }; } // namespace KHotKeys diff --git a/khotkeys/kcontrol/gesturerecorder.cpp b/khotkeys/kcontrol/gesturerecorder.cpp index d14614c77..58a177910 100644 --- a/khotkeys/kcontrol/gesturerecorder.cpp +++ b/khotkeys/kcontrol/gesturerecorder.cpp @@ -9,19 +9,19 @@ ****************************************************************************/ -#include <qcolor.h> -#include <qevent.h> +#include <tqcolor.h> +#include <tqevent.h> #include "gesturerecorder.h" namespace KHotKeys { -GestureRecorder::GestureRecorder(QWidget *parent, const char *name) - : QFrame(parent, name), _mouseButtonDown(false) +GestureRecorder::GestureRecorder(TQWidget *parent, const char *name) + : TQFrame(parent, name), _mouseButtonDown(false) { setBackgroundColor( colorGroup().base()); - setFrameStyle(QFrame::Sunken | QFrame::Panel); + setFrameStyle(TQFrame::Sunken | TQFrame::Panel); setLineWidth(2); setMidLineWidth(0); } @@ -30,34 +30,34 @@ GestureRecorder::~GestureRecorder() { } -void GestureRecorder::mousePressEvent(QMouseEvent *ev) +void GestureRecorder::mousePressEvent(TQMouseEvent *ev) { - if (ev->button() == QMouseEvent::LeftButton) + if (ev->button() == TQMouseEvent::LeftButton) { _mouseButtonDown = true; stroke.reset(); - QPoint pos = ev->pos(); + TQPoint pos = ev->pos(); stroke.record(pos.x(), pos.y()); } } -void GestureRecorder::mouseReleaseEvent(QMouseEvent *ev) +void GestureRecorder::mouseReleaseEvent(TQMouseEvent *ev) { - if ((ev->button() == QMouseEvent::LeftButton) && (_mouseButtonDown)) + if ((ev->button() == TQMouseEvent::LeftButton) && (_mouseButtonDown)) { - QPoint pos = ev->pos(); + TQPoint pos = ev->pos(); stroke.record(pos.x(), pos.y()); - QString data( stroke.translate()); + TQString data( stroke.translate()); if( !data.isEmpty()) emit recorded(data); } } -void GestureRecorder::mouseMoveEvent(QMouseEvent *ev) +void GestureRecorder::mouseMoveEvent(TQMouseEvent *ev) { if (_mouseButtonDown) { - QPoint pos = ev->pos(); + TQPoint pos = ev->pos(); stroke.record(pos.x(), pos.y()); } } diff --git a/khotkeys/kcontrol/gesturerecorder.h b/khotkeys/kcontrol/gesturerecorder.h index 707243d81..a995a5531 100644 --- a/khotkeys/kcontrol/gesturerecorder.h +++ b/khotkeys/kcontrol/gesturerecorder.h @@ -12,8 +12,8 @@ #ifndef GESTURE_RECORDER_H #define GESTURE_RECORDER_H -#include <qframe.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqstring.h> #include <gestures.h> @@ -27,16 +27,16 @@ class GestureRecorder : public QFrame Q_OBJECT public: - GestureRecorder(QWidget *parent, const char *name); + GestureRecorder(TQWidget *parent, const char *name); ~GestureRecorder(); protected: - void mousePressEvent(QMouseEvent *); - void mouseReleaseEvent(QMouseEvent *); - void mouseMoveEvent(QMouseEvent *); + void mousePressEvent(TQMouseEvent *); + void mouseReleaseEvent(TQMouseEvent *); + void mouseMoveEvent(TQMouseEvent *); signals: - void recorded(const QString &data); + void recorded(const TQString &data); private: bool _mouseButtonDown; diff --git a/khotkeys/kcontrol/gesturerecordpage.cpp b/khotkeys/kcontrol/gesturerecordpage.cpp index e24beaaf3..af2fb8cdc 100644 --- a/khotkeys/kcontrol/gesturerecordpage.cpp +++ b/khotkeys/kcontrol/gesturerecordpage.cpp @@ -9,9 +9,9 @@ ****************************************************************************/ -#include <qwidget.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include <klocale.h> #include <kmessagebox.h> @@ -23,14 +23,14 @@ namespace KHotKeys { -GestureRecordPage::GestureRecordPage(const QString &gesture, - QWidget *parent, const char *name) - : QVBox(parent, name), +GestureRecordPage::GestureRecordPage(const TQString &gesture, + TQWidget *parent, const char *name) + : TQVBox(parent, name), _recorder(NULL), _resetButton(NULL), - _tryOne(NULL), _tryTwo(NULL), _tryThree(NULL), _gest(QString::null), + _tryOne(NULL), _tryTwo(NULL), _tryThree(NULL), _gest(TQString::null), _tryCount(1) { - QString message; + TQString message; message = i18n("Draw the gesture you would like to record below. Press " "and hold the left mouse button while drawing, and release " @@ -42,28 +42,28 @@ GestureRecordPage::GestureRecordPage(const QString &gesture, "restart. If you want to force a restart, use the reset " "button below.\n\nDraw here:"); - QLabel *label = new QLabel(message, this, "label"); - label->setAlignment(QLabel::AlignLeft | QLabel::WordBreak | - QLabel::AlignVCenter); + TQLabel *label = new TQLabel(message, this, "label"); + label->setAlignment(TQLabel::AlignLeft | TQLabel::WordBreak | + TQLabel::AlignVCenter); _recorder = new GestureRecorder(this, "recorder"); _recorder->setMinimumHeight(150); setStretchFactor(_recorder, 1); - connect(_recorder, SIGNAL(recorded(const QString &)), - this, SLOT(slotRecorded(const QString &))); + connect(_recorder, TQT_SIGNAL(recorded(const TQString &)), + this, TQT_SLOT(slotRecorded(const TQString &))); - QHBox *hBox = new QHBox(this, "hbox"); + TQHBox *hBox = new TQHBox(this, "hbox"); _tryOne = new GestureDrawer(hBox, "tryOne"); _tryTwo = new GestureDrawer(hBox, "tryTwo"); _tryThree = new GestureDrawer(hBox, "tryThree"); - QWidget *spacer = new QWidget(hBox, "spacer"); + TQWidget *spacer = new TQWidget(hBox, "spacer"); hBox->setStretchFactor(spacer, 1); - _resetButton = new QPushButton(i18n("&Reset"), hBox, "resetButton"); - connect(_resetButton, SIGNAL(clicked()), - this, SLOT(slotResetClicked())); + _resetButton = new TQPushButton(i18n("&Reset"), hBox, "resetButton"); + connect(_resetButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotResetClicked())); @@ -82,7 +82,7 @@ GestureRecordPage::~GestureRecordPage() { } -void GestureRecordPage::slotRecorded(const QString &data) +void GestureRecordPage::slotRecorded(const TQString &data) { switch (_tryCount) { @@ -131,11 +131,11 @@ void GestureRecordPage::slotRecorded(const QString &data) void GestureRecordPage::slotResetClicked() { - _gest = QString::null; + _gest = TQString::null; - _tryOne->setData(QString::null); - _tryTwo->setData(QString::null); - _tryThree->setData(QString::null); + _tryOne->setData(TQString::null); + _tryTwo->setData(TQString::null); + _tryThree->setData(TQString::null); _tryCount = 1; diff --git a/khotkeys/kcontrol/gesturerecordpage.h b/khotkeys/kcontrol/gesturerecordpage.h index 2636b47b3..1b95b86fe 100644 --- a/khotkeys/kcontrol/gesturerecordpage.h +++ b/khotkeys/kcontrol/gesturerecordpage.h @@ -12,7 +12,7 @@ #ifndef GESTURE_RECORD_PAGE_H #define GESTURE_RECORD_PAGE_H -#include <qvbox.h> +#include <tqvbox.h> #include "gesturedrawer.h" @@ -31,14 +31,14 @@ class GestureRecordPage : public QVBox Q_OBJECT public: - GestureRecordPage(const QString &gesture, - QWidget *parent, const char *name); + GestureRecordPage(const TQString &gesture, + TQWidget *parent, const char *name); ~GestureRecordPage(); - const QString &getGesture() const { return _gest; } + const TQString &getGesture() const { return _gest; } protected slots: - void slotRecorded(const QString &data); + void slotRecorded(const TQString &data); void slotResetClicked(); signals: @@ -46,12 +46,12 @@ class GestureRecordPage : public QVBox private: GestureRecorder *_recorder; - QPushButton *_resetButton; + TQPushButton *_resetButton; GestureDrawer *_tryOne; GestureDrawer *_tryTwo; GestureDrawer *_tryThree; - QString _gest; + TQString _gest; Q_UINT32 _tryCount; }; diff --git a/khotkeys/kcontrol/gestures_settings_tab.cpp b/khotkeys/kcontrol/gestures_settings_tab.cpp index e3c71c66a..2b5a8ff42 100644 --- a/khotkeys/kcontrol/gestures_settings_tab.cpp +++ b/khotkeys/kcontrol/gestures_settings_tab.cpp @@ -17,9 +17,9 @@ #include "gestures_settings_tab.h" #include <klocale.h> -#include <qcombobox.h> +#include <tqcombobox.h> #include <knuminput.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> #include "kcmkhotkeys.h" #include "windowdef_list_widget.h" @@ -27,7 +27,7 @@ namespace KHotKeys { -Gestures_settings_tab::Gestures_settings_tab( QWidget* parent_P, const char* name_P ) +Gestures_settings_tab::Gestures_settings_tab( TQWidget* parent_P, const char* name_P ) : Gestures_settings_tab_ui( parent_P, name_P ) { mouse_button_combo->insertItem( i18n( "Button 2 (middle)" ), 0 ); @@ -39,12 +39,12 @@ Gestures_settings_tab::Gestures_settings_tab( QWidget* parent_P, const char* nam mouse_button_combo->insertItem( i18n( "Button 8 (if available)" ), 6 ); mouse_button_combo->insertItem( i18n( "Button 9 (if available)" ), 7 ); // KHotKeys::Module::changed() - connect( mouse_gestures_globally, SIGNAL( clicked()), - module, SLOT( changed())); - connect( mouse_button_combo, SIGNAL( activated( int )), - module, SLOT( changed())); - connect( timeout_input, SIGNAL( valueChanged( int )), - module, SLOT( changed())); + connect( mouse_gestures_globally, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( mouse_button_combo, TQT_SIGNAL( activated( int )), + module, TQT_SLOT( changed())); + connect( timeout_input, TQT_SIGNAL( valueChanged( int )), + module, TQT_SLOT( changed())); } void Gestures_settings_tab::read_data() diff --git a/khotkeys/kcontrol/gestures_settings_tab.h b/khotkeys/kcontrol/gestures_settings_tab.h index a02126d8f..813209439 100644 --- a/khotkeys/kcontrol/gestures_settings_tab.h +++ b/khotkeys/kcontrol/gestures_settings_tab.h @@ -21,7 +21,7 @@ class Gestures_settings_tab { Q_OBJECT public: - Gestures_settings_tab( QWidget* parent = NULL, const char* name = NULL ); + Gestures_settings_tab( TQWidget* parent = NULL, const char* name = NULL ); void read_data(); void write_data() const; public slots: diff --git a/khotkeys/kcontrol/info_tab.cpp b/khotkeys/kcontrol/info_tab.cpp index 7363d27a1..7a2e0c916 100644 --- a/khotkeys/kcontrol/info_tab.cpp +++ b/khotkeys/kcontrol/info_tab.cpp @@ -16,15 +16,15 @@ #include "info_tab.h" -#include <qpushbutton.h> -#include <qlabel.h> +#include <tqpushbutton.h> +#include <tqlabel.h> #include <klocale.h> namespace KHotKeys { -Info_tab::Info_tab( QWidget* parent_P, const char* name_P ) +Info_tab::Info_tab( TQWidget* parent_P, const char* name_P ) : Info_tab_ui( parent_P, name_P ) { clear_data(); diff --git a/khotkeys/kcontrol/info_tab.h b/khotkeys/kcontrol/info_tab.h index 72628fe75..32212ae98 100644 --- a/khotkeys/kcontrol/info_tab.h +++ b/khotkeys/kcontrol/info_tab.h @@ -21,7 +21,7 @@ class Info_tab { Q_OBJECT public: - Info_tab( QWidget* parent_P = NULL, const char* name_P = NULL ); + Info_tab( TQWidget* parent_P = NULL, const char* name_P = NULL ); public slots: void clear_data(); }; diff --git a/khotkeys/kcontrol/init.cpp b/khotkeys/kcontrol/init.cpp index 3468690e2..67dc2ee6e 100644 --- a/khotkeys/kcontrol/init.cpp +++ b/khotkeys/kcontrol/init.cpp @@ -31,13 +31,13 @@ extern "C" // Non-xinerama multhead support in KDE is just a hack // involving forking apps per-screen. Don't bother with // kded modules in such case. - QCString multiHead = getenv("KDE_MULTIHEAD"); + TQCString multiHead = getenv("KDE_MULTIHEAD"); if (multiHead.lower() == "true") kapp->kdeinitExec( "khotkeys" ); else { DCOPRef ref( "kded", "kded" ); - if( !ref.call( "loadModule", QCString( "khotkeys" ))) + if( !ref.call( "loadModule", TQCString( "khotkeys" ))) { kdWarning( 1217 ) << "Loading of khotkeys module failed." << endl; kapp->kdeinitExec( "khotkeys" ); diff --git a/khotkeys/kcontrol/kcmkhotkeys.cpp b/khotkeys/kcontrol/kcmkhotkeys.cpp index 8ffc1ff19..5d540d4c9 100644 --- a/khotkeys/kcontrol/kcmkhotkeys.cpp +++ b/khotkeys/kcontrol/kcmkhotkeys.cpp @@ -19,8 +19,8 @@ #include <unistd.h> #include <stdlib.h> -#include <qlayout.h> -#include <qsplitter.h> +#include <tqlayout.h> +#include <tqsplitter.h> #include <kcmodule.h> #include <kaboutdata.h> @@ -48,7 +48,7 @@ extern "C" { - KDE_EXPORT KCModule* create_khotkeys( QWidget* parent_P, const char* name_P ) + KDE_EXPORT KCModule* create_khotkeys( TQWidget* parent_P, const char* name_P ) { // sleep( 20 ); // CHECKME DEBUG KGlobal::locale()->insertCatalogue("khotkeys"); @@ -61,7 +61,7 @@ extern "C" namespace KHotKeys { -Module::Module( QWidget* parent_P, const char* ) +Module::Module( TQWidget* parent_P, const char* ) : KCModule( parent_P, "khotkeys" ), _actions_root( NULL ), _current_action_data( NULL ), listview_is_changed( false ), deleting_action( false ) { @@ -69,21 +69,21 @@ Module::Module( QWidget* parent_P, const char* ) module = this; init_global_data( false, this ); // don't grab keys init_arts(); - QVBoxLayout* vbox = new QVBoxLayout( this ); + TQVBoxLayout* vbox = new TQVBoxLayout( this ); vbox->setSpacing( 6 ); vbox->setMargin( 11 ); - QSplitter* splt = new QSplitter( this ); + TQSplitter* splt = new TQSplitter( this ); actions_listview_widget = new Actions_listview_widget( splt ); tab_widget = new Tab_widget( splt ); vbox->addWidget( splt ); buttons_widget = new Main_buttons_widget( this ); vbox->addWidget( buttons_widget ); - connect( actions_listview_widget, SIGNAL( current_action_changed()), - SLOT( listview_current_action_changed())); - connect( buttons_widget, SIGNAL( new_action_pressed()), SLOT( new_action())); - connect( buttons_widget, SIGNAL( new_action_group_pressed()), SLOT( new_action_group())); - connect( buttons_widget, SIGNAL( delete_action_pressed()), SLOT( delete_action())); - connect( buttons_widget, SIGNAL( global_settings_pressed()), SLOT( global_settings())); + connect( actions_listview_widget, TQT_SIGNAL( current_action_changed()), + TQT_SLOT( listview_current_action_changed())); + connect( buttons_widget, TQT_SIGNAL( new_action_pressed()), TQT_SLOT( new_action())); + connect( buttons_widget, TQT_SIGNAL( new_action_group_pressed()), TQT_SLOT( new_action_group())); + connect( buttons_widget, TQT_SIGNAL( delete_action_pressed()), TQT_SLOT( delete_action())); + connect( buttons_widget, TQT_SIGNAL( global_settings_pressed()), TQT_SLOT( global_settings())); // listview_current_action_changed(); // init KAboutData* about = new KAboutData("kcmkhotkeys", I18N_NOOP("KHotKeys"), KHOTKEYS_VERSION, @@ -124,7 +124,7 @@ void Module::save() settings.write_settings(); if( daemon_disabled()) { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send( "khotkeys*", "khotkeys", "quit()", data ); kdDebug( 1217 ) << "disabling khotkeys daemon" << endl; } @@ -137,7 +137,7 @@ void Module::save() } else { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send( "khotkeys*", "khotkeys", "reread_configuration()", data ); kdDebug( 1217 ) << "telling khotkeys daemon to reread configuration" << endl; } @@ -146,12 +146,12 @@ void Module::save() } -QString Module::quickHelp() const +TQString Module::quickHelp() const { return i18n( "" ); // TODO CHECKME } -void Module::action_name_changed( const QString& name_P ) +void Module::action_name_changed( const TQString& name_P ) { current_action_data()->set_name( name_P ); actions_listview_widget->action_name_changed( name_P ); @@ -272,7 +272,7 @@ void Module::set_gestures_exclude( Windowdef_list* windows ) void Module::import() { - QString file = KFileDialog::getOpenFileName( QString::null, "*.khotkeys", topLevelWidget(), + TQString file = KFileDialog::getOpenFileName( TQString::null, "*.khotkeys", topLevelWidget(), i18n( "Select File with Actions to Be Imported" )); if( file.isEmpty()) return; diff --git a/khotkeys/kcontrol/kcmkhotkeys.h b/khotkeys/kcontrol/kcmkhotkeys.h index 3061fa9ec..b406df8fe 100644 --- a/khotkeys/kcontrol/kcmkhotkeys.h +++ b/khotkeys/kcontrol/kcmkhotkeys.h @@ -32,16 +32,16 @@ class Module { Q_OBJECT public: - Module( QWidget *parent_P, const char *name_P ); + Module( TQWidget *parent_P, const char *name_P ); virtual ~Module(); virtual void load(); virtual void save(); // virtual void defaults(); not used - QString quickHelp() const; + TQString quickHelp() const; int buttons(); void set_current_action_data( Action_data_base* data_P ); Action_data_base* current_action_data(); - void action_name_changed( const QString& name_P ); + void action_name_changed( const TQString& name_P ); Action_data_group* actions_root() const; void set_gestures_disabled( bool set ); bool gestures_disabled() const; diff --git a/khotkeys/kcontrol/keyboard_input_widget.cpp b/khotkeys/kcontrol/keyboard_input_widget.cpp index 3d60d8e13..4d5727482 100644 --- a/khotkeys/kcontrol/keyboard_input_widget.cpp +++ b/khotkeys/kcontrol/keyboard_input_widget.cpp @@ -16,9 +16,9 @@ #include "keyboard_input_widget.h" -#include <qgroupbox.h> -#include <qpushbutton.h> -#include <qradiobutton.h> +#include <tqgroupbox.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> #include <ktextedit.h> @@ -31,21 +31,21 @@ namespace KHotKeys { -Keyboard_input_widget::Keyboard_input_widget( QWidget* parent_P, const char* name_P ) +Keyboard_input_widget::Keyboard_input_widget( TQWidget* parent_P, const char* name_P ) : Keyboard_input_widget_ui( parent_P, name_P ) { clear_data(); // KHotKeys::Module::changed() - connect( action_window_radio, SIGNAL( clicked()), - module, SLOT( changed())); - connect( active_window_radio, SIGNAL( clicked()), - module, SLOT( changed())); - connect( specific_window_radio, SIGNAL( clicked()), - module, SLOT( changed())); - connect( keyboard_input_multilineedit, SIGNAL( textChanged()), - module, SLOT( changed())); - connect( modify_button, SIGNAL( clicked()), - module, SLOT( changed())); + connect( action_window_radio, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( active_window_radio, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( specific_window_radio, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( keyboard_input_multilineedit, TQT_SIGNAL( textChanged()), + module, TQT_SLOT( changed())); + connect( modify_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); } void Keyboard_input_widget::clear_data() diff --git a/khotkeys/kcontrol/keyboard_input_widget.h b/khotkeys/kcontrol/keyboard_input_widget.h index 7c1f15b95..32690f44e 100644 --- a/khotkeys/kcontrol/keyboard_input_widget.h +++ b/khotkeys/kcontrol/keyboard_input_widget.h @@ -24,7 +24,7 @@ class Keyboard_input_widget { Q_OBJECT public: - Keyboard_input_widget( QWidget* parent_P = NULL, const char* name_P = NULL ); + Keyboard_input_widget( TQWidget* parent_P = NULL, const char* name_P = NULL ); void set_data( const Keyboard_input_action* data_P ); Keyboard_input_action* get_data( Action_data* data_P ) const; public slots: diff --git a/khotkeys/kcontrol/main_buttons_widget.cpp b/khotkeys/kcontrol/main_buttons_widget.cpp index fb8718a1c..3532cc13f 100644 --- a/khotkeys/kcontrol/main_buttons_widget.cpp +++ b/khotkeys/kcontrol/main_buttons_widget.cpp @@ -16,28 +16,28 @@ #include "main_buttons_widget.h" -#include <qpushbutton.h> +#include <tqpushbutton.h> #include "kcmkhotkeys.h" namespace KHotKeys { -Main_buttons_widget::Main_buttons_widget( QWidget* parent_P, const char* name_P ) +Main_buttons_widget::Main_buttons_widget( TQWidget* parent_P, const char* name_P ) : Main_buttons_widget_ui( parent_P, name_P ) { - connect( new_action_button, SIGNAL( clicked()), SIGNAL( new_action_pressed())); - connect( new_action_group_button, SIGNAL( clicked()), SIGNAL( new_action_group_pressed())); - connect( delete_action_button, SIGNAL( clicked()), SIGNAL( delete_action_pressed())); - connect( global_settings_button, SIGNAL( clicked()), SIGNAL( global_settings_pressed())); + connect( new_action_button, TQT_SIGNAL( clicked()), TQT_SIGNAL( new_action_pressed())); + connect( new_action_group_button, TQT_SIGNAL( clicked()), TQT_SIGNAL( new_action_group_pressed())); + connect( delete_action_button, TQT_SIGNAL( clicked()), TQT_SIGNAL( delete_action_pressed())); + connect( global_settings_button, TQT_SIGNAL( clicked()), TQT_SIGNAL( global_settings_pressed())); enable_delete( false ); // KHotKeys::Module::changed() - connect( new_action_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( new_action_group_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( delete_action_button, SIGNAL( clicked()), - module, SLOT( changed())); + connect( new_action_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( new_action_group_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( delete_action_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); setMaximumHeight( sizeHint().height()); // it gets too high and I have no idea why } diff --git a/khotkeys/kcontrol/main_buttons_widget.h b/khotkeys/kcontrol/main_buttons_widget.h index cd13b3cbc..e4410d9d0 100644 --- a/khotkeys/kcontrol/main_buttons_widget.h +++ b/khotkeys/kcontrol/main_buttons_widget.h @@ -21,7 +21,7 @@ class Main_buttons_widget { Q_OBJECT public: - Main_buttons_widget( QWidget* parent_P = NULL, const char* name_P = NULL ); + Main_buttons_widget( TQWidget* parent_P = NULL, const char* name_P = NULL ); void enable_delete( bool enable_P ); signals: void new_action_pressed(); diff --git a/khotkeys/kcontrol/menuedit.cpp b/khotkeys/kcontrol/menuedit.cpp index dd0035dfa..78de7dee6 100644 --- a/khotkeys/kcontrol/menuedit.cpp +++ b/khotkeys/kcontrol/menuedit.cpp @@ -23,9 +23,9 @@ #include <kaccel.h> #include <kapplication.h> #include <dcopclient.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqlayout.h> #include <kkeydialog.h> #include <settings.h> @@ -34,7 +34,7 @@ namespace KHotKeys { -static QObject* owner = NULL; +static TQObject* owner = NULL; void khotkeys_init() { @@ -53,7 +53,7 @@ void khotkeys_cleanup() } Menuentry_shortcut_action_data* khotkeys_get_menu_entry_internal2( - const Action_data_group* data_P, const QString& entry_P ) + const Action_data_group* data_P, const TQString& entry_P ) { if( !data_P->enabled( false )) return NULL; @@ -97,19 +97,19 @@ Action_data_group* khotkeys_get_menu_root( Action_data_group* data_P ) } Menuentry_shortcut_action_data* khotkeys_get_menu_entry_internal( Action_data_group* data_P, - const QString& entry_P ) + const TQString& entry_P ) { return khotkeys_get_menu_entry_internal2( khotkeys_get_menu_root( data_P ), entry_P ); } -QString khotkeys_get_menu_shortcut( Menuentry_shortcut_action_data* data_P ) +TQString khotkeys_get_menu_shortcut( Menuentry_shortcut_action_data* data_P ) { if( data_P->trigger() != NULL ) return data_P->trigger()->shortcut().toString(); return ""; } -void khotkeys_get_all_shortcuts_internal(const Action_data_group* data_P, QStringList &result) +void khotkeys_get_all_shortcuts_internal(const Action_data_group* data_P, TQStringList &result) { if( !data_P->enabled( false )) return; @@ -133,9 +133,9 @@ void khotkeys_get_all_shortcuts_internal(const Action_data_group* data_P, QStrin } -QStringList khotkeys_get_all_shortcuts( ) +TQStringList khotkeys_get_all_shortcuts( ) { - QStringList result; + TQStringList result; Settings settings; settings.read_settings( true ); @@ -145,7 +145,7 @@ QStringList khotkeys_get_all_shortcuts( ) } -KService::Ptr khotkeys_find_menu_entry_internal(const Action_data_group* data_P, const QString &shortcut_P) +KService::Ptr khotkeys_find_menu_entry_internal(const Action_data_group* data_P, const TQString &shortcut_P) { if( !data_P->enabled( false )) return 0; @@ -177,7 +177,7 @@ KService::Ptr khotkeys_find_menu_entry_internal(const Action_data_group* data_P, } -KService::Ptr khotkeys_find_menu_entry( const QString& shortcut_P ) +KService::Ptr khotkeys_find_menu_entry( const TQString& shortcut_P ) { Settings settings; settings.read_settings( true ); @@ -188,7 +188,7 @@ KService::Ptr khotkeys_find_menu_entry( const QString& shortcut_P ) void khotkeys_send_reread_config() { - QByteArray data; + TQByteArray data; if( !kapp->dcopClient()->isAttached()) kapp->dcopClient()->attach(); if( !kapp->dcopClient()->isApplicationRegistered( "khotkeys" )) @@ -198,13 +198,13 @@ void khotkeys_send_reread_config() } else { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send( "khotkeys*", "khotkeys", "reread_configuration()", data ); kdDebug( 1217 ) << "telling khotkeys daemon to reread configuration" << endl; } } -QString khotkeys_get_menu_entry_shortcut( const QString& entry_P ) +TQString khotkeys_get_menu_entry_shortcut( const TQString& entry_P ) { Settings settings; settings.read_settings( true ); @@ -215,12 +215,12 @@ QString khotkeys_get_menu_entry_shortcut( const QString& entry_P ) delete settings.actions; return ""; } - QString shortcut = khotkeys_get_menu_shortcut( entry ); + TQString shortcut = khotkeys_get_menu_shortcut( entry ); delete settings.actions; return shortcut; } -bool khotkeys_menu_entry_moved( const QString& new_P, const QString& old_P ) +bool khotkeys_menu_entry_moved( const TQString& new_P, const TQString& old_P ) { Settings settings; settings.read_settings( true ); @@ -232,7 +232,7 @@ bool khotkeys_menu_entry_moved( const QString& new_P, const QString& old_P ) return false; } Action_data_group* parent = entry->parent(); - QString new_name = new_P; + TQString new_name = new_P; if( entry->name().startsWith( i18n( "K Menu - " ))) new_name = i18n( "K Menu - " ) + new_P; Menuentry_shortcut_action_data* new_entry = new Menuentry_shortcut_action_data( parent, @@ -246,7 +246,7 @@ bool khotkeys_menu_entry_moved( const QString& new_P, const QString& old_P ) return true; } -void khotkeys_menu_entry_deleted( const QString& entry_P ) +void khotkeys_menu_entry_deleted( const TQString& entry_P ) { Settings settings; settings.read_settings( true ); @@ -263,8 +263,8 @@ void khotkeys_menu_entry_deleted( const QString& entry_P ) khotkeys_send_reread_config(); } -QString khotkeys_change_menu_entry_shortcut( const QString& entry_P, - const QString& shortcut_P ) +TQString khotkeys_change_menu_entry_shortcut( const TQString& entry_P, + const TQString& shortcut_P ) { Settings settings; settings.read_settings( true ); @@ -286,7 +286,7 @@ QString khotkeys_change_menu_entry_shortcut( const QString& entry_P, delete entry; entry = entry_tmp; } - QString shortcut = ""; + TQString shortcut = ""; // make sure the shortcut is valid shortcut = (KShortcut( shortcut_P )).toStringInternal(); if( !shortcut.isEmpty()) @@ -327,33 +327,33 @@ void khotkeys_cleanup() KHotKeys::khotkeys_cleanup(); } -QString khotkeys_get_menu_entry_shortcut( const QString& entry_P ) +TQString khotkeys_get_menu_entry_shortcut( const TQString& entry_P ) { return KHotKeys::khotkeys_get_menu_entry_shortcut( entry_P ); } -bool khotkeys_menu_entry_moved( const QString& new_P, const QString& old_P ) +bool khotkeys_menu_entry_moved( const TQString& new_P, const TQString& old_P ) { return KHotKeys::khotkeys_menu_entry_moved( new_P, old_P ); } -void khotkeys_menu_entry_deleted( const QString& entry_P ) +void khotkeys_menu_entry_deleted( const TQString& entry_P ) { KHotKeys::khotkeys_menu_entry_deleted( entry_P ); } -QString khotkeys_change_menu_entry_shortcut( const QString& entry_P, - const QString& shortcut_P ) +TQString khotkeys_change_menu_entry_shortcut( const TQString& entry_P, + const TQString& shortcut_P ) { return KHotKeys::khotkeys_change_menu_entry_shortcut( entry_P, shortcut_P ); } -QStringList khotkeys_get_all_shortcuts( ) +TQStringList khotkeys_get_all_shortcuts( ) { return KHotKeys::khotkeys_get_all_shortcuts(); } -KService::Ptr khotkeys_find_menu_entry( const QString& shortcut_P ) +KService::Ptr khotkeys_find_menu_entry( const TQString& shortcut_P ) { return KHotKeys::khotkeys_find_menu_entry( shortcut_P ); } diff --git a/khotkeys/kcontrol/menuedit.h b/khotkeys/kcontrol/menuedit.h index 0986d1cca..325a3050e 100644 --- a/khotkeys/kcontrol/menuedit.h +++ b/khotkeys/kcontrol/menuedit.h @@ -11,7 +11,7 @@ #ifndef _MENUEDIT_H_ #define _MENUEDIT_H_ -#include <qstring.h> +#include <tqstring.h> #include <kdialogbase.h> #include <kaccel.h> #include <kservice.h> @@ -27,18 +27,18 @@ KDE_EXPORT void khotkeys_init( void ); KDE_EXPORT void khotkeys_cleanup( void ); // return keyboard shortcut ( e.g. "ALT+T" ) for given menu entry ( e.g. // "System/Konsole.desktop" -KDE_EXPORT QString khotkeys_get_menu_entry_shortcut( const QString& entry_P ); +KDE_EXPORT TQString khotkeys_get_menu_entry_shortcut( const TQString& entry_P ); // changes assigned shortcut to menu entry a updates config file -KDE_EXPORT QString khotkeys_change_menu_entry_shortcut( const QString& entry_P, - const QString& shortcut_P ); +KDE_EXPORT TQString khotkeys_change_menu_entry_shortcut( const TQString& entry_P, + const TQString& shortcut_P ); // menu entry was moved in K Menu -KDE_EXPORT bool khotkeys_menu_entry_moved( const QString& new_P, const QString& old_P ); +KDE_EXPORT bool khotkeys_menu_entry_moved( const TQString& new_P, const TQString& old_P ); // menu entry was removed -KDE_EXPORT void khotkeys_menu_entry_deleted( const QString& entry_P ); +KDE_EXPORT void khotkeys_menu_entry_deleted( const TQString& entry_P ); // List of all hotkeys in use -KDE_EXPORT QStringList khotkeys_get_all_shortcuts( ); +KDE_EXPORT TQStringList khotkeys_get_all_shortcuts( ); // Find menu entry that uses shortcut -KDE_EXPORT KService::Ptr khotkeys_find_menu_entry( const QString& shortcut_P ); +KDE_EXPORT KService::Ptr khotkeys_find_menu_entry( const TQString& shortcut_P ); } // extern "C" #endif diff --git a/khotkeys/kcontrol/menuentry_widget.cpp b/khotkeys/kcontrol/menuentry_widget.cpp index 2bad5597c..9b313d20d 100644 --- a/khotkeys/kcontrol/menuentry_widget.cpp +++ b/khotkeys/kcontrol/menuentry_widget.cpp @@ -16,10 +16,10 @@ #include "menuentry_widget.h" -#include <qpushbutton.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qgroupbox.h> +#include <tqpushbutton.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> #include <kdebug.h> @@ -32,13 +32,13 @@ namespace KHotKeys { -Menuentry_widget::Menuentry_widget( QWidget* parent_P, const char* name_P ) +Menuentry_widget::Menuentry_widget( TQWidget* parent_P, const char* name_P ) : Menuentry_widget_ui( parent_P, name_P ) { clear_data(); // KHotKeys::Module::changed() - connect( menuentry_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); + connect( menuentry_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); } void Menuentry_widget::clear_data() diff --git a/khotkeys/kcontrol/menuentry_widget.h b/khotkeys/kcontrol/menuentry_widget.h index 0c871ec79..f4b61677d 100644 --- a/khotkeys/kcontrol/menuentry_widget.h +++ b/khotkeys/kcontrol/menuentry_widget.h @@ -24,7 +24,7 @@ class Menuentry_widget { Q_OBJECT public: - Menuentry_widget( QWidget* parent_P = NULL, const char* name_P = NULL ); + Menuentry_widget( TQWidget* parent_P = NULL, const char* name_P = NULL ); void set_data( const Menuentry_action* data_P ); Menuentry_action* get_data( Action_data* data_P ) const; public slots: diff --git a/khotkeys/kcontrol/tab_widget.cpp b/khotkeys/kcontrol/tab_widget.cpp index 2a484529a..243543519 100644 --- a/khotkeys/kcontrol/tab_widget.cpp +++ b/khotkeys/kcontrol/tab_widget.cpp @@ -51,16 +51,16 @@ namespace KHotKeys { -Tab_widget::Tab_widget( QWidget* parent_P, const char* name_P ) - : QTabWidget( parent_P, name_P ) +Tab_widget::Tab_widget( TQWidget* parent_P, const char* name_P ) + : TQTabWidget( parent_P, name_P ) { pages[ TAB_INFO ] = new Info_tab; pages[ TAB_GENERAL_SETTINGS ] = new General_settings_tab; pages[ TAB_GESTURES_SETTINGS ] = new Gestures_settings_tab; General_tab* general_tab; pages[ TAB_GENERAL ] = general_tab = new General_tab; - connect( general_tab, SIGNAL( action_type_changed( int )), - SLOT( set_action_type_slot( int ))); + connect( general_tab, TQT_SIGNAL( action_type_changed( int )), + TQT_SLOT( set_action_type_slot( int ))); pages[ TAB_GROUP_GENERAL ] = new Action_group_tab; pages[ TAB_CONDITIONS ] = new Condition_list_tab; pages[ TAB_ACTIONS ] = new Action_list_tab; @@ -76,7 +76,7 @@ Tab_widget::Tab_widget( QWidget* parent_P, const char* name_P ) for( tab_pos_t i = TAB_FIRST; i < TAB_END; ++i ) - connect( this, SIGNAL( clear_pages_signal()), pages[ i ], SLOT( clear_data())); + connect( this, TQT_SIGNAL( clear_pages_signal()), pages[ i ], TQT_SLOT( clear_data())); #ifdef HAVE_ARTS if( haveArts()) show_pages(( TAB_INFO, TAB_GENERAL_SETTINGS, TAB_GESTURES_SETTINGS, TAB_VOICE_SETTINGS )); @@ -127,7 +127,7 @@ void Tab_widget::save_current_action_changes() } else if( current_type == DATA ) { - QString name, comment; + TQString name, comment; bool enabled; static_cast< General_tab* >( pages[ TAB_GENERAL ] )->get_data( name, comment, enabled ); switch( current_data_type ) @@ -441,18 +441,18 @@ void Tab_widget::show_pages( const Pages_set& pages_P ) { removePage( pages[ i ] ); if( pages_P.is_set( i )) // don't clear page contents if it stays visible - disconnect( this, SIGNAL( clear_pages_signal()), pages[ i ], SLOT( clear_data())); + disconnect( this, TQT_SIGNAL( clear_pages_signal()), pages[ i ], TQT_SLOT( clear_data())); } clear_pages(); // reconnect all pages to this signal - disconnect( this, SIGNAL( clear_pages_signal()), NULL, NULL ); + disconnect( this, TQT_SIGNAL( clear_pages_signal()), NULL, NULL ); for( tab_pos_t i = TAB_FIRST; i < TAB_END; ++i ) { if( pages_P.is_set( i )) addTab( pages[ i ], i18n( tab_labels[ i ] )); - connect( this, SIGNAL( clear_pages_signal()), pages[ i ], SLOT( clear_data())); + connect( this, TQT_SIGNAL( clear_pages_signal()), pages[ i ], TQT_SLOT( clear_data())); } show(); } diff --git a/khotkeys/kcontrol/tab_widget.h b/khotkeys/kcontrol/tab_widget.h index eedaa541a..84fd6af84 100644 --- a/khotkeys/kcontrol/tab_widget.h +++ b/khotkeys/kcontrol/tab_widget.h @@ -11,7 +11,7 @@ #ifndef _TAB_WIDGET_H_ #define _TAB_WIDGET_H_ -#include <qtabwidget.h> +#include <tqtabwidget.h> #include <actions.h> @@ -35,7 +35,7 @@ class Tab_widget TYPE_ACTIVATE_WINDOW_SHORTCUT, TYPE_END }; - Tab_widget( QWidget* parent_P = NULL, const char* name_P = NULL ); + Tab_widget( TQWidget* parent_P = NULL, const char* name_P = NULL ); virtual ~Tab_widget(); void set_action_type( action_type_t type_P, bool force_P = false ); void save_current_action_changes(); @@ -54,7 +54,7 @@ class Tab_widget TAB_GENERAL, TAB_GROUP_GENERAL, TAB_TRIGGERS, TAB_SHORTCUT_TRIGGER, TAB_GESTURE_TRIGGER, TAB_ACTIONS, TAB_COMMAND_URL, TAB_MENUENTRY, TAB_DCOP, TAB_KEYBOARD_INPUT, TAB_WINDOW, TAB_CONDITIONS, TAB_VOICE_SETTINGS, TAB_END }; - QWidget* pages[ TAB_END ]; + TQWidget* pages[ TAB_END ]; enum tab_show_type_t { NONE, DATA, GROUP }; tab_show_type_t current_type; action_type_t current_data_type; diff --git a/khotkeys/kcontrol/triggers_tab.cpp b/khotkeys/kcontrol/triggers_tab.cpp index 8c4a13fda..39ff6933f 100644 --- a/khotkeys/kcontrol/triggers_tab.cpp +++ b/khotkeys/kcontrol/triggers_tab.cpp @@ -17,12 +17,12 @@ #include "triggers_tab.h" #include <assert.h> -#include <qpushbutton.h> -#include <qlineedit.h> -#include <qpopupmenu.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qheader.h> +#include <tqpushbutton.h> +#include <tqlineedit.h> +#include <tqpopupmenu.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqheader.h> #include <kdebug.h> #include <klocale.h> @@ -44,10 +44,10 @@ namespace KHotKeys // Triggers_tab -Triggers_tab::Triggers_tab( QWidget* parent_P, const char* name_P ) +Triggers_tab::Triggers_tab( TQWidget* parent_P, const char* name_P ) : Triggers_tab_ui( parent_P, name_P ), selected_item( NULL ) { - QPopupMenu* popup = new QPopupMenu; // CHECKME looks like setting parent doesn't work + TQPopupMenu* popup = new QPopupMenu; // CHECKME looks like setting parent doesn't work popup->insertItem( i18n( "Shortcut Trigger..." ), TYPE_SHORTCUT_TRIGGER ); popup->insertItem( i18n( "Gesture Trigger..." ), TYPE_GESTURE_TRIGGER ); popup->insertItem( i18n( "Window Trigger..." ), TYPE_WINDOW_TRIGGER ); @@ -55,9 +55,9 @@ Triggers_tab::Triggers_tab( QWidget* parent_P, const char* name_P ) if( haveArts()) popup->insertItem( i18n( "Voice Trigger..." ), TYPE_VOICE_TRIGGER ); #endif - connect( popup, SIGNAL( activated( int )), SLOT( new_selected( int ))); - connect( triggers_listview, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int ) ), - this, SLOT( modify_pressed() ) ); + connect( popup, TQT_SIGNAL( activated( int )), TQT_SLOT( new_selected( int ))); + connect( triggers_listview, TQT_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( modify_pressed() ) ); new_button->setPopup( popup ); copy_button->setEnabled( false ); @@ -69,16 +69,16 @@ Triggers_tab::Triggers_tab( QWidget* parent_P, const char* name_P ) triggers_listview->setForceSelect( true ); clear_data(); // KHotKeys::Module::changed() - connect( new_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( copy_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( modify_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( delete_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( comment_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); + connect( new_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( copy_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( modify_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( delete_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( comment_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); } Triggers_tab::~Triggers_tab() @@ -111,7 +111,7 @@ void Triggers_tab::set_data( const Trigger_list* data_P ) Trigger_list* Triggers_tab::get_data( Action_data* data_P ) const { Trigger_list* list = new Trigger_list( comment_lineedit->text()); - for( QListViewItem* pos = triggers_listview->firstChild(); + for( TQListViewItem* pos = triggers_listview->firstChild(); pos != NULL; pos = pos->nextSibling()) list->append( static_cast< Trigger_list_item* >( pos )->trigger()->copy( data_P )); @@ -129,14 +129,14 @@ void Triggers_tab::new_selected( int type_P ) break; case TYPE_GESTURE_TRIGGER: // Gesture trigger dlg = new Gesture_trigger_dialog( - new Gesture_trigger( NULL, QString::null )); // CHECKME NULL ? + new Gesture_trigger( NULL, TQString::null )); // CHECKME NULL ? break; case TYPE_WINDOW_TRIGGER: // Window trigger dlg = new Window_trigger_dialog( new Window_trigger( NULL, new Windowdef_list( "" ), 0 )); // CHECKME NULL ? break; case TYPE_VOICE_TRIGGER: // Voice trigger - dlg = new Voice_trigger_dialog( new Voice_trigger(NULL,QString::null,VoiceSignature(),VoiceSignature())); // CHECKME NULL ? + dlg = new Voice_trigger_dialog( new Voice_trigger(NULL,TQString::null,VoiceSignature(),VoiceSignature())); // CHECKME NULL ? break; } if( dlg != NULL ) @@ -169,7 +169,7 @@ void Triggers_tab::modify_pressed() edit_listview_item( selected_item ); } -void Triggers_tab::current_changed( QListViewItem* item_P ) +void Triggers_tab::current_changed( TQListViewItem* item_P ) { // if( item_P == selected_item ) // return; @@ -181,7 +181,7 @@ void Triggers_tab::current_changed( QListViewItem* item_P ) } Trigger_list_item* Triggers_tab::create_listview_item( Trigger* trigger_P, - QListView* parent_P, QListViewItem* after_P, bool copy_P ) + TQListView* parent_P, TQListViewItem* after_P, bool copy_P ) { Trigger* new_trg = copy_P ? trigger_P->copy( NULL ) : trigger_P; // CHECKME NULL ? // CHECKME uz by nemelo byt treba if( after_P == NULL ) @@ -212,26 +212,26 @@ void Triggers_tab::edit_listview_item( Trigger_list_item* item_P ) // Trigger_list_item -QString Trigger_list_item::text( int column_P ) const +TQString Trigger_list_item::text( int column_P ) const { - return column_P == 0 ? trigger()->description() : QString::null; + return column_P == 0 ? trigger()->description() : TQString::null; } // Shortcut_trigger_widget -Shortcut_trigger_widget::Shortcut_trigger_widget( QWidget* parent_P, const char* ) - : QWidget( parent_P ) +Shortcut_trigger_widget::Shortcut_trigger_widget( TQWidget* parent_P, const char* ) + : TQWidget( parent_P ) { - QVBoxLayout* lay = new QVBoxLayout( this, 11, 6 ); - QLabel* lbl = new QLabel( i18n( "Select keyboard shortcut:" ), this ); + TQVBoxLayout* lay = new TQVBoxLayout( this, 11, 6 ); + TQLabel* lbl = new TQLabel( i18n( "Select keyboard shortcut:" ), this ); lay->addWidget( lbl ); lay->addSpacing( 10 ); bt = new KKeyButton( this ); lay->addWidget( bt, 0 , Qt::AlignHCenter ); lay->addStretch(); clear_data(); - connect( bt, SIGNAL( capturedShortcut( const KShortcut& )), - this, SLOT( capturedShortcut( const KShortcut& ))); + connect( bt, TQT_SIGNAL( capturedShortcut( const KShortcut& )), + this, TQT_SLOT( capturedShortcut( const KShortcut& ))); } void Shortcut_trigger_widget::clear_data() @@ -320,8 +320,8 @@ Gesture_trigger_dialog::Gesture_trigger_dialog( Gesture_trigger* trigger_P ) _page = new GestureRecordPage( _trigger->gesturecode(), this, "GestureRecordPage"); - connect(_page, SIGNAL(gestureRecorded(bool)), - this, SLOT(enableButtonOK(bool))); + connect(_page, TQT_SIGNAL(gestureRecorded(bool)), + this, TQT_SLOT(enableButtonOK(bool))); setMainWidget( _page ); } @@ -341,9 +341,9 @@ Voice_trigger_dialog::Voice_trigger_dialog( Voice_trigger* trigger_P ) : KDialogBase( NULL, NULL, true, "", Ok | Cancel ), // CHECKME caption _trigger( trigger_P ), _page( NULL ) { - _page = new VoiceRecordPage( _trigger ? _trigger->voicecode() : QString::null , this, "VoiceRecordPage"); + _page = new VoiceRecordPage( _trigger ? _trigger->voicecode() : TQString::null , this, "VoiceRecordPage"); - connect(_page, SIGNAL(voiceRecorded(bool)), this, SLOT(enableButtonOK(bool))); + connect(_page, TQT_SIGNAL(voiceRecorded(bool)), this, TQT_SLOT(enableButtonOK(bool))); setMainWidget( _page ); } diff --git a/khotkeys/kcontrol/triggers_tab.h b/khotkeys/kcontrol/triggers_tab.h index 57cce3e3e..824b31173 100644 --- a/khotkeys/kcontrol/triggers_tab.h +++ b/khotkeys/kcontrol/triggers_tab.h @@ -30,22 +30,22 @@ class Action_data; class Trigger_list_item; class KHotKeysShortcutList; -// A listbox here would do too, but unlike QListView, QListBox now even cannot be subclassed +// A listbox here would do too, but unlike TQListView, TQListBox now even cannot be subclassed // to behave sanely WRT selecting and the current item class Triggers_tab : public Triggers_tab_ui { Q_OBJECT public: - Triggers_tab( QWidget* parent_P = NULL, const char* name_P = NULL ); + Triggers_tab( TQWidget* parent_P = NULL, const char* name_P = NULL ); virtual ~Triggers_tab(); void set_data( const Trigger_list* data_P ); Trigger_list* get_data( Action_data* data_P ) const; public slots: void clear_data(); protected: - Trigger_list_item* create_listview_item( Trigger* trigger_P, QListView* parent_P, - QListViewItem* after_P, bool copy_P ); + Trigger_list_item* create_listview_item( Trigger* trigger_P, TQListView* parent_P, + TQListViewItem* after_P, bool copy_P ); void edit_listview_item( Trigger_list_item* item_P ); Trigger_list_item* selected_item; enum type_t { TYPE_SHORTCUT_TRIGGER, TYPE_GESTURE_TRIGGER, TYPE_WINDOW_TRIGGER, TYPE_VOICE_TRIGGER }; @@ -54,17 +54,17 @@ class Triggers_tab virtual void copy_pressed(); virtual void delete_pressed(); virtual void modify_pressed(); - virtual void current_changed( QListViewItem* item_P ); + virtual void current_changed( TQListViewItem* item_P ); }; class Trigger_list_item : public QListViewItem { public: - Trigger_list_item( QListView* parent_P, Trigger* trigger_P ); - Trigger_list_item( QListView* parent_P, QListViewItem* after_P, Trigger* trigger_P ); + Trigger_list_item( TQListView* parent_P, Trigger* trigger_P ); + Trigger_list_item( TQListView* parent_P, TQListViewItem* after_P, Trigger* trigger_P ); virtual ~Trigger_list_item(); - virtual QString text( int column_P ) const; + virtual TQString text( int column_P ) const; Trigger* trigger() const; void set_trigger( Trigger* trigger_P ); protected: @@ -84,7 +84,7 @@ class Shortcut_trigger_widget { Q_OBJECT public: - Shortcut_trigger_widget( QWidget* parent_P = NULL, const char* name_P = NULL ); + Shortcut_trigger_widget( TQWidget* parent_P = NULL, const char* name_P = NULL ); void set_data( const Shortcut_trigger* trigger_P ); Shortcut_trigger* get_data( Action_data* data_P ) const; public slots: @@ -163,15 +163,15 @@ class Voice_trigger_dialog // Trigger_list_item inline -Trigger_list_item::Trigger_list_item( QListView* parent_P, Trigger* trigger_P ) - : QListViewItem( parent_P ), _trigger( trigger_P ) +Trigger_list_item::Trigger_list_item( TQListView* parent_P, Trigger* trigger_P ) + : TQListViewItem( parent_P ), _trigger( trigger_P ) { } inline -Trigger_list_item::Trigger_list_item( QListView* parent_P, QListViewItem* after_P, +Trigger_list_item::Trigger_list_item( TQListView* parent_P, TQListViewItem* after_P, Trigger* trigger_P ) - : QListViewItem( parent_P, after_P ), _trigger( trigger_P ) + : TQListViewItem( parent_P, after_P ), _trigger( trigger_P ) { } diff --git a/khotkeys/kcontrol/voice_settings_tab.cpp b/khotkeys/kcontrol/voice_settings_tab.cpp index 684ca0cdf..612498536 100644 --- a/khotkeys/kcontrol/voice_settings_tab.cpp +++ b/khotkeys/kcontrol/voice_settings_tab.cpp @@ -11,9 +11,9 @@ #include "voice_settings_tab.h" #include <klocale.h> -#include <qcombobox.h> +#include <tqcombobox.h> #include <knuminput.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <kkeybutton.h> #include <kkeydialog.h> @@ -23,10 +23,10 @@ namespace KHotKeys { -Voice_settings_tab::Voice_settings_tab( QWidget* parent_P, const char* name_P ) +Voice_settings_tab::Voice_settings_tab( TQWidget* parent_P, const char* name_P ) : Voice_settings_tab_ui( parent_P, name_P ) { - connect( keyButton , SIGNAL(capturedShortcut (const KShortcut &)) , this, SLOT(slotCapturedKey( const KShortcut& ))); + connect( keyButton , TQT_SIGNAL(capturedShortcut (const KShortcut &)) , this, TQT_SLOT(slotCapturedKey( const KShortcut& ))); } void Voice_settings_tab::read_data() diff --git a/khotkeys/kcontrol/voice_settings_tab.h b/khotkeys/kcontrol/voice_settings_tab.h index 7b7abd3c5..68e37af3a 100644 --- a/khotkeys/kcontrol/voice_settings_tab.h +++ b/khotkeys/kcontrol/voice_settings_tab.h @@ -23,7 +23,7 @@ class Voice_settings_tab { Q_OBJECT public: - Voice_settings_tab( QWidget* parent = NULL, const char* name = NULL ); + Voice_settings_tab( TQWidget* parent = NULL, const char* name = NULL ); void read_data(); void write_data() const; public slots: diff --git a/khotkeys/kcontrol/voicerecorder.cpp b/khotkeys/kcontrol/voicerecorder.cpp index 92458c2ee..31578298d 100644 --- a/khotkeys/kcontrol/voicerecorder.cpp +++ b/khotkeys/kcontrol/voicerecorder.cpp @@ -8,8 +8,8 @@ ****************************************************************************/ -#include <qcolor.h> -#include <qevent.h> +#include <tqcolor.h> +#include <tqevent.h> #include "voicerecorder.h" #include "soundrecorder.h" @@ -20,8 +20,8 @@ #include <klineedit.h> #include <klocale.h> #include <ktempfile.h> -#include <qlabel.h> -#include <qpainter.h> +#include <tqlabel.h> +#include <tqpainter.h> #include <kmessagebox.h> #include <klibloader.h> #include <kstandarddirs.h> @@ -45,14 +45,14 @@ bool VoiceRecorder::init( KLibrary* lib ) return arts_play != NULL; } -VoiceRecorder::VoiceRecorder(const Sound& sound_P, const QString &voiceId, QWidget *parent, const char *name) +VoiceRecorder::VoiceRecorder(const Sound& sound_P, const TQString &voiceId, TQWidget *parent, const char *name) : Voice_input_widget_ui(parent, name) , _recorder( SoundRecorder::create(this)) , _state(sNotModified), _tempFile(0L) , _voiceId(voiceId) { _sound=sound_P; buttonPlay->setEnabled(sound_P.size() > 50); buttonStop->setEnabled(false); - connect (_recorder , SIGNAL(recorded(const Sound& )) , this , SLOT(slotSoundRecorded(const Sound& ) )); + connect (_recorder , TQT_SIGNAL(recorded(const Sound& )) , this , TQT_SLOT(slotSoundRecorded(const Sound& ) )); //if(voiceid_P.isEmpty()) emit recorded(false); @@ -89,14 +89,14 @@ void VoiceRecorder::slotPlayPressed() return; /*if(!_modified) { - QString fileName = locateLocal( "appdata", _original_voiuceid + ".wav" ); + TQString fileName = locateLocal( "appdata", _original_voiuceid + ".wav" ); arts_play( fileName ); } else {*/ if(!_tempFile) { - _tempFile=new KTempFile(QString::null,".wav"); + _tempFile=new KTempFile(TQString::null,".wav"); _tempFile->setAutoDelete(true); } _sound.save(_tempFile->name()); @@ -118,7 +118,7 @@ void VoiceRecorder::slotSoundRecorded(const Sound &sound) bool correct=drawSound() && sound.size()>50; if(correct) { - QString vm=voice_handler->isNewSoundFarEnough( VoiceSignature(sound), _voiceId); + TQString vm=voice_handler->isNewSoundFarEnough( VoiceSignature(sound), _voiceId); if(!vm.isNull()) { KMessageBox::sorry (this, i18n("The word you recorded is too close to the existing reference '%1'. Please record another word.").arg(vm) ); @@ -140,14 +140,14 @@ void VoiceRecorder::slotSoundRecorded(const Sound &sound) { if(voiceId().isEmpty()) return VoiceSignature(); - QString fileName = locateLocal( "appdata", voiceId() + ".wav" ); + TQString fileName = locateLocal( "appdata", voiceId() + ".wav" ); _sound.save( fileName ); return VoiceSignature(_sound); }*/ bool VoiceRecorder::drawSound() { - label->setText(QString::null); + label->setText(TQString::null); uint length=_sound.size(); if(length < 2) @@ -155,20 +155,20 @@ bool VoiceRecorder::drawSound() int width=label->width(); int height=label->height(); - QPixmap pix(width,height); - pix.fill(QColor(255,255,255)); - QPainter p; + TQPixmap pix(width,height); + pix.fill(TQColor(255,255,255)); + TQPainter p; p.begin(&pix); - p.setPen(QPen(QColor("green"),1)); + p.setPen(TQPen(TQColor("green"),1)); p.drawLine(0,height/2,width,height/2); - p.setPen(QPen(QColor("red"),1)); + p.setPen(TQPen(TQColor("red"),1)); uint lx=0; uint ly=height/2; - /*** DRAW THE SIGNAL ******/ + /*** DRAW THE TQT_SIGNAL ******/ for(uint f=1; f<length; f++) { uint nx=f*width/length; @@ -179,7 +179,7 @@ bool VoiceRecorder::drawSound() unsigned int start=0 , stop=0; bool res=KHotKeys::VoiceSignature::window(_sound,&start,&stop); - p.setPen(QPen(QColor("blue"),1)); + p.setPen(TQPen(TQColor("blue"),1)); if(res) { p.drawLine(start*width/length ,0,start*width/length ,height); diff --git a/khotkeys/kcontrol/voicerecorder.h b/khotkeys/kcontrol/voicerecorder.h index 579f53893..c1ac57b85 100644 --- a/khotkeys/kcontrol/voicerecorder.h +++ b/khotkeys/kcontrol/voicerecorder.h @@ -11,9 +11,9 @@ #ifndef VOICE_RECORDER_H #define VOICE_RECORDER_H -#include <qframe.h> +#include <tqframe.h> #include "ui/voice_input_widget_ui.h" -#include <qmemarray.h> +#include <tqmemarray.h> #include "sound.h" class QMouseEvent; @@ -33,7 +33,7 @@ class VoiceRecorder : public Voice_input_widget_ui Q_OBJECT public: - VoiceRecorder(const Sound& sound_P, const QString &voiceId, QWidget *parent, const char *name); + VoiceRecorder(const Sound& sound_P, const TQString &voiceId, TQWidget *parent, const char *name); ~VoiceRecorder(); Sound sound() const; @@ -46,7 +46,7 @@ class VoiceRecorder : public Voice_input_widget_ui } static bool init( KLibrary* lib ); - typedef void (*arts_play_fun)( const QString& file ); + typedef void (*arts_play_fun)( const TQString& file ); protected slots: void slotStopPressed(); @@ -64,7 +64,7 @@ class VoiceRecorder : public Voice_input_widget_ui Sound _sound; State _state; KTempFile *_tempFile; - QString _voiceId; + TQString _voiceId; static arts_play_fun arts_play; }; diff --git a/khotkeys/kcontrol/voicerecordpage.cpp b/khotkeys/kcontrol/voicerecordpage.cpp index 385d78dda..fec07e22f 100644 --- a/khotkeys/kcontrol/voicerecordpage.cpp +++ b/khotkeys/kcontrol/voicerecordpage.cpp @@ -8,9 +8,9 @@ ****************************************************************************/ -#include <qwidget.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include <klineedit.h> #include <kstandarddirs.h> @@ -25,29 +25,29 @@ namespace KHotKeys { -VoiceRecordPage::VoiceRecordPage( const QString &voiceid_P, QWidget *parent, const char *name) - : QVBox(parent, name) , _original_voiceId(voiceid_P) +VoiceRecordPage::VoiceRecordPage( const TQString &voiceid_P, TQWidget *parent, const char *name) + : TQVBox(parent, name) , _original_voiceId(voiceid_P) { _message = i18n("Enter a code for the sound (e.g. the word you are saying) and record the same word twice."); - _label = new QLabel(_message, this, "label"); - _label->setAlignment(QLabel::AlignLeft | QLabel::WordBreak | - QLabel::AlignVCenter); + _label = new TQLabel(_message, this, "label"); + _label->setAlignment(TQLabel::AlignLeft | TQLabel::WordBreak | + TQLabel::AlignVCenter); _lineEdit = new KLineEdit( this ); _lineEdit->setText(voiceid_P); Sound s; - if(voiceid_P!=QString::null) + if(voiceid_P!=TQString::null) { - QString fileName = locateLocal( "data", "khotkeys/" + voiceid_P + "1.wav" ); + TQString fileName = locateLocal( "data", "khotkeys/" + voiceid_P + "1.wav" ); s.load(fileName); } _recorder1 = new VoiceRecorder(s, voiceid_P, this, "recorder"); - if(voiceid_P!=QString::null) + if(voiceid_P!=TQString::null) { - QString fileName = locateLocal( "data", "khotkeys/" + voiceid_P + "2.wav" ); + TQString fileName = locateLocal( "data", "khotkeys/" + voiceid_P + "2.wav" ); s.load(fileName); } _recorder2 = new VoiceRecorder(s, voiceid_P, this, "recorder"); @@ -55,13 +55,13 @@ VoiceRecordPage::VoiceRecordPage( const QString &voiceid_P, QWidget *parent, con //_recorder->setMinimumHeight(150); //setStretchFactor(_recorder, 1); - QWidget *spacer = new QWidget(this, "spacer"); + TQWidget *spacer = new TQWidget(this, "spacer"); setStretchFactor(spacer, 1); - connect(_recorder1, SIGNAL(recorded(bool)) , this, SLOT(slotChanged())); - connect(_recorder2, SIGNAL(recorded(bool)) , this, SLOT(slotChanged())); - connect(_lineEdit , SIGNAL( textChanged (const QString&)) , this , SLOT(slotChanged())); + connect(_recorder1, TQT_SIGNAL(recorded(bool)) , this, TQT_SLOT(slotChanged())); + connect(_recorder2, TQT_SIGNAL(recorded(bool)) , this, TQT_SLOT(slotChanged())); + connect(_lineEdit , TQT_SIGNAL( textChanged (const TQString&)) , this , TQT_SLOT(slotChanged())); } @@ -98,7 +98,7 @@ void VoiceRecordPage::slotChanged() || (_recorder1->state()==VoiceRecorder::sModified && _recorder2->state()==VoiceRecorder::sModified ) ) ); } -QString VoiceRecordPage::getVoiceId() const +TQString VoiceRecordPage::getVoiceId() const { return _lineEdit->text(); } @@ -106,7 +106,7 @@ QString VoiceRecordPage::getVoiceId() const VoiceSignature VoiceRecordPage::getVoiceSignature(int ech) const { VoiceRecorder *recorder= (ech==1) ? _recorder1 : _recorder2 ; - QString fileName = locateLocal( "data", "khotkeys/" + getVoiceId() + QString::number(ech) + ".wav" ); + TQString fileName = locateLocal( "data", "khotkeys/" + getVoiceId() + TQString::number(ech) + ".wav" ); Sound s=recorder->sound(); s.save(fileName); return VoiceSignature(s); diff --git a/khotkeys/kcontrol/voicerecordpage.h b/khotkeys/kcontrol/voicerecordpage.h index 13389b9dc..a4a7e4d71 100644 --- a/khotkeys/kcontrol/voicerecordpage.h +++ b/khotkeys/kcontrol/voicerecordpage.h @@ -11,7 +11,7 @@ #ifndef VOICE_RECORD_PAGE_H #define VOICE_RECORD_PAGE_H -#include <qvbox.h> +#include <tqvbox.h> @@ -34,10 +34,10 @@ class VoiceRecordPage : public QVBox Q_OBJECT public: - VoiceRecordPage(const QString &voiceip_P, QWidget *parent, const char *name); + VoiceRecordPage(const TQString &voiceip_P, TQWidget *parent, const char *name); ~VoiceRecordPage(); - QString getVoiceId() const ; + TQString getVoiceId() const ; VoiceSignature getVoiceSignature(int) const; bool isModifiedSignature(int) const; @@ -51,10 +51,10 @@ class VoiceRecordPage : public QVBox VoiceRecorder *_recorder1; VoiceRecorder *_recorder2; KLineEdit *_lineEdit; - QLabel *_label; - QString _message; + TQLabel *_label; + TQString _message; - QString _original_voiceId; + TQString _original_voiceId; }; diff --git a/khotkeys/kcontrol/window_trigger_widget.cpp b/khotkeys/kcontrol/window_trigger_widget.cpp index 882112cce..c897cf14a 100644 --- a/khotkeys/kcontrol/window_trigger_widget.cpp +++ b/khotkeys/kcontrol/window_trigger_widget.cpp @@ -16,7 +16,7 @@ #include "window_trigger_widget.h" -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <triggers.h> #include <actions.h> @@ -28,19 +28,19 @@ namespace KHotKeys { -Window_trigger_widget::Window_trigger_widget( QWidget* parent_P, const char* name_P ) +Window_trigger_widget::Window_trigger_widget( TQWidget* parent_P, const char* name_P ) : Window_trigger_widget_ui( parent_P, name_P ) { clear_data(); // KHotKeys::Module::changed() - connect( window_appears_checkbox, SIGNAL( clicked()), - module, SLOT( changed())); - connect( window_disappears_checkbox, SIGNAL( clicked()), - module, SLOT( changed())); - connect( window_activates_checkbox, SIGNAL( clicked()), - module, SLOT( changed())); - connect( window_deactivates_checkbox, SIGNAL( clicked()), - module, SLOT( changed())); + connect( window_appears_checkbox, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( window_disappears_checkbox, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( window_activates_checkbox, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( window_deactivates_checkbox, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); } void Window_trigger_widget::clear_data() diff --git a/khotkeys/kcontrol/window_trigger_widget.h b/khotkeys/kcontrol/window_trigger_widget.h index 02f54df1d..c012a0bca 100644 --- a/khotkeys/kcontrol/window_trigger_widget.h +++ b/khotkeys/kcontrol/window_trigger_widget.h @@ -24,7 +24,7 @@ class Window_trigger_widget { Q_OBJECT public: - Window_trigger_widget( QWidget* parent_P = NULL, const char* name_P = NULL ); + Window_trigger_widget( TQWidget* parent_P = NULL, const char* name_P = NULL ); void set_data( const Window_trigger* trigger_P ); Window_trigger* get_data( Action_data* data_P ) const; public slots: diff --git a/khotkeys/kcontrol/windowdef_list_widget.cpp b/khotkeys/kcontrol/windowdef_list_widget.cpp index e4dffc9c4..c0bfb1529 100644 --- a/khotkeys/kcontrol/windowdef_list_widget.cpp +++ b/khotkeys/kcontrol/windowdef_list_widget.cpp @@ -17,10 +17,10 @@ #include "windowdef_list_widget.h" #include <assert.h> -#include <qpushbutton.h> -#include <qheader.h> -#include <qlineedit.h> -#include <qpopupmenu.h> +#include <tqpushbutton.h> +#include <tqheader.h> +#include <tqlineedit.h> +#include <tqpopupmenu.h> #include <kdebug.h> #include <klocale.h> @@ -37,16 +37,16 @@ namespace KHotKeys // Windowdef_list_widget -Windowdef_list_widget::Windowdef_list_widget( QWidget* parent_P, const char* name_P ) +Windowdef_list_widget::Windowdef_list_widget( TQWidget* parent_P, const char* name_P ) : Windowdef_list_widget_ui( parent_P, name_P ), autodetect_object( NULL ), autodetect_slot( NULL ), selected_item( NULL ) { - QPopupMenu* popup = new QPopupMenu; // CHECKME looks like setting parent doesn't work + TQPopupMenu* popup = new QPopupMenu; // CHECKME looks like setting parent doesn't work popup->insertItem( i18n( "Simple Window..." ), TYPE_WINDOWDEF_SIMPLE ); - connect( popup, SIGNAL( activated( int )), SLOT( new_selected( int ))); + connect( popup, TQT_SIGNAL( activated( int )), TQT_SLOT( new_selected( int ))); - connect( windows_listview, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int ) ), - this, SLOT( modify_pressed() ) ); + connect( windows_listview, TQT_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( modify_pressed() ) ); new_button->setPopup( popup ); windows_listview->header()->hide(); windows_listview->addColumn( "" ); @@ -57,16 +57,16 @@ Windowdef_list_widget::Windowdef_list_widget( QWidget* parent_P, const char* nam delete_button->setEnabled( false ); clear_data(); // KHotKeys::Module::changed() - connect( new_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( copy_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( modify_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( delete_button, SIGNAL( clicked()), - module, SLOT( changed())); - connect( comment_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); + connect( new_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( copy_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( modify_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( delete_button, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( comment_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); } Windowdef_list_widget::~Windowdef_list_widget() @@ -100,7 +100,7 @@ Windowdef_list* Windowdef_list_widget::get_data() const { // CHECKME TODO hmm, tady to bude chtit asi i children :( Windowdef_list* list = new Windowdef_list( comment_lineedit->text()); - for( QListViewItem* pos = windows_listview->firstChild(); + for( TQListViewItem* pos = windows_listview->firstChild(); pos != NULL; pos = pos->nextSibling()) list->append( static_cast< Windowdef_list_item* >( pos )->window()->copy()); @@ -148,7 +148,7 @@ void Windowdef_list_widget::modify_pressed() edit_listview_item( selected_item ); } -void Windowdef_list_widget::current_changed( QListViewItem* item_P ) +void Windowdef_list_widget::current_changed( TQListViewItem* item_P ) { // if( item_P == selected_item ) // return; @@ -160,7 +160,7 @@ void Windowdef_list_widget::current_changed( QListViewItem* item_P ) } Windowdef_list_item* Windowdef_list_widget::create_listview_item( Windowdef* window_P, - QListView* parent1_P, QListViewItem* parent2_P, QListViewItem* after_P, bool copy_P ) + TQListView* parent1_P, TQListViewItem* parent2_P, TQListViewItem* after_P, bool copy_P ) { Windowdef* new_win = copy_P ? window_P->copy() : window_P; // CHECKME uz by nemelo byt treba @@ -199,9 +199,9 @@ void Windowdef_list_widget::edit_listview_item( Windowdef_list_item* item_P ) // Windowdef_list_item -QString Windowdef_list_item::text( int column_P ) const +TQString Windowdef_list_item::text( int column_P ) const { - return column_P == 0 ? window()->description() : QString::null; + return column_P == 0 ? window()->description() : TQString::null; } Windowdef_list_item::~Windowdef_list_item() @@ -211,7 +211,7 @@ Windowdef_list_item::~Windowdef_list_item() // Windowdef_simple_dialog -Windowdef_simple_dialog::Windowdef_simple_dialog( Windowdef_simple* window_P, QObject* obj_P, +Windowdef_simple_dialog::Windowdef_simple_dialog( Windowdef_simple* window_P, TQObject* obj_P, const char* slot_P ) : KDialogBase( NULL, NULL, true, i18n( "Window Details" ), Ok | Cancel ), window( NULL ) { diff --git a/khotkeys/kcontrol/windowdef_list_widget.h b/khotkeys/kcontrol/windowdef_list_widget.h index 8a69fc5eb..b49146a85 100644 --- a/khotkeys/kcontrol/windowdef_list_widget.h +++ b/khotkeys/kcontrol/windowdef_list_widget.h @@ -11,7 +11,7 @@ #ifndef _WINDOWDEF_LIST_WIDGET_H_ #define _WINDOWDEF_LIST_WIDGET_H_ -#include <qlistview.h> +#include <tqlistview.h> #include <kdialogbase.h> @@ -32,16 +32,16 @@ class Windowdef_list_widget { Q_OBJECT public: - Windowdef_list_widget( QWidget* parent_P = NULL, const char* name_P = NULL ); + Windowdef_list_widget( TQWidget* parent_P = NULL, const char* name_P = NULL ); virtual ~Windowdef_list_widget(); void set_data( const Windowdef_list* data_P ); Windowdef_list* get_data() const; - void set_autodetect( QObject* obj_P, const char* slot_P ); + void set_autodetect( TQObject* obj_P, const char* slot_P ); public slots: void clear_data(); protected: - Windowdef_list_item* create_listview_item( Windowdef* window_P, QListView* parent1_P, - QListViewItem* parent2_P, QListViewItem* after_P, bool copy_P ); + Windowdef_list_item* create_listview_item( Windowdef* window_P, TQListView* parent1_P, + TQListViewItem* parent2_P, TQListViewItem* after_P, bool copy_P ); void edit_listview_item( Windowdef_list_item* item_P ); enum type_t { TYPE_WINDOWDEF_SIMPLE }; protected slots: @@ -49,9 +49,9 @@ class Windowdef_list_widget virtual void copy_pressed(); virtual void delete_pressed(); virtual void modify_pressed(); - virtual void current_changed( QListViewItem* item_P ); + virtual void current_changed( TQListViewItem* item_P ); protected: - QObject* autodetect_object; + TQObject* autodetect_object; const char* autodetect_slot; Windowdef_list_item* selected_item; }; @@ -62,12 +62,12 @@ class Windowdef_list_item : public QListViewItem { public: - Windowdef_list_item( QListView* parent_P, Windowdef* window_P ); - Windowdef_list_item( QListViewItem* parent_P, Windowdef* window_P ); - Windowdef_list_item( QListView* parent_P, QListViewItem* after_P, Windowdef* window_P ); - Windowdef_list_item( QListViewItem* parent_P, QListViewItem* after_P, Windowdef* window_P ); + Windowdef_list_item( TQListView* parent_P, Windowdef* window_P ); + Windowdef_list_item( TQListViewItem* parent_P, Windowdef* window_P ); + Windowdef_list_item( TQListView* parent_P, TQListViewItem* after_P, Windowdef* window_P ); + Windowdef_list_item( TQListViewItem* parent_P, TQListViewItem* after_P, Windowdef* window_P ); virtual ~Windowdef_list_item(); - virtual QString text( int column_P ) const; + virtual TQString text( int column_P ) const; Windowdef* window() const; void set_window( Windowdef* window_P ); protected: @@ -86,7 +86,7 @@ class Windowdef_simple_dialog { Q_OBJECT public: - Windowdef_simple_dialog( Windowdef_simple* window_P, QObject* obj_P, const char* slot_P ); + Windowdef_simple_dialog( Windowdef_simple* window_P, TQObject* obj_P, const char* slot_P ); virtual Windowdef* edit_windowdef(); protected: virtual void accept(); @@ -101,7 +101,7 @@ class Windowdef_simple_dialog // Windowdef_list_widget inline -void Windowdef_list_widget::set_autodetect( QObject* obj_P, const char* slot_P ) +void Windowdef_list_widget::set_autodetect( TQObject* obj_P, const char* slot_P ) { autodetect_object = obj_P; autodetect_slot = slot_P; @@ -110,28 +110,28 @@ void Windowdef_list_widget::set_autodetect( QObject* obj_P, const char* slot_P ) // Windowdef_list_item inline -Windowdef_list_item::Windowdef_list_item( QListView* parent_P, Windowdef* window_P ) - : QListViewItem( parent_P ), _window( window_P ) +Windowdef_list_item::Windowdef_list_item( TQListView* parent_P, Windowdef* window_P ) + : TQListViewItem( parent_P ), _window( window_P ) { } inline -Windowdef_list_item::Windowdef_list_item( QListViewItem* parent_P, Windowdef* window_P ) - : QListViewItem( parent_P ), _window( window_P ) +Windowdef_list_item::Windowdef_list_item( TQListViewItem* parent_P, Windowdef* window_P ) + : TQListViewItem( parent_P ), _window( window_P ) { } inline -Windowdef_list_item::Windowdef_list_item( QListView* parent_P, QListViewItem* after_P, +Windowdef_list_item::Windowdef_list_item( TQListView* parent_P, TQListViewItem* after_P, Windowdef* window_P ) - : QListViewItem( parent_P, after_P ), _window( window_P ) + : TQListViewItem( parent_P, after_P ), _window( window_P ) { } inline -Windowdef_list_item::Windowdef_list_item( QListViewItem* parent_P, QListViewItem* after_P, +Windowdef_list_item::Windowdef_list_item( TQListViewItem* parent_P, TQListViewItem* after_P, Windowdef* window_P ) - : QListViewItem( parent_P, after_P ), _window( window_P ) + : TQListViewItem( parent_P, after_P ), _window( window_P ) { } diff --git a/khotkeys/kcontrol/windowdef_simple_widget.cpp b/khotkeys/kcontrol/windowdef_simple_widget.cpp index f0749e476..f79d81ea1 100644 --- a/khotkeys/kcontrol/windowdef_simple_widget.cpp +++ b/khotkeys/kcontrol/windowdef_simple_widget.cpp @@ -16,10 +16,10 @@ #include "windowdef_simple_widget.h" -#include <qlineedit.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqlineedit.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> #include <kdebug.h> #include <windows.h> @@ -31,37 +31,37 @@ namespace KHotKeys { -Windowdef_simple_widget::Windowdef_simple_widget( QWidget* parent_P, const char* name_P ) +Windowdef_simple_widget::Windowdef_simple_widget( TQWidget* parent_P, const char* name_P ) : Windowdef_simple_widget_ui( parent_P, name_P ) { window_title_lineedit->setEnabled( false ); window_class_lineedit->setEnabled( false ); window_role_lineedit->setEnabled( false ); - connect( autodetect_button, SIGNAL( clicked()), SLOT( autodetect_clicked())); + connect( autodetect_button, TQT_SIGNAL( clicked()), TQT_SLOT( autodetect_clicked())); clear_data(); // KHotKeys::Module::changed() - connect( window_title_combo, SIGNAL( activated( int )), - module, SLOT( changed())); - connect( window_title_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); - connect( window_class_combo, SIGNAL( activated( int )), - module, SLOT( changed())); - connect( window_class_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); - connect( window_role_combo, SIGNAL( activated( int )), - module, SLOT( changed())); - connect( window_role_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); - connect( type_normal_checkbox, SIGNAL( clicked()), - module, SLOT( changed())); - connect( type_dialog_checkbox, SIGNAL( clicked()), - module, SLOT( changed())); - connect( type_dock_checkbox, SIGNAL( clicked()), - module, SLOT( changed())); - connect( type_desktop_checkbox, SIGNAL( clicked()), - module, SLOT( changed())); - connect( comment_lineedit, SIGNAL( textChanged( const QString& )), - module, SLOT( changed())); + connect( window_title_combo, TQT_SIGNAL( activated( int )), + module, TQT_SLOT( changed())); + connect( window_title_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); + connect( window_class_combo, TQT_SIGNAL( activated( int )), + module, TQT_SLOT( changed())); + connect( window_class_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); + connect( window_role_combo, TQT_SIGNAL( activated( int )), + module, TQT_SLOT( changed())); + connect( window_role_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); + connect( type_normal_checkbox, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( type_dialog_checkbox, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( type_dock_checkbox, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( type_desktop_checkbox, TQT_SIGNAL( clicked()), + module, TQT_SLOT( changed())); + connect( comment_lineedit, TQT_SIGNAL( textChanged( const TQString& )), + module, TQT_SLOT( changed())); } void Windowdef_simple_widget::clear_data() @@ -142,11 +142,11 @@ void Windowdef_simple_widget::window_title_combo_changed( int item_P ) window_title_lineedit->setEnabled( item_P != 0 ); } -void Windowdef_simple_widget::set_autodetect( QObject* obj_P, const char* slot_P ) +void Windowdef_simple_widget::set_autodetect( TQObject* obj_P, const char* slot_P ) { - disconnect( SIGNAL( autodetect_signal())); + disconnect( TQT_SIGNAL( autodetect_signal())); if( obj_P != NULL ) - connect( this, SIGNAL( autodetect_signal()), obj_P, slot_P ); + connect( this, TQT_SIGNAL( autodetect_signal()), obj_P, slot_P ); } void Windowdef_simple_widget::autodetect_clicked() @@ -157,7 +157,7 @@ void Windowdef_simple_widget::autodetect_clicked() void Windowdef_simple_widget::autodetect() { - WindowSelector* sel = new WindowSelector( this, SLOT( autodetect_window_selected( WId ))); + WindowSelector* sel = new WindowSelector( this, TQT_SLOT( autodetect_window_selected( WId ))); sel->select(); } diff --git a/khotkeys/kcontrol/windowdef_simple_widget.h b/khotkeys/kcontrol/windowdef_simple_widget.h index e6777b6ee..26db6fd87 100644 --- a/khotkeys/kcontrol/windowdef_simple_widget.h +++ b/khotkeys/kcontrol/windowdef_simple_widget.h @@ -24,10 +24,10 @@ class Windowdef_simple_widget { Q_OBJECT public: - Windowdef_simple_widget( QWidget* parent_P = NULL, const char* name_P = NULL ); + Windowdef_simple_widget( TQWidget* parent_P = NULL, const char* name_P = NULL ); void set_data( const Windowdef_simple* data_P ); Windowdef_simple* get_data() const; - void set_autodetect( QObject* obj_P, const char* slot_P ); + void set_autodetect( TQObject* obj_P, const char* slot_P ); public slots: void clear_data(); protected: diff --git a/khotkeys/kcontrol/windowselector.cpp b/khotkeys/kcontrol/windowselector.cpp index a754b422d..d6e562df3 100644 --- a/khotkeys/kcontrol/windowselector.cpp +++ b/khotkeys/kcontrol/windowselector.cpp @@ -18,7 +18,7 @@ #include "voices.h" -#include <qcursor.h> +#include <tqcursor.h> #include <kdebug.h> #include <kapplication.h> #include <X11/Xlib.h> @@ -27,14 +27,14 @@ namespace KHotKeys { -WindowSelector::WindowSelector( QObject* receiver_P, const char* slot_P ) +WindowSelector::WindowSelector( TQObject* receiver_P, const char* slot_P ) { - connect( this, SIGNAL( selected_signal( WId )), receiver_P, slot_P ); + connect( this, TQT_SIGNAL( selected_signal( WId )), receiver_P, slot_P ); } void WindowSelector::select() { - kapp->desktop()->grabMouse( QCursor( crossCursor )); + kapp->desktop()->grabMouse( TQCursor( crossCursor )); kapp->installX11EventFilter( this ); } diff --git a/khotkeys/kcontrol/windowselector.h b/khotkeys/kcontrol/windowselector.h index 3a28853ed..4f52312ea 100644 --- a/khotkeys/kcontrol/windowselector.h +++ b/khotkeys/kcontrol/windowselector.h @@ -11,7 +11,7 @@ #ifndef _WINDOWSELECTOR_H_ #define _WINDOWSELECTOR_H_ -#include <qwidget.h> +#include <tqwidget.h> namespace KHotKeys { @@ -21,7 +21,7 @@ class WindowSelector { Q_OBJECT public: - WindowSelector( QObject* receiver, const char* slot ); + WindowSelector( TQObject* receiver, const char* slot ); void select(); protected: virtual bool x11Event( XEvent* e ); diff --git a/khotkeys/shared/action_data.cpp b/khotkeys/shared/action_data.cpp index 96e3e5559..472259268 100644 --- a/khotkeys/shared/action_data.cpp +++ b/khotkeys/shared/action_data.cpp @@ -25,8 +25,8 @@ namespace KHotKeys // Action_data_base -Action_data_base::Action_data_base( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, Condition_list* conditions_P, bool enabled_P ) +Action_data_base::Action_data_base( Action_data_group* parent_P, const TQString& name_P, + const TQString& comment_P, Condition_list* conditions_P, bool enabled_P ) : _parent( parent_P ), _conditions( conditions_P ), _name( name_P ), _comment( comment_P ), _enabled( enabled_P ) { @@ -39,7 +39,7 @@ Action_data_base::Action_data_base( Action_data_group* parent_P, const QString& Action_data_base::Action_data_base( KConfig& cfg_P, Action_data_group* parent_P ) : _parent( parent_P ) { - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); _name = cfg_P.readEntry( "Name" ); _comment = cfg_P.readEntry( "Comment" ); _enabled = cfg_P.readBoolEntry( "Enabled", true ); @@ -64,7 +64,7 @@ void Action_data_base::cfg_write( KConfig& cfg_P ) const cfg_P.writeEntry( "Name", name()); cfg_P.writeEntry( "Comment", comment()); cfg_P.writeEntry( "Enabled", enabled( true )); - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); cfg_P.setGroup( save_cfg_group + "Conditions" ); assert( conditions() != NULL ); conditions()->cfg_write( cfg_P ); @@ -74,7 +74,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 ) { - QString type = cfg_P.readEntry( "Type" ); + TQString type = cfg_P.readEntry( "Type" ); if( type == "ACTION_DATA_GROUP" ) { if( cfg_P.readBoolEntry( "AllowMerge", false )) @@ -169,7 +169,7 @@ void Action_data_group::update_triggers() Action_data::Action_data( KConfig& cfg_P, Action_data_group* parent_P ) : Action_data_base( cfg_P, parent_P ) { - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); cfg_P.setGroup( save_cfg_group + "Triggers" ); _triggers = new Trigger_list( cfg_P, this ); cfg_P.setGroup( save_cfg_group + "Actions" ); @@ -188,7 +188,7 @@ Action_data::~Action_data() void Action_data::cfg_write( KConfig& cfg_P ) const { Action_data_base::cfg_write( cfg_P ); - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); cfg_P.setGroup( save_cfg_group + "Triggers" ); triggers()->cfg_write( cfg_P ); cfg_P.setGroup( save_cfg_group + "Actions" ); @@ -286,8 +286,8 @@ void Generic_action_data::cfg_write( KConfig& cfg_P ) const // Command_url_shortcut_action_data Command_url_shortcut_action_data::Command_url_shortcut_action_data( Action_data_group* parent_P, - const QString& name_P, const QString& comment_P, - const KShortcut& shortcut_P, const QString& command_url_P, bool enabled_P ) + const TQString& name_P, const TQString& comment_P, + const KShortcut& 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 ) { @@ -306,8 +306,8 @@ void Simple_action_data< Shortcut_trigger, Command_url_action > // Menuentry_shortcut_action_data Menuentry_shortcut_action_data::Menuentry_shortcut_action_data( Action_data_group* parent_P, - const QString& name_P, const QString& comment_P, - const KShortcut& shortcut_P, const QString& menuentry_P, bool enabled_P ) + const TQString& name_P, const TQString& comment_P, + const KShortcut& 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 9d6018c2c..4de5e715b 100644 --- a/khotkeys/shared/action_data.h +++ b/khotkeys/shared/action_data.h @@ -12,8 +12,8 @@ #define _ACTION_DATA_H_ #include <assert.h> -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> #include <kdebug.h> @@ -34,8 +34,8 @@ class Action_data_group; class KDE_EXPORT Action_data_base { public: - Action_data_base( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, Condition_list* condition_P, bool enabled_P ); + 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 ); virtual ~Action_data_base(); virtual void cfg_write( KConfig& cfg_P ) const = 0; @@ -44,9 +44,9 @@ class KDE_EXPORT Action_data_base void reparent( Action_data_group* new_parent_P ); virtual void update_triggers() = 0; bool conditions_match() const; - const QString& name() const; - void set_name( const QString& name_P ); - const QString& comment() const; + const TQString& name() const; + 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 ); @@ -55,8 +55,8 @@ class KDE_EXPORT Action_data_base private: Action_data_group* _parent; Condition_list* _conditions; - QString _name; - QString _comment; + TQString _name; + TQString _comment; bool _enabled; // is not really important, only used in conf. module and when reading cfg. file KHOTKEYS_DISABLE_COPY( Action_data_base ); }; @@ -67,20 +67,20 @@ class KDE_EXPORT Action_data_group public: enum system_group_t { SYSTEM_NONE, SYSTEM_MENUENTRIES, SYSTEM_ROOT, /* last one*/ SYSTEM_MAX }; // don't remove entries - Action_data_group( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, Condition_list* conditions_P, system_group_t system_group_P, + 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 ); virtual ~Action_data_group(); virtual void update_triggers(); virtual void cfg_write( KConfig& cfg_P ) const; - typedef QPtrListIterator< Action_data_base > Iterator; // CHECKME neni const :( + typedef TQPtrListIterator< Action_data_base > Iterator; // CHECKME neni const :( Iterator first_child() const; bool is_system_group() const; system_group_t system_group() const; using Action_data_base::set_conditions; // make public protected: - QPtrList< Action_data_base > list; + TQPtrList< Action_data_base > list; system_group_t _system_group; // e.g. menuedit entries, can't be deleted or renamed friend class Action_data_base; // CHECKME void add_child( Action_data_base* child_P ); @@ -93,8 +93,8 @@ class KDE_EXPORT Action_data { typedef Action_data_base base; public: - Action_data( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, Trigger_list* triggers_P, Condition_list* conditions_P, + 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 ); virtual ~Action_data(); @@ -126,8 +126,8 @@ class KDE_EXPORT Generic_action_data { typedef Action_data base; public: - Generic_action_data( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, Trigger_list* triggers_P, Condition_list* conditions_P, + 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; @@ -146,8 +146,8 @@ class KDE_EXPORT Simple_action_data { typedef Action_data base; public: - Simple_action_data( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, bool enabled_P = true ); + 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 ); const A* action() const; const T* trigger() const; @@ -162,10 +162,10 @@ class KDE_EXPORT Command_url_shortcut_action_data { typedef Simple_action_data< Shortcut_trigger, Command_url_action > base; public: - Command_url_shortcut_action_data( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, bool enabled_P = true ); - Command_url_shortcut_action_data( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, const KShortcut& shortcut_P, const QString& command_url_P, + 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, bool enabled_P = true ); Command_url_shortcut_action_data( KConfig& cfg_P, Action_data_group* parent_P ); }; @@ -175,10 +175,10 @@ class KDE_EXPORT Menuentry_shortcut_action_data { typedef Simple_action_data< Shortcut_trigger, Menuentry_action > base; public: - Menuentry_shortcut_action_data( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, bool enabled_P = true ); - Menuentry_shortcut_action_data( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, const KShortcut& shortcut_P, const QString& command_url_P, + 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, bool enabled_P = true ); Menuentry_shortcut_action_data( KConfig& cfg_P, Action_data_group* parent_P ); }; @@ -194,8 +194,8 @@ class KDE_EXPORT Keyboard_input_gesture_action_data { typedef Action_data base; public: - Keyboard_input_gesture_action_data( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, bool enabled_P = true ); + 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 ); const Keyboard_input_action* action() const; // CHECKME kontrola, ze se dava jen jedna akce ? @@ -233,19 +233,19 @@ Action_data_group* Action_data_base::parent() const } inline -void Action_data_base::set_name( const QString& name_P ) +void Action_data_base::set_name( const TQString& name_P ) { _name = name_P; } inline -const QString& Action_data_base::name() const +const TQString& Action_data_base::name() const { return _name; } inline -const QString& Action_data_base::comment() const +const TQString& Action_data_base::comment() const { return _comment; } @@ -253,8 +253,8 @@ const QString& Action_data_base::comment() const // Action_data_group inline -Action_data_group::Action_data_group( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, Condition_list* conditions_P, system_group_t system_group_P, +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_base( parent_P, name_P, comment_P, conditions_P, enabled_P ), _system_group( system_group_P ) @@ -302,8 +302,8 @@ void Action_data_group::remove_child( Action_data_base* child_P ) // Action_data inline -Action_data::Action_data( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, Trigger_list* triggers_P, Condition_list* conditions_P, +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 ) : Action_data_base( parent_P, name_P, comment_P, conditions_P, enabled_P ), _triggers( triggers_P ), _actions( actions_P ) @@ -327,8 +327,8 @@ const Action_list* Action_data::actions() const // Generic_action_data inline -Generic_action_data::Generic_action_data( Action_data_group* parent_P, const QString& name_P, - const QString& comment_P, Trigger_list* triggers_P, Condition_list* conditions_P, +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 ) : Action_data( parent_P, name_P, comment_P, triggers_P, conditions_P, actions_P, enabled_P ) { @@ -345,7 +345,7 @@ Generic_action_data::Generic_action_data( KConfig& cfg_P, Action_data_group* par template< typename T, typename A > inline Simple_action_data< T, A >::Simple_action_data( Action_data_group* parent_P, - const QString& name_P, const QString& comment_P, bool enabled_P ) + const TQString& name_P, const TQString& comment_P, bool enabled_P ) : Action_data( parent_P, name_P, comment_P, NULL, new Condition_list( "", this ), NULL, enabled_P ) { @@ -394,7 +394,7 @@ const T* Simple_action_data< T, A >::trigger() const inline Command_url_shortcut_action_data::Command_url_shortcut_action_data( Action_data_group* parent_P, - const QString& name_P, const QString& comment_P, bool enabled_P ) + const TQString& name_P, const TQString& comment_P, bool enabled_P ) : Simple_action_data< Shortcut_trigger, Command_url_action >( parent_P, name_P, comment_P, enabled_P ) { @@ -411,7 +411,7 @@ Command_url_shortcut_action_data::Command_url_shortcut_action_data( KConfig& cfg inline Menuentry_shortcut_action_data::Menuentry_shortcut_action_data( Action_data_group* parent_P, - const QString& name_P, const QString& comment_P, bool enabled_P ) + const TQString& name_P, const TQString& comment_P, bool enabled_P ) : Simple_action_data< Shortcut_trigger, Menuentry_action >( parent_P, name_P, comment_P, enabled_P ) { @@ -428,7 +428,7 @@ Menuentry_shortcut_action_data::Menuentry_shortcut_action_data( KConfig& cfg_P, inline Keyboard_input_gesture_action_data::Keyboard_input_gesture_action_data( - Action_data_group* parent_P, const QString& name_P, const QString& comment_P, bool enabled_P ) + Action_data_group* parent_P, const TQString& name_P, const TQString& comment_P, bool enabled_P ) : Action_data( parent_P, name_P, comment_P, NULL, new Condition_list( "", this ), NULL, enabled_P ) { diff --git a/khotkeys/shared/actions.cpp b/khotkeys/shared/actions.cpp index 144a277af..e37ef395f 100644 --- a/khotkeys/shared/actions.cpp +++ b/khotkeys/shared/actions.cpp @@ -42,7 +42,7 @@ namespace KHotKeys Action* Action::create_cfg_read( KConfig& cfg_P, Action_data* data_P ) { - QString type = cfg_P.readEntry( "Type" ); + TQString type = cfg_P.readEntry( "Type" ); if( type == "COMMAND_URL" ) return new Command_url_action( cfg_P, data_P ); if( type == "MENUENTRY" ) @@ -65,16 +65,16 @@ void Action::cfg_write( KConfig& cfg_P ) const // Action_list Action_list::Action_list( KConfig& cfg_P, Action_data* data_P ) - : QPtrList< Action >() + : TQPtrList< Action >() { setAutoDelete( true ); - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); int cnt = cfg_P.readNumEntry( "ActionsCount", 0 ); for( int i = 0; i < cnt; ++i ) { - cfg_P.setGroup( save_cfg_group + QString::number( i )); + cfg_P.setGroup( save_cfg_group + TQString::number( i )); Action* action = Action::create_cfg_read( cfg_P, data_P ); if( action ) append( action ); @@ -84,13 +84,13 @@ Action_list::Action_list( KConfig& cfg_P, Action_data* data_P ) void Action_list::cfg_write( KConfig& cfg_P ) const { - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); int i = 0; for( Iterator it( *this ); it; ++it, ++i ) { - cfg_P.setGroup( save_cfg_group + QString::number( i )); + cfg_P.setGroup( save_cfg_group + TQString::number( i )); it.current()->cfg_write( cfg_P ); } cfg_P.setGroup( save_cfg_group ); @@ -117,7 +117,7 @@ void Command_url_action::execute() if( command_url().isEmpty()) return; KURIFilterData uri; - QString cmd = command_url(); + TQString cmd = command_url(); static bool sm_ready = false; if( !sm_ready ) { @@ -176,7 +176,7 @@ void Command_url_action::execute() timeout.start( 1000, true ); // 1sec timeout } -QString Command_url_action::description() const +TQString Command_url_action::description() const { return i18n( "Command/URL : " ) + command_url(); } @@ -212,10 +212,10 @@ void Menuentry_action::execute() timeout.start( 1000, true ); // 1sec timeout } -QString Menuentry_action::description() const +TQString Menuentry_action::description() const { (void) service(); - return i18n( "Menuentry : " ) + (_service ? _service->name() : QString::null); + return i18n( "Menuentry : " ) + (_service ? _service->name() : TQString::null); } Action* Menuentry_action::copy( Action_data* data_P ) const @@ -248,8 +248,8 @@ void Dcop_action::execute() { if( app.isEmpty() || obj.isEmpty() || call.isEmpty()) return; - QStringList args_list; - QString args_str = args; + TQStringList args_list; + TQString args_str = args; while( !args_str.isEmpty()) { unsigned int pos = 0; @@ -257,8 +257,8 @@ void Dcop_action::execute() ++pos; if( args_str[ pos ] == '\"' || args_str[ pos ] == '\'' ) { - QString val = ""; - QChar sep = args_str[ pos ]; + TQString val = ""; + TQChar sep = args_str[ pos ]; bool skip = false; ++pos; for(; @@ -297,7 +297,7 @@ void Dcop_action::execute() proc.start( KProcess::DontCare ); } -QString Dcop_action::description() const +TQString Dcop_action::description() const { return i18n( "DCOP : " ) + remote_application() + "::" + remote_object() + "::" + called_function(); @@ -317,7 +317,7 @@ Keyboard_input_action::Keyboard_input_action( KConfig& cfg_P, Action_data* data_ _input = cfg_P.readEntry( "Input" ); if( cfg_P.readBoolEntry( "IsDestinationWindow" )) { - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); cfg_P.setGroup( save_cfg_group + "DestinationWindow" ); _dest_window = new Windowdef_list( cfg_P ); _active_window = false; // ignored with _dest_window set anyway @@ -343,7 +343,7 @@ void Keyboard_input_action::cfg_write( KConfig& cfg_P ) const if( dest_window() != NULL ) { cfg_P.writeEntry( "IsDestinationWindow", true ); - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); cfg_P.setGroup( save_cfg_group + "DestinationWindow" ); dest_window()->cfg_write( cfg_P ); cfg_P.setGroup( save_cfg_group ); @@ -374,23 +374,23 @@ void Keyboard_input_action::execute() int last_index = -1, start = 0; while(( last_index = input().find( ':', last_index + 1 )) != -1 ) // find next ';' { - QString key = input().mid( start, last_index - start ).stripWhiteSpace(); + TQString key = input().mid( start, last_index - start ).stripWhiteSpace(); if( key == "Enter" && KKey( key ).keyCodeQt() == 0 ) key = "Return"; // CHECKE hack keyboard_handler->send_macro_key( KKey( key ), w ); start = last_index + 1; } // and the last one - QString key = input().mid( start, input().length()).stripWhiteSpace(); + TQString key = input().mid( start, input().length()).stripWhiteSpace(); if( key == "Enter" && KKey( key ).keyCodeQt() == 0 ) key = "Return"; keyboard_handler->send_macro_key( KKey( key ), w ); // the rest XFlush( qt_xdisplay()); } -QString Keyboard_input_action::description() const +TQString Keyboard_input_action::description() const { - QString tmp = input(); + TQString tmp = input(); tmp.replace( '\n', ' ' ); tmp.truncate( 30 ); return i18n( "Keyboard input : " ) + tmp; @@ -407,7 +407,7 @@ Action* Keyboard_input_action::copy( Action_data* data_P ) const Activate_window_action::Activate_window_action( KConfig& cfg_P, Action_data* data_P ) : Action( cfg_P, data_P ) { - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); cfg_P.setGroup( save_cfg_group + "Window" ); _window = new Windowdef_list( cfg_P ); cfg_P.setGroup( save_cfg_group ); @@ -422,7 +422,7 @@ void Activate_window_action::cfg_write( KConfig& cfg_P ) const { base::cfg_write( cfg_P ); cfg_P.writeEntry( "Type", "ACTIVATE_WINDOW" ); // overwrites value set in base::cfg_write() - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); cfg_P.setGroup( save_cfg_group + "Window" ); window()->cfg_write( cfg_P ); cfg_P.setGroup( save_cfg_group ); @@ -437,7 +437,7 @@ void Activate_window_action::execute() windows_handler->activate_window( win_id ); } -QString Activate_window_action::description() const +TQString Activate_window_action::description() const { return i18n( "Activate window : " ) + window()->comment(); } diff --git a/khotkeys/shared/actions.h b/khotkeys/shared/actions.h index 5295d5be9..828bbdb70 100644 --- a/khotkeys/shared/actions.h +++ b/khotkeys/shared/actions.h @@ -12,9 +12,9 @@ #define _ACTIONS_H_ -#include <qstring.h> -#include <qptrlist.h> -#include <qtimer.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqtimer.h> #include <kservice.h> @@ -37,7 +37,7 @@ class KDE_EXPORT Action Action( KConfig& cfg_P, Action_data* data_P ); virtual ~Action(); virtual void execute() = 0; - virtual QString description() const = 0; + virtual TQString description() const = 0; virtual void cfg_write( KConfig& cfg_P ) const; virtual Action* copy( Action_data* data_P ) const = 0; static Action* create_cfg_read( KConfig& cfg_P, Action_data* data_P ); @@ -47,16 +47,16 @@ class KDE_EXPORT Action }; class KDE_EXPORT Action_list - : public QPtrList< Action > + : public TQPtrList< Action > { public: - Action_list( const QString& comment_P ); // CHECKME nebo i data ? + 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; - typedef QPtrListIterator< Action > Iterator; - const QString& comment() const; + typedef TQPtrListIterator< Action > Iterator; + const TQString& comment() const; private: - QString _comment; + TQString _comment; KHOTKEYS_DISABLE_COPY( Action_list ); }; @@ -65,17 +65,17 @@ class KDE_EXPORT Command_url_action { typedef Action base; public: - Command_url_action( Action_data* data_P, const QString& command_url_P ); + 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; virtual void execute(); - virtual QString description() const; - const QString& command_url() const; + virtual TQString description() const; + const TQString& command_url() const; virtual Action* copy( Action_data* data_P ) const; protected: - QTimer timeout; + TQTimer timeout; private: - QString _command_url; + TQString _command_url; }; class KDE_EXPORT Menuentry_action @@ -83,11 +83,11 @@ class KDE_EXPORT Menuentry_action { typedef Command_url_action base; public: - Menuentry_action( Action_data* data_P, const QString& menuentry_P ); + 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; virtual void execute(); - virtual QString description() const; + virtual TQString description() const; virtual Action* copy( Action_data* data_P ) const; KService::Ptr service() const; private: @@ -99,22 +99,22 @@ class KDE_EXPORT Dcop_action { typedef Action base; public: - Dcop_action( Action_data* data_P, const QString& app_P, const QString& obj_P, - const QString& call_P, const QString& args_P ); + 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; virtual void execute(); - const QString& remote_application() const; - const QString& remote_object() const; - const QString& called_function() const; - const QString& arguments() const; - virtual QString description() const; + const TQString& remote_application() const; + const TQString& remote_object() const; + const TQString& called_function() const; + const TQString& arguments() const; + virtual TQString description() const; virtual Action* copy( Action_data* data_P ) const; private: - QString app; // CHECKME QCString ? - QString obj; - QString call; - QString args; + TQString app; // CHECKME TQCString ? + TQString obj; + TQString call; + TQString args; }; class KDE_EXPORT Keyboard_input_action @@ -122,22 +122,22 @@ class KDE_EXPORT Keyboard_input_action { typedef Action base; public: - Keyboard_input_action( Action_data* data_P, const QString& input_P, + 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 ); virtual ~Keyboard_input_action(); virtual void cfg_write( KConfig& cfg_P ) const; virtual void execute(); - const QString& input() const; + const TQString& input() const; // send to specific window: dest_window != NULL // send to active window: dest_window == NULL && activeWindow() == true // send to action window: dest_window == NULL && activeWindow() == false const Windowdef_list* dest_window() const; bool activeWindow() const; - virtual QString description() const; + virtual TQString description() const; virtual Action* copy( Action_data* data_P ) const; private: - QString _input; + TQString _input; const Windowdef_list* _dest_window; bool _active_window; }; @@ -153,7 +153,7 @@ class KDE_EXPORT Activate_window_action virtual void cfg_write( KConfig& cfg_P ) const; virtual void execute(); const Windowdef_list* window() const; - virtual QString description() const; + virtual TQString description() const; virtual Action* copy( Action_data* data_P ) const; private: const Windowdef_list* _window; @@ -185,14 +185,14 @@ Action::~Action() // Action_list inline -Action_list::Action_list( const QString& comment_P ) - : QPtrList< Action >(), _comment( comment_P ) +Action_list::Action_list( const TQString& comment_P ) + : TQPtrList< Action >(), _comment( comment_P ) { setAutoDelete( true ); } inline -const QString& Action_list::comment() const +const TQString& Action_list::comment() const { return _comment; } @@ -200,13 +200,13 @@ const QString& Action_list::comment() const // Command_url_action inline -Command_url_action::Command_url_action( Action_data* data_P, const QString& command_url_P ) +Command_url_action::Command_url_action( Action_data* data_P, const TQString& command_url_P ) : Action( data_P ), _command_url( command_url_P ) { } inline -const QString& Command_url_action::command_url() const +const TQString& Command_url_action::command_url() const { return _command_url; } @@ -214,7 +214,7 @@ const QString& Command_url_action::command_url() const // Menuentry_action inline -Menuentry_action::Menuentry_action( Action_data* data_P, const QString& menuentry_P ) +Menuentry_action::Menuentry_action( Action_data* data_P, const TQString& menuentry_P ) : Command_url_action( data_P, menuentry_P ) { } @@ -228,32 +228,32 @@ Menuentry_action::Menuentry_action( KConfig& cfg_P, Action_data* data_P ) // DCOP_action inline -Dcop_action::Dcop_action( Action_data* data_P, const QString& app_P, const QString& obj_P, - const QString& call_P, const QString& args_P ) +Dcop_action::Dcop_action( Action_data* data_P, const TQString& app_P, const TQString& obj_P, + const TQString& call_P, const TQString& args_P ) : Action( data_P ), app( app_P ), obj( obj_P ), call( call_P ), args( args_P ) { } inline -const QString& Dcop_action::remote_application() const +const TQString& Dcop_action::remote_application() const { return app; } inline -const QString& Dcop_action::remote_object() const +const TQString& Dcop_action::remote_object() const { return obj; } inline -const QString& Dcop_action::called_function() const +const TQString& Dcop_action::called_function() const { return call; } inline -const QString& Dcop_action::arguments() const +const TQString& Dcop_action::arguments() const { return args; } @@ -261,14 +261,14 @@ const QString& Dcop_action::arguments() const // Keyboard_input_action inline -Keyboard_input_action::Keyboard_input_action( Action_data* data_P, const QString& input_P, +Keyboard_input_action::Keyboard_input_action( Action_data* data_P, const TQString& input_P, const Windowdef_list* dest_window_P, bool active_window_P ) : Action( data_P ), _input( input_P ), _dest_window( dest_window_P ), _active_window( active_window_P ) { } inline -const QString& Keyboard_input_action::input() const +const TQString& Keyboard_input_action::input() const { return _input; } diff --git a/khotkeys/shared/conditions.cpp b/khotkeys/shared/conditions.cpp index 01d236934..fb819f6c7 100644 --- a/khotkeys/shared/conditions.cpp +++ b/khotkeys/shared/conditions.cpp @@ -51,7 +51,7 @@ Condition::Condition( KConfig&, Condition_list_base* parent_P ) Condition* Condition::create_cfg_read( KConfig& cfg_P, Condition_list_base* parent_P ) { - QString type = cfg_P.readEntry( "Type" ); + TQString type = cfg_P.readEntry( "Type" ); if( type == "ACTIVE_WINDOW" ) return new Active_window_condition( cfg_P, parent_P ); if( type == "EXISTING_WINDOW" ) @@ -99,7 +99,7 @@ void Condition::debug( int depth_P ) kdDebug( 1217 ) << tmp << description() << ":(" << this << ")" << endl; } -void Condition::debug_list( const QPtrList< Condition >& list_P, int depth_P ) +void Condition::debug_list( const TQPtrList< Condition >& list_P, int depth_P ) { char tmp[ 1024 ]; int i; @@ -108,7 +108,7 @@ void Condition::debug_list( const QPtrList< Condition >& list_P, int depth_P ) ++i ) tmp[ i ] = ' '; tmp[ i ] = '\0'; - for( QPtrListIterator< Condition > it( list_P ); + for( TQPtrListIterator< Condition > it( list_P ); it; ++it ) (*it)->debug( depth_P + 1 ); @@ -121,13 +121,13 @@ void Condition::debug_list( const QPtrList< Condition >& list_P, int depth_P ) Condition_list_base::Condition_list_base( KConfig& cfg_P, Condition_list_base* parent_P ) : Condition( parent_P ) { - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); int cnt = cfg_P.readNumEntry( "ConditionsCount", 0 ); for( int i = 0; i < cnt; ++i ) { - cfg_P.setGroup( save_cfg_group + QString::number( i )); + cfg_P.setGroup( save_cfg_group + TQString::number( i )); (void) Condition::create_cfg_read( cfg_P, this ); } cfg_P.setGroup( save_cfg_group ); @@ -145,13 +145,13 @@ Condition_list_base::~Condition_list_base() void Condition_list_base::cfg_write( KConfig& cfg_P ) const { - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); int i = 0; for( Iterator it( *this ); it; ++it, ++i ) { - cfg_P.setGroup( save_cfg_group + QString::number( i )); + cfg_P.setGroup( save_cfg_group + TQString::number( i )); it.current()->cfg_write( cfg_P ); } cfg_P.setGroup( save_cfg_group ); @@ -230,10 +230,10 @@ void Condition_list::set_data( Action_data_base* data_P ) data = data_P; } -const QString Condition_list::description() const +const TQString Condition_list::description() const { assert( false ); - return QString::null; + return TQString::null; } Condition_list* Condition_list::copy( Condition_list_base* ) const @@ -247,7 +247,7 @@ Condition_list* Condition_list::copy( Condition_list_base* ) const Active_window_condition::Active_window_condition( KConfig& cfg_P, Condition_list_base* parent_P ) : Condition( cfg_P, parent_P ) { - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); cfg_P.setGroup( save_cfg_group + "Window" ); _window = new Windowdef_list( cfg_P ); cfg_P.setGroup( save_cfg_group ); @@ -257,8 +257,8 @@ Active_window_condition::Active_window_condition( KConfig& cfg_P, Condition_list void Active_window_condition::init() { - connect( windows_handler, SIGNAL( active_window_changed( WId )), - this, SLOT( active_window_changed( WId ))); + connect( windows_handler, TQT_SIGNAL( active_window_changed( WId )), + this, TQT_SLOT( active_window_changed( WId ))); } bool Active_window_condition::match() const @@ -276,7 +276,7 @@ void Active_window_condition::set_match() void Active_window_condition::cfg_write( KConfig& cfg_P ) const { base::cfg_write( cfg_P ); - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); cfg_P.setGroup( save_cfg_group + "Window" ); window()->cfg_write( cfg_P ); cfg_P.setGroup( save_cfg_group ); @@ -292,7 +292,7 @@ Condition* Active_window_condition::copy( Condition_list_base* parent_P ) const return new Active_window_condition( window()->copy(), parent_P ); } -const QString Active_window_condition::description() const +const TQString Active_window_condition::description() const { return i18n( "Active window: " ) + window()->comment(); } @@ -313,7 +313,7 @@ Active_window_condition::~Active_window_condition() Existing_window_condition::Existing_window_condition( KConfig& cfg_P, Condition_list_base* parent_P ) : Condition( cfg_P, parent_P ) { - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); cfg_P.setGroup( save_cfg_group + "Window" ); _window = new Windowdef_list( cfg_P ); cfg_P.setGroup( save_cfg_group ); @@ -323,8 +323,8 @@ Existing_window_condition::Existing_window_condition( KConfig& cfg_P, Condition_ void Existing_window_condition::init() { - connect( windows_handler, SIGNAL( window_added( WId )), this, SLOT( window_added( WId ))); - connect( windows_handler, SIGNAL( window_removed( WId )), this, SLOT( window_removed( WId ))); + 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 ))); } bool Existing_window_condition::match() const @@ -345,7 +345,7 @@ void Existing_window_condition::set_match( WId w_P ) void Existing_window_condition::cfg_write( KConfig& cfg_P ) const { base::cfg_write( cfg_P ); - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); cfg_P.setGroup( save_cfg_group + "Window" ); window()->cfg_write( cfg_P ); cfg_P.setGroup( save_cfg_group ); @@ -361,7 +361,7 @@ Condition* Existing_window_condition::copy( Condition_list_base* parent_P ) cons return new Existing_window_condition( window()->copy(), parent_P ); } -const QString Existing_window_condition::description() const +const TQString Existing_window_condition::description() const { return i18n( "Existing window: " ) + window()->comment(); } @@ -409,7 +409,7 @@ Not_condition* Not_condition::copy( Condition_list_base* parent_P ) const return ret; } -const QString Not_condition::description() const +const TQString Not_condition::description() const { return i18n( "Not_condition", "Not" ); } @@ -453,7 +453,7 @@ And_condition* And_condition::copy( Condition_list_base* parent_P ) const return ret; } -const QString And_condition::description() const +const TQString And_condition::description() const { return i18n( "And_condition", "And" ); } @@ -494,7 +494,7 @@ Or_condition* Or_condition::copy( Condition_list_base* parent_P ) const return ret; } -const QString Or_condition::description() const +const TQString Or_condition::description() const { return i18n( "Or_condition", "Or" ); } diff --git a/khotkeys/shared/conditions.h b/khotkeys/shared/conditions.h index 59133f4d3..bc0ca5d6e 100644 --- a/khotkeys/shared/conditions.h +++ b/khotkeys/shared/conditions.h @@ -11,9 +11,9 @@ #ifndef _CONDITIONS_H_ #define _CONDITIONS_H_ -#include <qobject.h> -#include <qptrlist.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqptrlist.h> +#include <tqstring.h> #include "khotkeysglobal.h" #include "windows.h" @@ -39,7 +39,7 @@ class KDE_EXPORT 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 const QString description() 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(); @@ -50,18 +50,18 @@ class KDE_EXPORT Condition }; class KDE_EXPORT Condition_list_base - : public Condition, public QPtrList< Condition > // inheritance ? + : public Condition, public TQPtrList< Condition > // inheritance ? { typedef Condition base; public: Condition_list_base( Condition_list_base* parent_P ); - Condition_list_base( const QPtrList< Condition >& children_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 ); virtual ~Condition_list_base(); virtual void cfg_write( KConfig& cfg_P ) const; virtual bool accepts_children() const; - typedef QPtrListIterator< Condition > Iterator; + typedef TQPtrListIterator< Condition > Iterator; }; class KDE_EXPORT Condition_list @@ -69,23 +69,23 @@ class KDE_EXPORT Condition_list { typedef Condition_list_base base; public: - Condition_list( const QString& comment_P, Action_data_base* data_P ); + 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* copy( Action_data_base* data_P ) const; virtual bool match() const; - const QString& comment() const; + const TQString& comment() const; void set_data( Action_data_base* data_P ); virtual void updated() const; virtual Condition_list* copy( Condition_list_base* parent_P ) const; - virtual const QString description() const; + virtual const TQString description() const; private: - QString _comment; + TQString _comment; Action_data_base* data; }; class KDE_EXPORT Active_window_condition - : public QObject, public Condition + : public TQObject, public Condition { Q_OBJECT typedef Condition base; @@ -101,7 +101,7 @@ class KDE_EXPORT Active_window_condition #else virtual Condition* copy( Condition_list_base* parent_P ) const; #endif - virtual const QString description() const; + virtual const TQString description() const; public slots: void active_window_changed( WId ); private: @@ -112,7 +112,7 @@ class KDE_EXPORT Active_window_condition }; class KDE_EXPORT Existing_window_condition - : public QObject, public Condition + : public TQObject, public Condition { Q_OBJECT typedef Condition base; @@ -128,7 +128,7 @@ class KDE_EXPORT Existing_window_condition #else virtual Condition* copy( Condition_list_base* parent_P ) const; #endif - virtual const QString description() const; + virtual const TQString description() const; public slots: void window_added( WId w_P ); void window_removed( WId w_P ); @@ -149,7 +149,7 @@ class KDE_EXPORT Not_condition virtual bool match() const; virtual void cfg_write( KConfig& cfg_P ) const; virtual Not_condition* copy( Condition_list_base* parent_P ) const; - virtual const QString description() const; + virtual const TQString description() const; const Condition* condition() const; virtual bool accepts_children() const; }; @@ -164,7 +164,7 @@ class KDE_EXPORT And_condition virtual bool match() const; virtual void cfg_write( KConfig& cfg_P ) const; virtual And_condition* copy( Condition_list_base* parent_P ) const; - virtual const QString description() const; + virtual const TQString description() const; }; class KDE_EXPORT Or_condition @@ -177,7 +177,7 @@ class KDE_EXPORT Or_condition virtual bool match() const; virtual void cfg_write( KConfig& cfg_P ) const; virtual Or_condition* copy( Condition_list_base* parent_P ) const; - virtual const QString description() const; + virtual const TQString description() const; }; //*************************************************************************** @@ -202,27 +202,27 @@ Condition_list_base* Condition::parent() inline Condition_list_base::Condition_list_base( Condition_list_base* parent_P ) - : Condition( parent_P ), QPtrList< Condition >() + : Condition( parent_P ), TQPtrList< Condition >() { } inline -Condition_list_base::Condition_list_base( const QPtrList< Condition >& children_P, +Condition_list_base::Condition_list_base( const TQPtrList< Condition >& children_P, Condition_list_base* parent_P ) - : Condition( parent_P ), QPtrList< Condition >( children_P ) + : Condition( parent_P ), TQPtrList< Condition >( children_P ) { } // Condition_list inline -Condition_list::Condition_list( const QString& comment_P, Action_data_base* data_P ) +Condition_list::Condition_list( const TQString& comment_P, Action_data_base* data_P ) : Condition_list_base( NULL ), _comment( comment_P ), data( data_P ) { } inline -const QString& Condition_list::comment() const +const TQString& Condition_list::comment() const { return _comment; } diff --git a/khotkeys/shared/gestures.cpp b/khotkeys/shared/gestures.cpp index 11cc44e22..60b1d93b4 100644 --- a/khotkeys/shared/gestures.cpp +++ b/khotkeys/shared/gestures.cpp @@ -43,15 +43,15 @@ namespace KHotKeys Gesture* gesture_handler; -Gesture::Gesture( bool /*enabled_P*/, QObject* parent_P ) +Gesture::Gesture( bool /*enabled_P*/, TQObject* parent_P ) : _enabled( false ), recording( false ), button( 0 ), exclude( NULL ) { (void) new DeleteObject( this, parent_P ); assert( gesture_handler == NULL ); gesture_handler = this; - connect( &nostroke_timer, SIGNAL( timeout()), SLOT( stroke_timeout())); - connect( windows_handler, SIGNAL( active_window_changed( WId )), - SLOT( active_window_changed( WId ))); + 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 ))); } Gesture::~Gesture() @@ -103,23 +103,23 @@ void Gesture::active_window_changed( WId ) update_grab(); } -void Gesture::register_handler( QObject* receiver_P, const char* slot_P ) +void Gesture::register_handler( TQObject* receiver_P, const char* slot_P ) { if( handlers.contains( receiver_P )) return; handlers[ receiver_P ] = true; - connect( this, SIGNAL( handle_gesture( const QString&, WId )), + connect( this, TQT_SIGNAL( handle_gesture( const TQString&, WId )), receiver_P, slot_P ); if( handlers.count() == 1 ) update_grab(); } -void Gesture::unregister_handler( QObject* receiver_P, const char* slot_P ) +void Gesture::unregister_handler( TQObject* receiver_P, const char* slot_P ) { if( !handlers.contains( receiver_P )) return; handlers.remove( receiver_P ); - disconnect( this, SIGNAL( handle_gesture( const QString&, WId )), + disconnect( this, TQT_SIGNAL( handle_gesture( const TQString&, WId )), receiver_P, slot_P ); if( handlers.count() == 0 ) update_grab(); @@ -150,7 +150,7 @@ bool Gesture::x11Event( XEvent* ev_P ) recording = false; nostroke_timer.stop(); stroke.record( ev_P->xbutton.x, ev_P->xbutton.y ); - QString gesture( stroke.translate()); + TQString gesture( stroke.translate()); if( gesture.isEmpty()) { kdDebug( 1217 ) << "GESTURE: replay" << endl; diff --git a/khotkeys/shared/gestures.h b/khotkeys/shared/gestures.h index 4c210528a..d423be8a6 100644 --- a/khotkeys/shared/gestures.h +++ b/khotkeys/shared/gestures.h @@ -11,8 +11,8 @@ #ifndef _GESTURES_H_ #define _GESTURES_H_ -#include <qwidget.h> -#include <qtimer.h> +#include <tqwidget.h> +#include <tqtimer.h> #include <X11/Xlib.h> #include <fixx11h.h> @@ -63,25 +63,25 @@ class KDE_EXPORT Stroke }; class KDE_EXPORT Gesture - : public QWidget // not QObject because of x11EventFilter() + : public TQWidget // not TQObject because of x11EventFilter() { Q_OBJECT public: - Gesture( bool enabled_P, QObject* parent_P ); + Gesture( bool enabled_P, TQObject* parent_P ); virtual ~Gesture(); void enable( bool enable_P ); void set_mouse_button( unsigned int button_P ); void set_timeout( int time_P ); void set_exclude( Windowdef_list* windows_P ); - void register_handler( QObject* receiver_P, const char* slot_P ); - void unregister_handler( QObject* receiver_P, const char* slot_P ); + void register_handler( TQObject* receiver_P, const char* slot_P ); + void unregister_handler( TQObject* receiver_P, const char* slot_P ); protected: virtual bool x11Event( XEvent* ev_P ); private slots: void stroke_timeout(); void active_window_changed( WId window_P ); signals: - void handle_gesture( const QString &gesture, WId window ); + void handle_gesture( const TQString &gesture, WId window ); private: void update_grab(); void grab_mouse( bool grab_P ); @@ -89,27 +89,27 @@ class KDE_EXPORT Gesture bool _enabled; Stroke stroke; int start_x, start_y; - QTimer nostroke_timer; + TQTimer nostroke_timer; bool recording; unsigned int button; int timeout; WId gesture_window; Windowdef_list* exclude; - QMap< QObject*, bool > handlers; // bool is just a dummy + TQMap< TQObject*, bool > handlers; // bool is just a dummy }; -// Gesture class must be QWidget derived because of x11Event() -// but it should be QObject owned -> use a QObject proxy that will delete it +// Gesture class must be TQWidget derived because of x11Event() +// but it should be TQObject owned -> use a TQObject proxy that will delete it class DeleteObject : public QObject { Q_OBJECT public: - DeleteObject( QWidget* widget_P, QObject* parent_P ) - : QObject( parent_P ), widget( widget_P ) {} + DeleteObject( TQWidget* widget_P, TQObject* parent_P ) + : TQObject( parent_P ), widget( widget_P ) {} virtual ~DeleteObject() { delete widget; } private: - QWidget* widget; + TQWidget* widget; }; diff --git a/khotkeys/shared/input.cpp b/khotkeys/shared/input.cpp index 021dedf93..f9bfec6d3 100644 --- a/khotkeys/shared/input.cpp +++ b/khotkeys/shared/input.cpp @@ -17,13 +17,13 @@ #include "input.h" #include <assert.h> -#include <qwidget.h> +#include <tqwidget.h> #include <kglobalaccel.h> #include <kdebug.h> #include <kapplication.h> #include <kdeversion.h> -#include <qtimer.h> +#include <tqtimer.h> #include <kkeynative.h> #include "khotkeysglobal.h" @@ -38,8 +38,8 @@ namespace KHotKeys // Kbd -Kbd::Kbd( bool grabbing_enabled_P, QObject* parent_P ) - : QObject( parent_P ) +Kbd::Kbd( bool grabbing_enabled_P, TQObject* parent_P ) + : TQObject( parent_P ) { assert( keyboard_handler == NULL ); keyboard_handler = this; @@ -77,7 +77,7 @@ void Kbd::activate_receiver( Kbd_receiver* receiver_P ) if( rcv.active ) return; rcv.active = true; - for( QValueList< KShortcut >::ConstIterator it( rcv.shortcuts.begin()); + for( TQValueList< KShortcut >::ConstIterator it( rcv.shortcuts.begin()); it != rcv.shortcuts.end(); ++it ) grab_shortcut( *it ); @@ -89,7 +89,7 @@ void Kbd::deactivate_receiver( Kbd_receiver* receiver_P ) if( !rcv.active ) return; rcv.active = false; - for( QValueList< KShortcut >::ConstIterator it( rcv.shortcuts.begin()); + for( TQValueList< KShortcut >::ConstIterator it( rcv.shortcuts.begin()); it != rcv.shortcuts.end(); ++it ) ungrab_shortcut( *it ); @@ -104,14 +104,14 @@ void Kbd::grab_shortcut( const KShortcut& shortcut_P ) grabs[ shortcut_P ] = 1; #if 0 // CHECKME ugly ugly hack - QString name = ' ' + QString::number( keycode_P ); + TQString name = ' ' + TQString::number( keycode_P ); kga->insertItem( "", name, keycode_P ); - kga->connectItem( name, this, SLOT( key_slot( int ))); + kga->connectItem( name, this, TQT_SLOT( key_slot( int ))); #endif - QString name = ' ' + shortcut_P.toStringInternal(); - kga->insert( name, name, QString::null, shortcut_P, shortcut_P, - this, SLOT( key_slot( QString ))); - QTimer::singleShot( 0, this, SLOT( update_connections())); + 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())); } } @@ -123,13 +123,13 @@ void Kbd::ungrab_shortcut( const KShortcut& shortcut_P ) { #if 0 // CHECKME workaround for KGlobalAccel::disconnectItem() not working - kga->setItemEnabled( ' ' + QString::number( keycode_P ), false ); - // kga->disconnectItem( ' ' + QString::number( keycode_P ), NULL, NULL ); - kga->removeItem( ' ' + QString::number( keycode_P )); + kga->setItemEnabled( ' ' + TQString::number( keycode_P ), false ); + // kga->disconnectItem( ' ' + TQString::number( keycode_P ), NULL, NULL ); + kga->removeItem( ' ' + TQString::number( keycode_P )); #endif kga->remove( ' ' + shortcut_P.toStringInternal()); grabs.remove( shortcut_P ); - QTimer::singleShot( 0, this, SLOT( update_connections())); + TQTimer::singleShot( 0, this, TQT_SLOT( update_connections())); } } @@ -138,13 +138,13 @@ void Kbd::update_connections() kga->updateConnections(); } -void Kbd::key_slot( QString key_P ) +void Kbd::key_slot( TQString key_P ) { kdDebug( 1217 ) << "Key pressed:" << key_P << endl; KShortcut shortcut( key_P ); if( !grabs.contains( shortcut )) return; - for( QMap< Kbd_receiver*, Receiver_data >::ConstIterator it = receivers.begin(); + for( TQMap< Kbd_receiver*, Receiver_data >::ConstIterator it = receivers.begin(); it != receivers.end(); ++it ) if( ( *it ).shortcuts.contains( shortcut ) && ( *it ).active diff --git a/khotkeys/shared/input.h b/khotkeys/shared/input.h index 1983bcf0b..22df89284 100644 --- a/khotkeys/shared/input.h +++ b/khotkeys/shared/input.h @@ -11,11 +11,11 @@ #ifndef _INPUT_H_ #define _INPUT_H_ -#include <qobject.h> -#include <qwindowdefs.h> -#include <qmap.h> -#include <qwidget.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqwindowdefs.h> +#include <tqmap.h> +#include <tqwidget.h> +#include <tqvaluelist.h> #include <kshortcut.h> #include <X11/X.h> @@ -37,7 +37,7 @@ class Kbd { Q_OBJECT public: - Kbd( bool grabbing_enabled_P, QObject* parent_P ); + 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 ); @@ -49,17 +49,17 @@ class Kbd void grab_shortcut( const KShortcut& shortcut_P ); void ungrab_shortcut( const KShortcut& shortcut_P ); private slots: - void key_slot( QString key_P ); + void key_slot( TQString key_P ); void update_connections(); private: struct Receiver_data { Receiver_data(); - QValueList< KShortcut > shortcuts; + TQValueList< KShortcut > shortcuts; bool active; }; - QMap< Kbd_receiver*, Receiver_data > receivers; - QMap< KShortcut, int > grabs; + TQMap< Kbd_receiver*, Receiver_data > receivers; + TQMap< KShortcut, int > grabs; KGlobalAccel* kga; }; diff --git a/khotkeys/shared/khlistbox.cpp b/khotkeys/shared/khlistbox.cpp index 694fb658b..ff6d96221 100644 --- a/khotkeys/shared/khlistbox.cpp +++ b/khotkeys/shared/khlistbox.cpp @@ -21,19 +21,19 @@ namespace KHotKeys { -KHListBox::KHListBox( QWidget* parent_P, const char* name_P ) - : QListBox( parent_P, name_P ), saved_current_item( NULL ), +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, SIGNAL( selectionChanged( QListBoxItem* )), - SLOT( slot_selection_changed( QListBoxItem* ))); - connect( this, SIGNAL( currentChanged( QListBoxItem* )), - SLOT( slot_current_changed( QListBoxItem* ))); + connect( this, TQT_SIGNAL( selectionChanged( TQListBoxItem* )), + TQT_SLOT( slot_selection_changed( TQListBoxItem* ))); + connect( this, TQT_SIGNAL( currentChanged( TQListBoxItem* )), + TQT_SLOT( slot_current_changed( TQListBoxItem* ))); // CHECKME grrr - connect( this, SIGNAL( selectionChanged()), - SLOT( slot_selection_changed())); - connect( &insert_select_timer, SIGNAL( timeout()), - SLOT( slot_insert_select())); + connect( this, TQT_SIGNAL( selectionChanged()), + TQT_SLOT( slot_selection_changed())); + connect( &insert_select_timer, TQT_SIGNAL( timeout()), + TQT_SLOT( slot_insert_select())); } void KHListBox::slot_selection_changed() @@ -44,7 +44,7 @@ void KHListBox::slot_selection_changed() setSelected( saved_current_item, true ); } -void KHListBox::slot_selection_changed( QListBoxItem* item_P ) +void KHListBox::slot_selection_changed( TQListBoxItem* item_P ) { if( item_P == saved_current_item ) return; @@ -53,7 +53,7 @@ void KHListBox::slot_selection_changed( QListBoxItem* item_P ) emit current_changed( saved_current_item ); } -void KHListBox::slot_current_changed( QListBoxItem* item_P ) +void KHListBox::slot_current_changed( TQListBoxItem* item_P ) { insert_select_timer.stop(); if( item_P == saved_current_item ) @@ -67,19 +67,19 @@ void KHListBox::slot_current_changed( QListBoxItem* item_P ) void KHListBox::clear() { in_clear = true; - QListBox::clear(); + TQListBox::clear(); in_clear = false; slot_selection_changed( NULL ); } // neni virtual :(( a vubec nefunguje -void KHListBox::insertItem( QListBoxItem* item_P ) +void KHListBox::insertItem( TQListBoxItem* item_P ) { bool set = false; if( !in_clear ) set = count() == 0; - QListBox::insertItem( item_P ); + TQListBox::insertItem( item_P ); if( set && force_select ) { bool block = signalsBlocked(); @@ -90,7 +90,7 @@ void KHListBox::insertItem( QListBoxItem* item_P ) } } -// items are often inserted using the QListBoxItem constructor, +// items are often inserted using the TQListBoxItem constructor, // which means that a derived class are not yet fully created void KHListBox::slot_insert_select() { diff --git a/khotkeys/shared/khlistbox.h b/khotkeys/shared/khlistbox.h index 95bd32963..ddb988c36 100644 --- a/khotkeys/shared/khlistbox.h +++ b/khotkeys/shared/khlistbox.h @@ -11,7 +11,7 @@ #ifndef _KHLISTBOX_H_ #define _KHLISTBOX_H_ -#include <qtimer.h> +#include <tqtimer.h> #include <klistbox.h> @@ -24,23 +24,23 @@ class KHListBox Q_OBJECT Q_PROPERTY( bool forceSelect READ forceSelect WRITE setForceSelect ) public: - KHListBox( QWidget* parent_P, const char* name_P = NULL ); + KHListBox( TQWidget* parent_P, const char* name_P = NULL ); virtual void clear(); - virtual void insertItem( QListBoxItem* item_P ); + virtual void insertItem( TQListBoxItem* item_P ); bool forceSelect() const; void setForceSelect( bool force_P ); signals: - void current_changed( QListBoxItem* item_P ); + void current_changed( TQListBoxItem* item_P ); private slots: - void slot_selection_changed( QListBoxItem* item_P ); + void slot_selection_changed( TQListBoxItem* item_P ); void slot_selection_changed(); - void slot_current_changed( QListBoxItem* item_P ); + void slot_current_changed( TQListBoxItem* item_P ); void slot_insert_select(); private: - QListBoxItem* saved_current_item; + TQListBoxItem* saved_current_item; bool in_clear; bool force_select; - QTimer insert_select_timer; + TQTimer insert_select_timer; }; //*************************************************************************** diff --git a/khotkeys/shared/khlistview.cpp b/khotkeys/shared/khlistview.cpp index 45a1d04f9..2afa9db17 100644 --- a/khotkeys/shared/khlistview.cpp +++ b/khotkeys/shared/khlistview.cpp @@ -21,19 +21,19 @@ namespace KHotKeys { -KHListView::KHListView( QWidget* parent_P, const char* name_P ) +KHListView::KHListView( TQWidget* parent_P, const char* name_P ) : KListView( parent_P, name_P ), saved_current_item( NULL ), in_clear( false ), ignore( false ), force_select( false ) { - connect( this, SIGNAL( selectionChanged( QListViewItem* )), - SLOT( slot_selection_changed( QListViewItem* ))); - connect( this, SIGNAL( currentChanged( QListViewItem* )), - SLOT( slot_current_changed( QListViewItem* ))); + connect( this, TQT_SIGNAL( selectionChanged( TQListViewItem* )), + TQT_SLOT( slot_selection_changed( TQListViewItem* ))); + connect( this, TQT_SIGNAL( currentChanged( TQListViewItem* )), + TQT_SLOT( slot_current_changed( TQListViewItem* ))); // CHECKME grrr - connect( this, SIGNAL( selectionChanged()), - SLOT( slot_selection_changed())); - connect( &insert_select_timer, SIGNAL( timeout()), - SLOT( slot_insert_select())); + connect( this, TQT_SIGNAL( selectionChanged()), + TQT_SLOT( slot_selection_changed())); + connect( &insert_select_timer, TQT_SIGNAL( timeout()), + TQT_SLOT( slot_insert_select())); } void KHListView::slot_selection_changed() @@ -46,7 +46,7 @@ void KHListView::slot_selection_changed() setSelected( saved_current_item, true ); } -void KHListView::slot_selection_changed( QListViewItem* item_P ) +void KHListView::slot_selection_changed( TQListViewItem* item_P ) { if( ignore ) return; @@ -57,7 +57,7 @@ void KHListView::slot_selection_changed( QListViewItem* item_P ) emit current_changed( saved_current_item ); } -void KHListView::slot_current_changed( QListViewItem* item_P ) +void KHListView::slot_current_changed( TQListViewItem* item_P ) { if( ignore ) return; @@ -77,7 +77,7 @@ void KHListView::clear() slot_selection_changed( NULL ); } -void KHListView::insertItem( QListViewItem* item_P ) +void KHListView::insertItem( TQListViewItem* item_P ) { bool set = false; if( !in_clear ) @@ -100,7 +100,7 @@ void KHListView::clearSelection() slot_current_changed( currentItem()); } -// items are often inserted using the QListViewItem constructor, +// items are often inserted using the TQListViewItem constructor, // which means that a derived class are not yet fully created void KHListView::slot_insert_select() { @@ -109,7 +109,7 @@ void KHListView::slot_insert_select() slot_current_changed( currentItem()); } -void KHListView::contentsDropEvent( QDropEvent* e ) +void KHListView::contentsDropEvent( TQDropEvent* e ) { bool save_ignore = ignore; ignore = true; diff --git a/khotkeys/shared/khlistview.h b/khotkeys/shared/khlistview.h index 69986299d..c475b2d6c 100644 --- a/khotkeys/shared/khlistview.h +++ b/khotkeys/shared/khlistview.h @@ -11,7 +11,7 @@ #ifndef _KHLISTVIEW_H_ #define _KHLISTVIEW_H_ -#include <qtimer.h> +#include <tqtimer.h> #include <klistview.h> #include <kdemacros.h> @@ -25,27 +25,27 @@ class KDE_EXPORT KHListView Q_OBJECT Q_PROPERTY( bool forceSelect READ forceSelect WRITE setForceSelect ) public: - KHListView( QWidget* parent_P, const char* name_P = NULL ); + KHListView( TQWidget* parent_P, const char* name_P = NULL ); virtual void clear(); - virtual void insertItem( QListViewItem* item_P ); + virtual void insertItem( TQListViewItem* item_P ); virtual void clearSelection(); bool forceSelect() const; void setForceSelect( bool force_P ); signals: - void current_changed( QListViewItem* item_P ); + void current_changed( TQListViewItem* item_P ); protected: - virtual void contentsDropEvent (QDropEvent*); + virtual void contentsDropEvent (TQDropEvent*); private slots: - void slot_selection_changed( QListViewItem* item_P ); + void slot_selection_changed( TQListViewItem* item_P ); void slot_selection_changed(); - void slot_current_changed( QListViewItem* item_P ); + void slot_current_changed( TQListViewItem* item_P ); void slot_insert_select(); private: - QListViewItem* saved_current_item; + TQListViewItem* saved_current_item; bool in_clear; bool ignore; bool force_select; - QTimer insert_select_timer; + TQTimer insert_select_timer; }; //*************************************************************************** diff --git a/khotkeys/shared/khotkeysglobal.cpp b/khotkeys/shared/khotkeysglobal.cpp index 2b430fc8c..4c6b8360c 100644 --- a/khotkeys/shared/khotkeysglobal.cpp +++ b/khotkeys/shared/khotkeysglobal.cpp @@ -35,7 +35,7 @@ Kbd* keyboard_handler; Windows* windows_handler; static bool _khotkeys_active = false; -void init_global_data( bool active_P, QObject* owner_P ) +void init_global_data( bool active_P, TQObject* owner_P ) { assert( keyboard_handler == NULL ); assert( windows_handler == NULL ); @@ -59,15 +59,15 @@ bool khotkeys_active() // does the opposite of KStandardDirs::findResource() i.e. e.g. // "/opt/kde2/share/applnk/System/konsole.desktop" -> "System/konsole.desktop" -QString get_menu_entry_from_path( const QString& path_P ) +TQString get_menu_entry_from_path( const TQString& path_P ) { - QStringList dirs = KGlobal::dirs()->resourceDirs( "apps" ); - for( QStringList::ConstIterator it = dirs.begin(); + TQStringList dirs = KGlobal::dirs()->resourceDirs( "apps" ); + for( TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it ) if( path_P.find( *it ) == 0 ) { - QString ret = path_P; + TQString ret = path_P; ret.remove( 0, (*it).length()); if( ret[ 0 ] == '/' ) ret.remove( 0, 1 ); diff --git a/khotkeys/shared/khotkeysglobal.h b/khotkeys/shared/khotkeysglobal.h index 873473e0f..9ca469584 100644 --- a/khotkeys/shared/khotkeysglobal.h +++ b/khotkeys/shared/khotkeysglobal.h @@ -18,7 +18,7 @@ //#define KHOTKEYS_DEBUG //#endif -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> @@ -41,9 +41,9 @@ extern Windows* windows_handler; KDE_EXPORT bool khotkeys_active(); KDE_EXPORT void khotkeys_set_active( bool active_P ); -QString get_menu_entry_from_path( const QString& path_P ); +TQString get_menu_entry_from_path( const TQString& path_P ); -KDE_EXPORT void init_global_data( bool active_P, QObject* owner_P ); +KDE_EXPORT void init_global_data( bool active_P, TQObject* owner_P ); const char* const MENU_EDITOR_ENTRIES_GROUP_NAME = I18N_NOOP( "Menu Editor entries" ); diff --git a/khotkeys/shared/settings.cpp b/khotkeys/shared/settings.cpp index 829c8521a..fdab2be56 100644 --- a/khotkeys/shared/settings.cpp +++ b/khotkeys/shared/settings.cpp @@ -60,7 +60,7 @@ bool Settings::read_settings( KConfig& cfg_P, bool include_disabled_P, ImportTyp already_imported = cfg_P.readListEntry( "AlreadyImported" ); else { - QString import_id = cfg_P.readEntry( "ImportId" ); + TQString import_id = cfg_P.readEntry( "ImportId" ); if( !import_id.isEmpty()) { if( already_imported.contains( import_id )) @@ -122,8 +122,8 @@ void Settings::write_settings() { KConfig cfg( KHOTKEYS_CONFIG_FILE, false ); // CHECKME smazat stare sekce ? - QStringList groups = cfg.groupList(); - for( QStringList::ConstIterator it = groups.begin(); + TQStringList groups = cfg.groupList(); + for( TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it ) cfg.deleteGroup( *it ); @@ -157,7 +157,7 @@ void Settings::write_settings() int Settings::write_actions_recursively_v2( KConfig& cfg_P, Action_data_group* parent_P, bool enabled_P ) { int enabled_cnt = 0; - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); int cnt = 0; for( Action_data_group::Iterator it = parent_P->first_child(); it; @@ -166,7 +166,7 @@ int Settings::write_actions_recursively_v2( KConfig& cfg_P, Action_data_group* p ++cnt; if( enabled_P && (*it)->enabled( true )) ++enabled_cnt; - cfg_P.setGroup( save_cfg_group + "_" + QString::number( cnt )); + cfg_P.setGroup( save_cfg_group + "_" + TQString::number( cnt )); ( *it )->cfg_write( cfg_P ); Action_data_group* grp = dynamic_cast< Action_data_group* >( *it ); if( grp != NULL ) @@ -186,13 +186,13 @@ void Settings::read_settings_v2( KConfig& cfg_P, bool include_disabled_P ) void Settings::read_actions_recursively_v2( KConfig& cfg_P, Action_data_group* parent_P, bool include_disabled_P ) { - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); int cnt = cfg_P.readNumEntry( "DataCount" ); for( int i = 1; i <= cnt; ++i ) { - cfg_P.setGroup( save_cfg_group + "_" + QString::number( i )); + cfg_P.setGroup( save_cfg_group + "_" + TQString::number( i )); if( include_disabled_P || Action_data_base::cfg_is_enabled( cfg_P )) { Action_data_base* new_action = Action_data_base::create_cfg_read( cfg_P, parent_P ); @@ -226,17 +226,17 @@ void Settings::read_settings_v1( KConfig& cfg_P ) sect <= sections; ++sect ) { - QString group = QString( "Section%1" ).arg( sect ); + TQString group = TQString( "Section%1" ).arg( sect ); if( !cfg_P.hasGroup( group )) continue; cfg_P.setGroup( group ); - QString name = cfg_P.readEntry( "Name" ); + TQString name = cfg_P.readEntry( "Name" ); if( name.isNull() ) continue; - QString shortcut = cfg_P.readEntry( "Shortcut" ); + TQString shortcut = cfg_P.readEntry( "Shortcut" ); if( shortcut.isNull() ) continue; - QString run = cfg_P.readEntry( "Run" ); + TQString run = cfg_P.readEntry( "Run" ); if( run.isNull() ) continue; bool menuentry = cfg_P.readBoolEntry( "MenuEntry", false ); diff --git a/khotkeys/shared/settings.h b/khotkeys/shared/settings.h index cf05dcd31..fa6754160 100644 --- a/khotkeys/shared/settings.h +++ b/khotkeys/shared/settings.h @@ -48,7 +48,7 @@ class KDE_EXPORT Settings void read_actions_recursively_v2( KConfig& cfg_P, Action_data_group* parent_P, bool include_disabled_P ); private: - QStringList already_imported; + TQStringList already_imported; KHOTKEYS_DISABLE_COPY( Settings ); }; diff --git a/khotkeys/shared/sound.cpp b/khotkeys/shared/sound.cpp index e8d4191eb..c90eb2e02 100644 --- a/khotkeys/shared/sound.cpp +++ b/khotkeys/shared/sound.cpp @@ -19,8 +19,8 @@ ***************************************************************************/ #include "sound.h" -#include <qfile.h> -#include <qdatastream.h> +#include <tqfile.h> +#include <tqdatastream.h> #include <kdebug.h> @@ -47,18 +47,18 @@ Sound::~Sound() #define ABS(X) ( (X>0) ? X : -X ) -void Sound::load(const QString& filename) +void Sound::load(const TQString& filename) { kdDebug() << k_funcinfo << filename << endl; - data=QMemArray<Q_INT32>(); - QFile file(filename); + data=TQMemArray<Q_INT32>(); + TQFile file(filename); if(!file.open(IO_ReadOnly)) { kdWarning() << k_funcinfo <<"unable to open file" << endl; return; } - QDataStream stream(&file); - stream.setByteOrder( QDataStream::LittleEndian ); + TQDataStream stream(&file); + stream.setByteOrder( TQDataStream::LittleEndian ); Q_INT32 magic; MAGIC("RIFF"); @@ -74,7 +74,7 @@ void Sound::load(const QString& filename) READ_FROM_STREAM(Q_UINT16,BlockAlign); READ_FROM_STREAM(Q_UINT16,BitsPerSample); MAGIC("data"); - READ_FROM_STREAM(QByteArray,SoundData); + READ_FROM_STREAM(TQByteArray,SoundData); NumberOfChannels=1; //Wav i play are broken file.close(); @@ -105,27 +105,27 @@ void Sound::load(const QString& filename) } /* static int q=0; - QString name="test" + QString::number(q++) + ".wav"; + TQString name="test" + TQString::number(q++) + ".wav"; save(name);*/ } #define SMAGIC(CH) { stream << ( Q_INT32) ( (CH)[0] | (CH)[1]<<8 | (CH)[2]<< 16 | (CH)[3] << 24 ) ; } -void Sound::save(const QString& filename) const +void Sound::save(const TQString& filename) const { kdDebug( 1217 ) << k_funcinfo << filename << " - " << data.size() << endl; - QFile file(filename); + TQFile file(filename); if(!file.open(IO_WriteOnly)) { kdWarning() << k_funcinfo <<"unable to open file" << endl; return; } - QDataStream stream(&file); - stream.setByteOrder( QDataStream::LittleEndian ); + TQDataStream stream(&file); + stream.setByteOrder( TQDataStream::LittleEndian ); - QByteArray SoundData(data.size()*2); + TQByteArray SoundData(data.size()*2); for(unsigned long int f=0;f<data.size();f++) { @@ -159,7 +159,7 @@ void Sound::save(const QString& filename) const //READ_FROM_STREAM(Q_UINT16,BitsPerSample); stream << (Q_UINT16)(16); SMAGIC("data"); - //READ_FROM_STREAM(QByteArray,SoundData); + //READ_FROM_STREAM(TQByteArray,SoundData); stream << SoundData; file.close(); @@ -170,10 +170,10 @@ void Sound::save(const QString& filename) const #if 0 -void Sound::load(const QString& filename) +void Sound::load(const TQString& filename) { cout << "saout \n"; - data=QMemArray<long unsigned int>(); + data=TQMemArray<long unsigned int>(); static const int BUFFER_LEN = 4096; //code from libtunepimp diff --git a/khotkeys/shared/sound.h b/khotkeys/shared/sound.h index 1a38f182f..2c2d97d93 100644 --- a/khotkeys/shared/sound.h +++ b/khotkeys/shared/sound.h @@ -20,8 +20,8 @@ #ifndef SOUND_H #define SOUND_H -#include <qmemarray.h> -#include <qstring.h> +#include <tqmemarray.h> +#include <tqstring.h> #include <kdemacros.h> /** @@ -32,8 +32,8 @@ public: Sound(); ~Sound(); - void load(const QString &filename); - void save(const QString &filename) const; + void load(const TQString &filename); + void save(const TQString &filename) const; unsigned int size() const { @@ -50,7 +50,7 @@ public: return _fs; } - QMemArray<Q_INT32> data; + TQMemArray<Q_INT32> data; Q_UINT32 max; uint _fs; }; diff --git a/khotkeys/shared/soundrecorder.cpp b/khotkeys/shared/soundrecorder.cpp index fc2031113..266bbc7ce 100644 --- a/khotkeys/shared/soundrecorder.cpp +++ b/khotkeys/shared/soundrecorder.cpp @@ -27,7 +27,7 @@ #include <kdebug.h> #include <klocale.h> -#include <qtimer.h> +#include <tqtimer.h> #include <klibloader.h> #include "khotkeysglobal.h" @@ -47,7 +47,7 @@ bool SoundRecorder::init( KLibrary* lib ) return create_fun != NULL; } -SoundRecorder* SoundRecorder::create( QObject* parent, const char* name ) +SoundRecorder* SoundRecorder::create( TQObject* parent, const char* name ) { #ifdef HAVE_ARTS if( create_fun != NULL ) @@ -56,7 +56,7 @@ SoundRecorder* SoundRecorder::create( QObject* parent, const char* name ) return new SoundRecorder( parent, name ); } -SoundRecorder::SoundRecorder(QObject *parent, const char *name) : QObject(parent, name) {} +SoundRecorder::SoundRecorder(TQObject *parent, const char *name) : TQObject(parent, name) {} SoundRecorder::~SoundRecorder() { diff --git a/khotkeys/shared/soundrecorder.h b/khotkeys/shared/soundrecorder.h index d9539c4c5..c00f73527 100644 --- a/khotkeys/shared/soundrecorder.h +++ b/khotkeys/shared/soundrecorder.h @@ -20,7 +20,7 @@ #ifndef RECORDER_H #define RECORDER_H -#include <qobject.h> +#include <tqobject.h> #include "sound.h" #include <kdemacros.h> @@ -38,7 +38,7 @@ class KDE_EXPORT SoundRecorder : public QObject { Q_OBJECT public: - static SoundRecorder* create( QObject* parent = 0, const char* name = 0 ); + static SoundRecorder* create( TQObject* parent = 0, const char* name = 0 ); virtual ~SoundRecorder(); virtual void start(); @@ -51,8 +51,8 @@ signals: void recorded(const Sound&); protected: - SoundRecorder(QObject *parent = 0, const char *name = 0); - typedef SoundRecorder* (*create_ptr)( QObject*, const char* ); + SoundRecorder(TQObject *parent = 0, const char *name = 0); + typedef SoundRecorder* (*create_ptr)( TQObject*, const char* ); private: static create_ptr create_fun; }; diff --git a/khotkeys/shared/triggers.cpp b/khotkeys/shared/triggers.cpp index 1febedfa9..7cac2b98c 100644 --- a/khotkeys/shared/triggers.cpp +++ b/khotkeys/shared/triggers.cpp @@ -46,7 +46,7 @@ void Trigger::cfg_write( KConfig& cfg_P ) const Trigger* Trigger::create_cfg_read( KConfig& cfg_P, Action_data* data_P ) { - QString type = cfg_P.readEntry( "Type" ); + TQString type = cfg_P.readEntry( "Type" ); if( type == "SHORTCUT" || type == "SINGLE_SHORTCUT" ) return new Shortcut_trigger( cfg_P, data_P ); if( type == "WINDOW" ) @@ -63,17 +63,17 @@ 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 ) - : QPtrList< Trigger >() + : TQPtrList< Trigger >() { setAutoDelete( true ); _comment = cfg_P.readEntry( "Comment" ); - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); int cnt = cfg_P.readNumEntry( "TriggersCount", 0 ); for( int i = 0; i < cnt; ++i ) { - cfg_P.setGroup( save_cfg_group + QString::number( i )); + cfg_P.setGroup( save_cfg_group + TQString::number( i )); Trigger* trigger = Trigger::create_cfg_read( cfg_P, data_P ); if( trigger ) append( trigger ); @@ -84,13 +84,13 @@ Trigger_list::Trigger_list( KConfig& cfg_P, Action_data* data_P ) void Trigger_list::cfg_write( KConfig& cfg_P ) const { cfg_P.writeEntry( "Comment", comment()); - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); int i = 0; for( Iterator it( *this ); it; ++it, ++i ) { - cfg_P.setGroup( save_cfg_group + QString::number( i )); + cfg_P.setGroup( save_cfg_group + TQString::number( i )); it.current()->cfg_write( cfg_P ); } cfg_P.setGroup( save_cfg_group ); @@ -147,7 +147,7 @@ Shortcut_trigger* Shortcut_trigger::copy( Action_data* data_P ) const return new Shortcut_trigger( data_P ? data_P : data, shortcut()); } -const QString Shortcut_trigger::description() const +const TQString Shortcut_trigger::description() const { // CHECKME vice mods return i18n( "Shortcut trigger: " ) + _shortcut.toString(); @@ -179,7 +179,7 @@ Window_trigger::Window_trigger( KConfig& cfg_P, Action_data* data_P ) : Trigger( cfg_P, data_P ), active( false ) { // kdDebug( 1217 ) << "Window_trigger" << endl; - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); cfg_P.setGroup( save_cfg_group + "Windows" ); _windows = new Windowdef_list( cfg_P ); cfg_P.setGroup( save_cfg_group ); @@ -197,13 +197,13 @@ Window_trigger::~Window_trigger() void Window_trigger::init() { kdDebug( 1217 ) << "Window_trigger::init()" << endl; - connect( windows_handler, SIGNAL( window_added( WId )), this, SLOT( window_added( WId ))); - connect( windows_handler, SIGNAL( window_removed( WId )), this, SLOT( window_removed( WId ))); + 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 ))); if( window_actions & ( WINDOW_ACTIVATES | WINDOW_DEACTIVATES /*| WINDOW_DISAPPEARS*/ )) - connect( windows_handler, SIGNAL( active_window_changed( WId )), - this, SLOT( active_window_changed( WId ))); - connect( windows_handler, SIGNAL( window_changed( WId, unsigned int )), - this, SLOT( window_changed( WId, unsigned int ))); + 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 ))); } void Window_trigger::activate( bool activate_P ) @@ -293,7 +293,7 @@ void Window_trigger::window_changed( WId window_P, unsigned int dirty_P ) void Window_trigger::cfg_write( KConfig& cfg_P ) const { base::cfg_write( cfg_P ); - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); cfg_P.setGroup( save_cfg_group + "Windows" ); windows()->cfg_write( cfg_P ); cfg_P.setGroup( save_cfg_group ); @@ -313,14 +313,14 @@ Trigger* Window_trigger::copy( Action_data* data_P ) const return ret; } -const QString Window_trigger::description() const +const TQString Window_trigger::description() const { return i18n( "Window trigger: " ) + windows()->comment(); } // Gesture_trigger -Gesture_trigger::Gesture_trigger( Action_data* data_P, const QString &gesturecode_P ) +Gesture_trigger::Gesture_trigger( Action_data* data_P, const TQString &gesturecode_P ) : Trigger( data_P ), _gesturecode( gesturecode_P ) { } @@ -333,7 +333,7 @@ Gesture_trigger::Gesture_trigger( KConfig& cfg_P, Action_data* data_P ) Gesture_trigger::~Gesture_trigger() { - gesture_handler->unregister_handler( this, SLOT( handle_gesture( const QString&, WId ))); + gesture_handler->unregister_handler( this, TQT_SLOT( handle_gesture( const TQString&, WId ))); } void Gesture_trigger::cfg_write( KConfig& cfg_P ) const @@ -349,12 +349,12 @@ Trigger* Gesture_trigger::copy( Action_data* data_P ) const return new Gesture_trigger( data_P ? data_P : data, gesturecode()); } -const QString Gesture_trigger::description() const +const TQString Gesture_trigger::description() const { return i18n( "Gesture trigger: " ) + gesturecode(); } -void Gesture_trigger::handle_gesture( const QString &gesture_P, WId window_P ) +void Gesture_trigger::handle_gesture( const TQString &gesture_P, WId window_P ) { if( gesturecode() == gesture_P ) { @@ -366,15 +366,15 @@ void Gesture_trigger::handle_gesture( const QString &gesture_P, WId window_P ) void Gesture_trigger::activate( bool activate_P ) { if( activate_P ) - gesture_handler->register_handler( this, SLOT( handle_gesture( const QString&, WId ))); + gesture_handler->register_handler( this, TQT_SLOT( handle_gesture( const TQString&, WId ))); else - gesture_handler->unregister_handler( this, SLOT( handle_gesture( const QString&, WId ))); + gesture_handler->unregister_handler( this, TQT_SLOT( handle_gesture( const TQString&, WId ))); } // Voice_trigger - Voice_trigger::Voice_trigger( Action_data* data_P, const QString &Voicecode_P, const VoiceSignature& signature1_P, const VoiceSignature& signature2_P ) + Voice_trigger::Voice_trigger( Action_data* data_P, const TQString &Voicecode_P, const VoiceSignature& signature1_P, const VoiceSignature& signature2_P ) : Trigger( data_P ), _voicecode( Voicecode_P ) { _voicesignature[0]=signature1_P; @@ -409,7 +409,7 @@ Trigger* Voice_trigger::copy( Action_data* data_P ) const return new Voice_trigger( data_P ? data_P : data, voicecode(), voicesignature(1) , voicesignature(2) ); } -const QString Voice_trigger::description() const +const TQString Voice_trigger::description() const { return i18n( "Voice trigger: " ) + voicecode(); } diff --git a/khotkeys/shared/triggers.h b/khotkeys/shared/triggers.h index 2f921beff..9a8fe6bee 100644 --- a/khotkeys/shared/triggers.h +++ b/khotkeys/shared/triggers.h @@ -11,9 +11,9 @@ #ifndef _TRIGGERS_H_ #define _TRIGGERS_H_ -#include <qptrlist.h> -#include <qtimer.h> -#include <qmap.h> +#include <tqptrlist.h> +#include <tqtimer.h> +#include <tqmap.h> #include <kdemacros.h> #include "khotkeysglobal.h" @@ -37,7 +37,7 @@ class KDE_EXPORT Trigger virtual ~Trigger(); virtual void cfg_write( KConfig& cfg_P ) const = 0; virtual Trigger* copy( Action_data* data_P ) const = 0; - virtual const QString description() const = 0; + virtual const TQString description() const = 0; static Trigger* create_cfg_read( KConfig& cfg_P, Action_data* data_P ); virtual void activate( bool activate_P ) = 0; protected: @@ -46,18 +46,18 @@ class KDE_EXPORT Trigger }; class KDE_EXPORT Trigger_list - : public QPtrList< Trigger > + : public TQPtrList< Trigger > { public: - Trigger_list( const QString& comment_P ); // CHECKME nebo i data ? + Trigger_list( const TQString& comment_P ); // CHECKME nebo i data ? Trigger_list( KConfig& cfg_P, Action_data* data_P ); void activate( bool activate_P ); void cfg_write( KConfig& cfg_P ) const; - typedef QPtrListIterator< Trigger > Iterator; - const QString& comment() const; + typedef TQPtrListIterator< Trigger > Iterator; + const TQString& comment() const; Trigger_list* copy( Action_data* data_P ) const; private: - QString _comment; + TQString _comment; KHOTKEYS_DISABLE_COPY( Trigger_list ); }; @@ -71,7 +71,7 @@ class KDE_EXPORT Shortcut_trigger virtual ~Shortcut_trigger(); virtual void cfg_write( KConfig& cfg_P ) const; virtual Shortcut_trigger* copy( Action_data* data_P ) const; - virtual const QString description() const; + virtual const TQString description() const; const KShortcut& shortcut() const; virtual bool handle_key( const KShortcut& shortcut_P ); virtual void activate( bool activate_P ); @@ -80,7 +80,7 @@ class KDE_EXPORT Shortcut_trigger }; class KDE_EXPORT Window_trigger - : public QObject, public Trigger + : public TQObject, public Trigger { Q_OBJECT typedef Trigger base; @@ -101,7 +101,7 @@ class KDE_EXPORT Window_trigger #else virtual Trigger* copy( Action_data* data_P ) const; #endif - virtual const QString description() const; + virtual const TQString description() const; const Windowdef_list* windows() const; bool triggers_on( window_action_t w_action_P ) const; virtual void activate( bool activate_P ); @@ -109,7 +109,7 @@ class KDE_EXPORT Window_trigger Windowdef_list* _windows; int window_actions; void init(); - typedef QMap< WId, bool > Windows_map; + typedef TQMap< WId, bool > Windows_map; Windows_map existing_windows; WId last_active_window; protected slots: @@ -122,45 +122,45 @@ class KDE_EXPORT Window_trigger }; class KDE_EXPORT Gesture_trigger - : public QObject, public Trigger + : public TQObject, public Trigger { Q_OBJECT typedef Trigger base; public: - Gesture_trigger( Action_data* data_P, const QString& gesture_P ); + Gesture_trigger( Action_data* data_P, const TQString& gesture_P ); Gesture_trigger( KConfig& cfg_P, Action_data* data_P ); virtual ~Gesture_trigger(); virtual void cfg_write( KConfig& cfg_P ) const; virtual Trigger* copy( Action_data* data_P ) const; - virtual const QString description() const; - const QString& gesturecode() const; + virtual const TQString description() const; + const TQString& gesturecode() const; virtual void activate( bool activate_P ); protected slots: - void handle_gesture( const QString& gesture_P, WId window_P ); + void handle_gesture( const TQString& gesture_P, WId window_P ); private: - QString _gesturecode; + TQString _gesturecode; }; class KDE_EXPORT Voice_trigger - : public QObject, public Trigger + : public TQObject, public Trigger { Q_OBJECT typedef Trigger base; public: - Voice_trigger( Action_data* data_P, const QString& Voice_P, const VoiceSignature & signature1_P, const VoiceSignature & signature2_P ); + 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 ); virtual ~Voice_trigger(); virtual void cfg_write( KConfig& cfg_P ) const; virtual Trigger* copy( Action_data* data_P ) const; - virtual const QString description() const; - const QString& voicecode() const; + virtual const TQString description() const; + const TQString& voicecode() const; virtual void activate( bool activate_P ); VoiceSignature voicesignature( int ech ) const; public slots: void handle_Voice( ); private: - QString _voicecode; + TQString _voicecode; VoiceSignature _voicesignature[2]; }; @@ -191,14 +191,14 @@ Trigger::~Trigger() // Trigger_list inline -Trigger_list::Trigger_list( const QString& comment_P ) - : QPtrList< Trigger >(), _comment( comment_P ) +Trigger_list::Trigger_list( const TQString& comment_P ) + : TQPtrList< Trigger >(), _comment( comment_P ) { setAutoDelete( true ); } inline -const QString& Trigger_list::comment() const +const TQString& Trigger_list::comment() const { return _comment; } @@ -237,14 +237,14 @@ bool Window_trigger::triggers_on( window_action_t w_action_P ) const // Gesture_trigger inline -const QString& Gesture_trigger::gesturecode() const +const TQString& Gesture_trigger::gesturecode() const { return _gesturecode; } // Voice_trigger inline -const QString& Voice_trigger::voicecode() const +const TQString& Voice_trigger::voicecode() const { return _voicecode; } diff --git a/khotkeys/shared/voices.cpp b/khotkeys/shared/voices.cpp index e0dc95613..a6515fecf 100644 --- a/khotkeys/shared/voices.cpp +++ b/khotkeys/shared/voices.cpp @@ -27,7 +27,7 @@ #include <kdebug.h> #include <kxerrorhandler.h> #include <kkeynative.h> -#include <qtimer.h> +#include <tqtimer.h> #include <kglobalaccel.h> @@ -39,8 +39,8 @@ namespace KHotKeys Voice* voice_handler; -Voice::Voice( bool enabled_P, QObject* parent_P ) - : QObject( parent_P) ,_enabled( enabled_P ), _recording( false ), _recorder(0) +Voice::Voice( bool enabled_P, TQObject* parent_P ) + : TQObject( parent_P) ,_enabled( enabled_P ), _recording( false ), _recorder(0) { assert( voice_handler == NULL ); voice_handler = this; @@ -95,7 +95,7 @@ void Voice::record_start() if(!_recorder) { _recorder= SoundRecorder::create(this); - connect(_recorder, SIGNAL(recorded(const Sound& )), this, SLOT(slot_sound_recorded(const Sound& ))); + connect(_recorder, TQT_SIGNAL(recorded(const Sound& )), this, TQT_SLOT(slot_sound_recorded(const Sound& ))); } _recorder->start(); @@ -125,7 +125,7 @@ void Voice::slot_sound_recorded(const Sound &sound_P) double minimum=800000; double second_minimum=80000; int got_count=0; - QValueList<Voice_trigger*>::Iterator it; + TQValueList<Voice_trigger*>::Iterator it; for ( it = _references.begin(); it != _references.end(); ++it ) { for(int ech=1; ech<=2 ; ech++) @@ -208,7 +208,7 @@ void Voice::set_shortcut( const KShortcut &shortcut) _kga = new KGlobalAccel( this ); _kga->remove("voice"); - _kga->insert( "voice", i18n("Voice"), QString::null, shortcut, 0, this, SLOT(slot_key_pressed())) ; + _kga->insert( "voice", i18n("Voice"), TQString::null, shortcut, 0, this, TQT_SLOT(slot_key_pressed())) ; _kga->updateConnections(); } @@ -223,8 +223,8 @@ void Voice::slot_key_pressed() record_start(); if(!_timer) { - _timer=new QTimer(this); - connect(_timer, SIGNAL(timeout()) , this, SLOT(slot_timeout())); + _timer=new TQTimer(this); + connect(_timer, TQT_SIGNAL(timeout()) , this, TQT_SLOT(slot_timeout())); } _timer->start(1000*20,true); @@ -244,14 +244,14 @@ void Voice::slot_timeout() } -QString Voice::isNewSoundFarEnough(const VoiceSignature& signature, const QString ¤tTrigger) +TQString Voice::isNewSoundFarEnough(const VoiceSignature& signature, const TQString ¤tTrigger) { Voice_trigger *trig=0L; Voice_trigger *sec_trig=0L; double minimum=800000; double second_minimum=80000; int got_count=0; - QValueList<Voice_trigger*>::Iterator it; + TQValueList<Voice_trigger*>::Iterator it; for ( it = _references.begin(); it != _references.end(); ++it ) { Voice_trigger *t=*it; @@ -283,12 +283,12 @@ QString Voice::isNewSoundFarEnough(const VoiceSignature& signature, const QStrin kdDebug(1217) << k_funcinfo << "**** " << trig->voicecode() << " : " << minimum << endl; bool selected=trig && ((got_count==1 && minimum < REJECT_FACTOR_DIFF*0.7 ) || ( minimum < REJECT_FACTOR_DIFF && trig==sec_trig ) ); - return selected ? trig->voicecode() : QString::null; + return selected ? trig->voicecode() : TQString::null; } -bool Voice::doesVoiceCodeExists(const QString &vc) +bool Voice::doesVoiceCodeExists(const TQString &vc) { - QValueList<Voice_trigger*>::Iterator it; + TQValueList<Voice_trigger*>::Iterator it; for ( it = _references.begin(); it != _references.end(); ++it ) { Voice_trigger *t=*it; diff --git a/khotkeys/shared/voices.h b/khotkeys/shared/voices.h index b0193e7c2..89329ba5d 100644 --- a/khotkeys/shared/voices.h +++ b/khotkeys/shared/voices.h @@ -11,7 +11,7 @@ #ifndef VOICES_H_ #define VOICES_H_ -#include <qwidget.h> +#include <tqwidget.h> #include <kshortcut.h> class Sound; @@ -32,7 +32,7 @@ class KDE_EXPORT Voice : public QObject { Q_OBJECT public: - Voice( bool enabled_P, QObject* parent_P ); + Voice( bool enabled_P, TQObject* parent_P ); virtual ~Voice(); void enable( bool enable_P ); @@ -43,12 +43,12 @@ class KDE_EXPORT Voice : public QObject void set_shortcut( const KShortcut &k); /** - * return QString::null is a new signature is far enough from others signature + * return TQString::null is a new signature is far enough from others signature * otherwise, return the stringn which match. */ - QString isNewSoundFarEnough(const VoiceSignature& s, const QString& currentTrigger); + TQString isNewSoundFarEnough(const VoiceSignature& s, const TQString& currentTrigger); - bool doesVoiceCodeExists(const QString &s); + bool doesVoiceCodeExists(const TQString &s); public slots: void record_start(); @@ -60,19 +60,19 @@ class KDE_EXPORT Voice : public QObject void slot_timeout(); signals: - void handle_voice( const QString &voice ); + void handle_voice( const TQString &voice ); private: bool _enabled; bool _recording; - QValueList<Voice_trigger *> _references; + TQValueList<Voice_trigger *> _references; SoundRecorder *_recorder; KShortcut _shortcut; KGlobalAccel *_kga; - QTimer *_timer; + TQTimer *_timer; }; diff --git a/khotkeys/shared/voicesignature.cpp b/khotkeys/shared/voicesignature.cpp index c77c278b3..773f28731 100644 --- a/khotkeys/shared/voicesignature.cpp +++ b/khotkeys/shared/voicesignature.cpp @@ -29,7 +29,7 @@ #include <kdebug.h> -#include <qdatetime.h> +#include <tqdatetime.h> #undef Complex @@ -109,10 +109,10 @@ static inline double hamming(uint n, uint size) } -static QMemArray<double> fft(const Sound& sound, unsigned int start, unsigned int stop) +static TQMemArray<double> fft(const Sound& sound, unsigned int start, unsigned int stop) { if(start>=stop || sound.size() == 0) - return QMemArray<double>(); + return TQMemArray<double>(); //We need a sample with a size of a power of two uint size=stop-start; @@ -146,7 +146,7 @@ static QMemArray<double> fft(const Sound& sound, unsigned int start, unsigned in } //Generate an array to work in - QMemArray<Complex> samples(size); + TQMemArray<Complex> samples(size); //Fill it with samples in the "reversed carry" order int rev_carry = 0; @@ -188,7 +188,7 @@ static QMemArray<double> fft(const Sound& sound, unsigned int start, unsigned in } } - QMemArray<double> result(size); + TQMemArray<double> result(size); for(uint f=0;f<size;f++) { result[f]=samples[f].Mod() / size; @@ -200,10 +200,10 @@ static QMemArray<double> fft(const Sound& sound, unsigned int start, unsigned in -QMemArray<double> VoiceSignature::fft(const Sound& sound, unsigned int start, unsigned int stop) +TQMemArray<double> VoiceSignature::fft(const Sound& sound, unsigned int start, unsigned int stop) { return KHotKeys::fft(sound, start, stop); - /*QMemArray<double> result(8000); + /*TQMemArray<double> result(8000); for(int f=0; f<8000;f++) { Complex c(0); @@ -276,7 +276,7 @@ bool VoiceSignature::window(const Sound& sound, unsigned int *_start, unsigned i VoiceSignature::VoiceSignature(const Sound& sound) { static uint temp_wind=0, temp_fft=0, temp_moy=0; - QTime t; + TQTime t; t.start(); unsigned int start , stop; @@ -296,7 +296,7 @@ VoiceSignature::VoiceSignature(const Sound& sound) unsigned int w_stop =MIN(stop , start+ (int)((wind+1.0+WINDOW_SUPER)*length/WINDOW_NUMBER)); - QMemArray<double> fourrier=fft(sound, w_start,w_stop); + TQMemArray<double> fourrier=fft(sound, w_start,w_stop); temp_fft+=t.restart(); @@ -394,24 +394,24 @@ int VoiceSignature::size2() return FOUR_NUMBER; } -QMap<int, QMap<int, double> > VoiceSignature::pond; +TQMap<int, TQMap<int, double> > VoiceSignature::pond; -void VoiceSignature::write(KConfigBase *cfg, const QString &key) const +void VoiceSignature::write(KConfigBase *cfg, const TQString &key) const { - QStringList sl; + TQStringList sl; for(int x=0;x<WINDOW_NUMBER;x++) for(int y=0;y<FOUR_NUMBER;y++) { - sl.append( QString::number(data[x][y]) ); + sl.append( TQString::number(data[x][y]) ); } cfg->writeEntry(key,sl); } -void VoiceSignature::read(KConfigBase *cfg, const QString &key) +void VoiceSignature::read(KConfigBase *cfg, const TQString &key) { - QStringList sl=cfg->readListEntry(key); + TQStringList sl=cfg->readListEntry(key); for(int x=0;x<WINDOW_NUMBER;x++) for(int y=0;y<FOUR_NUMBER;y++) { diff --git a/khotkeys/shared/voicesignature.h b/khotkeys/shared/voicesignature.h index b4857efd2..82556864f 100644 --- a/khotkeys/shared/voicesignature.h +++ b/khotkeys/shared/voicesignature.h @@ -21,8 +21,8 @@ #define SIGNATURE_H -#include <qmemarray.h> -#include <qmap.h> +#include <tqmemarray.h> +#include <tqmap.h> #include <kdemacros.h> class Sound; @@ -73,9 +73,9 @@ public: VoiceSignature(){} ~VoiceSignature(); - QMap<int, QMap<int, double> > data; + TQMap<int, TQMap<int, double> > data; - static QMap<int, QMap<int, double> > pond; + static TQMap<int, TQMap<int, double> > pond; static float diff(const VoiceSignature &s1, const VoiceSignature &s2); @@ -84,11 +84,11 @@ public: static int size2(); - static QMemArray<double> fft(const Sound& sound, unsigned int start, unsigned int stop); + 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 QString &key) const; - void read(KConfigBase *cfg, const QString &key); + void write(KConfigBase *cfg, const TQString &key) const; + void read(KConfigBase *cfg, const TQString &key); inline bool isNull() const { diff --git a/khotkeys/shared/windows.cpp b/khotkeys/shared/windows.cpp index d269ef2fe..b8e86f694 100644 --- a/khotkeys/shared/windows.cpp +++ b/khotkeys/shared/windows.cpp @@ -17,7 +17,7 @@ #include "windows.h" #include <assert.h> -#include <qregexp.h> +#include <tqregexp.h> #include <kconfig.h> #include <kdebug.h> @@ -37,18 +37,18 @@ namespace KHotKeys // Windows -Windows::Windows( bool enable_signal_P, QObject* parent_P ) - : QObject( parent_P ), signals_enabled( enable_signal_P ), +Windows::Windows( bool enable_signal_P, TQObject* parent_P ) + : TQObject( parent_P ), signals_enabled( enable_signal_P ), kwin_module( new KWinModule( this )), _action_window( 0 ) { assert( windows_handler == NULL ); windows_handler = this; if( signals_enabled ) { - connect( kwin_module, SIGNAL( windowAdded( WId )), SLOT( window_added_slot( WId ))); - connect( kwin_module, SIGNAL( windowRemoved( WId )), SLOT( window_removed_slot( WId ))); - connect( kwin_module, SIGNAL( activeWindowChanged( WId )), - SLOT( active_window_changed_slot( WId ))); + connect( kwin_module, TQT_SIGNAL( windowAdded( WId )), TQT_SLOT( window_added_slot( WId ))); + connect( kwin_module, TQT_SIGNAL( windowRemoved( WId )), TQT_SLOT( window_removed_slot( WId ))); + connect( kwin_module, TQT_SIGNAL( activeWindowChanged( WId )), + TQT_SLOT( active_window_changed_slot( WId ))); } } @@ -91,18 +91,18 @@ void Windows::window_changed_slot( WId window_P, unsigned int flags_P ) emit window_changed( window_P, flags_P ); } -QString Windows::get_window_role( WId id_P ) +TQString Windows::get_window_role( WId id_P ) { // TODO this is probably just a hack return KWin::readNameProperty( id_P, qt_window_role ); } -QString Windows::get_window_class( WId id_P ) +TQString Windows::get_window_class( WId id_P ) { XClassHint hints_ret; if( XGetClassHint( qt_xdisplay(), id_P, &hints_ret ) == 0 ) // 0 means error return ""; - QString ret( hints_ret.res_name ); + TQString ret( hints_ret.res_name ); ret += ' '; ret += hints_ret.res_class; XFree( hints_ret.res_name ); @@ -127,7 +127,7 @@ void Windows::set_action_window( WId window_P ) WId Windows::find_window( const Windowdef_list* window_P ) { - for( QValueList< WId >::ConstIterator it = kwin_module->windows().begin(); + for( TQValueList< WId >::ConstIterator it = kwin_module->windows().begin(); it != kwin_module->windows().end(); ++it ) { @@ -214,7 +214,7 @@ Windowdef::Windowdef( KConfig& cfg_P ) Windowdef* Windowdef::create_cfg_read( KConfig& cfg_P ) { - QString type = cfg_P.readEntry( "Type" ); + TQString type = cfg_P.readEntry( "Type" ); if( type == "SIMPLE" ) return new Windowdef_simple( cfg_P ); kdWarning( 1217 ) << "Unknown Windowdef type read from cfg file\n"; @@ -224,17 +224,17 @@ Windowdef* Windowdef::create_cfg_read( KConfig& cfg_P ) // Windowdef_list Windowdef_list::Windowdef_list( KConfig& cfg_P ) - : QPtrList< Windowdef >() + : TQPtrList< Windowdef >() { setAutoDelete( true ); - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); _comment = cfg_P.readEntry( "Comment" ); int cnt = cfg_P.readNumEntry( "WindowsCount", 0 ); for( int i = 0; i < cnt; ++i ) { - cfg_P.setGroup( save_cfg_group + QString::number( i )); + cfg_P.setGroup( save_cfg_group + TQString::number( i )); Windowdef* window = Windowdef::create_cfg_read( cfg_P ); if( window ) append( window ); @@ -244,13 +244,13 @@ Windowdef_list::Windowdef_list( KConfig& cfg_P ) void Windowdef_list::cfg_write( KConfig& cfg_P ) const { - QString save_cfg_group = cfg_P.group(); + TQString save_cfg_group = cfg_P.group(); int i = 0; for( Iterator it( *this ); it; ++it, ++i ) { - cfg_P.setGroup( save_cfg_group + QString::number( i )); + cfg_P.setGroup( save_cfg_group + TQString::number( i )); it.current()->cfg_write( cfg_P ); } cfg_P.setGroup( save_cfg_group ); @@ -283,9 +283,9 @@ bool Windowdef_list::match( const Window_data& window_P ) const // Windowdef_simple -Windowdef_simple::Windowdef_simple( const QString& comment_P, const QString& title_P, - substr_type_t title_type_P, const QString& wclass_P, substr_type_t wclass_type_P, - const QString& role_P, substr_type_t role_type_P, int window_types_P ) +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( comment_P ), _title( title_P ), title_type( title_type_P ), _wclass( wclass_P ), wclass_type( wclass_type_P ), _role( role_P ), role_type( role_type_P ), _window_types( window_types_P ) @@ -331,7 +331,7 @@ bool Windowdef_simple::match( const Window_data& window_P ) return true; } -bool Windowdef_simple::is_substr_match( const QString& str1_P, const QString& str2_P, +bool Windowdef_simple::is_substr_match( const TQString& str1_P, const TQString& str2_P, substr_type_t type_P ) { switch( type_P ) @@ -344,7 +344,7 @@ bool Windowdef_simple::is_substr_match( const QString& str1_P, const QString& st return str1_P == str2_P; case REGEXP : { - QRegExp rg( str2_P ); + TQRegExp rg( str2_P ); return rg.search( str1_P ) >= 0; } case CONTAINS_NOT : @@ -353,7 +353,7 @@ bool Windowdef_simple::is_substr_match( const QString& str1_P, const QString& st return str1_P != str2_P; case REGEXP_NOT : { - QRegExp rg( str2_P ); + TQRegExp rg( str2_P ); return rg.search( str1_P ) < 0; } } @@ -366,7 +366,7 @@ Windowdef* Windowdef_simple::copy() const wclass_match_type(), role(), role_match_type(), window_types()); } -const QString Windowdef_simple::description() const +const TQString Windowdef_simple::description() const { return i18n( "Window simple: " ) + comment(); } diff --git a/khotkeys/shared/windows.h b/khotkeys/shared/windows.h index f048ce6b9..d145efa87 100644 --- a/khotkeys/shared/windows.h +++ b/khotkeys/shared/windows.h @@ -13,9 +13,9 @@ #include <sys/types.h> -#include <qobject.h> -#include <qstring.h> -#include <qptrlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqptrlist.h> #include <netwm_def.h> @@ -39,10 +39,10 @@ class KDE_EXPORT Windows { Q_OBJECT public: - Windows( bool enable_signals_P, QObject* parent_P ); + Windows( bool enable_signals_P, TQObject* parent_P ); virtual ~Windows(); - QString get_window_class( WId id_P ); - QString get_window_role( WId id_P ); + TQString get_window_class( WId id_P ); + TQString get_window_role( WId id_P ); WId active_window(); void set_action_window( WId window ); WId action_window(); @@ -70,42 +70,42 @@ class KDE_EXPORT Windows struct KDE_EXPORT Window_data { Window_data( WId id_P ); - QString title; // _NET_WM_NAME or WM_NAME - QString role; // WM_WINDOW_ROLE - QString wclass; // WM_CLASS + TQString title; // _NET_WM_NAME or WM_NAME + TQString role; // WM_WINDOW_ROLE + TQString wclass; // WM_CLASS NET::WindowType type; }; class KDE_EXPORT Windowdef { public: - Windowdef( const QString& comment_P ); + Windowdef( const TQString& comment_P ); Windowdef( KConfig& cfg_P ); virtual ~Windowdef(); - const QString& comment() const; + 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; virtual Windowdef* copy( /*Action_data_base* data_P*/ ) const = 0; - virtual const QString description() const = 0; + virtual const TQString description() const = 0; private: - QString _comment; + TQString _comment; KHOTKEYS_DISABLE_COPY( Windowdef ); // CHECKME asi pak udelat i pro vsechny potomky, at se nezapomene }; class KDE_EXPORT Windowdef_list - : public QPtrList< Windowdef > + : public TQPtrList< Windowdef > { public: - Windowdef_list( const QString& comment_P ); + Windowdef_list( const TQString& comment_P ); Windowdef_list( KConfig& cfg_P/*, Action_data_base* data_P*/ ); void cfg_write( KConfig& cfg_P ) const; bool match( const Window_data& window_P ) const; Windowdef_list* copy( /*Action_data_base* data_P*/ ) const; - typedef QPtrListIterator< Windowdef > Iterator; - const QString& comment() const; + typedef TQPtrListIterator< Windowdef > Iterator; + const TQString& comment() const; private: - QString _comment; + TQString _comment; KHOTKEYS_DISABLE_COPY( Windowdef_list ); }; @@ -133,32 +133,32 @@ class KDE_EXPORT Windowdef_simple // WINDOW_TYPE_MENU = ( 1 << NET::Menu ), WINDOW_TYPE_DIALOG = ( 1 << NET::Dialog ) }; - Windowdef_simple( const QString& comment_P, const QString& title_P, - substr_type_t title_type_P, const QString& wclass_P, substr_type_t wclass_type_P, - const QString& role_P, substr_type_t role_type_P, int window_types_P ); + 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 ); virtual bool match( const Window_data& window_P ); virtual void cfg_write( KConfig& cfg_P ) const; - const QString& title() const; + const TQString& title() const; substr_type_t title_match_type() const; - const QString& wclass() const; + const TQString& wclass() const; substr_type_t wclass_match_type() const; - const QString& role() const; + const TQString& role() const; substr_type_t role_match_type() const; int window_types() const; bool type_match( window_type_t type_P ) const; bool type_match( NET::WindowType type_P ) const; virtual Windowdef* copy( /*Action_data_base* data_P*/ ) const; - virtual const QString description() const; + virtual const TQString description() const; protected: - bool is_substr_match( const QString& str1_P, const QString& str2_P, + bool is_substr_match( const TQString& str1_P, const TQString& str2_P, substr_type_t type_P ); private: - QString _title; + TQString _title; substr_type_t title_type; - QString _wclass; + TQString _wclass; substr_type_t wclass_type; - QString _role; + TQString _role; substr_type_t role_type; int _window_types; }; @@ -170,13 +170,13 @@ class KDE_EXPORT Windowdef_simple // Windowdef inline -Windowdef::Windowdef( const QString& comment_P ) +Windowdef::Windowdef( const TQString& comment_P ) : _comment( comment_P ) { } inline -const QString& Windowdef::comment() const +const TQString& Windowdef::comment() const { return _comment; } @@ -189,14 +189,14 @@ Windowdef::~Windowdef() // Windowdef_list inline -Windowdef_list::Windowdef_list( const QString& comment_P ) - : QPtrList< Windowdef >(), _comment( comment_P ) +Windowdef_list::Windowdef_list( const TQString& comment_P ) + : TQPtrList< Windowdef >(), _comment( comment_P ) { setAutoDelete( true ); } inline -const QString& Windowdef_list::comment() const +const TQString& Windowdef_list::comment() const { return _comment; } @@ -204,7 +204,7 @@ const QString& Windowdef_list::comment() const // Windowdef_simple inline -const QString& Windowdef_simple::title() const +const TQString& Windowdef_simple::title() const { return _title; } @@ -216,7 +216,7 @@ Windowdef_simple::substr_type_t Windowdef_simple::title_match_type() const } inline -const QString& Windowdef_simple::wclass() const +const TQString& Windowdef_simple::wclass() const { return _wclass; } @@ -228,7 +228,7 @@ Windowdef_simple::substr_type_t Windowdef_simple::wclass_match_type() const } inline -const QString& Windowdef_simple::role() const +const TQString& Windowdef_simple::role() const { return _role; } diff --git a/khotkeys/update/update.cpp b/khotkeys/update/update.cpp index ac96a9709..c99efda49 100644 --- a/khotkeys/update/update.cpp +++ b/khotkeys/update/update.cpp @@ -39,8 +39,8 @@ int main( int argc, char* argv[] ) KCmdLineArgs::addCmdLineOptions( options ); KApplication app( false, true ); // X11 connection is necessary for KKey* stuff :-/ KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); - QCString id = args->getOption( "id" ); - QString file = locate( "data", "khotkeys/" + id + ".khotkeys" ); + TQCString id = args->getOption( "id" ); + TQString file = locate( "data", "khotkeys/" + id + ".khotkeys" ); if( file.isEmpty()) { kdWarning() << "File " << id << " not found!" << endl; @@ -56,7 +56,7 @@ int main( int argc, char* argv[] ) return 2; } settings.write_settings(); - QByteArray data; + TQByteArray data; kapp->dcopClient()->send( "khotkeys*", "khotkeys", "reread_configuration()", data ); return 0; } |