summaryrefslogtreecommitdiffstats
path: root/khexedit/lib/controller
diff options
context:
space:
mode:
Diffstat (limited to 'khexedit/lib/controller')
-rw-r--r--khexedit/lib/controller/kchareditor.cpp4
-rw-r--r--khexedit/lib/controller/keditor.cpp20
-rw-r--r--khexedit/lib/controller/knavigator.cpp22
-rw-r--r--khexedit/lib/controller/ktabcontroller.cpp4
-rw-r--r--khexedit/lib/controller/kvalueeditor.cpp22
5 files changed, 36 insertions, 36 deletions
diff --git a/khexedit/lib/controller/kchareditor.cpp b/khexedit/lib/controller/kchareditor.cpp
index 7225ec7..9f58245 100644
--- a/khexedit/lib/controller/kchareditor.cpp
+++ b/khexedit/lib/controller/kchareditor.cpp
@@ -39,9 +39,9 @@ bool KCharEditor::handleKeyPress( TQKeyEvent *KeyEvent )
bool KeyUsed = false;
// some input that should be inserted?
if( KeyEvent->text().length() > 0
- && !(KeyEvent->state()&( Qt::ControlButton | Qt::AltButton | Qt::MetaButton )) )
+ && !(KeyEvent->state()&( TQt::ControlButton | TQt::AltButton | TQt::MetaButton )) )
{
- TQChar C = KeyEvent->text()[0];
+ TQChar C = TQString(KeyEvent->text())[0];
if( C.isPrint() )
{
TQByteArray D( 1 );
diff --git a/khexedit/lib/controller/keditor.cpp b/khexedit/lib/controller/keditor.cpp
index 5678b09..02b9129 100644
--- a/khexedit/lib/controller/keditor.cpp
+++ b/khexedit/lib/controller/keditor.cpp
@@ -38,9 +38,9 @@ KEditor::KEditor( KBufferCursor *BC, KHexEdit* HE, KController *P )
bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent )
{
bool clearUndoRedoInfo = true;
- bool ShiftPressed = KeyEvent->state() & Qt::ShiftButton;
- bool ControlPressed = KeyEvent->state() & Qt::ControlButton;
- bool AltPressed = KeyEvent->state() & Qt::AltButton;
+ bool ShiftPressed = KeyEvent->state() & TQt::ShiftButton;
+ bool ControlPressed = KeyEvent->state() & TQt::ControlButton;
+ bool AltPressed = KeyEvent->state() & TQt::AltButton;
bool KeyUsed = true;
// we only care for cursor keys and the like, won't hardcode any other keys
@@ -49,7 +49,7 @@ bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent )
// in each command anyway
switch( KeyEvent->key() )
{
- case Qt::Key_Delete:
+ case TQt::Key_Delete:
if( ShiftPressed )
HexEdit->cut();
else if( HexEdit->BufferRanges->hasSelection() )
@@ -61,7 +61,7 @@ bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent )
}
break;
- case Qt::Key_Insert:
+ case TQt::Key_Insert:
if( ShiftPressed )
HexEdit->paste();
else if( ControlPressed )
@@ -70,7 +70,7 @@ bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent )
HexEdit->setOverwriteMode( !HexEdit->OverWrite );
break;
- case Qt::Key_Backspace:
+ case TQt::Key_Backspace:
if( AltPressed )
{
if( ControlPressed )
@@ -95,13 +95,13 @@ bool KEditor::handleKeyPress( TQKeyEvent *KeyEvent )
doEditAction( ControlPressed ? WordBackspace : CharBackspace );
clearUndoRedoInfo = false;
break;
- case Qt::Key_F16: // "Copy" key on Sun keyboards
+ case TQt::Key_F16: // "Copy" key on Sun keyboards
HexEdit->copy();
break;
- case Qt::Key_F18: // "Paste" key on Sun keyboards
+ case TQt::Key_F18: // "Paste" key on Sun keyboards
HexEdit->paste();
break;
- case Qt::Key_F20: // "Cut" key on Sun keyboards
+ case TQt::Key_F20: // "Cut" key on Sun keyboards
HexEdit->cut();
break;
@@ -187,7 +187,7 @@ void KEditor::doEditAction( KEditAction Action )
}
}
- HexEdit->repaintChanged();
+ HexEdit->tqrepaintChanged();
HexEdit->ensureCursorVisible();
HexEdit->unpauseCursor();
diff --git a/khexedit/lib/controller/knavigator.cpp b/khexedit/lib/controller/knavigator.cpp
index d865d12..3258ce9 100644
--- a/khexedit/lib/controller/knavigator.cpp
+++ b/khexedit/lib/controller/knavigator.cpp
@@ -39,8 +39,8 @@ bool KNavigator::handleKeyPress( TQKeyEvent *KeyEvent )
bool KeyUsed = true;
//bool clearUndoRedoInfo = true;
- bool ShiftPressed = KeyEvent->state() & Qt::ShiftButton;
- bool ControlPressed = KeyEvent->state() & Qt::ControlButton;
+ bool ShiftPressed = KeyEvent->state() & TQt::ShiftButton;
+ bool ControlPressed = KeyEvent->state() & TQt::ControlButton;
//bool AltPressed = KeyEvent->state() & AltButton;
// we only care for cursor keys and the like, won't hardcode any other keys
@@ -49,28 +49,28 @@ bool KNavigator::handleKeyPress( TQKeyEvent *KeyEvent )
// in each command anyway
switch( KeyEvent->key() )
{
- case Qt::Key_Left:
+ case TQt::Key_Left:
moveCursor( ControlPressed ? MoveWordBackward : MoveBackward, ShiftPressed );
break;
- case Qt::Key_Right:
+ case TQt::Key_Right:
moveCursor( ControlPressed ? MoveWordForward : MoveForward, ShiftPressed );
break;
- case Qt::Key_Up:
+ case TQt::Key_Up:
moveCursor( ControlPressed ? MovePgUp : MoveUp, ShiftPressed );
break;
- case Qt::Key_Down:
+ case TQt::Key_Down:
moveCursor( ControlPressed ? MovePgDown : MoveDown, ShiftPressed );
break;
- case Qt::Key_Home:
+ case TQt::Key_Home:
moveCursor( ControlPressed ? MoveHome : MoveLineStart, ShiftPressed );
break;
- case Qt::Key_End:
+ case TQt::Key_End:
moveCursor( ControlPressed ? MoveEnd : MoveLineEnd, ShiftPressed );
break;
- case Qt::Key_Prior:
+ case TQt::Key_Prior:
moveCursor( MovePgUp, ShiftPressed );
break;
- case Qt::Key_Next:
+ case TQt::Key_Next:
moveCursor( MovePgDown, ShiftPressed );
break;
@@ -127,7 +127,7 @@ void KNavigator::moveCursor( KMoveAction Action, bool Select )
if( Select )
BufferRanges->setSelectionEnd( BufferCursor->realIndex() );
- HexEdit->repaintChanged();
+ HexEdit->tqrepaintChanged();
HexEdit->ensureCursorVisible();
HexEdit->unpauseCursor();
diff --git a/khexedit/lib/controller/ktabcontroller.cpp b/khexedit/lib/controller/ktabcontroller.cpp
index 0531b2c..401be04 100644
--- a/khexedit/lib/controller/ktabcontroller.cpp
+++ b/khexedit/lib/controller/ktabcontroller.cpp
@@ -37,9 +37,9 @@ bool KTabController::handleKeyPress( TQKeyEvent *KeyEvent )
{
bool KeyUsed = false;
- bool ShiftPressed = KeyEvent->state() & Qt::ShiftButton;
+ bool ShiftPressed = KeyEvent->state() & TQt::ShiftButton;
- if( KeyEvent->key() == Qt::Key_Tab )
+ if( KeyEvent->key() == TQt::Key_Tab )
{
// are we in the char column?
if( HexEdit->cursorColumn() == KHexEdit::CharColumnId )
diff --git a/khexedit/lib/controller/kvalueeditor.cpp b/khexedit/lib/controller/kvalueeditor.cpp
index 3bf4c9b..4f32789 100644
--- a/khexedit/lib/controller/kvalueeditor.cpp
+++ b/khexedit/lib/controller/kvalueeditor.cpp
@@ -46,29 +46,29 @@ bool KValueEditor::handleKeyPress( TQKeyEvent *KeyEvent )
//
switch( KeyEvent->key() )
{
- case Qt::Key_Plus:
+ case TQt::Key_Plus:
doValueEditAction( IncValue );
break;
- case Qt::Key_Minus:
+ case TQt::Key_Minus:
doValueEditAction( DecValue );
break;
- case Qt::Key_Space:
+ case TQt::Key_Space:
if( !InEditMode )
{
KeyUsed = false;
break;
}
- case Qt::Key_Enter:
- case Qt::Key_Return:
+ case TQt::Key_Enter:
+ case TQt::Key_Return:
doValueEditAction( InEditMode?LeaveValue:EnterValue );
break;
- case Qt::Key_Escape:
+ case TQt::Key_Escape:
if( InEditMode )
doValueEditAction( CancelValue );
else
KeyUsed = false;
break;
- case Qt::Key_Backspace:
+ case TQt::Key_Backspace:
if( InEditMode )
doValueEditAction( ValueBackspace );
else
@@ -77,9 +77,9 @@ bool KValueEditor::handleKeyPress( TQKeyEvent *KeyEvent )
default:
// is plain char?
if( KeyEvent->text().length() > 0
- && ( !(KeyEvent->state()&( Qt::ControlButton | Qt::AltButton | Qt::MetaButton )) ) )
+ && ( !(KeyEvent->state()&( TQt::ControlButton | TQt::AltButton | TQt::MetaButton )) ) )
{
- TQChar C = KeyEvent->text()[0];
+ TQChar C = TQString(KeyEvent->text())[0];
// no usable char?
if( !C.isLetterOrNumber() )
{
@@ -115,7 +115,7 @@ bool KValueEditor::handleKeyPress( TQKeyEvent *KeyEvent )
BufferCursor->gotoRealIndex();
KSection ChangedRange( Index,HexEdit->DataBuffer->size()-1 );
HexEdit->BufferRanges->addChangedRange( ChangedRange );
- HexEdit->repaintChanged();
+ HexEdit->tqrepaintChanged();
HexEdit->ensureCursorVisible();
HexEdit->unpauseCursor();
HexEdit->updateCursor();
@@ -207,7 +207,7 @@ void KValueEditor::doValueEditAction( KValueEditAction Action, int Input )
EditValue = NewValue;
ByteCodec->encode( ByteBuffer, 0, EditValue );
- HexEdit->DataBuffer->replace( Index, 1, (char*)&EditValue, 1 );
+ HexEdit->DataBuffer->tqreplace( Index, 1, (char*)&EditValue, 1 );
}
HexEdit->updateCursor();