diff options
Diffstat (limited to 'khotkeys/shared')
-rw-r--r-- | khotkeys/shared/actions.cpp | 2 | ||||
-rw-r--r-- | khotkeys/shared/gestures.cpp | 8 | ||||
-rw-r--r-- | khotkeys/shared/input.cpp | 22 | ||||
-rw-r--r-- | khotkeys/shared/input.h | 2 | ||||
-rw-r--r-- | khotkeys/shared/settings.cpp | 2 | ||||
-rw-r--r-- | khotkeys/shared/sound.cpp | 62 | ||||
-rw-r--r-- | khotkeys/shared/sound.h | 4 | ||||
-rw-r--r-- | khotkeys/shared/triggers.cpp | 8 | ||||
-rw-r--r-- | khotkeys/shared/voices.cpp | 4 | ||||
-rw-r--r-- | khotkeys/shared/voicesignature.cpp | 10 | ||||
-rw-r--r-- | khotkeys/shared/windows.cpp | 4 |
11 files changed, 64 insertions, 64 deletions
diff --git a/khotkeys/shared/actions.cpp b/khotkeys/shared/actions.cpp index e37ef395f..f58c7e308 100644 --- a/khotkeys/shared/actions.cpp +++ b/khotkeys/shared/actions.cpp @@ -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..28560e03d 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 )), @@ -197,7 +197,7 @@ void Gesture::grab_mouse( bool grab_P ) if( grab_P ) { KXErrorHandler handler; - static int mask[] = { 0, Button1MotionMask, Button2MotionMask, Button3MotionMask, + static int tqmask[] = { 0, Button1MotionMask, Button2MotionMask, Button3MotionMask, Button4MotionMask, Button5MotionMask, ButtonMotionMask, ButtonMotionMask, ButtonMotionMask, ButtonMotionMask }; #define XCapL KKeyNative::modXLock() @@ -216,7 +216,7 @@ void Gesture::grab_mouse( bool grab_P ) i < 8; ++i ) XGrabButton( qt_xdisplay(), button, mods[ i ], qt_xrootwin(), False, - ButtonPressMask | ButtonReleaseMask | mask[ button ], GrabModeAsync, GrabModeAsync, + ButtonPressMask | ButtonReleaseMask | tqmask[ button ], GrabModeAsync, GrabModeAsync, None, None ); bool err = handler.error( true ); kdDebug( 1217 ) << "Gesture grab:" << err << endl; 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..eff131c44 100644 --- a/khotkeys/shared/input.h +++ b/khotkeys/shared/input.h @@ -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/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..ddaec44b8 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,7 +90,7 @@ 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); @@ -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) ) ); + TQ_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; // 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/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/voicesignature.cpp b/khotkeys/shared/voicesignature.cpp index 773f28731..4f4266b7e 100644 --- a/khotkeys/shared/voicesignature.cpp +++ b/khotkeys/shared/voicesignature.cpp @@ -154,14 +154,14 @@ static TQMemArray<double> fft(const Sound& sound, unsigned int start, unsigned i { samples[f]=sound.at(start2+rev_carry)* hamming(rev_carry, size); // KDEBUG(rev_carry); - int mask = size>>1; // N / 2 + int tqmask = size>>1; // N / 2 // add 1 backwards - while (rev_carry >= mask) + while (rev_carry >= tqmask) { - rev_carry -= mask; // turn off this bit - mask >>= 1; + rev_carry -= tqmask; // turn off this bit + tqmask >>= 1; } - rev_carry += mask; + rev_carry += tqmask; } samples[size-1]=sound.at(start2+size-1)*hamming(size-1, size); 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 : |