diff options
Diffstat (limited to 'khotkeys/shared')
-rw-r--r-- | khotkeys/shared/actions.cpp | 8 | ||||
-rw-r--r-- | khotkeys/shared/gestures.cpp | 4 | ||||
-rw-r--r-- | khotkeys/shared/gestures.h | 2 | ||||
-rw-r--r-- | khotkeys/shared/input.cpp | 22 | ||||
-rw-r--r-- | khotkeys/shared/input.h | 4 | ||||
-rw-r--r-- | khotkeys/shared/khlistbox.h | 2 | ||||
-rw-r--r-- | khotkeys/shared/khotkeysglobal.cpp | 2 | ||||
-rw-r--r-- | khotkeys/shared/settings.cpp | 2 | ||||
-rw-r--r-- | khotkeys/shared/sound.cpp | 68 | ||||
-rw-r--r-- | khotkeys/shared/sound.h | 4 | ||||
-rw-r--r-- | khotkeys/shared/soundrecorder.h | 2 | ||||
-rw-r--r-- | khotkeys/shared/triggers.cpp | 8 | ||||
-rw-r--r-- | khotkeys/shared/voices.cpp | 4 | ||||
-rw-r--r-- | khotkeys/shared/voices.h | 2 | ||||
-rw-r--r-- | khotkeys/shared/windows.cpp | 4 | ||||
-rw-r--r-- | khotkeys/shared/windows.h | 2 |
16 files changed, 70 insertions, 70 deletions
diff --git a/khotkeys/shared/actions.cpp b/khotkeys/shared/actions.cpp index e37ef395f..a58b85c8c 100644 --- a/khotkeys/shared/actions.cpp +++ b/khotkeys/shared/actions.cpp @@ -124,7 +124,7 @@ void Command_url_action::execute() kapp->propagateSessionManager(); sm_ready = true; } -// int space_pos = command_url().find( ' ' ); +// int space_pos = command_url().tqfind( ' ' ); // if( command_url()[ 0 ] != '\'' && command_url()[ 0 ] != '"' && space_pos > -1 // && command_url()[ space_pos - 1 ] != '\\' ) // cmd = command_url().left( space_pos ); // get first 'word' @@ -286,7 +286,7 @@ void Dcop_action::execute() // one word if( pos != 0 ) args_str = args_str.mid( pos ); - int nxt_pos = args_str.find( ' ' ); + int nxt_pos = args_str.tqfind( ' ' ); args_list.append( args_str.left( nxt_pos )); // should be ok if nxt_pos is -1 args_str = nxt_pos >= 0 ? args_str.mid( nxt_pos ) : ""; } @@ -372,7 +372,7 @@ void Keyboard_input_action::execute() w = InputFocus; } int last_index = -1, start = 0; - while(( last_index = input().find( ':', last_index + 1 )) != -1 ) // find next ';' + while(( last_index = input().tqfind( ':', last_index + 1 )) != -1 ) // find next ';' { TQString key = input().mid( start, last_index - start ).stripWhiteSpace(); if( key == "Enter" && KKey( key ).keyCodeQt() == 0 ) @@ -391,7 +391,7 @@ void Keyboard_input_action::execute() TQString Keyboard_input_action::description() const { TQString tmp = input(); - tmp.replace( '\n', ' ' ); + tmp.tqreplace( '\n', ' ' ); tmp.truncate( 30 ); return i18n( "Keyboard input : " ) + tmp; } diff --git a/khotkeys/shared/gestures.cpp b/khotkeys/shared/gestures.cpp index 60b1d93b4..620d8d2ed 100644 --- a/khotkeys/shared/gestures.cpp +++ b/khotkeys/shared/gestures.cpp @@ -105,7 +105,7 @@ void Gesture::active_window_changed( WId ) void Gesture::register_handler( TQObject* receiver_P, const char* slot_P ) { - if( handlers.contains( receiver_P )) + if( handlers.tqcontains( receiver_P )) return; handlers[ receiver_P ] = true; connect( this, TQT_SIGNAL( handle_gesture( const TQString&, WId )), @@ -116,7 +116,7 @@ void Gesture::register_handler( TQObject* receiver_P, const char* slot_P ) void Gesture::unregister_handler( TQObject* receiver_P, const char* slot_P ) { - if( !handlers.contains( receiver_P )) + if( !handlers.tqcontains( receiver_P )) return; handlers.remove( receiver_P ); disconnect( this, TQT_SIGNAL( handle_gesture( const TQString&, WId )), diff --git a/khotkeys/shared/gestures.h b/khotkeys/shared/gestures.h index d423be8a6..4f0f3f94c 100644 --- a/khotkeys/shared/gestures.h +++ b/khotkeys/shared/gestures.h @@ -101,7 +101,7 @@ class KDE_EXPORT Gesture // 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 + : public TQObject { Q_OBJECT public: diff --git a/khotkeys/shared/input.cpp b/khotkeys/shared/input.cpp index f9bfec6d3..90e789282 100644 --- a/khotkeys/shared/input.cpp +++ b/khotkeys/shared/input.cpp @@ -55,7 +55,7 @@ Kbd::~Kbd() void Kbd::insert_item( const KShortcut& shortcut_P, Kbd_receiver* receiver_P ) { - Receiver_data& rcv = receivers[ receiver_P ]; + Receiver_data& rcv = tqreceivers[ receiver_P ]; rcv.shortcuts.append( shortcut_P ); if( rcv.active ) grab_shortcut( shortcut_P ); @@ -63,17 +63,17 @@ void Kbd::insert_item( const KShortcut& shortcut_P, Kbd_receiver* receiver_P ) void Kbd::remove_item( const KShortcut& shortcut_P, Kbd_receiver* receiver_P ) { - Receiver_data& rcv = receivers[ receiver_P ]; + Receiver_data& rcv = tqreceivers[ receiver_P ]; rcv.shortcuts.remove( shortcut_P ); if( rcv.active ) ungrab_shortcut( shortcut_P ); if( rcv.shortcuts.count() == 0 ) - receivers.remove( receiver_P ); + tqreceivers.remove( receiver_P ); } void Kbd::activate_receiver( Kbd_receiver* receiver_P ) { - Receiver_data& rcv = receivers[ receiver_P ]; + Receiver_data& rcv = tqreceivers[ receiver_P ]; if( rcv.active ) return; rcv.active = true; @@ -85,7 +85,7 @@ void Kbd::activate_receiver( Kbd_receiver* receiver_P ) void Kbd::deactivate_receiver( Kbd_receiver* receiver_P ) { - Receiver_data& rcv = receivers[ receiver_P ]; + Receiver_data& rcv = tqreceivers[ receiver_P ]; if( !rcv.active ) return; rcv.active = false; @@ -97,7 +97,7 @@ void Kbd::deactivate_receiver( Kbd_receiver* receiver_P ) void Kbd::grab_shortcut( const KShortcut& shortcut_P ) { - if( grabs.contains( shortcut_P )) + if( grabs.tqcontains( shortcut_P )) ++grabs[ shortcut_P ]; else { @@ -117,7 +117,7 @@ void Kbd::grab_shortcut( const KShortcut& shortcut_P ) void Kbd::ungrab_shortcut( const KShortcut& shortcut_P ) { - if( !grabs.contains( shortcut_P )) + if( !grabs.tqcontains( shortcut_P )) return; if( --grabs[ shortcut_P ] == 0 ) { @@ -142,12 +142,12 @@ void Kbd::key_slot( TQString key_P ) { kdDebug( 1217 ) << "Key pressed:" << key_P << endl; KShortcut shortcut( key_P ); - if( !grabs.contains( shortcut )) + if( !grabs.tqcontains( shortcut )) return; - for( TQMap< Kbd_receiver*, Receiver_data >::ConstIterator it = receivers.begin(); - it != receivers.end(); + for( TQMap< Kbd_receiver*, Receiver_data >::ConstIterator it = tqreceivers.begin(); + it != tqreceivers.end(); ++it ) - if( ( *it ).shortcuts.contains( shortcut ) && ( *it ).active + if( ( *it ).shortcuts.tqcontains( shortcut ) && ( *it ).active && it.key()->handle_key( shortcut )) return; } diff --git a/khotkeys/shared/input.h b/khotkeys/shared/input.h index 22df89284..a9f19240d 100644 --- a/khotkeys/shared/input.h +++ b/khotkeys/shared/input.h @@ -33,7 +33,7 @@ class Kbd_receiver }; class Kbd - : public QObject + : public TQObject { Q_OBJECT public: @@ -58,7 +58,7 @@ class Kbd TQValueList< KShortcut > shortcuts; bool active; }; - TQMap< Kbd_receiver*, Receiver_data > receivers; + TQMap< Kbd_receiver*, Receiver_data > tqreceivers; TQMap< KShortcut, int > grabs; KGlobalAccel* kga; }; diff --git a/khotkeys/shared/khlistbox.h b/khotkeys/shared/khlistbox.h index ddb988c36..ad2cdb3b6 100644 --- a/khotkeys/shared/khlistbox.h +++ b/khotkeys/shared/khlistbox.h @@ -19,7 +19,7 @@ namespace KHotKeys { class KHListBox - : public QListBox + : public TQListBox { Q_OBJECT Q_PROPERTY( bool forceSelect READ forceSelect WRITE setForceSelect ) diff --git a/khotkeys/shared/khotkeysglobal.cpp b/khotkeys/shared/khotkeysglobal.cpp index 4c6b8360c..8eb159d3c 100644 --- a/khotkeys/shared/khotkeysglobal.cpp +++ b/khotkeys/shared/khotkeysglobal.cpp @@ -65,7 +65,7 @@ TQString get_menu_entry_from_path( const TQString& path_P ) for( TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it ) - if( path_P.find( *it ) == 0 ) + if( path_P.tqfind( *it ) == 0 ) { TQString ret = path_P; ret.remove( 0, (*it).length()); diff --git a/khotkeys/shared/settings.cpp b/khotkeys/shared/settings.cpp index fdab2be56..a6434be06 100644 --- a/khotkeys/shared/settings.cpp +++ b/khotkeys/shared/settings.cpp @@ -63,7 +63,7 @@ bool Settings::read_settings( KConfig& cfg_P, bool include_disabled_P, ImportTyp TQString import_id = cfg_P.readEntry( "ImportId" ); if( !import_id.isEmpty()) { - if( already_imported.contains( import_id )) + if( already_imported.tqcontains( import_id )) { if( import_P == ImportSilent || KMessageBox::warningContinueCancel( NULL, diff --git a/khotkeys/shared/sound.cpp b/khotkeys/shared/sound.cpp index c90eb2e02..cb2ef54d1 100644 --- a/khotkeys/shared/sound.cpp +++ b/khotkeys/shared/sound.cpp @@ -50,7 +50,7 @@ Sound::~Sound() void Sound::load(const TQString& filename) { kdDebug() << k_funcinfo << filename << endl; - data=TQMemArray<Q_INT32>(); + data=TQMemArray<TQ_INT32>(); TQFile file(filename); if(!file.open(IO_ReadOnly)) { @@ -59,20 +59,20 @@ void Sound::load(const TQString& filename) } TQDataStream stream(&file); stream.setByteOrder( TQDataStream::LittleEndian ); - Q_INT32 magic; + TQ_INT32 magic; MAGIC("RIFF"); - READ_FROM_STREAM(Q_UINT32,ChunkSize); + READ_FROM_STREAM(TQ_UINT32,ChunkSize); MAGIC("WAVE"); MAGIC("fmt "); - READ_FROM_STREAM(Q_UINT32,ChunkSize2); - READ_FROM_STREAM(Q_INT16,AudioFormat); - READ_FROM_STREAM(Q_UINT16,NumberOfChannels); - READ_FROM_STREAM(Q_UINT32,SampleRate); + READ_FROM_STREAM(TQ_UINT32,ChunkSize2); + READ_FROM_STREAM(TQ_INT16,AudioFormat); + READ_FROM_STREAM(TQ_UINT16,NumberOfChannels); + READ_FROM_STREAM(TQ_UINT32,SampleRate); _fs=SampleRate; - READ_FROM_STREAM(Q_UINT32,ByteRate); - READ_FROM_STREAM(Q_UINT16,BlockAlign); - READ_FROM_STREAM(Q_UINT16,BitsPerSample); + READ_FROM_STREAM(TQ_UINT32,ByteRate); + READ_FROM_STREAM(TQ_UINT16,BlockAlign); + READ_FROM_STREAM(TQ_UINT16,BitsPerSample); MAGIC("data"); READ_FROM_STREAM(TQByteArray,SoundData); NumberOfChannels=1; //Wav i play are broken @@ -90,10 +90,10 @@ void Sound::load(const TQString& filename) max=0; for(unsigned long int f=0;f<NumberOfSamples;f++) { - Q_INT32 nb=0; + TQ_INT32 nb=0; for(uint k=0;k<BytePS;k++) { - nb |= (SoundData[f*BytePS+k]&0x000000FF) << (k*8); + nb |= (SoundData.at(f*BytePS+k)&0x000000FF) << (k*8); } if(nb & (1 << (BytePS*8 -1)) ) nb = nb-(1<<BytePS*8); @@ -110,7 +110,7 @@ void Sound::load(const TQString& filename) } -#define SMAGIC(CH) { stream << ( Q_INT32) ( (CH)[0] | (CH)[1]<<8 | (CH)[2]<< 16 | (CH)[3] << 24 ) ; } +#define SMAGIC(CH) { stream << ( TQ_INT32) ( (CH)[0] | (CH)[1]<<8 | (CH)[2]<< 16 | (CH)[3] << 24 ) ; } void Sound::save(const TQString& filename) const { @@ -129,35 +129,35 @@ void Sound::save(const TQString& filename) const for(unsigned long int f=0;f<data.size();f++) { - Q_UINT16 val= (signed short int) ( (data.at(f) * ((double)(1<<13)/(signed)max) ) ); - SoundData[ 2*f ]= val & 0x00FF; - SoundData[2*f+1]= (val & 0xFF00) >> 8; + TQ_UINT16 val= (signed short int) ( (data.at(f) * ((double)(1<<13)/(signed)max) ) ); + SoundData.tqat( 2*f )= val & 0x00FF; + SoundData.tqat(2*f+1)= (val & 0xFF00) >> 8; // kdDebug( 1217 ) << k_funcinfo << data.at(f) << " / " << max << " = " << val << " | " << SoundData[ 2*f ] << " "<< SoundData[ 2*f+1 ] << endl; } - Q_UINT16 NumberOfChannels=2; - Q_UINT32 SampleRate=_fs; + TQ_UINT16 NumberOfChannels=2; + TQ_UINT32 SampleRate=_fs; SMAGIC("RIFF"); - //READ_FROM_STREAM(Q_UINT32,ChunkSize); - stream << (Q_UINT32)(36+ SoundData.size()); + //READ_FROM_STREAM(TQ_UINT32,ChunkSize); + stream << (TQ_UINT32)(36+ SoundData.size()); SMAGIC("WAVE"); SMAGIC("fmt "); - //READ_FROM_STREAM(Q_UINT32,ChunkSize2); - stream << (Q_UINT32)(16); - //READ_FROM_STREAM(Q_INT16,AudioFormat); - stream << (Q_INT16)(1); - //READ_FROM_STREAM(Q_UINT16,NumberOfChannels); - stream << (Q_UINT16)(NumberOfChannels); - //READ_FROM_STREAM(Q_UINT32,SampleRate); - stream << (Q_UINT32)(SampleRate); - //READ_FROM_STREAM(Q_UINT32,ByteRate); - stream << (Q_UINT32)(NumberOfChannels*SampleRate*16/8); - //READ_FROM_STREAM(Q_UINT16,BlockAlign); - stream << (Q_UINT16)(16/8 *NumberOfChannels); - //READ_FROM_STREAM(Q_UINT16,BitsPerSample); - stream << (Q_UINT16)(16); + //READ_FROM_STREAM(TQ_UINT32,ChunkSize2); + stream << (TQ_UINT32)(16); + //READ_FROM_STREAM(TQ_INT16,AudioFormat); + stream << (TQ_INT16)(1); + //READ_FROM_STREAM(TQ_UINT16,NumberOfChannels); + stream << (TQ_UINT16)(NumberOfChannels); + //READ_FROM_STREAM(TQ_UINT32,SampleRate); + stream << (TQ_UINT32)(SampleRate); + //READ_FROM_STREAM(TQ_UINT32,ByteRate); + stream << (TQ_UINT32)(NumberOfChannels*SampleRate*16/8); + //READ_FROM_STREAM(TQ_UINT16,BlockAlign); + stream << (TQ_UINT16)(16/8 *NumberOfChannels); + //READ_FROM_STREAM(TQ_UINT16,BitsPerSample); + stream << (TQ_UINT16)(16); SMAGIC("data"); //READ_FROM_STREAM(TQByteArray,SoundData); stream << SoundData; diff --git a/khotkeys/shared/sound.h b/khotkeys/shared/sound.h index 2c2d97d93..6453563de 100644 --- a/khotkeys/shared/sound.h +++ b/khotkeys/shared/sound.h @@ -50,8 +50,8 @@ public: return _fs; } - TQMemArray<Q_INT32> data; - Q_UINT32 max; + TQMemArray<TQ_INT32> data; + TQ_UINT32 max; uint _fs; }; diff --git a/khotkeys/shared/soundrecorder.h b/khotkeys/shared/soundrecorder.h index c00f73527..c7e55fc22 100644 --- a/khotkeys/shared/soundrecorder.h +++ b/khotkeys/shared/soundrecorder.h @@ -34,7 +34,7 @@ namespace KHotKeys /** @author Olivier Goffart */ -class KDE_EXPORT SoundRecorder : public QObject +class KDE_EXPORT SoundRecorder : public TQObject { Q_OBJECT public: diff --git a/khotkeys/shared/triggers.cpp b/khotkeys/shared/triggers.cpp index 7cac2b98c..b3042f00f 100644 --- a/khotkeys/shared/triggers.cpp +++ b/khotkeys/shared/triggers.cpp @@ -225,7 +225,7 @@ void Window_trigger::window_added( WId window_P ) void Window_trigger::window_removed( WId window_P ) { - if( existing_windows.contains( window_P )) + if( existing_windows.tqcontains( window_P )) { bool matches = existing_windows[ window_P ]; kdDebug( 1217 ) << "Window_trigger::w_removed() : " << matches << endl; @@ -244,7 +244,7 @@ void Window_trigger::window_removed( WId window_P ) void Window_trigger::active_window_changed( WId window_P ) { bool was_match = false; - if( existing_windows.contains( last_active_window )) + if( existing_windows.tqcontains( last_active_window )) was_match = existing_windows[ last_active_window ]; if( active && was_match && ( window_actions & WINDOW_DEACTIVATES )) { @@ -253,7 +253,7 @@ void Window_trigger::active_window_changed( WId window_P ) } /* bool matches = windows()->match( Window_data( window_P )); existing_windows[ window_P ] = matches;*/ - bool matches = existing_windows.contains( window_P ) + bool matches = existing_windows.tqcontains( window_P ) ? existing_windows[ window_P ] : false; if( active && matches && ( window_actions & WINDOW_ACTIVATES )) { @@ -272,7 +272,7 @@ void Window_trigger::window_changed( WId window_P, unsigned int dirty_P ) return; kdDebug( 1217 ) << "Window_trigger::w_changed()" << endl; bool was_match = false; - if( existing_windows.contains( window_P )) + if( existing_windows.tqcontains( window_P )) was_match = existing_windows[ window_P ]; bool matches = windows()->match( Window_data( window_P )); existing_windows[ window_P ] = matches; diff --git a/khotkeys/shared/voices.cpp b/khotkeys/shared/voices.cpp index a6515fecf..e19f66eec 100644 --- a/khotkeys/shared/voices.cpp +++ b/khotkeys/shared/voices.cpp @@ -79,7 +79,7 @@ void Voice::enable( bool enabled_P ) void Voice::register_handler( Voice_trigger *trigger_P ) { - if( !_references.contains( trigger_P )) + if( !_references.tqcontains( trigger_P )) _references.append(trigger_P); } @@ -179,7 +179,7 @@ void Voice::slot_sound_recorded(const Sound &sound_P) //kdDebug(1217) << k_funcinfo << keyNative.key().toString() << endl; - if(_shortcut.contains(keyNative)) + if(_shortcut.tqcontains(keyNative)) { if(pEvent->type == XKeyPress && !_recording ) { diff --git a/khotkeys/shared/voices.h b/khotkeys/shared/voices.h index f03d2b040..0f8496d8a 100644 --- a/khotkeys/shared/voices.h +++ b/khotkeys/shared/voices.h @@ -28,7 +28,7 @@ class Voice_trigger; class VoiceSignature; -class KDE_EXPORT Voice : public QObject +class KDE_EXPORT Voice : public TQObject { Q_OBJECT public: diff --git a/khotkeys/shared/windows.cpp b/khotkeys/shared/windows.cpp index b8e86f694..a1394b731 100644 --- a/khotkeys/shared/windows.cpp +++ b/khotkeys/shared/windows.cpp @@ -339,7 +339,7 @@ bool Windowdef_simple::is_substr_match( const TQString& str1_P, const TQString& case NOT_IMPORTANT : return true; case CONTAINS : - return str1_P.contains( str2_P ) > 0; + return str1_P.tqcontains( str2_P ) > 0; case IS : return str1_P == str2_P; case REGEXP : @@ -348,7 +348,7 @@ bool Windowdef_simple::is_substr_match( const TQString& str1_P, const TQString& return rg.search( str1_P ) >= 0; } case CONTAINS_NOT : - return str1_P.contains( str2_P ) == 0; + return str1_P.tqcontains( str2_P ) == 0; case IS_NOT : return str1_P != str2_P; case REGEXP_NOT : diff --git a/khotkeys/shared/windows.h b/khotkeys/shared/windows.h index d145efa87..8aad308c9 100644 --- a/khotkeys/shared/windows.h +++ b/khotkeys/shared/windows.h @@ -35,7 +35,7 @@ class Windowdef_list; /*class Action_data_base;*/ class KDE_EXPORT Windows - : public QObject + : public TQObject { Q_OBJECT public: |