summaryrefslogtreecommitdiffstats
path: root/khexedit
diff options
context:
space:
mode:
Diffstat (limited to 'khexedit')
-rw-r--r--khexedit/bitswapwidget.cc42
-rw-r--r--khexedit/bitswapwidget.h12
-rw-r--r--khexedit/chartabledialog.cc8
-rw-r--r--khexedit/chartabledialog.h3
-rw-r--r--khexedit/converterdialog.cc8
-rw-r--r--khexedit/converterdialog.h6
-rw-r--r--khexedit/dialog.cc70
-rw-r--r--khexedit/dialog.h25
-rw-r--r--khexedit/draglabel.cc16
-rw-r--r--khexedit/draglabel.h5
-rw-r--r--khexedit/exportdialog.cc32
-rw-r--r--khexedit/exportdialog.h3
-rw-r--r--khexedit/fileinfodialog.cc20
-rw-r--r--khexedit/fileinfodialog.h3
-rw-r--r--khexedit/hexbuffer.cc180
-rw-r--r--khexedit/hexbuffer.h28
-rw-r--r--khexedit/hexdrag.cc10
-rw-r--r--khexedit/hexdrag.h5
-rw-r--r--khexedit/hexeditorwidget.cc364
-rw-r--r--khexedit/hexeditorwidget.h19
-rw-r--r--khexedit/hexeditstate.h42
-rw-r--r--khexedit/hexmanagerwidget.cc44
-rw-r--r--khexedit/hexmanagerwidget.h12
-rw-r--r--khexedit/hextoolwidget.cc34
-rw-r--r--khexedit/hextoolwidget.h5
-rw-r--r--khexedit/hexvalidator.cc4
-rw-r--r--khexedit/hexvalidator.h5
-rw-r--r--khexedit/hexviewwidget.cc90
-rw-r--r--khexedit/hexviewwidget.h19
-rw-r--r--khexedit/lib/codecs/kbinarybytecodec.cpp4
-rw-r--r--khexedit/lib/codecs/kbytecodec.cpp4
-rw-r--r--khexedit/lib/codecs/kcharcodec.cpp2
-rw-r--r--khexedit/lib/codecs/kdecimalbytecodec.cpp12
-rw-r--r--khexedit/lib/codecs/kebcdic1047charcodec.cpp6
-rw-r--r--khexedit/lib/codecs/khexadecimalbytecodec.cpp8
-rw-r--r--khexedit/lib/codecs/koctalbytecodec.cpp12
-rw-r--r--khexedit/lib/codecs/ktextcharcodec.cpp14
-rw-r--r--khexedit/lib/codecs/ktextcharcodec.h4
-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
-rw-r--r--khexedit/lib/helper.h2
-rw-r--r--khexedit/lib/kbigbuffer.cpp6
-rw-r--r--khexedit/lib/kbigbuffer.h8
-rw-r--r--khexedit/lib/kbordercolumn.cpp8
-rw-r--r--khexedit/lib/kbuffercoltextexport.cpp2
-rw-r--r--khexedit/lib/kbuffercolumn.cpp26
-rw-r--r--khexedit/lib/kbuffercolumn.h8
-rw-r--r--khexedit/lib/kbuffercursor.h8
-rw-r--r--khexedit/lib/kbufferdrag.cpp16
-rw-r--r--khexedit/lib/kbufferdrag.h5
-rw-r--r--khexedit/lib/kbufferlayout.h6
-rw-r--r--khexedit/lib/kbufferranges.h2
-rw-r--r--khexedit/lib/kbytesedit.cpp4
-rw-r--r--khexedit/lib/kbytesedit.h17
-rw-r--r--khexedit/lib/kcolumnsview.cpp8
-rw-r--r--khexedit/lib/kcolumnsview.h7
-rw-r--r--khexedit/lib/kcursor.h2
-rw-r--r--khexedit/lib/kdatabuffer.cpp4
-rw-r--r--khexedit/lib/kdatabuffer.h14
-rw-r--r--khexedit/lib/kfixedsizebuffer.cpp10
-rw-r--r--khexedit/lib/kfixedsizebuffer.h6
-rw-r--r--khexedit/lib/khechar.h2
-rw-r--r--khexedit/lib/khexedit.cpp120
-rw-r--r--khexedit/lib/khexedit.h57
-rw-r--r--khexedit/lib/koffsetcolumn.cpp8
-rw-r--r--khexedit/lib/koffsetcolumn.h2
-rw-r--r--khexedit/lib/kplainbuffer.cpp8
-rw-r--r--khexedit/lib/kplainbuffer.h8
-rw-r--r--khexedit/lib/kvaluecolumn.cpp4
-rw-r--r--khexedit/lib/kwrappingrobuffer.cpp2
-rw-r--r--khexedit/lib/kwrappingrobuffer.h6
-rw-r--r--khexedit/listview.cc16
-rw-r--r--khexedit/listview.h5
-rw-r--r--khexedit/optiondialog.cc74
-rw-r--r--khexedit/optiondialog.h16
-rw-r--r--khexedit/parts/kbytesedit/kbyteseditwidget.cpp8
-rw-r--r--khexedit/parts/kbytesedit/kbyteseditwidget.h9
-rw-r--r--khexedit/parts/kpart/khebrowserextension.h1
-rw-r--r--khexedit/parts/kpart/khepart.cpp8
-rw-r--r--khexedit/parts/kpart/khepart.h1
-rw-r--r--khexedit/parts/kpart/khepartfactory.h5
-rw-r--r--khexedit/printdialogpage.cc26
-rw-r--r--khexedit/printdialogpage.h3
-rw-r--r--khexedit/searchbar.cc12
-rw-r--r--khexedit/searchbar.h5
-rw-r--r--khexedit/statusbarprogress.cc50
-rw-r--r--khexedit/statusbarprogress.h17
-rw-r--r--khexedit/stringdialog.cc16
-rw-r--r--khexedit/stringdialog.h3
-rw-r--r--khexedit/toplevel.cc280
-rw-r--r--khexedit/toplevel.h9
94 files changed, 1121 insertions, 1081 deletions
diff --git a/khexedit/bitswapwidget.cc b/khexedit/bitswapwidget.cc
index 70a5a22..20d4039 100644
--- a/khexedit/bitswapwidget.cc
+++ b/khexedit/bitswapwidget.cc
@@ -24,10 +24,10 @@
#include "bitswapwidget.h"
-CDigitLabel::CDigitLabel( TQWidget *parent, uint digit, const char *name )
- :TQLabel(parent, name), mDigit( digit ), mDotPosition( 0 )
+CDigitLabel::CDigitLabel( TQWidget *tqparent, uint digit, const char *name )
+ :TQLabel(tqparent, name), mDigit( digit ), mDotPosition( 0 )
{
- setFocusPolicy( StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
initialize();
}
@@ -56,7 +56,7 @@ void CDigitLabel::setValue( uint digit, bool notify )
{
if( notify == true )
{
- emit valueChanged( this, digit, false );
+ emit valueChanged( TQT_TQOBJECT(this), digit, false );
}
mDigit = digit;
@@ -64,7 +64,7 @@ void CDigitLabel::setValue( uint digit, bool notify )
if( notify == true )
{
- emit valueChanged( this, mDigit, true );
+ emit valueChanged( TQT_TQOBJECT(this), mDigit, true );
}
}
}
@@ -81,7 +81,7 @@ void CDigitLabel::setDotPosition( uint dotPosition )
-TQSize CDigitLabel::sizeHint( void ) const
+TQSize CDigitLabel::tqsizeHint( void ) const
{
int h = fontMetrics().height();
TQSize s( h, h ); // Retangular
@@ -98,18 +98,18 @@ void CDigitLabel::drawContents( TQPainter *p )
if( hasFocus() == true )
{
- p->fillRect( cr, palette().active().highlight() );
- p->setPen( palette().active().highlightedText() );
+ p->fillRect( cr, tqpalette().active().highlight() );
+ p->setPen( tqpalette().active().highlightedText() );
}
else
{
- p->fillRect( cr, palette().active().base() );
- p->setPen( palette().active().text() );
+ p->fillRect( cr, tqpalette().active().base() );
+ p->setPen( tqpalette().active().text() );
}
if( mDotPosition != 0 )
{
- p->fillRect( cr.x()+2, cr.y()+2, 5, 5, Qt::red ); // UL
+ p->fillRect( cr.x()+2, cr.y()+2, 5, 5, TQt::red ); // UL
/*
if( mDotPosition == 1 )
{
@@ -132,7 +132,7 @@ void CDigitLabel::drawContents( TQPainter *p )
TQString text;
text.setNum( mDigit );
- p->drawText( 0, 0, cr.width(), cr.height(), alignment(), text );
+ p->drawText( 0, 0, cr.width(), cr.height(), tqalignment(), text );
@@ -145,12 +145,12 @@ void CDigitLabel::keyPressEvent( TQKeyEvent *e )
{
case Key_Left:
case Key_Up:
- emit stepCell( this, false );
+ emit stepCell( TQT_TQOBJECT(this), false );
break;
case Key_Right:
case Key_Down:
- emit stepCell( this, true );
+ emit stepCell( TQT_TQOBJECT(this), true );
break;
case Key_Escape:
@@ -174,8 +174,8 @@ void CDigitLabel::keyPressEvent( TQKeyEvent *e )
-CByteWidget::CByteWidget( TQWidget *parent, const char *name )
- :TQWidget(parent, name)
+CByteWidget::CByteWidget( TQWidget *tqparent, const char *name )
+ :TQWidget(tqparent, name)
{
mHBox = new TQHBoxLayout( this, 0 );
@@ -183,9 +183,9 @@ CByteWidget::CByteWidget( TQWidget *parent, const char *name )
{
mDigit[i] = new CDigitLabel( this, 7-i );
mDigit[i]->setLineWidth( 1 );
- mDigit[i]->setFixedSize( mDigit[i]->sizeHint()*2 );
+ mDigit[i]->setFixedSize( mDigit[i]->tqsizeHint()*2 );
mDigit[i]->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- mDigit[i]->setAlignment( AlignCenter );
+ mDigit[i]->tqsetAlignment( AlignCenter );
connect( mDigit[i], TQT_SIGNAL(stepCell(const TQObject *, bool )),
this, TQT_SLOT(stepCell(const TQObject *, bool )));
connect( mDigit[i], TQT_SIGNAL(valueChanged(const TQObject *, uint, bool )),
@@ -206,7 +206,7 @@ void CByteWidget::stepCell( const TQObject *obj, bool next )
{
for( uint i=0; i<8; i++ )
{
- if( obj == mDigit[i] )
+ if( TQT_BASE_OBJECT_CONST(obj) == TQT_BASE_OBJECT_CONST(mDigit[i]) )
{
if( next == true )
{
@@ -228,7 +228,7 @@ void CByteWidget::valueChanged( const TQObject *obj, uint val, bool after )
{
for( uint i=0; i<8; i++ )
{
- if( obj == mDigit[i] )
+ if( TQT_BASE_OBJECT_CONST(obj) == TQT_BASE_OBJECT_CONST(mDigit[i]) )
{
uint tmp = 7-mDigit[i]->value();
mDigit[tmp]->setValue( mDigit[i]->value(), false );
@@ -282,7 +282,7 @@ void CByteWidget::setBuddy( const TQObject *obj )
{
for( uint i=0; i<8; i++ )
{
- if( obj == mDigit[i] )
+ if( TQT_BASE_OBJECT_CONST(obj) == TQT_BASE_OBJECT_CONST(mDigit[i]) )
{
uint val = mDigit[i]->value();
if( val < 8 )
diff --git a/khexedit/bitswapwidget.h b/khexedit/bitswapwidget.h
index 9f54ab6..14d6ab2 100644
--- a/khexedit/bitswapwidget.h
+++ b/khexedit/bitswapwidget.h
@@ -26,15 +26,16 @@
#include <tqstring.h>
-class CDigitLabel : public QLabel
+class CDigitLabel : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- CDigitLabel( TQWidget *parent, uint digit = 0, const char *name=0 );
+ CDigitLabel( TQWidget *tqparent, uint digit = 0, const char *name=0 );
~CDigitLabel( void );
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
inline uint value( void );
signals:
@@ -67,12 +68,13 @@ inline uint CDigitLabel::value( void )
-class CByteWidget : public QWidget
+class CByteWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- CByteWidget( TQWidget *parent, const char *name=0 );
+ CByteWidget( TQWidget *tqparent, const char *name=0 );
~CByteWidget( void );
bool flag( TQByteArray &buf );
diff --git a/khexedit/chartabledialog.cc b/khexedit/chartabledialog.cc
index 3f67b0e..a249325 100644
--- a/khexedit/chartabledialog.cc
+++ b/khexedit/chartabledialog.cc
@@ -32,13 +32,13 @@
#include "chartabledialog.h"
-CCharTableDialog::CCharTableDialog( TQWidget *parent, const char *name,
+CCharTableDialog::CCharTableDialog( TQWidget *tqparent, const char *name,
bool modal )
:KDialogBase( Plain, i18n("Character Table"), Help|User1|Cancel, User1,
- parent, name, modal, true, KStdGuiItem::insert())
+ tqparent, name, modal, true, KStdGuiItem::insert())
{
updateGeometry();
- setHelp( "khexedit/khexedit.html", TQString::null );
+ setHelp( "khexedit/khexedit.html", TQString() );
TQString text;
TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
@@ -69,7 +69,7 @@ CCharTableDialog::CCharTableDialog( TQWidget *parent, const char *name,
text = i18n("Insert this number of characters:");
TQLabel *label = new TQLabel( text, plainPage() );
- label->setFixedWidth( label->sizeHint().width() );
+ label->setFixedWidth( label->tqsizeHint().width() );
hbox->addWidget( label );
mInputCountSpin = new TQSpinBox( plainPage(), "spin" );
diff --git a/khexedit/chartabledialog.h b/khexedit/chartabledialog.h
index dcdaafd..ac829e7 100644
--- a/khexedit/chartabledialog.h
+++ b/khexedit/chartabledialog.h
@@ -35,9 +35,10 @@ class TQSpinBox;
class CCharTableDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- CCharTableDialog( TQWidget *parent=0, const char *name=0,bool modal=false );
+ CCharTableDialog( TQWidget *tqparent=0, const char *name=0,bool modal=false );
~CCharTableDialog( void );
signals:
diff --git a/khexedit/converterdialog.cc b/khexedit/converterdialog.cc
index 6f3a82e..3452c4f 100644
--- a/khexedit/converterdialog.cc
+++ b/khexedit/converterdialog.cc
@@ -28,9 +28,9 @@
#include "hexvalidator.h"
-CValidateLineEdit::CValidateLineEdit( TQWidget *parent, int validateType,
+CValidateLineEdit::CValidateLineEdit( TQWidget *tqparent, int validateType,
const char *name )
- :TQLineEdit( parent, name ), mBusy(false)
+ :TQLineEdit( tqparent, name ), mBusy(false)
{
mValidator = new CHexValidator( this, (CHexValidator::EState)validateType );
setValidator( mValidator );
@@ -66,9 +66,9 @@ void CValidateLineEdit::convertText( const TQString &text )
-CConverterDialog::CConverterDialog( TQWidget *parent, const char *name,
+CConverterDialog::CConverterDialog( TQWidget *tqparent, const char *name,
bool modal )
- :KDialogBase( parent, name, modal, i18n("Converter"), Cancel|User2|User1,
+ :KDialogBase( tqparent, name, modal, i18n("Converter"), Cancel|User2|User1,
Cancel, true, KStdGuiItem::clear(), i18n("&On Cursor") )
{
TQWidget *page = new TQWidget( this );
diff --git a/khexedit/converterdialog.h b/khexedit/converterdialog.h
index abcc432..d5e8d7e 100644
--- a/khexedit/converterdialog.h
+++ b/khexedit/converterdialog.h
@@ -30,9 +30,10 @@ class CHexValidator;
class CValidateLineEdit : public TQLineEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- CValidateLineEdit( TQWidget *parent, int validateType, const char *name=0 );
+ CValidateLineEdit( TQWidget *tqparent, int validateType, const char *name=0 );
~CValidateLineEdit( void );
public slots:
@@ -53,9 +54,10 @@ class CValidateLineEdit : public TQLineEdit
class CConverterDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- CConverterDialog( TQWidget *parent, const char *name=0, bool modal=true );
+ CConverterDialog( TQWidget *tqparent, const char *name=0, bool modal=true );
~CConverterDialog( void );
protected:
diff --git a/khexedit/dialog.cc b/khexedit/dialog.cc
index 8bc2cbe..a290cb8 100644
--- a/khexedit/dialog.cc
+++ b/khexedit/dialog.cc
@@ -40,8 +40,8 @@ static const TQStringList &formatStrings( void );
static const TQStringList &operationStrings( void );
-CGotoDialog::CGotoDialog( TQWidget *parent, const char *name, bool modal )
- :KDialogBase( Plain, i18n("Goto Offset"), Ok|Cancel, Ok, parent, name,
+CGotoDialog::CGotoDialog( TQWidget *tqparent, const char *name, bool modal )
+ :KDialogBase( Plain, i18n("Goto Offset"), Ok|Cancel, Ok, tqparent, name,
modal )
{
TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
@@ -174,8 +174,8 @@ void CGotoDialog::slotOk( void )
-CFindDialog::CFindDialog( TQWidget *parent, const char *name, bool modal )
- :KDialogBase( Plain, i18n("Find"), Ok|Cancel, Ok, parent, name, modal )
+CFindDialog::CFindDialog( TQWidget *tqparent, const char *name, bool modal )
+ :KDialogBase( Plain, i18n("Find"), Ok|Cancel, Ok, tqparent, name, modal )
{
TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
@@ -240,7 +240,7 @@ CFindDialog::CFindDialog( TQWidget *parent, const char *name, bool modal )
mCheckBackward->setChecked( config.readBoolEntry( "Backwards", false ) );
mCheckUseNavigator->setChecked( config.readBoolEntry( "UseNavigator", true));
uint val = config.readUnsignedNumEntry( "Format", 0 );
- mSelector->setCurrentItem(QMIN(4,val) );
+ mSelector->setCurrentItem(TQMIN(4,val) );
selectorChanged( mSelector->currentItem() );
enableButtonOK(!mInput->text().isEmpty());
}
@@ -343,10 +343,10 @@ void CFindDialog::findAgain( EOperation operation )
-CFindNavigatorDialog::CFindNavigatorDialog( TQWidget *parent, const char *name,
+CFindNavigatorDialog::CFindNavigatorDialog( TQWidget *tqparent, const char *name,
bool modal )
:KDialogBase( Plain, i18n("Find (Navigator)"), User3|User2|User1|Close,
- User2, parent, name, modal, true, i18n("New &Key"),
+ User2, tqparent, name, modal, true, i18n("New &Key"),
i18n("&Next"), i18n("&Previous") )
{
TQString text;
@@ -365,7 +365,7 @@ CFindNavigatorDialog::CFindNavigatorDialog( TQWidget *parent, const char *name,
mKey = new TQLineEdit( plainPage() );
mKey->setMinimumWidth( fontMetrics().width("M") * 20 );
- mKey->setFocusPolicy( TQWidget::NoFocus );
+ mKey->setFocusPolicy( TQ_NoFocus );
hbox->addWidget( mKey );
topLayout->addSpacing( spacingHint() ); // A little bit extra space
@@ -481,9 +481,9 @@ void CFindNavigatorDialog::done( int resultCode )
-CReplaceDialog::CReplaceDialog( TQWidget *parent, const char *name, bool modal )
+CReplaceDialog::CReplaceDialog( TQWidget *tqparent, const char *name, bool modal )
:KDialogBase( Plain, i18n("Find & Replace"), Ok|Cancel, Ok,
- parent, name, modal )
+ tqparent, name, modal )
{
TQString text;
TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
@@ -501,7 +501,7 @@ CReplaceDialog::CReplaceDialog( TQWidget *parent, const char *name, bool modal )
connect( mFindSelector, TQT_SIGNAL(activated(int)),
TQT_SLOT(findSelectorChanged(int)) );
- text = i18n("Fo&rmat (find):");
+ text = i18n("Fo&rmat (tqfind):");
TQLabel *label = new TQLabel( mFindSelector, text, plainPage() );
if( label == 0 ) { return; }
@@ -530,10 +530,10 @@ CReplaceDialog::CReplaceDialog( TQWidget *parent, const char *name, bool modal )
connect( mReplaceSelector, TQT_SIGNAL(activated(int)),
TQT_SLOT(replaceSelectorChanged(int)) );
- text = i18n("For&mat (replace):");
+ text = i18n("For&mat (tqreplace):");
label = new TQLabel( mReplaceSelector, text, plainPage() );
if( label == 0 ) { return; }
- label->setFixedHeight( label->sizeHint().height() );
+ label->setFixedHeight( label->tqsizeHint().height() );
vbox->addWidget( label );
vbox->addWidget( mReplaceSelector );
@@ -549,7 +549,7 @@ CReplaceDialog::CReplaceDialog( TQWidget *parent, const char *name, bool modal )
label = new TQLabel( mReplaceInput, i18n("Rep&lace:"), plainPage() );
if( label == 0 ) { return; }
- label->setFixedHeight( label->sizeHint().height() );
+ label->setFixedHeight( label->tqsizeHint().height() );
vbox->addWidget( label );
vbox->addWidget( mReplaceInput );
@@ -581,10 +581,10 @@ CReplaceDialog::CReplaceDialog( TQWidget *parent, const char *name, bool modal )
mCheckBackward->setChecked( config.readBoolEntry( "Backwards", false ) );
mCheckPrompt->setChecked( config.readBoolEntry( "Prompt", true));
uint val = config.readUnsignedNumEntry( "FindFormat", 0 );
- mFindSelector->setCurrentItem(QMIN(4,val) );
+ mFindSelector->setCurrentItem(TQMIN(4,val) );
findSelectorChanged( mFindSelector->currentItem() );
val = config.readUnsignedNumEntry( "ReplaceFormat", 0 );
- mReplaceSelector->setCurrentItem(QMIN(4,val) );
+ mReplaceSelector->setCurrentItem(TQMIN(4,val) );
replaceSelectorChanged( mReplaceSelector->currentItem() );
enableButtonOK(!mFindInput->text().isEmpty());
}
@@ -676,10 +676,10 @@ void CReplaceDialog::slotOk( void )
-CReplacePromptDialog::CReplacePromptDialog( TQWidget *parent, const char *name,
+CReplacePromptDialog::CReplacePromptDialog( TQWidget *tqparent, const char *name,
bool modal )
:KDialogBase( Plain, i18n("Find & Replace"), User3|User2|User1|Close,
- User2, parent, name, modal, true, i18n("Replace &All"),
+ User2, tqparent, name, modal, true, i18n("Replace &All"),
i18n("Do Not Replace"), i18n("Replace"))
{
TQString text;
@@ -757,9 +757,9 @@ void CReplacePromptDialog::done( int returnCode )
-CFilterDialog::CFilterDialog( TQWidget *parent, const char *name, bool modal )
+CFilterDialog::CFilterDialog( TQWidget *tqparent, const char *name, bool modal )
:KDialogBase( Plain, i18n("Binary Filter"), Ok|Cancel, Ok,
- parent, name, modal )
+ tqparent, name, modal )
{
TQString text;
TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
@@ -846,7 +846,7 @@ void CFilterDialog::makeOperandLayout( void )
mOperandSelector = new TQComboBox( false, page );
if( mOperandSelector == 0 ) { return; }
- mOperandSelector->setFixedHeight( mOperandSelector->sizeHint().height());
+ mOperandSelector->setFixedHeight( mOperandSelector->tqsizeHint().height());
mOperandSelector->setMinimumWidth( fontMetrics().width("M")*20 );
mOperandSelector->insertStringList( formatStrings() );
connect( mOperandSelector, TQT_SIGNAL(activated(int)),
@@ -891,7 +891,7 @@ void CFilterDialog::makeBitSwapLayout( void )
text = i18n("Swap rule");
TQLabel *label = new TQLabel( text, page );
if( label == 0 ) { return; }
- label->setFixedHeight( label->sizeHint().height() );
+ label->setFixedHeight( label->tqsizeHint().height() );
vbox->addWidget( label );
mByteWidget = new CByteWidget( page );
@@ -902,7 +902,7 @@ void CFilterDialog::makeBitSwapLayout( void )
text = i18n("&Reset");
TQPushButton *resetButton = new TQPushButton( text, page );
- resetButton->setFixedHeight( resetButton->sizeHint().height() );
+ resetButton->setFixedHeight( resetButton->tqsizeHint().height() );
connect( resetButton, TQT_SIGNAL(clicked()), mByteWidget, TQT_SLOT(reset()) );
hbox->addWidget( resetButton );
@@ -1066,9 +1066,9 @@ void CFilterDialog::operationSelectorChanged( int index )
-CInsertDialog::CInsertDialog( TQWidget *parent, const char *name, bool modal )
+CInsertDialog::CInsertDialog( TQWidget *tqparent, const char *name, bool modal )
:KDialogBase( Plain, i18n("Insert Pattern"), Ok|Cancel, Ok,
- parent, name, modal )
+ tqparent, name, modal )
{
setButtonOKText(i18n("&Insert"));
@@ -1152,7 +1152,7 @@ CInsertDialog::CInsertDialog( TQWidget *parent, const char *name, bool modal )
mCheckOnCursor->setChecked( config.readBoolEntry( "InsertOnCursor", false) );
cursorCheck();
uint val = config.readUnsignedNumEntry( "Format", 0 );
- mPatternSelector->setCurrentItem( QMIN(4,val) );
+ mPatternSelector->setCurrentItem( TQMIN(4,val) );
patternSelectorChanged( mPatternSelector->currentItem() );
}
@@ -1237,7 +1237,7 @@ void centerDialog( TQWidget *widget, TQWidget *centerParent )
}
TQPoint point = centerParent->mapToGlobal( TQPoint(0,0) );
- TQRect pos = centerParent->geometry();
+ TQRect pos = centerParent->tqgeometry();
widget->setGeometry( point.x() + pos.width()/2 - widget->width()/2,
point.y() + pos.height()/2 - widget->height()/2,
@@ -1253,7 +1253,7 @@ void centerDialogBottom( TQWidget *widget, TQWidget *centerParent )
}
TQPoint point = centerParent->mapToGlobal( TQPoint(0,0) );
- TQRect pos = centerParent->geometry();
+ TQRect pos = centerParent->tqgeometry();
widget->setGeometry( point.x() + pos.width()/2 - widget->width()/2,
point.y() + pos.height() - widget->height(),
@@ -1278,7 +1278,7 @@ void comboMatchText( TQComboBox *combo, const TQString &text )
-void showEntryFailure( TQWidget *parent, const TQString &msg )
+void showEntryFailure( TQWidget *tqparent, const TQString &msg )
{
TQString message;
message += i18n("Your request can not be processed.");
@@ -1291,17 +1291,17 @@ void showEntryFailure( TQWidget *parent, const TQString &msg )
{
message += msg;
}
- KMessageBox::sorry( parent, message, i18n("Invalid argument(s)") );
+ KMessageBox::sorry( tqparent, message, i18n("Invalid argument(s)") );
}
-bool verifyFileDestnation( TQWidget *parent, const TQString &title,
+bool verifyFileDestnation( TQWidget *tqparent, const TQString &title,
const TQString &path )
{
if( path.isEmpty() == true )
{
TQString msg = i18n("You must specify a destination file.");
- KMessageBox::sorry( parent, msg, title );
+ KMessageBox::sorry( tqparent, msg, title );
return( false );
}
@@ -1311,21 +1311,21 @@ bool verifyFileDestnation( TQWidget *parent, const TQString &title,
if( info.isDir() == true )
{
TQString msg = i18n("You have specified an existing folder.");
- KMessageBox::sorry( parent, msg, title );
+ KMessageBox::sorry( tqparent, msg, title );
return( false );
}
if( info.isWritable() == false )
{
TQString msg = i18n("You do not have write permission to this file.");
- KMessageBox::sorry( parent, msg, title );
+ KMessageBox::sorry( tqparent, msg, title );
return( false );
}
TQString msg = i18n( ""
"You have specified an existing file.\n"
"Overwrite current file?" );
- int reply = KMessageBox::warningContinueCancel( parent, msg, title, i18n("Overwrite") );
+ int reply = KMessageBox::warningContinueCancel( tqparent, msg, title, i18n("Overwrite") );
if( reply != KMessageBox::Continue )
{
return( false );
diff --git a/khexedit/dialog.h b/khexedit/dialog.h
index 226825e..12456be 100644
--- a/khexedit/dialog.h
+++ b/khexedit/dialog.h
@@ -64,9 +64,10 @@ const uint Find_Next = 7;
class CGotoDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- CGotoDialog( TQWidget *parent, const char *name = 0, bool modal = false );
+ CGotoDialog( TQWidget *tqparent, const char *name = 0, bool modal = false );
~CGotoDialog( void );
protected:
@@ -90,6 +91,7 @@ class CGotoDialog : public KDialogBase
class CFindDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum EOperation
@@ -100,7 +102,7 @@ class CFindDialog : public KDialogBase
};
public:
- CFindDialog( TQWidget *parent=0, const char *name=0, bool modal=false );
+ CFindDialog( TQWidget *tqparent=0, const char *name=0, bool modal=false );
~CFindDialog( void );
bool isEmpty( void );
@@ -137,9 +139,10 @@ class CFindDialog : public KDialogBase
class CFindNavigatorDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- CFindNavigatorDialog( TQWidget *parent=0, const char *name=0,
+ CFindNavigatorDialog( TQWidget *tqparent=0, const char *name=0,
bool modal=false );
~CFindNavigatorDialog( void );
void defineData( SSearchControl &sc );
@@ -166,9 +169,10 @@ class CFindNavigatorDialog : public KDialogBase
class CReplaceDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- CReplaceDialog( TQWidget *parent=0, const char *name=0, bool modal=false );
+ CReplaceDialog( TQWidget *tqparent=0, const char *name=0, bool modal=false );
~CReplaceDialog( void );
protected:
@@ -209,9 +213,10 @@ class CReplaceDialog : public KDialogBase
class CReplacePromptDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- CReplacePromptDialog( TQWidget *parent=0, const char *name=0,
+ CReplacePromptDialog( TQWidget *tqparent=0, const char *name=0,
bool modal=false );
~CReplacePromptDialog( void );
void defineData( SSearchControl &sc );
@@ -238,6 +243,7 @@ class CReplacePromptDialog : public KDialogBase
class CFilterDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum EStackMode
@@ -249,7 +255,7 @@ class CFilterDialog : public KDialogBase
};
public:
- CFilterDialog( TQWidget *parent=0, const char *name=0, bool modal=false );
+ CFilterDialog( TQWidget *tqparent=0, const char *name=0, bool modal=false );
~CFilterDialog( void );
protected:
@@ -297,9 +303,10 @@ class CFilterDialog : public KDialogBase
class CInsertDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- CInsertDialog( TQWidget *parent=0, const char *name=0, bool modal=false );
+ CInsertDialog( TQWidget *tqparent=0, const char *name=0, bool modal=false );
~CInsertDialog( void );
protected:
@@ -336,8 +343,8 @@ void centerDialogBottom( TQWidget *widget, TQWidget *centerParent );
void comboMatchText( TQComboBox *combo, const TQString &text );
bool stringToOffset( const TQString & text, uint &offset );
-void showEntryFailure( TQWidget *parent, const TQString &msg );
-bool verifyFileDestnation( TQWidget *parent, const TQString &title,
+void showEntryFailure( TQWidget *tqparent, const TQString &msg );
+bool verifyFileDestnation( TQWidget *tqparent, const TQString &title,
const TQString &path );
diff --git a/khexedit/draglabel.cc b/khexedit/draglabel.cc
index 8a98945..4f40110 100644
--- a/khexedit/draglabel.cc
+++ b/khexedit/draglabel.cc
@@ -28,12 +28,12 @@
#include "draglabel.h"
-CDragLabel::CDragLabel( TQWidget *parent )
- : TQLabel( "draglabel", parent, "kde toolbar widget" )
+CDragLabel::CDragLabel( TQWidget *tqparent )
+ : TQLabel( "draglabel", tqparent, "kde toolbar widget" )
{
mValid = true;
mDragPending = false;
- setBackgroundMode( Qt::PaletteButton );
+ setBackgroundMode( TQt::PaletteButton );
}
@@ -44,7 +44,7 @@ CDragLabel::~CDragLabel( void )
void CDragLabel::mousePressEvent( TQMouseEvent *e )
{
- if( mValid == false || e->button() != LeftButton || mUrl.isEmpty() == true )
+ if( mValid == false || e->button() != Qt::LeftButton || mUrl.isEmpty() == true )
{
return;
}
@@ -104,7 +104,7 @@ void CDragLabel::prepPixmap( KURLDrag &uriDrag )
}
TQString text;
- int index = mUrl.findRev( '/', mUrl.length() );
+ int index = mUrl.tqfindRev( '/', mUrl.length() );
if( index < 0 )
{
text = mUrl;
@@ -120,12 +120,12 @@ void CDragLabel::prepPixmap( KURLDrag &uriDrag )
int h = fontMetrics().lineSpacing();
if( pixmap()->height() > h ) { h = pixmap()->height(); }
- TQBitmap mask( w, h, TRUE );
+ TQBitmap tqmask( w, h, TRUE );
TQPixmap dragPixmap( w, h );
dragPixmap.fill( black );
TQPainter p;
- p.begin( &mask );
+ p.begin( &tqmask );
p.setPen( white );
p.drawPixmap( 0, 0, mDragMask );
p.drawText( pixmap()->width()+sep, 0, w-pixmap()->width()+sep,
@@ -136,7 +136,7 @@ void CDragLabel::prepPixmap( KURLDrag &uriDrag )
p.drawPixmap( 0, 0, *pixmap() );
p.end();
- dragPixmap.setMask( mask );
+ dragPixmap.setMask( tqmask );
TQPoint hotspot( pixmap()->width(), pixmap()->height()/2 );
uriDrag.setPixmap( dragPixmap, hotspot );
diff --git a/khexedit/draglabel.h b/khexedit/draglabel.h
index 441473e..16176f0 100644
--- a/khexedit/draglabel.h
+++ b/khexedit/draglabel.h
@@ -29,12 +29,13 @@
class KURLDrag;
-class CDragLabel: public QLabel
+class CDragLabel: public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- CDragLabel( TQWidget *parent );
+ CDragLabel( TQWidget *tqparent );
~CDragLabel( void );
void setUrl( const TQString &url );
diff --git a/khexedit/exportdialog.cc b/khexedit/exportdialog.cc
index 3d13d7c..df99fef 100644
--- a/khexedit/exportdialog.cc
+++ b/khexedit/exportdialog.cc
@@ -31,11 +31,11 @@
#include <tqpushbutton.h>
-CExportDialog::CExportDialog( TQWidget *parent, char *name, bool modal )
+CExportDialog::CExportDialog( TQWidget *tqparent, char *name, bool modal )
:KDialogBase( Tabbed, i18n("Export Document"), Help|Ok|Cancel, Ok,
- parent, name, modal )
+ tqparent, name, modal )
{
- setHelp( "khexedit/khexedit.html", TQString::null );
+ setHelp( "khexedit/khexedit.html", TQString() );
mFrame[ page_destination ] = addPage( i18n("Destination") );
mFrame[ page_option ] = addPage( i18n("Options") );
@@ -47,7 +47,7 @@ CExportDialog::CExportDialog( TQWidget *parent, char *name, bool modal )
readConfiguration();
TQString path = mDestination.fileInput->text();
- int index = path.findRev( '/' );
+ int index = path.tqfindRev( '/' );
if( index != -1 ) { mWorkDir = path.left( index+1 ); }
}
@@ -109,8 +109,8 @@ void CExportDialog::readConfiguration( void )
}
}
val = mConfig->readNumEntry( "ArrayElementPerLine", 20 );
- val = QMAX( val, mArray.lineSizeSpin->minValue() );
- val = QMIN( val, mArray.lineSizeSpin->maxValue() );
+ val = TQMAX( val, mArray.lineSizeSpin->minValue() );
+ val = TQMIN( val, mArray.lineSizeSpin->maxValue() );
mArray.lineSizeSpin->setValue( val );
state = mConfig->readBoolEntry( "ArrayUnsignedAsHex", true );
mArray.hexadecimalCheck->setChecked( state );
@@ -208,17 +208,17 @@ void CExportDialog::setupDestinationPage( void )
vbox->addSpacing( fontMetrics().lineSpacing() );
TQRadioButton *radio1 = new TQRadioButton( i18n("&Everything"), group );
- radio1->setFixedSize( radio1->sizeHint() );
+ radio1->setFixedSize( radio1->tqsizeHint() );
mDestination.rangeBox->insert( radio1, 0 );
vbox->addWidget( radio1, 0, AlignLeft );
TQRadioButton *radio2 = new TQRadioButton( i18n("&Selection"), group );
- radio2->setFixedSize( radio2->sizeHint() );
+ radio2->setFixedSize( radio2->tqsizeHint() );
mDestination.rangeBox->insert( radio2, 1 );
vbox->addWidget( radio2, 0, AlignLeft );
TQRadioButton *radio3 = new TQRadioButton( i18n("&Range"), group );
- radio3->setFixedSize( radio3->sizeHint() );
+ radio3->setFixedSize( radio3->tqsizeHint() );
mDestination.rangeBox->insert( radio3, 2 );
vbox->addWidget( radio3, 0, AlignLeft );
@@ -264,7 +264,7 @@ void CExportDialog::setupOptionPage( void )
makeCArrayOption();
mOptionStack->raiseWidget( (int)option_text );
- TQSize size = mOptionStack->sizeHint();
+ TQSize size = mOptionStack->tqsizeHint();
size += TQSize(spacingHint()*2, spacingHint()*2);
page->setMinimumSize( size );
}
@@ -462,11 +462,11 @@ void CExportDialog::browserClicked( void )
TQString url;
if( mDestination.formatCombo->currentItem() == option_html )
{
- url = KFileDialog::getExistingDirectory( mWorkDir, topLevelWidget() );
+ url = KFileDialog::getExistingDirectory( mWorkDir, tqtopLevelWidget() );
}
else
{
- url = KFileDialog::getSaveFileName( mWorkDir, "*", topLevelWidget() );
+ url = KFileDialog::getSaveFileName( mWorkDir, "*", tqtopLevelWidget() );
}
if( url.isEmpty() )
@@ -474,7 +474,7 @@ void CExportDialog::browserClicked( void )
return;
}
- int index = url.findRev( '/' );
+ int index = url.tqfindRev( '/' );
if( index != -1 )
{
mWorkDir = url.left( index+1 );
@@ -673,14 +673,14 @@ bool CExportDialog::verifyPackage( const TQString &path )
}
const TQString prefix = mHtml.prefixInput->text();
- TQString f1 = TQString("%1%2.html").arg(prefix).arg("00000000");
- TQString f2 = TQString("%1%2.html").arg(prefix).arg("99999999");
+ TQString f1 = TQString("%1%2.html").tqarg(prefix).tqarg("00000000");
+ TQString f2 = TQString("%1%2.html").tqarg(prefix).tqarg("99999999");
TQString msg = i18n( ""
"You have specified an existing folder.\n"
"If you continue, any existing file in the range "
"\"%1\" to \"%2\" can be lost.\n"
- "Continue?").arg(f1).arg(f2);
+ "Continue?").tqarg(f1).tqarg(f2);
int reply = KMessageBox::warningContinueCancel( this, msg, title );
if( reply != KMessageBox::Continue )
{
diff --git a/khexedit/exportdialog.h b/khexedit/exportdialog.h
index b4dc3e1..52adac8 100644
--- a/khexedit/exportdialog.h
+++ b/khexedit/exportdialog.h
@@ -39,6 +39,7 @@ class KSimpleConfig;
class CExportDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum EPage
@@ -57,7 +58,7 @@ class CExportDialog : public KDialogBase
option_max
};
- CExportDialog( TQWidget *parent = 0, char *name = 0, bool modal = false );
+ CExportDialog( TQWidget *tqparent = 0, char *name = 0, bool modal = false );
~CExportDialog( void );
void writeConfiguration( void );
diff --git a/khexedit/fileinfodialog.cc b/khexedit/fileinfodialog.cc
index 465c7f3..08fa5b1 100644
--- a/khexedit/fileinfodialog.cc
+++ b/khexedit/fileinfodialog.cc
@@ -30,18 +30,18 @@
#include "listview.h"
// quick'n'dirty hack to have the occurrence column sorted correctly
-class CStatisticListViewItem : public QListViewItem
+class CStatisticListViewItem : public TQListViewItem
{
public:
- CStatisticListViewItem( TQListView * parent, TQListViewItem * after,
+ CStatisticListViewItem( TQListView * tqparent, TQListViewItem * after,
TQString label1, TQString label2, TQString label3, TQString label4,
TQString label5, TQString label6, TQString label7, int i, int o)
- : TQListViewItem( parent, after, label1, label2, label3, label4, label5, label6, label7),
+ : TQListViewItem( tqparent, after, label1, label2, label3, label4, label5, label6, label7),
item( i ),
occurrence( o )
{}
- virtual int compare( TQListViewItem *i, int col, bool ascending/*Qt doc says: ignore this one*/ ) const
+ virtual int compare( TQListViewItem *i, int col, bool ascending/*TQt doc says: ignore this one*/ ) const
{
// occurrence column (or the percent one)?
if( col == 5 || col == 6 )
@@ -69,12 +69,12 @@ class CStatisticListViewItem : public QListViewItem
-CFileInfoDialog::CFileInfoDialog( TQWidget *parent,const char *name,bool modal)
+CFileInfoDialog::CFileInfoDialog( TQWidget *tqparent,const char *name,bool modal)
:KDialogBase( Plain, i18n("Statistics"), Help|User1|Cancel, User1,
- parent, name, modal, true, i18n("&Update") ),
+ tqparent, name, modal, true, i18n("&Update") ),
mBusy(false), mDirty(false)
{
- setHelp( "khexedit/khexedit.html", TQString::null );
+ setHelp( "khexedit/khexedit.html", TQString() );
TQString text;
TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
@@ -239,13 +239,13 @@ void CFileInfoDialog::setStatistics( SStatisticControl &sc )
o.sprintf("%03o", i );
b.sprintf("%s", printBin(i) );
- n = TQString("%1").arg( sc.occurrence[i], pre );
+ n = TQString("%1").tqarg( sc.occurrence[i], pre );
if( sc.documentSize == 0 )
p = "0.00";
else
{
double val = 100.0*((double)sc.occurrence[i]/(double)sc.documentSize);
- p = TQString("%1").arg( val, 6, 'f', 2 );
+ p = TQString("%1").tqarg( val, 6, 'f', 2 );
}
const TQChar _i((char)i);
@@ -321,7 +321,7 @@ void CFileInfoDialog::showEvent( TQShowEvent *e )
void CFileInfoDialog::timerEvent( TQTimerEvent * )
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
slotUser1();
}
diff --git a/khexedit/fileinfodialog.h b/khexedit/fileinfodialog.h
index 742f3bd..5c8528f 100644
--- a/khexedit/fileinfodialog.h
+++ b/khexedit/fileinfodialog.h
@@ -36,9 +36,10 @@ class CListView;
class CFileInfoDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- CFileInfoDialog( TQWidget *parent=0, const char *name=0,bool modal=false );
+ CFileInfoDialog( TQWidget *tqparent=0, const char *name=0,bool modal=false );
~CFileInfoDialog( void );
void setStatistics( void );
diff --git a/khexedit/hexbuffer.cc b/khexedit/hexbuffer.cc
index 81b8fe6..2b9dc96 100644
--- a/khexedit/hexbuffer.cc
+++ b/khexedit/hexbuffer.cc
@@ -323,7 +323,7 @@ int SFilterControl::execute( uchar *dest, uchar *src, uint size )
// A short description so that I will understand what the
// h... is going on five minutes from now.
//
- // Destination byte is masked (AND'ed) with the inverse bitmap
+ // Destination byte is tqmasked (AND'ed) with the inverse bitmap
// (the noninversed bitmap contains position of the
// two swap bits, eg 7-2 gives 10000100). Then the destination
// is OR'ed with the swapped bitmap.
@@ -347,14 +347,14 @@ const char *SExportCArray::printFormatted( const char *b, uint maxSize ) const
if( elementType == Char )
{
char e = 0;
- memcpy( &e, b, QMIN(sizeof(e),maxSize) );
+ memcpy( &e, b, TQMIN(sizeof(e),maxSize) );
sprintf( buf, "%d", e );
return( buf );
}
else if( elementType == Uchar )
{
unsigned char e = 0;
- memcpy( &e, b, QMIN(sizeof(e),maxSize) );
+ memcpy( &e, b, TQMIN(sizeof(e),maxSize) );
if( unsignedAsHexadecimal == true )
{
sprintf( buf, "0x%02x", e );
@@ -368,7 +368,7 @@ const char *SExportCArray::printFormatted( const char *b, uint maxSize ) const
else if( elementType == Short )
{
short e = 0;
- memcpy( &e, b, QMIN(sizeof(e),maxSize) );
+ memcpy( &e, b, TQMIN(sizeof(e),maxSize) );
sprintf( buf, "%d", e );
return( buf );
@@ -376,7 +376,7 @@ const char *SExportCArray::printFormatted( const char *b, uint maxSize ) const
else if( elementType == Ushort )
{
unsigned short e = 0;
- memcpy( &e, b, QMIN(sizeof(e),maxSize) );
+ memcpy( &e, b, TQMIN(sizeof(e),maxSize) );
if( unsignedAsHexadecimal == true )
{
sprintf( buf, "0x%04x", e );
@@ -390,14 +390,14 @@ const char *SExportCArray::printFormatted( const char *b, uint maxSize ) const
else if( elementType == Int )
{
int e = 0;
- memcpy( &e, b, QMIN(sizeof(e),maxSize) );
+ memcpy( &e, b, TQMIN(sizeof(e),maxSize) );
sprintf( buf, "%u", e );
return( buf );
}
else if( elementType == Uint )
{
unsigned int e = 0;
- memcpy( &e, b, QMIN(sizeof(e),maxSize) );
+ memcpy( &e, b, TQMIN(sizeof(e),maxSize) );
if( unsignedAsHexadecimal == true )
{
sprintf( buf, "0x%08x", e );
@@ -411,14 +411,14 @@ const char *SExportCArray::printFormatted( const char *b, uint maxSize ) const
else if( elementType == Float )
{
float e = 0;
- memcpy( &e, b, QMIN(sizeof(e),maxSize) );
+ memcpy( &e, b, TQMIN(sizeof(e),maxSize) );
sprintf( buf, "%f", e );
return( buf );
}
else if( elementType == Double )
{
double e = 0;
- memcpy( &e, b, QMIN(sizeof(e),maxSize) );
+ memcpy( &e, b, TQMIN(sizeof(e),maxSize) );
sprintf( buf, "%f", e );
return( buf );
}
@@ -447,8 +447,8 @@ TQString SExportCArray::variableName( uint range ) const
uint es = elementSize();
uint numElement = range / es + ((range % es) ? 1 : 0);
- return( TQString("%1 %2[%2]").arg(typeString[elementType]).
- arg(arrayName).arg(numElement) );
+ return( TQString("%1 %2[%2]").tqarg(typeString[elementType]).
+ tqarg(arrayName).tqarg(numElement) );
}
@@ -568,7 +568,7 @@ bool CHexBuffer::hasFileName( void )
//
// FIXME: Files can be called "Untitled" so this must be corrected.
//
- if( mUrl.isEmpty() || mUrl.contains( i18n( "Untitled" ), false ) )
+ if( mUrl.isEmpty() || mUrl.tqcontains( i18n( "Untitled" ), false ) )
{
return( false );
}
@@ -580,9 +580,9 @@ bool CHexBuffer::hasFileName( void )
-int CHexBuffer::setLayout( SDisplayLayout &layout )
+int CHexBuffer::setLayout( SDisplayLayout &tqlayout )
{
- mLayout = layout;
+ mLayout = tqlayout;
mLayout.verify();
if( mLayout.primaryMode == SDisplayLayout::textOnly )
@@ -630,9 +630,9 @@ void CHexBuffer::setColor( SDisplayColor &color )
//
// Test...
//
- //mColor.secondTextBg = Qt::yellow;
- //mColor.offsetBg = Qt::lightGray;
- //mColor.gridFg = Qt::darkCyan;
+ //mColor.secondTextBg = TQt::yellow;
+ //mColor.offsetBg = TQt::lightGray;
+ //mColor.gridFg = TQt::darkCyan;
/*
mColor.secondTextBg = mColor.textBg;
@@ -676,7 +676,7 @@ bool CHexBuffer::toggleEditor( void )
edit_secondary : edit_primary;
}
- setEditMode( mEditMode ); // Sets the cursor shapes as well
+ setEditMode( mEditMode ); // Sets the cursor tqshapes as well
if( changed == true )
{
@@ -766,7 +766,7 @@ void CHexBuffer::setDisableCursor( bool disableCursor )
}
-void CHexBuffer::setCursorShapeModifier( bool alwaysBlock, bool thickInsert )
+void CHexBuffer::settqCursorShapeModifier( bool alwaysBlock, bool thickInsert )
{
mCursor.setShapeModifier( alwaysBlock, thickInsert );
setEditMode( mEditMode );
@@ -813,12 +813,12 @@ void CHexBuffer::setEditMode( EEditMode editMode )
-void CHexBuffer::setMaximumSize( uint maximumSize )
+void CHexBuffer::setMaximumSize( uint tqmaximumSize )
{
- if( maximumSize == 0 ) { maximumSize = ~0; }
+ if( tqmaximumSize == 0 ) { tqmaximumSize = ~0; }
- mMaximumSize = maximumSize;
- mFixedSizeMode = maximumSize == (uint)~0 ? false : true;
+ mMaximumSize = tqmaximumSize;
+ mFixedSizeMode = tqmaximumSize == (uint)~0 ? false : true;
mCursor.setFixedSizeMode( mFixedSizeMode );
if( mLayout.offsetVisible == false )
@@ -832,9 +832,9 @@ void CHexBuffer::setMaximumSize( uint maximumSize )
if( mLayout.offsetMode == SDisplayLayout::decimal )
{
printOffset = &CHexBuffer::printDecimalOffset;
- for( mOffsetSize=0; maximumSize > 0; mOffsetSize += 1 )
+ for( mOffsetSize=0; tqmaximumSize > 0; mOffsetSize += 1 )
{
- maximumSize = maximumSize / 10;
+ tqmaximumSize = tqmaximumSize / 10;
}
mOffsetIndex = 10 - mOffsetSize;
}
@@ -848,9 +848,9 @@ void CHexBuffer::setMaximumSize( uint maximumSize )
{
printOffset = &CHexBuffer::printHexadecimalSmallOffset;
}
- for( mOffsetSize=0; maximumSize > 0; mOffsetSize += 1 )
+ for( mOffsetSize=0; tqmaximumSize > 0; mOffsetSize += 1 )
{
- maximumSize = maximumSize / 16;
+ tqmaximumSize = tqmaximumSize / 16;
}
if( mOffsetSize > 4 ) { mOffsetSize += 1; } // Space for the ':' sign
mOffsetIndex = 9 - mOffsetSize;
@@ -920,7 +920,7 @@ int CHexBuffer::writeFile( TQFile &file, CProgress &p )
do
{
- const uint blockSize = QMIN( 131072 /* == 1024 * 128 */ , remaining );
+ const uint blockSize = TQMIN( 131072 /* == 1024 * 128 */ , remaining );
const int writeSize = file.writeBlock( data() + offset, blockSize );
if( writeSize == -1 )
{
@@ -952,7 +952,7 @@ int CHexBuffer::writeFile( TQFile &file, CProgress &p )
int CHexBuffer::readFile( TQFile &file, const TQString &url, CProgress &p )
{
- if( resize( file.size() + 100 ) == false )
+ if( tqresize( file.size() + 100 ) == false )
{
p.finish();
return( Err_NoMemory );
@@ -965,7 +965,7 @@ int CHexBuffer::readFile( TQFile &file, const TQString &url, CProgress &p )
uint remaining = file.size();
while( remaining > 0 )
{
- const uint blockSize = QMIN( 131072 /* == 1024 * 128 */ , remaining );
+ const uint blockSize = TQMIN( 131072 /* == 1024 * 128 */ , remaining );
const int readSize = file.readBlock( data() + offset, blockSize );
if( readSize == -1 )
{
@@ -1029,7 +1029,7 @@ int CHexBuffer::insertFile( TQFile &file, CProgress &p )
uint remaining = file.size();
while( remaining > 0 )
{
- const uint blockSize = QMIN( 131072 /* == 1024 * 128 */ , remaining );
+ const uint blockSize = TQMIN( 131072 /* == 1024 * 128 */ , remaining );
const int readSize = file.readBlock( array.data() + offset, blockSize );
if( readSize == -1 )
{
@@ -1064,7 +1064,7 @@ int CHexBuffer::insertFile( TQFile &file, CProgress &p )
int CHexBuffer::newFile( const TQString &url )
{
- if( resize( 100 ) == 0 )
+ if( tqresize( 100 ) == 0 )
{
return( Err_NoMemory );
}
@@ -1609,7 +1609,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int sx, int x1, int x2 )
//
// Draw the bookmark identifiers on this line (if any). We use the
- // bitmask to minimize the number of times we try to draw the bookmarks.
+ // bittqmask to minimize the number of times we try to draw the bookmarks.
//
int bookmarkPosition = 0;
if( mBookmarkMap.testBit(fileOffset/200) ||
@@ -1712,17 +1712,17 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y,
if( (line+1) % 2 || outsideText == true )
{
paint.fillRect( x1, y, x2, lineHeight(),
- useBlackWhite == true ? Qt::white : mColor.textBg );
+ useBlackWhite == true ? TQt::white : mColor.textBg );
}
else
{
paint.fillRect( x1, y, x2, lineHeight(),
- useBlackWhite == true ? Qt::white : mColor.secondTextBg );
+ useBlackWhite == true ? TQt::white : mColor.secondTextBg );
}
if( mLayout.horzGridWidth > 0 && outsideText == false )
{
- TQPen pen( useBlackWhite == true ? Qt::black : mColor.gridFg,
+ TQPen pen( useBlackWhite == true ? TQt::black : mColor.gridFg,
mLayout.horzGridWidth );
paint.setPen( pen );
paint.drawLine( x1, y+mFontHeight, x2+x1, y+mFontHeight );
@@ -1753,7 +1753,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y,
int s1 = mOffsetSize * mUnitWidth;
if( fileData != 0 )
{
- paint.setPen( useBlackWhite == true ? Qt::black : mColor.offsetFg );
+ paint.setPen( useBlackWhite == true ? TQt::black : mColor.offsetFg );
THIS_FPTR(printOffset)( mPrintBuf, fileOffset );
// ## paint.drawText( offset, mFontAscent+y, &mPrintBuf[mOffsetIndex],
// mOffsetSize );
@@ -1768,7 +1768,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y,
offset += mLayout.separatorMarginWidth;
int s2 = mLayout.leftSeparatorWidth + mLayout.separatorMarginWidth;
- TQPen pen( useBlackWhite == true ? Qt::black : mColor.leftSeparatorFg,
+ TQPen pen( useBlackWhite == true ? TQt::black : mColor.leftSeparatorFg,
mLayout.leftSeparatorWidth );
paint.setPen( pen );
int center = offset + mLayout.leftSeparatorWidth/2;
@@ -1789,7 +1789,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y,
int flag = THIS_FPTR(printCell)( mPrintBuf, fileData[i] );
if( useBlackWhite == true )
{
- paint.setPen( Qt::black );
+ paint.setPen( TQt::black );
}
else
{
@@ -1804,7 +1804,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y,
{
if( (i+1) % mLayout.columnSize == 0 )
{
- TQPen pen( useBlackWhite == true ? Qt::black : mColor.gridFg,
+ TQPen pen( useBlackWhite == true ? TQt::black : mColor.gridFg,
mLayout.vertGridWidth );
paint.setPen( pen );
int x = localOffset - (mSplitWidth+1) / 2;
@@ -1822,7 +1822,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y,
{
offset += mLayout.separatorMarginWidth;
int s = mLayout.separatorMarginWidth + mLayout.rightSeparatorWidth;
- TQPen pen( useBlackWhite == true ? Qt::black : mColor.rightSeparatorFg,
+ TQPen pen( useBlackWhite == true ? TQt::black : mColor.rightSeparatorFg,
mLayout.rightSeparatorWidth );
paint.setPen( pen );
int center = offset + mLayout.rightSeparatorWidth/2;
@@ -1841,7 +1841,7 @@ void CHexBuffer::drawText( TQPainter &paint, uint line, int x1, int x2, int y,
int flag = printAsciiCell( mPrintBuf, fileData[i] );
if( useBlackWhite == true )
{
- paint.setPen( Qt::black );
+ paint.setPen( TQt::black );
}
else
{
@@ -1888,8 +1888,8 @@ void CHexBuffer::drawHeader( TQPainter &paint, int sx, int width, int y,
paint.setFont( KGlobalSettings::generalFont() );
const TQFontMetrics &fm = paint.fontMetrics();
- paint.fillRect( sx, y, width, fm.height(), Qt::white );
- paint.setPen( Qt::black );
+ paint.fillRect( sx, y, width, fm.height(), TQt::white );
+ paint.setPen( TQt::black );
if( header.line == SPageHeader::SingleLine )
{
if( isFooter == false )
@@ -1923,8 +1923,8 @@ void CHexBuffer::drawHeader( TQPainter &paint, int sx, int width, int y,
else if( header.pos[i] == SPageHeader::PageNumber )
{
msg = i18n("Page %1 of %2")
- .arg(KGlobal::locale()->formatNumber(position.curPage, 0))
- .arg(KGlobal::locale()->formatNumber(position.maxPage, 0));
+ .tqarg(KGlobal::locale()->formatNumber(position.curPage, 0))
+ .tqarg(KGlobal::locale()->formatNumber(position.maxPage, 0));
}
else if( header.pos[i] == SPageHeader::FileName )
{
@@ -2091,7 +2091,7 @@ void CHexBuffer::drawCursor( TQPainter &paint, uint line, int startx,
}
//
- // Draw the cursor shape
+ // Draw the cursor tqshape
//
bool transparent = false;
if( mActiveEditor == edit_primary )
@@ -2116,7 +2116,7 @@ void CHexBuffer::drawCursor( TQPainter &paint, uint line, int startx,
paint.drawLine( center-2, mFontHeight-1, center+2, mFontHeight-1 );
}
}
- else // Solid block shape
+ else // Solid block tqshape
{
paint.fillRect( c.x1 - startx, 0, mUnitWidth, mFontHeight, cbg );
useFg = true;
@@ -2209,7 +2209,7 @@ void CHexBuffer::drawCursor( TQPainter &paint, uint line, int startx,
}
//
- // Draw the cursor shape
+ // Draw the cursor tqshape
//
transparent = false;
if( mActiveEditor == edit_secondary )
@@ -2822,16 +2822,16 @@ int CHexBuffer::exportHtml( const SExportHtml &ex, CProgress &p )
for( uint i=0; i < numFiles; i++ )
{
name.sprintf( "%08d.html", i+1 );
- fileNames.append( TQString("%1/%2%3").arg(ex.package).arg(ex.prefix).
+ fileNames.append( TQString("%1/%2%3").tqarg(ex.package).tqarg(ex.prefix).
arg(name));
}
name.sprintf( "%08d.html", 0 );
- TQString tocName =TQString("%1/%2%3").arg(ex.package).arg(ex.prefix).arg(name);
+ TQString tocName =TQString("%1/%2%3").tqarg(ex.package).tqarg(ex.prefix).tqarg(name);
TQString linkName;
if( ex.symLink == true )
{
- linkName = TQString("%1/%2").arg(ex.package).arg("index.html");
+ linkName = TQString("%1/%2").tqarg(ex.package).tqarg("index.html");
}
while( remaining > 0 )
@@ -2849,7 +2849,7 @@ int CHexBuffer::exportHtml( const SExportHtml &ex, CProgress &p )
THIS_FPTR(printOffset)( mPrintBuf, (startLine-1)*mLayout.lineSize );
mPrintBuf[mOffsetSize]=0;
- offset += TQString(" %1 [%2]").arg(i18n("to")).arg(mPrintBuf);
+ offset += TQString(" %1 [%2]").tqarg(i18n("to")).tqarg(mPrintBuf);
offsets.append(offset);
if( p.expired() == true )
@@ -2981,7 +2981,7 @@ int CHexBuffer::copyText( TQByteArray &array, const SExportRange &range,
uint bytePerLine = mOffsetSize + 1 + (mNumCell + 2)*mLayout.lineSize + 1;
uint size = (stopLine - startLine + 1)*bytePerLine;
- if( array.resize( size+1 ) == false )
+ if( array.tqresize( size+1 ) == false )
{
return( Err_NoMemory );
}
@@ -3021,7 +3021,7 @@ int CHexBuffer::copySelectedData( TQByteArray &array )
}
uint size = stop - start;
- if( array.resize( size ) == false )
+ if( array.tqresize( size ) == false )
{
return( Err_NoMemory );
}
@@ -3466,7 +3466,7 @@ void CHexBuffer::updateBookmarkMap( bool resize )
{
//
// Espen 2000-05-16:
- // I do this test to avoid some Qt warnings when I have closed
+ // I do this test to avoid some TQt warnings when I have closed
// or reduced the size of the documnet while the (now invalid)
// bookmarks still exist.
//
@@ -3621,7 +3621,7 @@ int CHexBuffer::replaceAll( SSearchControl &sc, bool init )
if( sc.key.size() > sc.val.size() )
{
uint diff = sc.key.size() - sc.val.size();
- stop -= QMIN( stop, diff );
+ stop -= TQMIN( stop, diff );
}
else if( sc.key.size() < sc.val.size() )
{
@@ -3660,7 +3660,7 @@ int CHexBuffer::replaceAll( SSearchControl &sc, bool init )
}
}
- i -= QMIN( i, sc.key.size() );
+ i -= TQMIN( i, sc.key.size() );
if( i == 0 ) { break; }
}
}
@@ -4167,7 +4167,7 @@ int CHexBuffer::scanData( SSearchControl &sc, bool init )
{
sc.match = true;
cursorGoto( i, 7 );
- markSet( i, sc.key.size() );
+ markSet( i, (uint)sc.key.size() );
return( Err_Success );
}
}
@@ -4193,7 +4193,7 @@ int CHexBuffer::scanData( SSearchControl &sc, bool init )
{
sc.match = true;
cursorGoto( i, 7 );
- markSet( i, sc.key.size() );
+ markSet( i, (uint)sc.key.size() );
return( Err_Success );
}
}
@@ -4360,7 +4360,7 @@ void CHexBuffer::doActionGroup( CHexActionGroup *group )
void CHexBuffer::doAction( CHexAction *action )
{
- if( action->mAction == CHexAction::replace )
+ if( action->mAction == CHexAction::tqreplace )
{
doReplace( action, true );
}
@@ -4406,7 +4406,7 @@ void CHexBuffer::recordStart( SCursor &cursor )
void CHexBuffer::recordReplace( SCursor &cursor, uint size, char *data1,
uint data1Size )
{
- CHexAction *hexAction = new CHexAction( CHexAction::replace,
+ CHexAction *hexAction = new CHexAction( CHexAction::tqreplace,
cursor.curr.offset );
if( hexAction == 0 )
{
@@ -4786,7 +4786,7 @@ void CHexBuffer::printHtmlTocPage( const TQString &tocName,
for( uint i=0; i<=numPage; i++ )
{
TQString n( fileNames[i].right( fileNames[i].length() -
- fileNames[i].findRev('/') - 1) );
+ fileNames[i].tqfindRev('/') - 1) );
os << "<A HREF=\"" << n << "\">" << i18n("Page") << i+1;
os << "</A>";
os << " " << offsets[i];
@@ -4802,7 +4802,7 @@ void CHexBuffer::printHtmlTocPage( const TQString &tocName,
// Make a symlink. We ignore any error here. I don't consider
// it to be fatal.
//
- TQString n( tocName.right( tocName.length() - tocName.findRev('/') - 1) );
+ TQString n( tocName.right( tocName.length() - tocName.tqfindRev('/') - 1) );
symlink( n.latin1(), linkName.latin1() );
}
@@ -4825,11 +4825,11 @@ void CHexBuffer::printHtmlCaption( TQTextStream &os, uint captionType,
break;
case 2:
- caption = mUrl.right( mUrl.length() - mUrl.findRev('/') - 1);
+ caption = mUrl.right( mUrl.length() - mUrl.tqfindRev('/') - 1);
break;
case 3:
- caption = i18n("Page %1 of %2").arg(curPage).arg(numPage);
+ caption = i18n("Page %1 of %2").tqarg(curPage).tqarg(numPage);
break;
}
@@ -4854,7 +4854,7 @@ void CHexBuffer::printHtmlNavigator( TQTextStream &os, const TQString *next,
}
else
{
- TQString n( next->right( next->length() - next->findRev('/') - 1) );
+ TQString n( next->right( next->length() - next->tqfindRev('/') - 1) );
os << "<A HREF=\"" << n << "\">" << i18n("Next") << "</A>" << " ";
}
@@ -4864,7 +4864,7 @@ void CHexBuffer::printHtmlNavigator( TQTextStream &os, const TQString *next,
}
else
{
- TQString p( prev->right( prev->length() - prev->findRev('/') - 1) );
+ TQString p( prev->right( prev->length() - prev->tqfindRev('/') - 1) );
os << "<A HREF=\"" << p << "\">" << i18n("Previous") << "</A>" << " ";
}
@@ -4874,7 +4874,7 @@ void CHexBuffer::printHtmlNavigator( TQTextStream &os, const TQString *next,
}
else
{
- TQString t( toc->right( toc->length() - toc->findRev('/') - 1) );
+ TQString t( toc->right( toc->length() - toc->tqfindRev('/') - 1) );
os << "<A HREF=\"" << t << "\">" << i18n("Contents");
os << "</A>" << " ";
}
@@ -4896,7 +4896,7 @@ int CHexBuffer::printHtmlHeader( TQTextStream &os, bool isFront )
if( isFront == true )
{
os << "<HTML>" << endl << "<HEAD>" << endl;
- os << "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; ";
+ os << "<META HTTP-ETQUIV=\"Content-Type\" CONTENT=\"text/html; ";
os << "charset=iso-8859-1\">" << endl;
os << "<META NAME=\"hexdata\" CONTENT=\"khexedit dump\">" << endl;
os << "</HEAD>" << endl << "<BODY>" << endl;
@@ -4925,15 +4925,15 @@ int CHexBuffer::printHtmlTable( TQTextStream &os, uint line, uint numLine,
os << "CELLSPACING=0 CELLPADDING=2>" << endl;
if( mLayout.offsetVisible == true )
{
- color = bw == true ? Qt::white : mColor.offsetBg;
- os << "<TD BGCOLOR=" << color.name().latin1() << ">" << endl;
+ color = bw == true ? TQt::white : mColor.offsetBg;
+ os << "<TD BGCOLOR=" << TQString(color.name()).latin1() << ">" << endl;
os << "<TABLE BORDER=0 COLS=1 WIDTH=\"100%\" ";
os << "CELLSPACING=0 CELLPADDING=2>" << endl;
- color = bw == true ? Qt::black : mColor.offsetFg;
+ color = bw == true ? TQt::black : mColor.offsetFg;
for( i=0; i<numLine; i++ )
{
- os << "<TR><TD><TT><b><FONT COLOR=" << color.name().latin1() << ">";
+ os << "<TR><TD><TT><b><FONT COLOR=" << TQString(color.name()).latin1() << ">";
THIS_FPTR(printOffset)( mPrintBuf, (line+i)*mLayout.lineSize );
mPrintBuf[mOffsetSize]=0;
os << mPrintBuf << "</TD></TR>" << endl;
@@ -4941,8 +4941,8 @@ int CHexBuffer::printHtmlTable( TQTextStream &os, uint line, uint numLine,
os << "</TABLE>" << endl << "</TD>" << endl;
}
- color = bw == true ? Qt::white : mColor.textBg;
- os << "<TD BGCOLOR=" << color.name().latin1() << ">" << endl;
+ color = bw == true ? TQt::white : mColor.textBg;
+ os << "<TD BGCOLOR=" << TQString(color.name()).latin1() << ">" << endl;
os << "<TABLE BORDER=0 COLS=1 WIDTH=\"100%\" ";
os << "CELLSPACING=0 CELLPADDING=2>" << endl;
for( i=0; i<numLine; i++ )
@@ -4953,8 +4953,8 @@ int CHexBuffer::printHtmlTable( TQTextStream &os, uint line, uint numLine,
if( mLayout.secondaryMode != SDisplayLayout::hide )
{
- color = bw == true ? Qt::white : mColor.textBg;
- os << "<TD BGCOLOR=" << color.name().latin1() << ">" << endl;
+ color = bw == true ? TQt::white : mColor.textBg;
+ os << "<TD BGCOLOR=" << TQString(color.name()).latin1() << ">" << endl;
os << "<TABLE BORDER=0 COLS=1 WIDTH=\"100%\" ";
os << "CELLSPACING=0 CELLPADDING=2>" << endl;
for( i=0; i<numLine; i++ )
@@ -4978,14 +4978,14 @@ int CHexBuffer::printHtmlLine( TQTextStream &os, uint line, bool isPrimary,
TQColor color;
if( bw == true )
{
- color = Qt::white;
+ color = TQt::white;
}
else
{
color = (line+1) % 2 ? mColor.textBg : mColor.secondTextBg;
}
- os << "<TR><TD NOWRAP BGCOLOR=" << color.name().latin1() << "><TT><B>"
+ os << "<TR><TD NOWRAP BGCOLOR=" << TQString(color.name()).latin1() << "><TT><B>"
<< endl;
if( offset >= documentSize() )
{
@@ -5003,7 +5003,7 @@ int CHexBuffer::printHtmlLine( TQTextStream &os, uint line, bool isPrimary,
mPrintBuf[mNumCell] = 0;
if( i == 0 )
{
- color = bw == true ? Qt::black : foregroundColor(i);
+ color = bw == true ? TQt::black : foregroundColor(i);
}
else
{
@@ -5015,21 +5015,21 @@ int CHexBuffer::printHtmlLine( TQTextStream &os, uint line, bool isPrimary,
unsigned char val = (unsigned char)data()[offset+i];
if( THIS_FPTR(printCell)( mPrintBuf, val ) == 0 )
{
- color = bw == true ? Qt::black : foregroundColor(i);
+ color = bw == true ? TQt::black : foregroundColor(i);
}
else
{
- color = bw == true ? Qt::black : mColor.nonPrintFg;
+ color = bw == true ? TQt::black : mColor.nonPrintFg;
}
}
mPrintBuf[mNumCell] = 0;
if( i == 0 )
{
- os << "<FONT COLOR=" << color.name().latin1() << ">";
+ os << "<FONT COLOR=" << TQString(color.name()).latin1() << ">";
}
else if( color != prevColor )
{
- os << "</FONT><FONT COLOR=" << color.name().latin1() << ">";
+ os << "</FONT><FONT COLOR=" << TQString(color.name()).latin1() << ">";
}
prevColor = color;
@@ -5053,7 +5053,7 @@ int CHexBuffer::printHtmlLine( TQTextStream &os, uint line, bool isPrimary,
memset(mPrintBuf, ' ', 1 );
if( i == 0 )
{
- color = bw == true ? Qt::black : mColor.secondaryFg;
+ color = bw == true ? TQt::black : mColor.secondaryFg;
}
else
{
@@ -5065,21 +5065,21 @@ int CHexBuffer::printHtmlLine( TQTextStream &os, uint line, bool isPrimary,
unsigned char val = (unsigned char)data()[offset+i];
if( printAsciiCell( mPrintBuf, val ) == 0 )
{
- color = bw == true ? Qt::black : mColor.secondaryFg;
+ color = bw == true ? TQt::black : mColor.secondaryFg;
}
else
{
- color = bw == true ? Qt::black : mColor.nonPrintFg;
+ color = bw == true ? TQt::black : mColor.nonPrintFg;
}
mPrintBuf[1] = 0;
if( i == 0 )
{
- os << "<FONT COLOR=" << color.name().latin1() << ">";
+ os << "<FONT COLOR=" << TQString(color.name()).latin1() << ">";
}
else if( color != prevColor )
{
- os << "</FONT><FONT COLOR=" << color.name().latin1() << ">";
+ os << "</FONT><FONT COLOR=" << TQString(color.name()).latin1() << ">";
}
prevColor = color;
diff --git a/khexedit/hexbuffer.h b/khexedit/hexbuffer.h
index 755cca1..e5026de 100644
--- a/khexedit/hexbuffer.h
+++ b/khexedit/hexbuffer.h
@@ -304,38 +304,38 @@ struct SCursorConfig
bool selectOn( void )
{
- return( state & Qt::ShiftButton );
+ return( state & TQt::ShiftButton );
}
bool removeSelection( void )
{
- return( state & Qt::ShiftButton ? false : true );
+ return( state & TQt::ShiftButton ? false : true );
}
void setKeepSelection( bool val )
{
- state = val == true ? state|Qt::ShiftButton : state&~Qt::ShiftButton;
+ state = val == true ? state|TQt::ShiftButton : state&~TQt::ShiftButton;
}
bool controlButton( void )
{
- return( state & Qt::ControlButton ? true : false );
+ return( state & TQt::ControlButton ? true : false );
}
bool shiftButton( void )
{
- return( state & Qt::ShiftButton ? true : false );
+ return( state & TQt::ShiftButton ? true : false );
}
bool altButton( void )
{
- return( state & Qt::AltButton ? true : false );
+ return( state & TQt::AltButton ? true : false );
}
void emulateControlButton( bool val )
{
- state = val == true ? state|Qt::ControlButton : state&~Qt::ControlButton;
+ state = val == true ? state|TQt::ControlButton : state&~TQt::ControlButton;
}
int state;
@@ -967,7 +967,7 @@ class CHexAction
public:
enum HexAction
{
- replace
+ tqreplace
};
public:
@@ -1031,7 +1031,7 @@ typedef bool (CHexBuffer::*InputCellFunc)( unsigned char *dest, int value,
typedef void (CHexBuffer::*PrintOffsetFunc)( char *buf, uint offset );
-class CHexBuffer : public QByteArray
+class CHexBuffer : public TQByteArray
{
public:
enum EColumn
@@ -1072,7 +1072,7 @@ class CHexBuffer : public QByteArray
CHexBuffer( void );
~CHexBuffer( void );
- int setLayout( SDisplayLayout &layout );
+ int setLayout( SDisplayLayout &tqlayout );
void setColor( SDisplayColor &color );
void setInputMode( SDisplayInputMode &mode );
bool toggleEditor( void );
@@ -1082,7 +1082,7 @@ class CHexBuffer : public QByteArray
void setNonPrintChar( TQChar nonPrintChar );
void setShowCursor( bool showCursor );
void setDisableCursor( bool disableCursor );
- void setCursorShapeModifier( bool alwaysBlock, bool thickInsert );
+ void settqCursorShapeModifier( bool alwaysBlock, bool thickInsert );
void setEditMode( EEditMode editMode );
void setEditMode( EEditMode editMode, bool alwaysBlock, bool thickInsert );
void setMaximumSize( uint size );
@@ -1156,7 +1156,7 @@ class CHexBuffer : public QByteArray
inline SCursorState &cursorState( void );
inline void valueOnCursor( TQByteArray &buf, uint size );
inline SFileState &fileState( void );
- inline const SDisplayLayout &layout( void );
+ inline const SDisplayLayout &tqlayout( void );
inline const SDisplayInputMode &inputMode( void );
inline TQPtrList<SCursorOffset> &bookmarkList( void );
@@ -1417,7 +1417,7 @@ inline void CHexBuffer::valueOnCursor( TQByteArray &buf, uint size )
}
-inline const SDisplayLayout &CHexBuffer::layout( void )
+inline const SDisplayLayout &CHexBuffer::tqlayout( void )
{
return( mLayout );
}
@@ -1531,7 +1531,7 @@ inline const TQColor &CHexBuffer::foregroundColor( uint column )
{
if( column > mLayout.lineSize )
{
- return( Qt::black );
+ return( TQt::black );
}
else
{
diff --git a/khexedit/hexdrag.cc b/khexedit/hexdrag.cc
index 19cb34e..0347129 100644
--- a/khexedit/hexdrag.cc
+++ b/khexedit/hexdrag.cc
@@ -75,7 +75,7 @@ const char *CHexDrag::format( int i ) const
}
-TQByteArray CHexDrag::encodedData( const char *fmt ) const
+TQByteArray CHexDrag::tqencodedData( const char *fmt ) const
{
if( fmt != 0 )
{
@@ -98,7 +98,7 @@ bool CHexDrag::canDecode( const TQMimeSource *e )
bool CHexDrag::decode( const TQMimeSource *e, TQByteArray &dest )
{
- dest = e->encodedData(mediaString);
+ dest = e->tqencodedData(mediaString);
return( dest.size() == 0 ? false : true );
//
@@ -107,8 +107,8 @@ bool CHexDrag::decode( const TQMimeSource *e, TQByteArray &dest )
// Major opcode: 17"
//
// if I try to use the code below on a source that has been
- // collected from QClipboard. It is the e->provides(mediaString)
- // that fail (Qt-2.0). Sometimes it works :(
+ // collected from TQClipboard. It is the e->provides(mediaString)
+ // that fail (TQt-2.0). Sometimes it works :(
//
// printf("0: %s\n", e->format(0) ); No problem.
// printf("1: %s\n", e->format(1) ); Crash.
@@ -116,7 +116,7 @@ bool CHexDrag::decode( const TQMimeSource *e, TQByteArray &dest )
#if 0
if( e->provides(mediaString) == true )
{
- dest = e->encodedData(mediaString);
+ dest = e->tqencodedData(mediaString);
return( true );
}
else
diff --git a/khexedit/hexdrag.h b/khexedit/hexdrag.h
index 2705124..aef2e01 100644
--- a/khexedit/hexdrag.h
+++ b/khexedit/hexdrag.h
@@ -25,9 +25,10 @@
#include <tqdragobject.h>
#include <tqstring.h>
-class CHexDrag : public QDragObject
+class CHexDrag : public TQDragObject
{
Q_OBJECT
+ TQ_OBJECT
public:
CHexDrag( const TQByteArray &data, TQWidget *dragSource = 0,
@@ -36,7 +37,7 @@ class CHexDrag : public QDragObject
void setData( const TQByteArray &data );
const char* format ( int i ) const;
- TQByteArray encodedData( const char *fmt ) const;
+ TQByteArray tqencodedData( const char *fmt ) const;
static bool canDecode( const TQMimeSource *e );
diff --git a/khexedit/hexeditorwidget.cc b/khexedit/hexeditorwidget.cc
index 60107f3..d1eaddd 100644
--- a/khexedit/hexeditorwidget.cc
+++ b/khexedit/hexeditorwidget.cc
@@ -47,8 +47,8 @@
-CHexEditorWidget::CHexEditorWidget( TQWidget *parent, const char *name )
- : TQWidget( parent, name )
+CHexEditorWidget::CHexEditorWidget( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
CHexBuffer *hexBuffer = new CHexBuffer;
if( hexBuffer == 0 ) { return; }
@@ -66,13 +66,13 @@ CHexEditorWidget::CHexEditorWidget( TQWidget *parent, const char *name )
connect( mHexView, TQT_SIGNAL(pleaseStepFile(bool)), TQT_SLOT( stepFile(bool)) );
connect( kapp, TQT_SIGNAL( kdisplayFontChanged() ), TQT_SLOT( fontChanged() ) );
connect( kapp, TQT_SIGNAL( kdisplayPaletteChanged() ),TQT_SLOT( paletteChanged()) );
- connect( mHexView, TQT_SIGNAL( layoutChanged( const SDisplayLayout & ) ),
- TQT_SLOT( layoutChanged( const SDisplayLayout & ) ) );
+ connect( mHexView, TQT_SIGNAL( tqlayoutChanged( const SDisplayLayout & ) ),
+ TQT_SLOT( tqlayoutChanged( const SDisplayLayout & ) ) );
connect( mHexView, TQT_SIGNAL( inputModeChanged( const SDisplayInputMode & ) ),
this, TQT_SLOT( inputModeChanged( const SDisplayInputMode & ) ) );
mHexView->setFocus();
- setBackgroundColor( palette().active().base() );
+ setBackgroundColor( tqpalette().active().base() );
mProgressBusy = false;
mGotoDialog = 0;
@@ -115,7 +115,7 @@ void CHexEditorWidget::initialize( void )
setFont( mDisplayState.font );
mHexView->setMisc( mDisplayState.misc );
mHexView->setCursor( mDisplayState.cursor, false );
- mHexView->setLayout( mDisplayState.layout );
+ mHexView->setLayout( mDisplayState.tqlayout );
mHexView->setInputMode( mDisplayState.input );
mHexView->setInsertMode( mDisplayState.misc.insertMode );
}
@@ -123,25 +123,25 @@ void CHexEditorWidget::initialize( void )
void CHexEditorWidget::writeConfiguration( KConfig &config )
{
- SDisplayLayout &layout = mDisplayState.layout;
+ SDisplayLayout &tqlayout = mDisplayState.tqlayout;
config.setGroup( "Display Options" );
- config.writeEntry( "PrimaryMode", layout.primaryModeString() );
- config.writeEntry( "SecondaryMode", layout.secondaryModeString() );
- config.writeEntry( "OffsetMode", layout.offsetModeString() );
- config.writeEntry( "OffsetVisible", layout.offsetVisible );
- config.writeEntry( "PrimaryUpperCase", layout.primaryUpperCase );
- config.writeEntry( "OffsetUpperCase", layout.offsetUpperCase );
- config.writeEntry( "LineSize", layout.lineSize );
- config.writeEntry( "ColumnSize", layout.columnSize );
- config.writeEntry( "LockLine", layout.lockLine );
- config.writeEntry( "LockColumn", layout.lockColumn );
- config.writeEntry( "ColumnCharSpace", layout.columnCharSpace );
- config.writeEntry( "ColumnSpacing", layout.columnSpacing );
- config.writeEntry( "SeparatorMarginWidth", layout.separatorMarginWidth );
- config.writeEntry( "EdgeMarginWidth", layout.edgeMarginWidth );
- config.writeEntry( "LeftSeparatorWidth", layout.leftSeparatorWidth );
- config.writeEntry( "RightSeparatorWidth", layout.rightSeparatorWidth );
- config.writeEntry( "GridMode", layout.gridModeString() );
+ config.writeEntry( "PrimaryMode", tqlayout.primaryModeString() );
+ config.writeEntry( "SecondaryMode", tqlayout.secondaryModeString() );
+ config.writeEntry( "OffsetMode", tqlayout.offsetModeString() );
+ config.writeEntry( "OffsetVisible", tqlayout.offsetVisible );
+ config.writeEntry( "PrimaryUpperCase", tqlayout.primaryUpperCase );
+ config.writeEntry( "OffsetUpperCase", tqlayout.offsetUpperCase );
+ config.writeEntry( "LineSize", tqlayout.lineSize );
+ config.writeEntry( "ColumnSize", tqlayout.columnSize );
+ config.writeEntry( "LockLine", tqlayout.lockLine );
+ config.writeEntry( "LockColumn", tqlayout.lockColumn );
+ config.writeEntry( "ColumnCharSpace", tqlayout.columnCharSpace );
+ config.writeEntry( "ColumnSpacing", tqlayout.columnSpacing );
+ config.writeEntry( "SeparatorMarginWidth", tqlayout.separatorMarginWidth );
+ config.writeEntry( "EdgeMarginWidth", tqlayout.edgeMarginWidth );
+ config.writeEntry( "LeftSeparatorWidth", tqlayout.leftSeparatorWidth );
+ config.writeEntry( "RightSeparatorWidth", tqlayout.rightSeparatorWidth );
+ config.writeEntry( "GridMode", tqlayout.gridModeString() );
SDisplayLine &line = mDisplayState.line;
config.setGroup( "Line Size" );
@@ -183,7 +183,7 @@ void CHexEditorWidget::writeConfiguration( KConfig &config )
config.setGroup( "Display Font" );
config.writeEntry( "UseSystemFont", font.useSystemFont );
config.writeEntry( "LocalFont", font.localFont );
- config.writeEntry( "NonPrintChar", font.nonPrintChar.unicode() );
+ config.writeEntry( "NonPrintChar", font.nonPrintChar.tqunicode() );
SDisplayCursor &cursor = mDisplayState.cursor;
config.setGroup( "Display Cursor" );
@@ -221,38 +221,38 @@ void CHexEditorWidget::writeConfiguration( KConfig &config )
void CHexEditorWidget::readConfiguration( KConfig &config )
{
- SDisplayLayout &layout = mDisplayState.layout;
+ SDisplayLayout &tqlayout = mDisplayState.tqlayout;
config.setGroup( "Display Options" );
- layout.setPrimaryMode( config.readEntry("PrimaryMode") );
- layout.setSecondaryMode( config.readEntry("SecondaryMode") );
- layout.setOffsetMode( config.readEntry("OffsetMode") );
- layout.offsetVisible = config.readBoolEntry(
- "OffsetVisible", layout.offsetVisible );
- layout.primaryUpperCase = config.readBoolEntry(
- "PrimaryUpperCase", layout.primaryUpperCase );
- layout.offsetUpperCase = config.readBoolEntry(
- "OffsetUpperCase", layout.offsetUpperCase );
- layout.lineSize = config.readNumEntry(
- "LineSize", layout.lineSize );
- layout.columnSize = config.readNumEntry(
- "ColumnSize", layout.columnSize );
- layout.lockLine = config.readBoolEntry(
- "LockLine", layout.lockLine );
- layout.lockColumn = config.readBoolEntry(
- "LockColumn", layout.lockColumn );
- layout.columnCharSpace = config.readBoolEntry(
- "ColumnCharSpace", layout.columnCharSpace );
- layout.columnSpacing = config.readNumEntry(
- "ColumnSpacing", layout.columnSpacing );
- layout.separatorMarginWidth = config.readNumEntry(
- "SeparatorMarginWidth", layout.separatorMarginWidth );
- layout.edgeMarginWidth = config.readNumEntry(
- "EdgeMarginWidth", layout.edgeMarginWidth );
- layout.leftSeparatorWidth = config.readNumEntry(
- "LeftSeparatorWidth", layout.leftSeparatorWidth );
- layout.rightSeparatorWidth = config.readNumEntry(
- "RightSeparatorWidth", layout.rightSeparatorWidth );
- layout.setGridMode( config.readEntry("GridMode") );
+ tqlayout.setPrimaryMode( config.readEntry("PrimaryMode") );
+ tqlayout.setSecondaryMode( config.readEntry("SecondaryMode") );
+ tqlayout.setOffsetMode( config.readEntry("OffsetMode") );
+ tqlayout.offsetVisible = config.readBoolEntry(
+ "OffsetVisible", tqlayout.offsetVisible );
+ tqlayout.primaryUpperCase = config.readBoolEntry(
+ "PrimaryUpperCase", tqlayout.primaryUpperCase );
+ tqlayout.offsetUpperCase = config.readBoolEntry(
+ "OffsetUpperCase", tqlayout.offsetUpperCase );
+ tqlayout.lineSize = config.readNumEntry(
+ "LineSize", tqlayout.lineSize );
+ tqlayout.columnSize = config.readNumEntry(
+ "ColumnSize", tqlayout.columnSize );
+ tqlayout.lockLine = config.readBoolEntry(
+ "LockLine", tqlayout.lockLine );
+ tqlayout.lockColumn = config.readBoolEntry(
+ "LockColumn", tqlayout.lockColumn );
+ tqlayout.columnCharSpace = config.readBoolEntry(
+ "ColumnCharSpace", tqlayout.columnCharSpace );
+ tqlayout.columnSpacing = config.readNumEntry(
+ "ColumnSpacing", tqlayout.columnSpacing );
+ tqlayout.separatorMarginWidth = config.readNumEntry(
+ "SeparatorMarginWidth", tqlayout.separatorMarginWidth );
+ tqlayout.edgeMarginWidth = config.readNumEntry(
+ "EdgeMarginWidth", tqlayout.edgeMarginWidth );
+ tqlayout.leftSeparatorWidth = config.readNumEntry(
+ "LeftSeparatorWidth", tqlayout.leftSeparatorWidth );
+ tqlayout.rightSeparatorWidth = config.readNumEntry(
+ "RightSeparatorWidth", tqlayout.rightSeparatorWidth );
+ tqlayout.setGridMode( config.readEntry("GridMode") );
SDisplayLine &line = mDisplayState.line;
config.setGroup( "Line Size" );
@@ -398,9 +398,9 @@ void CHexEditorWidget::paletteChanged( void )
setColor( mDisplayState.color );
}
-void CHexEditorWidget::layoutChanged( const SDisplayLayout &/*layout*/ )
+void CHexEditorWidget::tqlayoutChanged( const SDisplayLayout &/*tqlayout*/ )
{
- //mDisplayState.layout = layout;
+ //mDisplayState.tqlayout = tqlayout;
}
void CHexEditorWidget::inputModeChanged( const SDisplayInputMode &input )
@@ -414,30 +414,30 @@ void CHexEditorWidget::setLineSize(const SDisplayLine &line )
mDisplayState.line = line;
}
-void CHexEditorWidget::setLayout( const SDisplayLayout &layout )
+void CHexEditorWidget::setLayout( const SDisplayLayout &tqlayout )
{
//
// We only set the values that can be modified by the dialog
//
- mDisplayState.layout.lockLine = layout.lockLine;
- mDisplayState.layout.lockColumn = layout.lockColumn;
- mDisplayState.layout.leftSeparatorWidth = layout.leftSeparatorWidth;
- mDisplayState.layout.rightSeparatorWidth = layout.rightSeparatorWidth;
- mDisplayState.layout.separatorMarginWidth = layout.separatorMarginWidth;
- mDisplayState.layout.edgeMarginWidth = layout.edgeMarginWidth;
- mDisplayState.layout.columnCharSpace = layout.columnCharSpace;
- mDisplayState.layout.columnSpacing = layout.columnSpacing;
- mDisplayState.layout.horzGridWidth = layout.horzGridWidth;
- mDisplayState.layout.vertGridWidth = layout.vertGridWidth;
+ mDisplayState.tqlayout.lockLine = tqlayout.lockLine;
+ mDisplayState.tqlayout.lockColumn = tqlayout.lockColumn;
+ mDisplayState.tqlayout.leftSeparatorWidth = tqlayout.leftSeparatorWidth;
+ mDisplayState.tqlayout.rightSeparatorWidth = tqlayout.rightSeparatorWidth;
+ mDisplayState.tqlayout.separatorMarginWidth = tqlayout.separatorMarginWidth;
+ mDisplayState.tqlayout.edgeMarginWidth = tqlayout.edgeMarginWidth;
+ mDisplayState.tqlayout.columnCharSpace = tqlayout.columnCharSpace;
+ mDisplayState.tqlayout.columnSpacing = tqlayout.columnSpacing;
+ mDisplayState.tqlayout.horzGridWidth = tqlayout.horzGridWidth;
+ mDisplayState.tqlayout.vertGridWidth = tqlayout.vertGridWidth;
//
// Select the line and column sizes we shall use now.
//
- SDisplayLayout &l = mDisplayState.layout;
+ SDisplayLayout &l = mDisplayState.tqlayout;
l.lineSize = mDisplayState.line.lineSize[ l.primaryMode ];
l.columnSize = mDisplayState.line.columnSize[ l.primaryMode ];
- mHexView->setLayout( mDisplayState.layout );
+ mHexView->setLayout( mDisplayState.tqlayout );
}
void CHexEditorWidget::setCursor( const SDisplayCursor &cursor )
@@ -453,26 +453,26 @@ void CHexEditorWidget::setColor( const SDisplayColor &color )
//
// The selection colors can not be chosen.
//
- mDisplayState.color.selectBg = kapp->palette().active().highlight();
- mDisplayState.color.selectFg = kapp->palette().active().highlightedText();
+ mDisplayState.color.selectBg = kapp->tqpalette().active().highlight();
+ mDisplayState.color.selectFg = kapp->tqpalette().active().highlightedText();
if( mDisplayState.color.useSystemColor == true )
{
SDisplayColor c = mDisplayState.color;
- c.textBg = kapp->palette().active().base();
- c.secondTextBg = kapp->palette().active().base();
- c.offsetBg = kapp->palette().active().base();
- c.inactiveBg = kapp->palette().active().base();
- c.primaryFg[0] = kapp->palette().active().text();
- c.primaryFg[1] = kapp->palette().active().text();
- c.nonPrintFg = kapp->palette().active().text();
- c.offsetFg = kapp->palette().active().text();
- c.secondaryFg = kapp->palette().active().text();
- c.leftSeparatorFg = kapp->palette().active().text();
- c.rightSeparatorFg = kapp->palette().active().text();
- c.cursorBg = kapp->palette().active().text();
- c.cursorFg = kapp->palette().active().base();
- c.gridFg = kapp->palette().active().text();
+ c.textBg = kapp->tqpalette().active().base();
+ c.secondTextBg = kapp->tqpalette().active().base();
+ c.offsetBg = kapp->tqpalette().active().base();
+ c.inactiveBg = kapp->tqpalette().active().base();
+ c.primaryFg[0] = kapp->tqpalette().active().text();
+ c.primaryFg[1] = kapp->tqpalette().active().text();
+ c.nonPrintFg = kapp->tqpalette().active().text();
+ c.offsetFg = kapp->tqpalette().active().text();
+ c.secondaryFg = kapp->tqpalette().active().text();
+ c.leftSeparatorFg = kapp->tqpalette().active().text();
+ c.rightSeparatorFg = kapp->tqpalette().active().text();
+ c.cursorBg = kapp->tqpalette().active().text();
+ c.cursorFg = kapp->tqpalette().active().base();
+ c.gridFg = kapp->tqpalette().active().text();
SDisplayColor defaultColor;
c.bookmarkBg = defaultColor.bookmarkBg;
c.bookmarkFg = defaultColor.bookmarkFg;
@@ -513,46 +513,46 @@ void CHexEditorWidget::setMisc( const SDisplayMisc &misc )
void CHexEditorWidget::setHexadecimalMode( void )
{
- layout().primaryMode = SDisplayLayout::hexadecimal;
- layout().lineSize = line().lineSize[ SDisplayLine::hexadecimal ];
- layout().columnSize = line().columnSize[ SDisplayLine::hexadecimal ];
- mHexView->setLayout( layout() );
+ tqlayout().primaryMode = SDisplayLayout::hexadecimal;
+ tqlayout().lineSize = line().lineSize[ SDisplayLine::hexadecimal ];
+ tqlayout().columnSize = line().columnSize[ SDisplayLine::hexadecimal ];
+ mHexView->setLayout( tqlayout() );
}
void CHexEditorWidget::setDecimalMode( void )
{
- layout().primaryMode = SDisplayLayout::decimal;
- layout().lineSize = line().lineSize[ SDisplayLine::decimal ];
- layout().columnSize = line().columnSize[ SDisplayLine::decimal ];
- mHexView->setLayout( layout() );
+ tqlayout().primaryMode = SDisplayLayout::decimal;
+ tqlayout().lineSize = line().lineSize[ SDisplayLine::decimal ];
+ tqlayout().columnSize = line().columnSize[ SDisplayLine::decimal ];
+ mHexView->setLayout( tqlayout() );
}
void CHexEditorWidget::setOctalMode( void )
{
- layout().primaryMode = SDisplayLayout::octal;
- layout().lineSize = line().lineSize[ SDisplayLine::octal ];
- layout().columnSize = line().columnSize[ SDisplayLine::octal ];
- mHexView->setLayout( layout() );
+ tqlayout().primaryMode = SDisplayLayout::octal;
+ tqlayout().lineSize = line().lineSize[ SDisplayLine::octal ];
+ tqlayout().columnSize = line().columnSize[ SDisplayLine::octal ];
+ mHexView->setLayout( tqlayout() );
}
void CHexEditorWidget::setBinaryMode( void )
{
- layout().primaryMode = SDisplayLayout::binary;
- layout().lineSize = line().lineSize[ SDisplayLine::binary ];
- layout().columnSize = line().columnSize[ SDisplayLine::binary ];
- mHexView->setLayout( layout() );
+ tqlayout().primaryMode = SDisplayLayout::binary;
+ tqlayout().lineSize = line().lineSize[ SDisplayLine::binary ];
+ tqlayout().columnSize = line().columnSize[ SDisplayLine::binary ];
+ mHexView->setLayout( tqlayout() );
}
void CHexEditorWidget::setTextMode( void )
{
- layout().primaryMode = SDisplayLayout::textOnly;
- layout().lineSize = line().lineSize[ SDisplayLine::textOnly ];
- layout().columnSize = line().columnSize[ SDisplayLine::textOnly ];
- mHexView->setLayout( layout() );
+ tqlayout().primaryMode = SDisplayLayout::textOnly;
+ tqlayout().lineSize = line().lineSize[ SDisplayLine::textOnly ];
+ tqlayout().columnSize = line().columnSize[ SDisplayLine::textOnly ];
+ mHexView->setLayout( tqlayout() );
}
@@ -564,7 +564,7 @@ void CHexEditorWidget::saveWorkingDirectory( const TQString &url )
return;
}
- int index = url.findRev( '/' );
+ int index = url.tqfindRev( '/' );
if( index != -1 )
{
mWorkDir = url.left( index+1 );
@@ -580,7 +580,7 @@ void CHexEditorWidget::newFile( void )
return;
}
- TQString url = i18n("Untitled %1").arg( mUntitledCount );
+ TQString url = i18n("Untitled %1").tqarg( mUntitledCount );
//
// If the url is already present in the document list (should not happen),
@@ -605,7 +605,7 @@ void CHexEditorWidget::newFile( void )
if( errCode != Err_Success )
{
TQString msg = i18n("Unable to create new document.");
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Operation Failed") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Operation Failed") );
return;
}
@@ -626,7 +626,7 @@ void CHexEditorWidget::newFile( const TQByteArray &data )
void CHexEditorWidget::open()
{
- KURL file = KFileDialog::getOpenURL( mWorkDir, "*" ,topLevelWidget() );
+ KURL file = KFileDialog::getOpenURL( mWorkDir, "*" ,tqtopLevelWidget() );
if( file.isEmpty() )
return;
@@ -764,7 +764,7 @@ bool CHexEditorWidget::selectDocument( const TQString &url,
void CHexEditorWidget::insertFile( void )
{
- KFileDialog fdlg(mWorkDir, TQString::null, topLevelWidget(), 0, TRUE);
+ KFileDialog fdlg(mWorkDir, TQString(), tqtopLevelWidget(), 0, TRUE);
fdlg.setOperationMode( KFileDialog::Opening );
fdlg.okButton()->setGuiItem( KStdGuiItem::insert() );
fdlg.setCaption(i18n("Insert File"));
@@ -868,7 +868,7 @@ bool CHexEditorWidget::querySave( void )
TQString msg = i18n(""
"The current document has been modified.\n"
"Do you want to save it?" );
- int reply = KMessageBox::warningYesNoCancel( topLevelWidget(), msg, TQString::null, KStdGuiItem::save(), KStdGuiItem::discard() );
+ int reply = KMessageBox::warningYesNoCancel( tqtopLevelWidget(), msg, TQString(), KStdGuiItem::save(), KStdGuiItem::discard() );
if( reply == KMessageBox::Yes )
{
return( save() );
@@ -934,7 +934,7 @@ bool CHexEditorWidget::save( void )
"Current document has been changed on disk.\n"
"If you save now, those changes will be lost.\n"
"Proceed?" );
- int reply = KMessageBox::warningYesNoCancel( topLevelWidget(), msg,
+ int reply = KMessageBox::warningYesNoCancel( tqtopLevelWidget(), msg,
i18n("Save"), KStdGuiItem::save(), KStdGuiItem::discard() );
if( reply == KMessageBox::No || reply == KMessageBox::Cancel )
{
@@ -986,7 +986,7 @@ bool CHexEditorWidget::saveAs( void )
TQString msg = i18n(""
"A document with this name already exists.\n"
"Do you want to overwrite it?" );
- int reply = KMessageBox::warningContinueCancel( topLevelWidget(), msg,
+ int reply = KMessageBox::warningContinueCancel( tqtopLevelWidget(), msg,
i18n("Save As"), i18n("Overwrite") );
if( reply == KMessageBox::Continue )
break;
@@ -1021,7 +1021,7 @@ void CHexEditorWidget::reload( void )
if( mHexView->urlValid() == false )
{
TQString msg = i18n( "The current document does not exist on the disk." );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Reload") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Reload") );
return;
}
@@ -1040,7 +1040,7 @@ void CHexEditorWidget::reload( void )
"If you reload now, the modifications will be lost." );
}
- int reply = KMessageBox::warningContinueCancel(topLevelWidget(),msg,i18n("Reload"), i18n("&Reload"));
+ int reply = KMessageBox::warningContinueCancel(tqtopLevelWidget(),msg,i18n("Reload"), i18n("&Reload"));
if( reply != KMessageBox::Continue )
{
return;
@@ -1070,7 +1070,7 @@ void CHexEditorWidget::print( void )
prt.setFullPage( true ); // I use my own marings
// FIXME: Make a better header for the printingdialog
- if (prt.setup(topLevelWidget(), i18n("Print Hex-Document")))
+ if (prt.setup(tqtopLevelWidget(), i18n("Print Hex-Document")))
{
prt.setTopMarginMM( prt.option("kde-khexedit-topmarginmm").toInt() );
prt.setBottomMarginMM( prt.option("kde-khexedit-bottommarginmm").toInt() );
@@ -1125,7 +1125,7 @@ void CHexEditorWidget::printPostscript( CHexPrinter &printer )
if( errCode != Err_Success )
{
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Print") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Print") );
}
}
@@ -1148,7 +1148,7 @@ bool CHexEditorWidget::confirmPrintPageNumber( CHexPrinter &printer )
"You are about to print %n pages.<br>"
"Proceed?</qt>",
numPageSelected );
- int reply = KMessageBox::warningYesNo( topLevelWidget(), msg,
+ int reply = KMessageBox::warningYesNo( tqtopLevelWidget(), msg,
i18n("Print"), KStdGuiItem::print(), KStdGuiItem::cancel() );
if( reply != KMessageBox::Continue )
{
@@ -1165,7 +1165,7 @@ void CHexEditorWidget::exportDialog( void )
{
if( mExportDialog == 0 )
{
- mExportDialog = new CExportDialog( topLevelWidget(), 0, false );
+ mExportDialog = new CExportDialog( tqtopLevelWidget(), 0, false );
if( mExportDialog == 0 ) { return; }
connect( mExportDialog, TQT_SIGNAL( exportText(const SExportText &)),
this, TQT_SLOT( exportText( const SExportText &)) );
@@ -1191,7 +1191,7 @@ void CHexEditorWidget::exportText( const SExportText &ex )
{
TQString msg = i18n("Unable to export data.\n");
msg += hexError( errCode );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Export") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Export") );
}
}
@@ -1208,7 +1208,7 @@ void CHexEditorWidget::exportHtml( const SExportHtml &ex )
{
TQString msg = i18n("Unable to export data.\n");
msg += hexError( errCode );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Export") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Export") );
}
}
@@ -1225,7 +1225,7 @@ void CHexEditorWidget::exportCArray( const SExportCArray &ex )
{
TQString msg = i18n("Unable to export data.\n");
msg += hexError( errCode );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Export") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Export") );
}
}
@@ -1238,7 +1238,7 @@ void CHexEditorWidget::encode( CConversion::EMode mode )
"The encoding you have selected is not reversible.\n"
"If you revert to the original encoding later, there is no "
"guarantee that the data can be restored to the original state.");
- int reply = KMessageBox::warningContinueCancel( topLevelWidget(), msg,
+ int reply = KMessageBox::warningContinueCancel( tqtopLevelWidget(), msg,
i18n("Encode"), i18n("&Encode"));
if( reply != KMessageBox::Continue )
{
@@ -1258,7 +1258,7 @@ void CHexEditorWidget::encode( CConversion::EMode mode )
{
TQString msg = i18n("Could not encode data.\n");
msg += hexError( errCode );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Encode") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Encode") );
}
}
@@ -1306,34 +1306,34 @@ void CHexEditorWidget::enableInputLock( bool inputLock )
void CHexEditorWidget::toggleOffsetColumnVisibility( void )
{
- layout().offsetVisible = layout().offsetVisible == true ? false : true;
- mHexView->setLayout( layout() );
+ tqlayout().offsetVisible = tqlayout().offsetVisible == true ? false : true;
+ mHexView->setLayout( tqlayout() );
}
void CHexEditorWidget::toggleTextColumnVisibility( void )
{
- layout().secondaryMode = layout().secondaryMode == SDisplayLayout::hide ?
+ tqlayout().secondaryMode = tqlayout().secondaryMode == SDisplayLayout::hide ?
SDisplayLayout::textOnly : SDisplayLayout::hide;
- mHexView->setLayout( layout() );
+ mHexView->setLayout( tqlayout() );
}
void CHexEditorWidget::toggleOffsetAsDecimal( void )
{
- layout().offsetMode = layout().offsetMode == SDisplayLayout::hexadecimal ?
+ tqlayout().offsetMode = tqlayout().offsetMode == SDisplayLayout::hexadecimal ?
SDisplayLayout::decimal : SDisplayLayout::hexadecimal;
- mHexView->setLayout( layout() );
+ mHexView->setLayout( tqlayout() );
}
void CHexEditorWidget::toggleDataUppercase( void )
{
- layout().primaryUpperCase = layout().primaryUpperCase == true ? false : true;
- mHexView->setLayout( layout() );
+ tqlayout().primaryUpperCase = tqlayout().primaryUpperCase == true ? false : true;
+ mHexView->setLayout( tqlayout() );
}
void CHexEditorWidget::toggleOffsetUppercase( void )
{
- layout().offsetUpperCase = layout().offsetUpperCase == true ? false : true;
- mHexView->setLayout( layout() );
+ tqlayout().offsetUpperCase = tqlayout().offsetUpperCase == true ? false : true;
+ mHexView->setLayout( tqlayout() );
}
void CHexEditorWidget::toggleInsertMode( void )
@@ -1412,7 +1412,7 @@ void CHexEditorWidget::removeAllBookmark( void )
TQString msg = i18n(""
"Deleted bookmarks can not be restored.\n"
"Proceed?" );
- int reply = KMessageBox::warningContinueCancel( topLevelWidget(), msg );
+ int reply = KMessageBox::warningContinueCancel( tqtopLevelWidget(), msg );
if( reply != KMessageBox::Continue )
{
return;
@@ -1447,7 +1447,7 @@ void CHexEditorWidget::gotoOffset( void )
{
if( mGotoDialog == 0 )
{
- mGotoDialog = new CGotoDialog( topLevelWidget(), 0, false );
+ mGotoDialog = new CGotoDialog( tqtopLevelWidget(), 0, false );
if( mGotoDialog == 0 ) { return; }
connect( mGotoDialog, TQT_SIGNAL(gotoOffset( uint, uint, bool, bool )),
mHexView, TQT_SLOT(gotoOffset( uint, uint, bool, bool )) );
@@ -1456,7 +1456,7 @@ void CHexEditorWidget::gotoOffset( void )
}
-void CHexEditorWidget::find( void )
+void CHexEditorWidget::tqfind( void )
{
if( mFindNavigatorDialog != 0 )
{
@@ -1465,7 +1465,7 @@ void CHexEditorWidget::find( void )
if( mFindDialog == 0 )
{
- mFindDialog = new CFindDialog( topLevelWidget(), 0, false );
+ mFindDialog = new CFindDialog( tqtopLevelWidget(), 0, false );
if( mFindDialog == 0 ) { return; }
connect( mFindDialog,
TQT_SIGNAL(findData(SSearchControl &, uint, bool)),
@@ -1526,7 +1526,7 @@ void CHexEditorWidget::findData( SSearchControl &sc, uint mode, bool navigator)
if( mode == Find_First )
{
TQString msg = i18n( "Search key not found in document." );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Find") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Find") );
}
}
@@ -1580,7 +1580,7 @@ bool CHexEditorWidget::askWrap( bool fwd, const TQString &header )
"Continue from the end?" );
}
- int reply = KMessageBox::questionYesNo( topLevelWidget(), msg, header, KStdGuiItem::cont(), KStdGuiItem::cancel() );
+ int reply = KMessageBox::questionYesNo( tqtopLevelWidget(), msg, header, KStdGuiItem::cont(), KStdGuiItem::cancel() );
return( reply == KMessageBox::Yes ? true : false );
}
@@ -1594,7 +1594,7 @@ bool CHexEditorWidget::canFind( bool showError )
TQString msg = i18n(""
"Your request can not be processed.\n"
"No search pattern defined." );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Find") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Find") );
}
return( false );
}
@@ -1613,13 +1613,13 @@ void CHexEditorWidget::findNavigator( SSearchControl &sc )
if( mFindNavigatorDialog == 0 )
{
- mFindNavigatorDialog = new CFindNavigatorDialog(topLevelWidget(),0,false);
+ mFindNavigatorDialog = new CFindNavigatorDialog(tqtopLevelWidget(),0,false);
if( mFindNavigatorDialog == 0 ) { return; }
connect( mFindNavigatorDialog,
TQT_SIGNAL(findData(SSearchControl &, uint, bool)),
TQT_SLOT(findData(SSearchControl &, uint, bool)) );
connect( mFindNavigatorDialog, TQT_SIGNAL(makeKey(void)),
- TQT_SLOT(find()) );
+ TQT_SLOT(tqfind()) );
}
if( mFindNavigatorDialog->isVisible() == false )
{
@@ -1630,13 +1630,13 @@ void CHexEditorWidget::findNavigator( SSearchControl &sc )
-void CHexEditorWidget::replace( void )
+void CHexEditorWidget::tqreplace( void )
{
hideReplacePrompt();
if( mReplaceDialog == 0 )
{
- mReplaceDialog = new CReplaceDialog( topLevelWidget(), 0, false );
+ mReplaceDialog = new CReplaceDialog( tqtopLevelWidget(), 0, false );
if( mReplaceDialog == 0 ) { return; }
connect( mReplaceDialog,
TQT_SIGNAL( replaceData( SSearchControl &, uint)),
@@ -1726,7 +1726,7 @@ void CHexEditorWidget::replacePrompt( SSearchControl &sc )
{
if( mReplacePromptDialog == 0 )
{
- mReplacePromptDialog = new CReplacePromptDialog(topLevelWidget(), 0,false);
+ mReplacePromptDialog = new CReplacePromptDialog(tqtopLevelWidget(), 0,false);
if( mReplacePromptDialog == 0 ) { return; }
connect( mReplacePromptDialog,
TQT_SIGNAL( replaceData( SSearchControl &, uint)),
@@ -1765,14 +1765,14 @@ void CHexEditorWidget::replaceResult( SSearchControl &sc )
{
msg += i18n( "Search key not found in document." );
}
- KMessageBox::information( topLevelWidget(), msg, i18n("Find & Replace"));
+ KMessageBox::information( tqtopLevelWidget(), msg, i18n("Find & Replace"));
}
else
{
const TQString msg = i18n(
"<qt>Operation complete.<br><br>One replacement was made.</qt>",
"<qt>Operation complete.<br><br>%n replacements were made.</qt>", sc.numReplace );
- KMessageBox::information( topLevelWidget(), msg, i18n("Find & Replace"));
+ KMessageBox::information( tqtopLevelWidget(), msg, i18n("Find & Replace"));
}
}
@@ -1781,7 +1781,7 @@ void CHexEditorWidget::insertPattern( void )
{
if( mInsertDialog == 0 )
{
- mInsertDialog = new CInsertDialog( topLevelWidget(), 0, false );
+ mInsertDialog = new CInsertDialog( tqtopLevelWidget(), 0, false );
if( mInsertDialog == 0 ) { return; }
connect( mInsertDialog, TQT_SIGNAL(execute( SInsertData & )),
mHexView, TQT_SLOT(insert( SInsertData & )) );
@@ -1795,7 +1795,7 @@ void CHexEditorWidget::encoding( void )
TQString msg = i18n(""
"Not available yet!\n"
"Define your own encoding" );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Encoding") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Encoding") );
}
@@ -1803,7 +1803,7 @@ void CHexEditorWidget::strings( void )
{
if( mStringDialog == 0 )
{
- mStringDialog = new CStringDialog( topLevelWidget(), 0, false );
+ mStringDialog = new CStringDialog( tqtopLevelWidget(), 0, false );
if( mStringDialog == 0 ) { return; }
connect( mStringDialog, TQT_SIGNAL(markText( uint, uint, bool )),
mHexView, TQT_SLOT(setMark( uint, uint, bool )) );
@@ -1830,7 +1830,7 @@ void CHexEditorWidget::collectStrings( void )
{
TQString msg = i18n("Could not collect strings.\n");
msg += hexError( errCode );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Collect Strings") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Collect Strings") );
}
}
@@ -1842,14 +1842,14 @@ void CHexEditorWidget::recordView( void )
TQString msg = i18n(""
"Not available yet!\n"
"Define a record (structure) and fill it with data from the document." );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Record Viewer") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Record Viewer") );
}
void CHexEditorWidget::filter( void )
{
if( mFilterDialog == 0 )
{
- mFilterDialog = new CFilterDialog( topLevelWidget(), 0, false );
+ mFilterDialog = new CFilterDialog( tqtopLevelWidget(), 0, false );
if( mFilterDialog == 0 ) { return; }
connect( mFilterDialog, TQT_SIGNAL(filterData( SFilterControl & )),
mHexView, TQT_SLOT(filter( SFilterControl & )) );
@@ -1862,7 +1862,7 @@ void CHexEditorWidget::chart( void )
{
if( mCharTableDialog == 0 )
{
- mCharTableDialog = new CCharTableDialog( topLevelWidget(), 0, false );
+ mCharTableDialog = new CCharTableDialog( tqtopLevelWidget(), 0, false );
if( mCharTableDialog == 0 ) { return; }
connect( mCharTableDialog, TQT_SIGNAL(assign( const TQByteArray & )),
mHexView, TQT_SLOT(insert( const TQByteArray & )) );
@@ -1887,7 +1887,7 @@ void CHexEditorWidget::statistics( void )
{
if( mFileInfoDialog == 0 )
{
- mFileInfoDialog = new CFileInfoDialog( topLevelWidget(), 0, false );
+ mFileInfoDialog = new CFileInfoDialog( tqtopLevelWidget(), 0, false );
if( mFileInfoDialog == 0 ) { return; }
connect( mFileInfoDialog, TQT_SIGNAL(collectStatistic(SStatisticControl &)),
TQT_SLOT(collectStatistics(SStatisticControl &)));
@@ -1916,7 +1916,7 @@ void CHexEditorWidget::collectStatistics( SStatisticControl &sc )
TQString msg = i18n("Could not collect document statistics.\n");
msg += hexError( errCode );
- KMessageBox::sorry( topLevelWidget(), msg,
+ KMessageBox::sorry( tqtopLevelWidget(), msg,
i18n("Collect Document Statistics") );
}
@@ -1927,12 +1927,12 @@ void CHexEditorWidget::options( void )
{
if( mOptionDialog == 0 )
{
- mOptionDialog = new COptionDialog( topLevelWidget(), 0, false );
+ mOptionDialog = new COptionDialog( tqtopLevelWidget(), 0, false );
if( mOptionDialog == 0 ) { return; }
connect( mOptionDialog, TQT_SIGNAL(lineSizeChoice(const SDisplayLine &)),
TQT_SLOT(setLineSize(const SDisplayLine &)) );
- connect( mOptionDialog, TQT_SIGNAL(layoutChoice(const SDisplayLayout &)),
+ connect( mOptionDialog, TQT_SIGNAL(tqlayoutChoice(const SDisplayLayout &)),
TQT_SLOT(setLayout(const SDisplayLayout &)) );
connect( mOptionDialog, TQT_SIGNAL(fontChoice(const SDisplayFont &)),
TQT_SLOT(setFont(const SDisplayFont &)) );
@@ -1958,8 +1958,8 @@ void CHexEditorWidget::favorites( void )
{
TQString msg = i18n(""
"Not available yet!\n"
- "Save or retrive your favorite layout" );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Profiles") );
+ "Save or retrive your favorite tqlayout" );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Profiles") );
}
@@ -1978,8 +1978,8 @@ int CHexEditorWidget::readURL( const KURL &url, bool insert )
//
if( !url.isValid() )
{
- TQString msg = i18n("Malformed URL\n%1").arg( url.url() );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Read URL") );
+ TQString msg = i18n("Malformed URL\n%1").tqarg( url.url() );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read URL") );
return( Err_IllegalArgument );
}
@@ -2013,7 +2013,7 @@ void CHexEditorWidget::writeURL( TQString &url )
{
mHexView->setModified( modified );
TQString msg = i18n("Could not save remote file.");
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Write Failure") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Write Failure") );
}
}
}
@@ -2049,30 +2049,30 @@ bool CHexEditorWidget::readFile( const TQString &diskPath, const TQString &url,
TQFileInfo info( diskPath );
if( info.exists() == false )
{
- const TQString msg = i18n("The specified file does not exist.\n%1").arg( diskPath );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") );
+ const TQString msg = i18n("The specified file does not exist.\n%1").tqarg( diskPath );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read") );
return( false );
}
if( info.isDir() == true )
{
- const TQString msg = i18n("You have specified a folder.\n%1").arg( diskPath );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") );
+ const TQString msg = i18n("You have specified a folder.\n%1").tqarg( diskPath );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read") );
return( false );
}
if( info.isReadable() == false )
{
- const TQString msg = i18n("You do not have read permission to this file.\n%1").arg( diskPath );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") );
+ const TQString msg = i18n("You do not have read permission to this file.\n%1").tqarg( diskPath );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read") );
return( false );
}
TQFile file( diskPath );
if( file.open( IO_ReadOnly | IO_Raw ) == false )
{
- const TQString msg = i18n("An error occurred while trying to open the file.\n%1").arg( diskPath );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") );
+ const TQString msg = i18n("An error occurred while trying to open the file.\n%1").tqarg( diskPath );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read") );
return( false );
}
@@ -2102,7 +2102,7 @@ bool CHexEditorWidget::readFile( const TQString &diskPath, const TQString &url,
TQString header = insert == true ? i18n("Insert") : i18n("Read");
TQString msg = i18n("Could not read file.\n");
msg += hexError( errCode );
- KMessageBox::sorry( topLevelWidget(), msg, header );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, header );
}
file.close();
@@ -2120,14 +2120,14 @@ bool CHexEditorWidget::writeFile( const TQString &diskPath )
if( info.isDir() == true )
{
TQString msg = i18n("You have specified a folder.");
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Write Failure") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Write Failure") );
return( false );
}
if( info.isWritable() == false )
{
TQString msg = i18n("You do not have write permission.");
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Write Failure") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Write Failure") );
return( false );
}
}
@@ -2136,7 +2136,7 @@ bool CHexEditorWidget::writeFile( const TQString &diskPath )
if( file.open( IO_WriteOnly | IO_Raw | IO_Truncate ) == false )
{
TQString msg = i18n("An error occurred while trying to open the file.");
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Write Failure") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Write Failure") );
return( false );
}
@@ -2149,7 +2149,7 @@ bool CHexEditorWidget::writeFile( const TQString &diskPath )
{
TQString msg = i18n("Could not write data to disk.\n");
msg += hexError( errCode );
- KMessageBox::sorry( topLevelWidget(), msg, i18n("Write Failure") );
+ KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Write Failure") );
}
file.close();
@@ -2231,7 +2231,7 @@ bool CHexEditorWidget::createBuffer( void )
{
TQString msg = i18n( "Can not create text buffer.\n" );
msg += hexError( Err_NoMemory );
- KMessageBox::error( topLevelWidget(), msg, i18n("Loading Failed" ) );
+ KMessageBox::error( tqtopLevelWidget(), msg, i18n("Loading Failed" ) );
return( false );
}
@@ -2418,7 +2418,7 @@ int CHexEditorWidget::progressParse( const SProgressData &pd )
}
- int reply = KMessageBox::warningYesNo( topLevelWidget(), msg, header, KStdGuiItem::cancel(), KStdGuiItem::cont() );
+ int reply = KMessageBox::warningYesNo( tqtopLevelWidget(), msg, header, KStdGuiItem::cancel(), KStdGuiItem::cont() );
mProgressStop = false;
return( reply == KMessageBox::Yes ? Err_Stop : Err_Success );
}
@@ -2431,7 +2431,7 @@ bool CHexEditorWidget::busy( bool showWarning )
{
TQString msg = i18n("Could not finish operation.\n");
msg += hexError( Err_Busy );
- KMessageBox::sorry( topLevelWidget(), msg );
+ KMessageBox::sorry( tqtopLevelWidget(), msg );
}
return( mProgressBusy );
diff --git a/khexedit/hexeditorwidget.h b/khexedit/hexeditorwidget.h
index 04701f6..d14bfd1 100644
--- a/khexedit/hexeditorwidget.h
+++ b/khexedit/hexeditorwidget.h
@@ -51,9 +51,10 @@ class CReplacePromptDialog;
namespace KIO { class Job; }
-class CHexEditorWidget : public QWidget
+class CHexEditorWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum EProgressMode
@@ -70,7 +71,7 @@ class CHexEditorWidget : public QWidget
};
public:
- CHexEditorWidget( TQWidget *parent = 0, const char *name = 0 );
+ CHexEditorWidget( TQWidget *tqparent = 0, const char *name = 0 );
~CHexEditorWidget( void );
void initialize( void );
@@ -82,7 +83,7 @@ class CHexEditorWidget : public QWidget
inline int defaultTextWidth( void );
inline CHexViewWidget *view( void );
- inline SDisplayLayout &layout( void );
+ inline SDisplayLayout &tqlayout( void );
inline SDisplayLine &line( void );
inline SDisplayInputMode &inputMode( void );
inline SDisplayMisc::EOpenFile openFile( void );
@@ -149,12 +150,12 @@ class CHexEditorWidget : public QWidget
void gotoNextBookmark( void );
void gotoPrevBookmark( void );
void gotoOffset( void );
- void find( void );
+ void tqfind( void );
void findAgain( void );
void findNext( void );
void findPrevious( void );
void findData( SSearchControl &sc, uint mode, bool navigator );
- void replace( void );
+ void tqreplace( void );
void insertPattern( void );
void encoding( void );
void strings( void );
@@ -169,10 +170,10 @@ class CHexEditorWidget : public QWidget
protected slots:
void fontChanged( void );
void paletteChanged( void );
- void layoutChanged( const SDisplayLayout &layout );
+ void tqlayoutChanged( const SDisplayLayout &tqlayout );
void inputModeChanged( const SDisplayInputMode &input );
void setLineSize(const SDisplayLine &line );
- void setLayout( const SDisplayLayout &layout );
+ void setLayout( const SDisplayLayout &tqlayout );
void setCursor( const SDisplayCursor &cursor );
void setColor( const SDisplayColor &color );
void setFont( const SDisplayFont &font );
@@ -258,9 +259,9 @@ inline CHexViewWidget *CHexEditorWidget::view( void )
return( mHexView );
}
-inline SDisplayLayout &CHexEditorWidget::layout( void )
+inline SDisplayLayout &CHexEditorWidget::tqlayout( void )
{
- return( mDisplayState.layout );
+ return( mDisplayState.tqlayout );
}
inline SDisplayLine &CHexEditorWidget::line( void )
diff --git a/khexedit/hexeditstate.h b/khexedit/hexeditstate.h
index 13a6c66..04f6425 100644
--- a/khexedit/hexeditstate.h
+++ b/khexedit/hexeditstate.h
@@ -378,26 +378,26 @@ class SDisplayColor
// choses in Control Center.
//
useSystemColor = false;
- offsetBg = Qt::white;
- textBg = Qt::white;
- secondTextBg = Qt::white;
- inactiveBg = Qt::gray;
- selectBg = kapp->palette().active().highlight();
- selectFg = kapp->palette().active().highlightedText();
- markBg = Qt::blue;
- markFg = Qt::white;
- primaryFg[0] = Qt::black;
- primaryFg[1] = Qt::blue;
- offsetFg = Qt::red;
- secondaryFg = Qt::black;
- nonPrintFg = Qt::red;
- gridFg = Qt::darkCyan;
- leftSeparatorFg = Qt::darkGreen;
- rightSeparatorFg = Qt::darkGreen;
- cursorBg = Qt::red;
- cursorFg = Qt::black;
- bookmarkBg = Qt::green;
- bookmarkFg = Qt::black;
+ offsetBg = TQt::white;
+ textBg = TQt::white;
+ secondTextBg = TQt::white;
+ inactiveBg = TQt::gray;
+ selectBg = kapp->tqpalette().active().highlight();
+ selectFg = kapp->tqpalette().active().highlightedText();
+ markBg = TQt::blue;
+ markFg = TQt::white;
+ primaryFg[0] = TQt::black;
+ primaryFg[1] = TQt::blue;
+ offsetFg = TQt::red;
+ secondaryFg = TQt::black;
+ nonPrintFg = TQt::red;
+ gridFg = TQt::darkCyan;
+ leftSeparatorFg = TQt::darkGreen;
+ rightSeparatorFg = TQt::darkGreen;
+ cursorBg = TQt::red;
+ cursorFg = TQt::black;
+ bookmarkBg = TQt::green;
+ bookmarkFg = TQt::black;
}
bool useSystemColor;
@@ -574,7 +574,7 @@ class SDisplayState
{
public:
SDisplayLine line;
- SDisplayLayout layout;
+ SDisplayLayout tqlayout;
SDisplayCursor cursor;
SDisplayColor color;
SDisplayFont font;
diff --git a/khexedit/hexmanagerwidget.cc b/khexedit/hexmanagerwidget.cc
index b5fe32c..2001a6b 100644
--- a/khexedit/hexmanagerwidget.cc
+++ b/khexedit/hexmanagerwidget.cc
@@ -23,11 +23,11 @@
#include "hexmanagerwidget.h"
#include "searchbar.h"
-CHexManagerWidget::CHexManagerWidget( TQWidget *parent, const char *name,
+CHexManagerWidget::CHexManagerWidget( TQWidget *tqparent, const char *name,
EConversionPosition conversionPosition,
EPosition tabBarPosition,
EPosition searchBarPosition )
- : TQWidget( parent, name )
+ : TQWidget( tqparent, name )
{
mValid = false;
@@ -70,7 +70,7 @@ void CHexManagerWidget::updateLayout( void )
{
if( mValid == false ) { return; }
- delete layout();
+ delete tqlayout();
TQVBoxLayout *vlay = new TQVBoxLayout( this, 0, 0 );
if( mSearchBar && mSearchBarPosition == AboveEditor )
@@ -126,19 +126,19 @@ void CHexManagerWidget::setConversionVisibility( EConversionPosition position )
else if( mConversionPosition == Float )
{
TQPoint point = mapToGlobal( TQPoint(0,0) );
- TQRect rect = geometry();
+ TQRect rect = tqgeometry();
TQPoint p;
- p.setX(point.x() + rect.width()/2 - mConverter->minimumSize().width()/2);
- p.setY(point.y() + rect.height()/2 - mConverter->minimumSize().height()/2);
- mConverter->resize( mConverter->minimumSize() );
+ p.setX(point.x() + rect.width()/2 - mConverter->tqminimumSize().width()/2);
+ p.setY(point.y() + rect.height()/2 - mConverter->tqminimumSize().height()/2);
+ mConverter->resize( mConverter->tqminimumSize() );
mConverter->reparent( 0, WStyle_Customize | WStyle_DialogBorder, p, true );
mConverter->setCaption(kapp->makeStdCaption(i18n("Conversion")));
}
else
{
mConversionPosition = Embed;
- uint utilHeight = mConverter->minimumSize().height();
+ uint utilHeight = mConverter->tqminimumSize().height();
TQPoint p( 0, height() - utilHeight );
mConverter->reparent( this, 0, p, true );
}
@@ -250,16 +250,16 @@ int CHexManagerWidget::preferredWidth( void )
int w = mEditor->defaultTextWidth();
if( mConversionPosition == Embed )
{
- int converterWidth = mConverter->sizeHint().width();
- w = QMAX( w, converterWidth );
+ int converterWidth = mConverter->tqsizeHint().width();
+ w = TQMAX( w, converterWidth );
}
return( w );
}
-CTabBar::CTabBar( TQWidget *parent, char *name )
- :TQTabBar( parent, name )
+CTabBar::CTabBar( TQWidget *tqparent, char *name )
+ :TQTabBar( tqparent, name )
{
connect( this, TQT_SIGNAL(selected(int)), this, TQT_SLOT(slotSelected(int)) );
}
@@ -267,9 +267,9 @@ CTabBar::CTabBar( TQWidget *parent, char *name )
void CTabBar::addName( const TQString &name )
{
- TQString n( name.right(name.length()-name.findRev('/')-1) );
+ TQString n( name.right(name.length()-name.tqfindRev('/')-1) );
- TQTab *t = find( n );
+ TQTab *t = tqfind( n );
if( t == 0 )
{
t = new TQTab();
@@ -283,8 +283,8 @@ void CTabBar::addName( const TQString &name )
void CTabBar::removeName( const TQString &name )
{
- TQString n( name.right(name.length()-name.findRev('/')-1) );
- TQTab *t = find(n);
+ TQString n( name.right(name.length()-name.tqfindRev('/')-1) );
+ TQTab *t = tqfind(n);
if( t == 0 )
{
return;
@@ -297,7 +297,7 @@ void CTabBar::removeName( const TQString &name )
{
mFileList.remove(it);
removeTab(t);
- layoutTabs();
+ tqlayoutTabs();
break;
}
}
@@ -306,8 +306,8 @@ void CTabBar::removeName( const TQString &name )
void CTabBar::changeName( const TQString &curName, const TQString &newName )
{
- TQString n( curName.right(curName.length()-curName.findRev('/')-1) );
- TQTab *t = find(n);
+ TQString n( curName.right(curName.length()-curName.tqfindRev('/')-1) );
+ TQTab *t = tqfind(n);
if( t == 0 )
{
return;
@@ -318,12 +318,12 @@ void CTabBar::changeName( const TQString &curName, const TQString &newName )
{
if( (*it).id() == t->identifier() )
{
- TQString m( newName.right(newName.length()-newName.findRev('/')-1) );
+ TQString m( newName.right(newName.length()-newName.tqfindRev('/')-1) );
t->setText(m);
mFileList.remove(it);
mFileList.append( CFileKey(newName,t->identifier()) );
- layoutTabs();
+ tqlayoutTabs();
update(); // Seems to be necessary
break;
}
@@ -331,7 +331,7 @@ void CTabBar::changeName( const TQString &curName, const TQString &newName )
}
-TQTab *CTabBar::find( const TQString &name )
+TQTab *CTabBar::tqfind( const TQString &name )
{
TQPtrList<TQTab> &list = *tabList();
for( TQTab *t = list.first(); t != 0; t = list.next() )
diff --git a/khexedit/hexmanagerwidget.h b/khexedit/hexmanagerwidget.h
index 2d90233..40dfc9f 100644
--- a/khexedit/hexmanagerwidget.h
+++ b/khexedit/hexmanagerwidget.h
@@ -72,12 +72,13 @@ class CFileKey
-class CTabBar : public QTabBar
+class CTabBar : public TQTabBar
{
Q_OBJECT
+ TQ_OBJECT
public:
- CTabBar( TQWidget *parent=0, char *name=0 );
+ CTabBar( TQWidget *tqparent=0, char *name=0 );
void addName( const TQString &name );
void removeName( const TQString &name );
void changeName( const TQString &curName, const TQString &newName );
@@ -87,7 +88,7 @@ class CTabBar : public QTabBar
void slotSelected( int id );
private:
- TQTab *find( const TQString &name );
+ TQTab *tqfind( const TQString &name );
private:
TQValueList<CFileKey> mFileList;
@@ -97,9 +98,10 @@ class CTabBar : public QTabBar
};
-class CHexManagerWidget : public QWidget
+class CHexManagerWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum EConversionPosition
@@ -117,7 +119,7 @@ class CHexManagerWidget : public QWidget
};
public:
- CHexManagerWidget( TQWidget *parent = 0, const char *name = 0,
+ CHexManagerWidget( TQWidget *tqparent = 0, const char *name = 0,
EConversionPosition state = Embed,
EPosition tabBarPosition = HideItem,
EPosition searchBarPosition = HideItem );
diff --git a/khexedit/hextoolwidget.cc b/khexedit/hextoolwidget.cc
index b5e918e..7c80583 100644
--- a/khexedit/hextoolwidget.cc
+++ b/khexedit/hextoolwidget.cc
@@ -29,8 +29,8 @@
#include <tqcombobox.h>
-CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name )
- : TQFrame( parent, name )
+CHexToolWidget::CHexToolWidget( TQWidget *tqparent, const char *name )
+ : TQFrame( tqparent, name )
{
setFrameStyle( TQFrame::Panel | TQFrame::Raised );
setLineWidth( 1 );
@@ -64,30 +64,30 @@ CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name )
for( int i=0; i<4; i++ )
{
TQLabel *Label = new TQLabel( msg1[i], this );
- Label->setAlignment( AlignRight|AlignVCenter );
+ Label->tqsetAlignment( AlignRight|AlignVCenter );
ValuesBox->addWidget( Label, i, 0 );
mText1[i] = new TQLineEdit( this );
mText1[i]->setReadOnly( true );
- mText1[i]->setAlignment( AlignRight );
+ mText1[i]->tqsetAlignment( AlignRight );
ValuesBox->addWidget( mText1[i], i, 1 );
Label = new TQLabel( msg2[i], this );
- Label->setAlignment( AlignRight|AlignVCenter );
+ Label->tqsetAlignment( AlignRight|AlignVCenter );
ValuesBox->addWidget( Label, i, 3 );
mText2[i] = new TQLineEdit( this );
mText2[i]->setReadOnly( true );
- mText2[i]->setAlignment( AlignRight );
+ mText2[i]->tqsetAlignment( AlignRight );
ValuesBox->addWidget( mText2[i], i, 4 );
Label = new TQLabel( msg3[i], this );
- Label->setAlignment( AlignRight|AlignVCenter );
+ Label->tqsetAlignment( AlignRight|AlignVCenter );
mUtilBox->addWidget( Label, i, 1 );
mText3[i] = new TQLineEdit( this );
mText3[i]->setReadOnly( true );
- mText3[i]->setAlignment( AlignRight );
+ mText3[i]->tqsetAlignment( AlignRight );
mUtilBox->addWidget( mText3[i], i, 2 );
}
@@ -95,7 +95,7 @@ CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name )
text = i18n("Show little endian decoding");
mCheckIntelFormat = new TQCheckBox( text, this );
- mCheckIntelFormat->setMinimumSize( mCheckIntelFormat->sizeHint() );
+ mCheckIntelFormat->setMinimumSize( mCheckIntelFormat->tqsizeHint() );
connect( mCheckIntelFormat, TQT_SIGNAL(clicked()), this, TQT_SLOT(intelFormat()) );
SettingsBox->addWidget( mCheckIntelFormat, 0, AlignVCenter );
mCheckIntelFormat->setChecked( // default value to please endian system users
@@ -109,7 +109,7 @@ CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name )
text = i18n("Show unsigned as hexadecimal");
mCheckHexadecimal = new TQCheckBox( text, this );
- mCheckHexadecimal->setMinimumSize( mCheckHexadecimal->sizeHint() );
+ mCheckHexadecimal->setMinimumSize( mCheckHexadecimal->tqsizeHint() );
connect( mCheckHexadecimal, TQT_SIGNAL(clicked()), this, TQT_SLOT(unsignedFormat()) );
SettingsBox->addWidget( mCheckHexadecimal, 0, AlignVCenter );
@@ -120,7 +120,7 @@ CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name )
// Variable bitwidth. Based on Craig Graham's work.
//
TQLabel *bitLabel = new TQLabel( i18n("Stream length:"), this );
- bitLabel->setAlignment( AlignRight|AlignVCenter );
+ bitLabel->tqsetAlignment( AlignRight|AlignVCenter );
mUtilBox->addWidget( bitLabel, 4, 1 );
mBitCombo = new TQComboBox( false, this );
@@ -132,7 +132,7 @@ CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name )
text += i==0 ? i18n("Bit Window") : i18n("Bits Window");
mBitCombo->insertItem( text );
}
- mBitCombo->setMinimumSize( mBitCombo->sizeHint() );
+ mBitCombo->setMinimumSize( mBitCombo->tqsizeHint() );
connect( mBitCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(bitWidthChanged(int)));
mUtilBox->addWidget( mBitCombo, 4, 2 );
@@ -147,7 +147,7 @@ CHexToolWidget::CHexToolWidget( TQWidget *parent, const char *name )
mCursorState.valid = false;
mViewHexCaps = true;
- setMinimumSize( sizeHint() );
+ setMinimumSize( tqsizeHint() );
show();
}
@@ -192,7 +192,7 @@ void CHexToolWidget::bitWidthChanged( int /*i*/ )
//
unsigned long CHexToolWidget::bitValue( SCursorState &state, int n )
{
- static const unsigned char bitmask[9] =
+ static const unsigned char bittqmask[9] =
{
0, 1<<7, 3<<6, 7<<5, 15<<4, 31<<3, 63<<2, 127<<1, 255
};
@@ -217,9 +217,9 @@ unsigned long CHexToolWidget::bitValue( SCursorState &state, int n )
int this_time = ((8-bit)>=n)?n:(8-bit);
//
- // mask to get only the bit's we're swallowing
+ // tqmask to get only the bit's we're swallowing
//
- c &= bitmask[this_time];
+ c &= bittqmask[this_time];
//
// shift down to get bit's in low part of byte
@@ -258,7 +258,7 @@ void CHexToolWidget::cursorChanged( SCursorState &state )
// checking for system endianess, using the compiler for the byte interpretation and cutting bloaded code
// TODO: add PDP endianess
void *P8Bit, *P16Bit, *P32Bit, *P64Bit;
- // ensure strict alignment for double as needed on some architectures (e.g. PA-RISC)
+ // ensure strict tqalignment for double as needed on some architectures (e.g. PA-RISC)
typedef union { unsigned char b[8]; double d; } aligned_t;
aligned_t Data;
if(
diff --git a/khexedit/hextoolwidget.h b/khexedit/hextoolwidget.h
index 7bb0643..2c2abe5 100644
--- a/khexedit/hextoolwidget.h
+++ b/khexedit/hextoolwidget.h
@@ -31,12 +31,13 @@ class TQCheckBox;
#include "hexbuffer.h"
#include <tqframe.h>
-class CHexToolWidget : public QFrame
+class CHexToolWidget : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- CHexToolWidget( TQWidget *parent = 0, const char *name = 0 );
+ CHexToolWidget( TQWidget *tqparent = 0, const char *name = 0 );
~CHexToolWidget( void );
void writeConfiguration( KConfig &config );
diff --git a/khexedit/hexvalidator.cc b/khexedit/hexvalidator.cc
index 96cd982..28325a9 100644
--- a/khexedit/hexvalidator.cc
+++ b/khexedit/hexvalidator.cc
@@ -23,9 +23,9 @@
#include <tqwidget.h>
#include "hexvalidator.h"
-CHexValidator::CHexValidator( TQWidget *parent, EState state,
+CHexValidator::CHexValidator( TQWidget *tqparent, EState state,
const char *name )
- :TQValidator( parent, name )
+ :TQValidator( TQT_TQOBJECT(tqparent), name )
{
setState( state );
}
diff --git a/khexedit/hexvalidator.h b/khexedit/hexvalidator.h
index 69b6fc1..551bc4f 100644
--- a/khexedit/hexvalidator.h
+++ b/khexedit/hexvalidator.h
@@ -23,9 +23,10 @@
#include <tqvalidator.h>
-class CHexValidator: public QValidator
+class CHexValidator: public TQValidator
{
Q_OBJECT
+ TQ_OBJECT
public:
enum EState
@@ -38,7 +39,7 @@ class CHexValidator: public QValidator
};
public:
- CHexValidator( TQWidget *parent, EState state, const char *name = 0 );
+ CHexValidator( TQWidget *tqparent, EState state, const char *name = 0 );
~CHexValidator( void );
TQValidator::State validate( TQString &string, int &pos ) const;
void setState( EState state );
diff --git a/khexedit/hexviewwidget.cc b/khexedit/hexviewwidget.cc
index 5f3e32c..8cdc1d4 100644
--- a/khexedit/hexviewwidget.cc
+++ b/khexedit/hexviewwidget.cc
@@ -165,22 +165,22 @@ void CDragManager::setupTimer( void )
//
-// This widget will use the entire space of the parent widget
+// This widget will use the entire space of the tqparent widget
//
-CHexViewWidget::CHexViewWidget( TQWidget *parent, const char *name,
+CHexViewWidget::CHexViewWidget( TQWidget *tqparent, const char *name,
CHexBuffer *hexBuffer )
- : TQFrame( parent, name,
+ : TQFrame( tqparent, name,
#ifdef USE_NORTHWEST_GRAVITY
- Qt::WStaticContents
+ TQt::WStaticContents
#else
0
#endif
), mScrollBarSize( 16 )
{
- if( parent == 0 || hexBuffer == 0 ) { return; }
+ if( tqparent == 0 || hexBuffer == 0 ) { return; }
//
- // Qt 2.0:
+ // TQt 2.0:
// -------
// I use the "CScrollBar" because sometimes (very seldom) when I
// do a mHorzScroll->hide() the mHorzScroll->isVisible() remains true
@@ -193,9 +193,9 @@ CHexViewWidget::CHexViewWidget( TQWidget *parent, const char *name,
// signal whenever is receives a TQHideEvent.
//
- mVertScroll = new CScrollBar( TQScrollBar::Vertical, this );
+ mVertScroll = new CScrollBar( Qt::Vertical, this );
if( mVertScroll == 0 ) { return; }
- mHorzScroll = new CScrollBar( TQScrollBar::Horizontal, this );
+ mHorzScroll = new CScrollBar( Qt::Horizontal, this );
if( mHorzScroll == 0 ) { return; }
mCorner = new TQWidget( this );
if( mCorner == 0 ) { return; }
@@ -217,7 +217,7 @@ CHexViewWidget::CHexViewWidget( TQWidget *parent, const char *name,
setFrameStyle( TQFrame::WinPanel|TQFrame::Sunken );
setWFlags( WResizeNoErase );
- setFocusPolicy( StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
mHexBuffer = hexBuffer;
mHexBuffer->cursorReset();
@@ -233,7 +233,7 @@ CHexViewWidget::CHexViewWidget( TQWidget *parent, const char *name,
setStartY(0);
setAcceptDrops(true);
- setDropHighlight(false); // Init state + frame shape
+ setDropHighlight(false); // Init state + frame tqshape
setBackgroundColor( mHexBuffer->backgroundColor() );
}
@@ -272,7 +272,7 @@ int CHexViewWidget::insertFile( TQFile &file, CProgress &p )
emit dataChanged();
emit cursorChanged( mHexBuffer->cursorState() );
- emit layoutChanged( mLayout );
+ emit tqlayoutChanged( mLayout );
return( Err_Success );
}
@@ -371,7 +371,7 @@ void CHexViewWidget::setBuffer( CHexBuffer *hexBuffer )
emit cursorChanged( mHexBuffer->cursorState() );
emit fileState( mHexBuffer->fileState() );
emit encodingChanged( mHexBuffer->encoding() );
- emit layoutChanged( mLayout );
+ emit tqlayoutChanged( mLayout );
emit inputModeChanged( mHexBuffer->inputMode() );
emit fileName( mHexBuffer->url(), mHexBuffer->hasFileName() );
emit bookmarkChanged( mHexBuffer->bookmarkList() );
@@ -386,7 +386,7 @@ void CHexViewWidget::changeXPos( int p )
setStartX(p);
- if( QABS(dx) < width() )
+ if( TQABS(dx) < width() )
{
scroll( dx, 0, contentsRect() );
}
@@ -414,7 +414,7 @@ void CHexViewWidget::changeYPos( int p )
int dy = startY() - p;
setStartY(p);
- if( QABS( dy ) < height() )
+ if( TQABS( dy ) < height() )
{
scroll( 0, dy, contentsRect() );
}
@@ -438,7 +438,7 @@ void CHexViewWidget::changeYPos( int p )
void CHexViewWidget::clipboardChanged( void )
{
- disconnect(TQApplication::clipboard(),TQT_SIGNAL(dataChanged()),
+ disconnect(TQApplication::tqclipboard(),TQT_SIGNAL(dataChanged()),
this,TQT_SLOT(clipboardChanged()));
unselect();
}
@@ -459,7 +459,7 @@ void CHexViewWidget::filter( SFilterControl &fc )
int errCode = mHexBuffer->filter( fc );
if( errCode == Err_Success )
{
- repaint();
+ tqrepaint();
emit dataChanged();
emit cursorChanged( mHexBuffer->cursorState() );
}
@@ -629,7 +629,7 @@ void CHexViewWidget::updateView( bool redraw, bool fixCursor )
tooMuchX += mScrollBarSize;
if( horzScrollbarVisible == false && tooMuchX > 0 )
{
- // Horizontal scrollbar will be visible after all.
+ //Qt::Horizontal scrollbar will be visible after all.
editHeight -= mScrollBarSize;
tooMuchY += mScrollBarSize;
}
@@ -716,13 +716,13 @@ void CHexViewWidget::setPalette( const TQPalette &p )
}
-void CHexViewWidget::setLayout( SDisplayLayout &layout )
+void CHexViewWidget::setLayout( SDisplayLayout &tqlayout )
{
- mLayout = layout;
+ mLayout = tqlayout;
mHexBuffer->setLayout( mLayout );
updateWindow();
- emit layoutChanged( mLayout );
+ emit tqlayoutChanged( mLayout );
emit cursorChanged( mHexBuffer->cursorState() );
emit textWidth( defaultWidth() );
}
@@ -739,7 +739,7 @@ void CHexViewWidget::setCursor( const SDisplayCursor &cursor,
bool /*updateDisplay*/ )
{
mCursor = cursor;
- mHexBuffer->setCursorShapeModifier( cursor.alwaysBlockShape,
+ mHexBuffer->settqCursorShapeModifier( cursor.alwaysBlockShape,
cursor.thickInsertShape );
setupCursorTimer();
redrawFromOffset( mHexBuffer->cursorOffset(), false );
@@ -752,7 +752,7 @@ void CHexViewWidget::setColor( const SDisplayColor &color,
mHexBuffer->setColor( mColor );
if( updateDisplay == true )
{
- repaint();
+ tqrepaint();
}
}
@@ -796,7 +796,7 @@ int CHexViewWidget::setEncoding( CConversion::EMode mode, CProgress &p )
int errCode = mHexBuffer->setEncoding( mode, p );
if( errCode == Err_Success )
{
- repaint();
+ tqrepaint();
emit cursorChanged( mHexBuffer->cursorState() );
emit encodingChanged( mHexBuffer->encoding() );
}
@@ -964,18 +964,18 @@ void CHexViewWidget::copy( void )
{
return;
}
- disconnect(TQApplication::clipboard(),TQT_SIGNAL(dataChanged()),
+ disconnect(TQApplication::tqclipboard(),TQT_SIGNAL(dataChanged()),
this,TQT_SLOT(clipboardChanged()));
//
- // Note: Do no give the CHexDrag a parent != 0. The clipboard
+ // Note: Do no give the CHexDrag a tqparent != 0. The clipboard
// owns the current dragdata and will destroy it on exit or
- // when it receives a new object. If the CHexDrag has a parent
- // != 0, the CHexDrag object will be destroyed when the parent
+ // when it receives a new object. If the CHexDrag has a tqparent
+ // != 0, the CHexDrag object will be destroyed when the tqparent
// is destroyed. We will then have a double destroy situation
// when the app. is closed (=> segfault).
//
- TQApplication::clipboard()->setData(new CHexDrag( buf ));
- connect(TQApplication::clipboard(),TQT_SIGNAL(dataChanged()),
+ TQApplication::tqclipboard()->setData(new CHexDrag( buf ));
+ connect(TQApplication::tqclipboard(),TQT_SIGNAL(dataChanged()),
this,TQT_SLOT(clipboardChanged()));
}
@@ -988,10 +988,10 @@ void CHexViewWidget::copyText( int columnSegment )
return;
}
- disconnect(TQApplication::clipboard(),TQT_SIGNAL(dataChanged()),
+ disconnect(TQApplication::tqclipboard(),TQT_SIGNAL(dataChanged()),
this,TQT_SLOT(clipboardChanged()));
- TQApplication::clipboard()->setText( buf.data() );
- connect(TQApplication::clipboard(),TQT_SIGNAL(dataChanged()),
+ TQApplication::tqclipboard()->setText( buf.data() );
+ connect(TQApplication::tqclipboard(),TQT_SIGNAL(dataChanged()),
this,TQT_SLOT(clipboardChanged()));
}
@@ -999,7 +999,7 @@ void CHexViewWidget::copyText( int columnSegment )
void CHexViewWidget::paste( void )
{
- TQMimeSource *data = TQApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::tqclipboard()->data();
if( data != 0 )
{
TQByteArray buf;
@@ -1099,11 +1099,11 @@ int CHexViewWidget::bookmarkMenu( const TQString &title )
if( p == 0 ) { continue; }
text.sprintf("%04X:%04X", p->offset>>16, p->offset&0x0000FFFF );
- text.prepend( TQString("[%1] %2: ").arg(i+1).arg(i18n("Offset")) );
+ text.prepend( TQString("[%1] %2: ").tqarg(i+1).tqarg(i18n("Offset")) );
popup->insertItem( text, i );
}
- TQSize s(popup->sizeHint());
+ TQSize s(popup->tqsizeHint());
TQPoint center( (width()-s.width())/2, (height()-s.height())/2 );
int position = popup->exec( mapToGlobal(center) );
delete popup;
@@ -1379,7 +1379,7 @@ void CHexViewWidget::drawFrame( TQPainter *p )
// accepts a drop. The setPalette() function causes quite a bit of flicker
// in the scrollbars (even when PropagationMode is NoChildren), so I
// draw the frame manually when it can accept a drop. Note that the
- // code below is for the frame shape "TQFrame::WinPanel|TQFrame::Plain"
+ // code below is for the frame tqshape "TQFrame::WinPanel|TQFrame::Plain"
//
if( mDropHighlight == true )
{
@@ -1505,7 +1505,7 @@ void CHexViewWidget::keyPressEvent( TQKeyEvent *e )
default:
if( (e->text()[0]).isPrint() == true )
{
- cursorInput( e->text()[0] );
+ cursorInput( TQString(e->text())[0] );
}
break;
}
@@ -1534,7 +1534,7 @@ void CHexViewWidget::mousePressEvent( TQMouseEvent *e )
// The RMB popup menu is managed by the KContextMenuManager
//
- if( e->button() == LeftButton )
+ if( e->button() == Qt::LeftButton )
{
if( e->state() & ControlButton )
{
@@ -1550,7 +1550,7 @@ void CHexViewWidget::mousePressEvent( TQMouseEvent *e )
setCursorPosition( e->x(), e->y(), true, cellLevel );
}
}
- else if( e->button() == MidButton )
+ else if( e->button() == Qt::MidButton )
{
paste();
}
@@ -1559,7 +1559,7 @@ void CHexViewWidget::mousePressEvent( TQMouseEvent *e )
void CHexViewWidget::mouseMoveEvent( TQMouseEvent *e )
{
- if( e->state() & LeftButton )
+ if( e->state() & Qt::LeftButton )
{
if( mDragManager->start( e ) == false )
{
@@ -1575,7 +1575,7 @@ void CHexViewWidget::mouseReleaseEvent( TQMouseEvent *e )
// The RMB popup menu is managed by the KContextMenuManager
//
- if( e->button() == LeftButton )
+ if( e->button() == Qt::LeftButton )
{
if( e->state() & ControlButton )
{
@@ -1670,7 +1670,7 @@ void CHexViewWidget::dropEvent( TQDropEvent *e )
{
//
// This widget can not itself open a file so it will simply pass
- // the request to a parent that can (hopefully) do this
+ // the request to a tqparent that can (hopefully) do this
//
for( KURL::List::ConstIterator it = list.begin(); it != list.end(); it++ )
{
@@ -1860,7 +1860,7 @@ void CHexViewWidget::setCursorPosition(int x, int y, bool init, bool cellLevel)
void CHexViewWidget::redrawInterval( uint startOffset, uint stopOffset )
{
//
- // Can be improved, I repaint the entire line even if the offsets
+ // Can be improved, I tqrepaint the entire line even if the offsets
// only specify one byte.
//
uint lineStart = mHexBuffer->calculateLine( startOffset );
@@ -1942,7 +1942,7 @@ void CHexViewWidget::paintText( const TQRect &rect, bool expand )
#endif
}
- if( contentsRect().contains( r ) == false )
+ if( contentsRect().tqcontains( r ) == false )
{
paintFrame();
if( r.left() < frameWidth() ) { r.setLeft( frameWidth() ); }
@@ -2270,7 +2270,7 @@ void CHexViewWidget::setDropHighlight( bool dropHighlight )
//
// 2000-01-10 Espen Sand
// Highlight. I have reimplemented TQFrame::drawFrame(TQPainter *)
- // to support a custom frame color. I assume the frame shape is
+ // to support a custom frame color. I assume the frame tqshape is
// "TQFrame::WinPanel|TQFrame::Plain" in that function.
//
setFrameStyle( TQFrame::WinPanel|TQFrame::Plain );
diff --git a/khexedit/hexviewwidget.h b/khexedit/hexviewwidget.h
index d0050e8..c467e03 100644
--- a/khexedit/hexviewwidget.h
+++ b/khexedit/hexviewwidget.h
@@ -37,13 +37,14 @@
#include "hexclipboard.h"
#include "hexbuffer.h"
-class CScrollBar : public QScrollBar
+class CScrollBar : public TQScrollBar
{
Q_OBJECT
+ TQ_OBJECT
public:
- CScrollBar( Orientation o, TQWidget *parent, const char *name = 0 )
- : TQScrollBar( o, parent, name )
+ CScrollBar( Qt::Orientation o, TQWidget *tqparent, const char *name = 0 )
+ : TQScrollBar( o, tqparent, name )
{
}
@@ -58,9 +59,10 @@ class CScrollBar : public QScrollBar
};
-class CDragManager : public QWidget
+class CDragManager : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum EDragActivateMode
@@ -95,12 +97,13 @@ class CDragManager : public QWidget
-class CHexViewWidget : public QFrame
+class CHexViewWidget : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- CHexViewWidget( TQWidget *parent, const char *name, CHexBuffer *hexBuffer );
+ CHexViewWidget( TQWidget *tqparent, const char *name, CHexBuffer *hexBuffer );
~CHexViewWidget( void );
inline bool widgetValid( void );
@@ -137,7 +140,7 @@ class CHexViewWidget : public QFrame
virtual void setPalette( const TQPalette & );
void setInputMode( SDisplayInputMode &mode );
- void setLayout( SDisplayLayout &layout );
+ void setLayout( SDisplayLayout &tqlayout );
void setCursor( const SDisplayCursor &cursor, bool updateDisplay );
void setColor( const SDisplayColor &color, bool updateDisplay );
void setFont( const SDisplayFontInfo &fontInfo, bool updateDisplay );
@@ -215,7 +218,7 @@ class CHexViewWidget : public QFrame
void cursorChanged( SCursorState &state );
void fileState( SFileState &state );
void dataChanged( void );
- void layoutChanged( const SDisplayLayout &layout );
+ void tqlayoutChanged( const SDisplayLayout &tqlayout );
void inputModeChanged( const SDisplayInputMode &mode );
void bookmarkChanged( TQPtrList<SCursorOffset> &list );
void editMode( CHexBuffer::EEditMode editMode );
diff --git a/khexedit/lib/codecs/kbinarybytecodec.cpp b/khexedit/lib/codecs/kbinarybytecodec.cpp
index a49a460..fc9fe8d 100644
--- a/khexedit/lib/codecs/kbinarybytecodec.cpp
+++ b/khexedit/lib/codecs/kbinarybytecodec.cpp
@@ -24,7 +24,7 @@ using namespace KHE;
void KBinaryByteCodec::encode( TQString &Digits, unsigned int Pos, const unsigned char Char ) const
{
for( unsigned char M=1<<7; M>0; M>>=1 )
- Digits.at(Pos++) = (Char & M) ? '1' : '0';
+ Digits.tqat(Pos++) = (Char & M) ? '1' : '0';
}
void KBinaryByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const
@@ -36,7 +36,7 @@ void KBinaryByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned
break;
// now set the
for( ; M>0; M>>=1 )
- Digits.at(Pos++) = (Char & M) ? '1' : '0';
+ Digits.tqat(Pos++) = (Char & M) ? '1' : '0';
}
diff --git a/khexedit/lib/codecs/kbytecodec.cpp b/khexedit/lib/codecs/kbytecodec.cpp
index f4847ba..900055e 100644
--- a/khexedit/lib/codecs/kbytecodec.cpp
+++ b/khexedit/lib/codecs/kbytecodec.cpp
@@ -40,7 +40,7 @@ KByteCodec *KByteCodec::createCodec( KCoding C )
unsigned int KByteCodec::decode( unsigned char *Char, const TQString &Digits, uint Pos ) const
{
- //kdDebug() << TQString("KByteCodec::decode(%1,%2)").arg(Digits).arg(Pos) << endl;
+ //kdDebug() << TQString("KByteCodec::decode(%1,%2)").tqarg(Digits).tqarg(Pos) << endl;
const uint P = Pos;
// remove leading 0s
@@ -50,7 +50,7 @@ unsigned int KByteCodec::decode( unsigned char *Char, const TQString &Digits, ui
unsigned int d = encodingWidth();
do
{
- if( !appendDigit(&C,Digits.at(Pos)) )
+ if( !appendDigit(&C,Digits.tqat(Pos)) )
break;
++Pos;
diff --git a/khexedit/lib/codecs/kcharcodec.cpp b/khexedit/lib/codecs/kcharcodec.cpp
index 1aab79b..dea28c1 100644
--- a/khexedit/lib/codecs/kcharcodec.cpp
+++ b/khexedit/lib/codecs/kcharcodec.cpp
@@ -42,7 +42,7 @@ KCharCodec *KCharCodec::createCodec( const TQString &Name )
{
KCharCodec *Codec = 0;
- if( KTextCharCodec::codecNames().findIndex(Name) != -1 )
+ if( KTextCharCodec::codecNames().tqfindIndex(Name) != -1 )
Codec = KTextCharCodec::createCodec( Name );
else if( KEBCDIC1047CharCodec::codecName() == Name )
Codec = KEBCDIC1047CharCodec::create();
diff --git a/khexedit/lib/codecs/kdecimalbytecodec.cpp b/khexedit/lib/codecs/kdecimalbytecodec.cpp
index c556875..065eb81 100644
--- a/khexedit/lib/codecs/kdecimalbytecodec.cpp
+++ b/khexedit/lib/codecs/kdecimalbytecodec.cpp
@@ -24,12 +24,12 @@ using namespace KHE;
void KDecimalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{
unsigned char C = Char / 100;
- Digits.at(Pos++) = '0'+C;
+ Digits.tqat(Pos++) = '0'+C;
Char -= C * 100;
C = Char / 10;
- Digits.at(Pos++) = '0'+C;
+ Digits.tqat(Pos++) = '0'+C;
Char -= C * 10;
- Digits.at(Pos) = '0'+Char;
+ Digits.tqat(Pos) = '0'+Char;
}
@@ -38,15 +38,15 @@ void KDecimalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigne
unsigned char C;
if( (C = Char / 100) )
{
- Digits.at(Pos++) = '0'+C;
+ Digits.tqat(Pos++) = '0'+C;
Char -= C * 100;
}
if( (C = Char / 10) )
{
- Digits.at(Pos++) = '0'+C;
+ Digits.tqat(Pos++) = '0'+C;
Char -= C * 10;
}
- Digits.at(Pos) = '0'+Char;
+ Digits.tqat(Pos) = '0'+Char;
}
diff --git a/khexedit/lib/codecs/kebcdic1047charcodec.cpp b/khexedit/lib/codecs/kebcdic1047charcodec.cpp
index d1002c3..2e91035 100644
--- a/khexedit/lib/codecs/kebcdic1047charcodec.cpp
+++ b/khexedit/lib/codecs/kebcdic1047charcodec.cpp
@@ -21,7 +21,7 @@
using namespace KHE;
-static Q_UINT16 UnicodeChars[256] =
+static TQ_UINT16 UnicodeChars[256] =
{
0x0000, 0x0001, 0x0002, 0x0003, 0x009C, 0x0009, 0x0086, 0x007F,
0x0097, 0x008D, 0x008E, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
@@ -98,7 +98,7 @@ static const char KEBCDIC1047CharCodecName[] = "EBCDIC 1047";
bool KEBCDIC1047CharCodec::encode( char *D, const TQChar &C ) const
{
- int I = C.unicode();
+ int I = C.tqunicode();
// not in range?
if( 0x00FF < I )
return false;
@@ -119,6 +119,6 @@ const TQString& KEBCDIC1047CharCodec::name() const
const TQString& KEBCDIC1047CharCodec::codecName()
{
- static const TQString Name( TQString::fromLatin1(KEBCDIC1047CharCodecName) );
+ static const TQString Name( TQString::tqfromLatin1(KEBCDIC1047CharCodecName) );
return Name;
}
diff --git a/khexedit/lib/codecs/khexadecimalbytecodec.cpp b/khexedit/lib/codecs/khexadecimalbytecodec.cpp
index 596fd24..46abdad 100644
--- a/khexedit/lib/codecs/khexadecimalbytecodec.cpp
+++ b/khexedit/lib/codecs/khexadecimalbytecodec.cpp
@@ -41,16 +41,16 @@ bool KHexadecimalByteCodec::smallDigits() const { return Digit != BigDigit; }
void KHexadecimalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{
- Digits.at(Pos++) = Digit[Char>>4];
- Digits.at(Pos) = Digit[Char&0x0F];
+ Digits.tqat(Pos++) = Digit[Char>>4];
+ Digits.tqat(Pos) = Digit[Char&0x0F];
}
void KHexadecimalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{
unsigned char C;
if( (C = (Char>>4)) )
- Digits.at(Pos++) = Digit[C];
- Digits.at(Pos) = Digit[Char&0x0F];
+ Digits.tqat(Pos++) = Digit[C];
+ Digits.tqat(Pos) = Digit[Char&0x0F];
}
diff --git a/khexedit/lib/codecs/koctalbytecodec.cpp b/khexedit/lib/codecs/koctalbytecodec.cpp
index 44c7952..7aa156d 100644
--- a/khexedit/lib/codecs/koctalbytecodec.cpp
+++ b/khexedit/lib/codecs/koctalbytecodec.cpp
@@ -23,9 +23,9 @@ using namespace KHE;
void KOctalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{
- Digits.at(Pos++) = '0'+(Char>>6);
- Digits.at(Pos++) = '0'+((Char>>3)&0x07);
- Digits.at(Pos) = '0'+((Char) &0x07);
+ Digits.tqat(Pos++) = '0'+(Char>>6);
+ Digits.tqat(Pos++) = '0'+((Char>>3)&0x07);
+ Digits.tqat(Pos) = '0'+((Char) &0x07);
}
@@ -33,10 +33,10 @@ void KOctalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned
{
unsigned char C;
if( (C = (Char>>6)&0x07) )
- Digits.at(Pos++) = '0'+C;
+ Digits.tqat(Pos++) = '0'+C;
if( (C = (Char>>3)&0x07) )
- Digits.at(Pos++) = '0'+C;
- Digits.at(Pos) = '0'+((Char)&0x07);
+ Digits.tqat(Pos++) = '0'+C;
+ Digits.tqat(Pos) = '0'+((Char)&0x07);
}
diff --git a/khexedit/lib/codecs/ktextcharcodec.cpp b/khexedit/lib/codecs/ktextcharcodec.cpp
index a9014dd..f5bcc65 100644
--- a/khexedit/lib/codecs/ktextcharcodec.cpp
+++ b/khexedit/lib/codecs/ktextcharcodec.cpp
@@ -27,7 +27,7 @@
using namespace KHE;
-static const char QTextCodecWhiteSpace = 63;
+static const char TQTextCodecWhiteSpace = 63;
static struct KEncodingNames {
KEncoding Encoding;
@@ -106,7 +106,7 @@ static bool is8Bit( TQTextCodec *Codec )
Length = 1;
CS = Codec->fromUnicode( S, Length );
//kdDebug() << Codec->name() << " "<<c[0]<<"->"<<CS[0]<<":"<<Length << endl;
- if( Length != 1 || (CS[0] != (char)c[0] && CS[0] != QTextCodecWhiteSpace) )
+ if( Length != 1 || (CS[0] != (char)c[0] && CS[0] != TQTextCodecWhiteSpace) )
{
Result = false;
break;
@@ -127,7 +127,7 @@ const TQStringList &KTextCharCodec::codecNames()
bool Found = true;
TQTextCodec* Codec = KGlobal::charsets()->codecForName( *it, Found );
if( Found && is8Bit(Codec) )
- CodecNames.append( TQString::fromLatin1(Codec->name()) );
+ CodecNames.append( TQString::tqfromLatin1(Codec->name()) );
}
}
@@ -150,7 +150,7 @@ TQString KTextCharCodec::nameOfEncoding( KEncoding C )
if( N != 0 )
{
- TQString CodeName = TQString::fromLatin1( N );
+ TQString CodeName = TQString::tqfromLatin1( N );
}
return Codec;
}
@@ -186,10 +186,10 @@ const TQStringList &KTextCharCodec::codecNames()
for( unsigned int i=0; i<NoOfEncodings; ++i )
{
bool Found = true;
- TQString Name = TQString::fromLatin1( EncodingNames[i].Name );
+ TQString Name = TQString::tqfromLatin1( EncodingNames[i].Name );
TQTextCodec* Codec = KGlobal::charsets()->codecForName( Name, Found );
if( Found )
- CodecNames.append( TQString::fromLatin1(Codec->name()) );
+ CodecNames.append( TQString::tqfromLatin1(Codec->name()) );
}
}
@@ -231,6 +231,6 @@ KHEChar KTextCharCodec::decode( char Byte ) const
const TQString& KTextCharCodec::name() const
{
if( Name.isNull() )
- Name = TQString::fromLatin1( Codec->name() );
+ Name = TQString::tqfromLatin1( Codec->name() );
return Name;
}
diff --git a/khexedit/lib/codecs/ktextcharcodec.h b/khexedit/lib/codecs/ktextcharcodec.h
index 8d834ea..05a40ab 100644
--- a/khexedit/lib/codecs/ktextcharcodec.h
+++ b/khexedit/lib/codecs/ktextcharcodec.h
@@ -51,9 +51,9 @@ class KTextCharCodec : public KCharCodec
protected:
TQTextCodec *Codec;
- /** decodes the chars to unicode */
+ /** decodes the chars to tqunicode */
TQTextDecoder *Decoder;
- /** encodes the chars from unicode */
+ /** encodes the chars from tqunicode */
TQTextEncoder *Encoder;
/** */
mutable TQString Name;
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();
diff --git a/khexedit/lib/helper.h b/khexedit/lib/helper.h
index 5f2b009..5fa746f 100644
--- a/khexedit/lib/helper.h
+++ b/khexedit/lib/helper.h
@@ -25,7 +25,7 @@
// temporary solution until syntax highlighting is implemented
static inline TQColor colorForChar( const KHE::KHEChar Byte )
{
- return Byte.isUndefined() ? Qt::yellow : Byte.isPunct() ? Qt::red : Byte.isPrint() ? Qt::black : Qt::blue;
+ return Byte.isUndefined() ? TQt::yellow : Byte.isPunct() ? TQt::red : Byte.isPrint() ? TQt::black : TQt::blue;
}
#endif
diff --git a/khexedit/lib/kbigbuffer.cpp b/khexedit/lib/kbigbuffer.cpp
index 99925da..08be888 100644
--- a/khexedit/lib/kbigbuffer.cpp
+++ b/khexedit/lib/kbigbuffer.cpp
@@ -83,7 +83,7 @@ int KBigBuffer::remove( KSection /*Section*/ )
return 0;
}
-unsigned int KBigBuffer::replace( KSection /*Section*/, const char*, unsigned int /*Length*/ )
+unsigned int KBigBuffer::tqreplace( KSection /*Section*/, const char*, unsigned int /*Length*/ )
{
return 0;
}
@@ -95,8 +95,8 @@ int KBigBuffer::fill( char /*FillChar*/, int /*Length*/, unsigned int /*Pos*/ )
int KBigBuffer::move( int /*DestPos*/, KSection /*SourceSection*/ ) { return 0; }
-//int KBigBuffer::find( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; }
-int KBigBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; }
+//int KBigBuffer::tqfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; }
+int KBigBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; }
int KBigBuffer::rfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; }
diff --git a/khexedit/lib/kbigbuffer.h b/khexedit/lib/kbigbuffer.h
index 63e6ec4..b4461ab 100644
--- a/khexedit/lib/kbigbuffer.h
+++ b/khexedit/lib/kbigbuffer.h
@@ -52,18 +52,18 @@ class KHEXEDIT_EXPORT KBigBuffer : public KDataBuffer
virtual int insert( int Pos, const char*, int Length );
virtual int remove( KSection S );
- virtual unsigned int replace( KSection S, const char*, unsigned int InputLength );
+ virtual unsigned int tqreplace( KSection S, const char*, unsigned int InputLength );
virtual int move( int DestPos, KSection SourceSection );
virtual int fill( char FillChar, int Length = -1, unsigned int Pos = 0 );
virtual void setDatum( unsigned int Offset, const char Char );
virtual void setModified( bool M = true );
- //virtual int find( const char*, int Length, int Pos = 0 ) const;
- virtual int find( const char*KeyData, int Length, KSection Section ) const;
+ //virtual int tqfind( const char*, int Length, int Pos = 0 ) const;
+ virtual int tqfind( const char*KeyData, int Length, KSection Section ) const;
virtual int rfind( const char*, int Length, int Pos = -1 ) const;
-/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
+/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
public:
void setReadOnly( bool RO = true );
diff --git a/khexedit/lib/kbordercolumn.cpp b/khexedit/lib/kbordercolumn.cpp
index d23bfea..170f972 100644
--- a/khexedit/lib/kbordercolumn.cpp
+++ b/khexedit/lib/kbordercolumn.cpp
@@ -49,8 +49,8 @@ void KBorderColumn::paintLine( TQPainter *P )
if( Middle )
{
- int GridColor = View->style().styleHint( TQStyle::SH_Table_GridLineColor, View );
- P->setPen( GridColor != -1 ? (QRgb)GridColor : View->colorGroup().mid() );
+ int GridColor = View->tqstyle().tqstyleHint( TQStyle::SH_Table_GridLineColor, View );
+ P->setPen( GridColor != -1 ? (TQRgb)GridColor : View->tqcolorGroup().mid() );
P->drawLine( LineX, 0, LineX, LineHeight-1 ) ;
}
}
@@ -75,8 +75,8 @@ void KBorderColumn::paintEmptyColumn( TQPainter *P, KPixelXs Xs, KPixelYs Ys )
KPixelX LX = x() + LineX;
if( Middle && Xs.includes(LX) )
{
- int GridColor = View->style().styleHint( TQStyle::SH_Table_GridLineColor, View );
- P->setPen( GridColor != -1 ? (QRgb)GridColor : View->colorGroup().mid() );
+ int GridColor = View->tqstyle().tqstyleHint( TQStyle::SH_Table_GridLineColor, View );
+ P->setPen( GridColor != -1 ? (TQRgb)GridColor : View->tqcolorGroup().mid() );
P->drawLine( LX, Ys.start(), LX, Ys.end() ) ;
}
}
diff --git a/khexedit/lib/kbuffercoltextexport.cpp b/khexedit/lib/kbuffercoltextexport.cpp
index 142504c..9ee6f77 100644
--- a/khexedit/lib/kbuffercoltextexport.cpp
+++ b/khexedit/lib/kbuffercoltextexport.cpp
@@ -38,7 +38,7 @@ KBufferColTextExport::KBufferColTextExport( const KBufferColumn* BufferColumn, c
: Data( D ),
CoordRange( CR )
{
- NoOfBytesPerLine = BufferColumn->layout()->noOfBytesPerLine();
+ NoOfBytesPerLine = BufferColumn->tqlayout()->noOfBytesPerLine();
Pos = new int[NoOfBytesPerLine];
// TODO: remove this hack and make it more general
diff --git a/khexedit/lib/kbuffercolumn.cpp b/khexedit/lib/kbuffercolumn.cpp
index d4f58d9..1d26bf0 100644
--- a/khexedit/lib/kbuffercolumn.cpp
+++ b/khexedit/lib/kbuffercolumn.cpp
@@ -185,7 +185,7 @@ void KBufferColumn::recalcByteWidth()
void KBufferColumn::recalcVerticalGridX()
{
- VerticalGridX = ByteWidth-1 + GroupSpacingWidth/2;
+ VerticalGridX = ByteWidth-1 + GroupSpacingWidth/2;
}
@@ -395,7 +395,7 @@ void KBufferColumn::paintLine( TQPainter *P, int Line ) // TODO: could be remove
void KBufferColumn::paintPositions( TQPainter *P, int Line, KSection Pos )
{
- const TQColorGroup &CG = View->colorGroup();
+ const TQColorGroup &CG = View->tqcolorGroup();
// clear background
unsigned int BlankFlag = (Pos.start()!=0?StartsBefore:0) | (Pos.end()!=LastPos?EndsLater:0);
@@ -427,13 +427,13 @@ void KBufferColumn::paintPositions( TQPainter *P, int Line, KSection Pos )
// falls Marking nicht mehr gebuffert und noch zu erwarten
if( HasMarking && Marking.endsBefore(IndizesPart.start()) )
{
- // erhebe nächste Markierung im Bereich
+ // erhebe n�chste Markierung im Bereich
HasMarking = isMarked( IndizesPart, &Marking, &MarkingFlag );
}
// falls Selection nicht mehr gebuffert und noch zu erwarten
if( HasSelection && Selection.endsBefore(IndizesPart.start()) )
{
- // erhebe nächste Selection im Bereich
+ // erhebe n�chste Selection im Bereich
HasSelection = isSelected( IndizesPart, &Selection, &SelectionFlag );
}
@@ -501,7 +501,7 @@ void KBufferColumn::paintPlain( TQPainter *P, KSection Positions, int Index )
void KBufferColumn::paintSelection( TQPainter *P, KSection Positions, int Index, int Flag )
{
- const TQColorGroup &CG = View->colorGroup();
+ const TQColorGroup &CG = View->tqcolorGroup();
paintRange( P, CG.highlight(), Positions, Flag );
@@ -524,7 +524,7 @@ void KBufferColumn::paintSelection( TQPainter *P, KSection Positions, int Index,
void KBufferColumn::paintMarking( TQPainter *P, KSection Positions, int Index, int Flag )
{
- const TQColorGroup &CG = View->colorGroup();
+ const TQColorGroup &CG = View->tqcolorGroup();
paintRange( P, CG.text(), Positions, Flag );
@@ -549,7 +549,7 @@ void KBufferColumn::paintMarking( TQPainter *P, KSection Positions, int Index, i
void KBufferColumn::paintGrid( TQPainter *P, KSection Range )
{
int st = 0; // counter for spacing triggering
- P->setPen( Qt::black );
+ P->setPen( TQt::black );
// paint all the bytes affected
for( int p=Range.start(); p<=Range.end(); ++p,++st )
{
@@ -560,7 +560,7 @@ void KBufferColumn::paintGrid( TQPainter *P, KSection Range )
// spacing behind byte and vertical grid enabled?
if( st == SpacingTrigger && p != LastPos )
- P->drawLine( VerticalGridX, 0, VerticalGridX, LineHeight-1 ) ;
+ P->drawLine(VerticalGridX, 0,VerticalGridX, LineHeight-1 ) ;
P->translate( -x, 0 );
}
@@ -572,7 +572,7 @@ void KBufferColumn::paintRange( TQPainter *P, const TQColor &Color, KSection Pos
KPixelX RangeX = Flag & StartsBefore ? relRightXOfPos( Positions.start()-1 ) + 1 : relXOfPos( Positions.start() );
KPixelX RangeW = (Flag & EndsLater ? relXOfPos( Positions.end()+1 ): relRightXOfPos( Positions.end() ) + 1) - RangeX;
- P->fillRect( RangeX,0,RangeW,LineHeight, TQBrush(Color,Qt::SolidPattern) );
+ P->fillRect( RangeX,0,RangeW,LineHeight, TQBrush(Color,TQt::SolidPattern) );
}
@@ -581,9 +581,9 @@ void KBufferColumn::paintByte( TQPainter *P, int Index )
char Byte = ( Index > -1 ) ? Buffer->datum( Index ) : EmptyByte;
KHEChar B = Codec->decode( Byte );
- const TQColorGroup &CG = View->colorGroup();
+ const TQColorGroup &CG = View->tqcolorGroup();
TQColor Color = CG.text();
- TQBrush Brush( CG.base(), Qt::SolidPattern );
+ TQBrush Brush( CG.base(), TQt::SolidPattern );
if( Index > -1 )
{
@@ -631,14 +631,14 @@ void KBufferColumn::paintCursor( TQPainter *P, int Index )
{
char Byte = ( Index > -1 ) ? Buffer->datum( Index ) : EmptyByte;
KHEChar B = Codec->decode( Byte );
- P->fillRect( 0, 0, ByteWidth, LineHeight, TQBrush(colorForChar(B),Qt::SolidPattern) );
+ P->fillRect( 0, 0, ByteWidth, LineHeight, TQBrush(colorForChar(B),TQt::SolidPattern) );
}
void KBufferColumn::drawByte( TQPainter *P, char /*Byte*/, KHEChar B, const TQColor &Color ) const
{
P->setPen( Color );
- P->drawText( 0, DigitBaseLine, B );
+ P->drawText( 0, DigitBaseLine, TQString(B) );
}
diff --git a/khexedit/lib/kbuffercolumn.h b/khexedit/lib/kbuffercolumn.h
index 10e930d..47f21d1 100644
--- a/khexedit/lib/kbuffercolumn.h
+++ b/khexedit/lib/kbuffercolumn.h
@@ -39,7 +39,7 @@ class KCharCodec;
const int NoByteFound = -1;
/** base class of all buffer column displayers
- * holds all information about the vertical layout of a buffer column
+ * holds all information about the vertical tqlayout of a buffer column
* knows how to paint the data and the editing things (focus, cursor, selection)
* but does not offer
*
@@ -154,7 +154,7 @@ class KBufferColumn : public KColumn
int firstPos() const;
int lastPos() const;
KSection visiblePositions() const;
- const KBufferLayout *layout() const;
+ const KBufferLayout *tqlayout() const;
KCharCodec* codec() const;
protected:
@@ -184,7 +184,7 @@ class KBufferColumn : public KColumn
protected:
/** pointer to the buffer */
KDataBuffer *Buffer;
- /** pointer to the layout */
+ /** pointer to the tqlayout */
const KBufferLayout *Layout;
/** pointer to the ranges */
KBufferRanges *Ranges;
@@ -242,7 +242,7 @@ inline int KBufferColumn::firstPos() const { return PaintPositions.start(); }
inline int KBufferColumn::lastPos() const { return PaintPositions.end(); }
inline KSection KBufferColumn::visiblePositions() const { return PaintPositions; }
-inline const KBufferLayout *KBufferColumn::layout() const { return Layout; }
+inline const KBufferLayout *KBufferColumn::tqlayout() const { return Layout; }
inline void KBufferColumn::setCodec( KCharCodec *C ) { Codec = C; }
diff --git a/khexedit/lib/kbuffercursor.h b/khexedit/lib/kbuffercursor.h
index 855b3e8..93205cc 100644
--- a/khexedit/lib/kbuffercursor.h
+++ b/khexedit/lib/kbuffercursor.h
@@ -27,10 +27,10 @@ namespace KHE
class KBufferLayout;
-/**@short navigates through the buffer in an abstract way, based on the layout
+/**@short navigates through the buffer in an abstract way, based on the tqlayout
*
* The cursor is allowed to access every coord that has content as
- * described in the layout. It holds the coord of the actual position
+ * described in the tqlayout. It holds the coord of the actual position
* and the according index in the data array.
*
* To enable the cursor to be placed behind the last position in a line
@@ -138,7 +138,7 @@ class KBufferCursor
void stepToEnd();
private:
- /** layout, tells how the column is organized */
+ /** tqlayout, tells how the column is organized */
const KBufferLayout *Layout;
/** Position in buffer */
@@ -151,7 +151,7 @@ class KBufferCursor
*/
bool Behind : 1;
- /** tells whether there could be a position behind the end of the layout */
+ /** tells whether there could be a position behind the end of the tqlayout */
bool AppendPosEnabled : 1;
};
diff --git a/khexedit/lib/kbufferdrag.cpp b/khexedit/lib/kbufferdrag.cpp
index 3fb3cff..8fa1973 100644
--- a/khexedit/lib/kbufferdrag.cpp
+++ b/khexedit/lib/kbufferdrag.cpp
@@ -50,7 +50,7 @@ static const char *localTextPlain()
TextPlainLocal = TQCString(KGlobal::locale()->encoding()).lower();
// remove the whitespaces
int s;
- while( (s=TextPlainLocal.find(' ')) >= 0 )
+ while( (s=TextPlainLocal.tqfind(' ')) >= 0 )
TextPlainLocal.remove( s, 1 );
TextPlainLocal.prepend( TextPlainLocalStub );
@@ -62,12 +62,12 @@ static const char *localTextPlain()
// tries to create a codec by the given charset description
static TQTextCodec* codecForCharset( const TQCString& Desc )
{
- int i = Desc.find( "charset=" );
+ int i = Desc.tqfind( "charset=" );
if( i >= 0 )
{
TQCString CharSetName = Desc.mid( i+8 );
// remove any further attributes
- if( (i=CharSetName.find( ';' )) >= 0 )
+ if( (i=CharSetName.tqfind( ';' )) >= 0 )
CharSetName = CharSetName.left( i );
// try to find codec
@@ -135,7 +135,7 @@ const char *KBufferDrag::format( int i ) const
}
-TQByteArray KBufferDrag::encodedData( const char *Format ) const
+TQByteArray KBufferDrag::tqencodedData( const char *Format ) const
{
if( Format != 0 )
{
@@ -144,7 +144,7 @@ TQByteArray KBufferDrag::encodedData( const char *Format ) const
return( Data );
// plain text wanted?
- if( qstrncmp(Format,TextPlain,10) == 0 )
+ if( tqstrncmp(Format,TextPlain,10) == 0 )
{
TQCString Output;
TQTextCodec *TextCodec = codecForCharset( TQCString(Format).lower() );
@@ -166,7 +166,7 @@ TQByteArray KBufferDrag::encodedData( const char *Format ) const
{
KHEChar B = CharCodec->decode( Data[i] );
- Text.at(i) = B.isUndefined() ? KHEChar(UndefinedChar) :
+ Text.tqat(i) = B.isUndefined() ? KHEChar(UndefinedChar) :
(!B.isPrint() && B != Tab && B != Return ) ? KHEChar(SubstituteChar) : B;
}
// clean up
@@ -224,12 +224,12 @@ bool KBufferDrag::canDecode( const TQMimeSource* Source )
bool KBufferDrag::decode( const TQMimeSource* Source, TQByteArray &Dest )
{
-// Dest = Source->encodedData( MediaString );
+// Dest = Source->tqencodedData( MediaString );
// return Dest.size() != 0;
bool CanDecode = Source->provides( OctetStream );
if( CanDecode )
- Dest = Source->encodedData( OctetStream );
+ Dest = Source->tqencodedData( OctetStream );
return CanDecode;
}
diff --git a/khexedit/lib/kbufferdrag.h b/khexedit/lib/kbufferdrag.h
index d04bca6..effd9a2 100644
--- a/khexedit/lib/kbufferdrag.h
+++ b/khexedit/lib/kbufferdrag.h
@@ -37,9 +37,10 @@ typedef KColTextExport* KColTextExportPtr;
/**
*@author Friedrich W. H. Kossebau
*/
-class KBufferDrag : public QDragObject
+class KBufferDrag : public TQDragObject
{
Q_OBJECT
+ TQ_OBJECT
public:
// TODO: make this call somewhat more generic
@@ -51,7 +52,7 @@ class KBufferDrag : public QDragObject
public: // TQDragObject API
virtual const char *format( int i ) const;
- virtual TQByteArray encodedData( const char* ) const;
+ virtual TQByteArray tqencodedData( const char* ) const;
public:
virtual void setData( const TQByteArray &);
diff --git a/khexedit/lib/kbufferlayout.h b/khexedit/lib/kbufferlayout.h
index c243225..bd92005 100644
--- a/khexedit/lib/kbufferlayout.h
+++ b/khexedit/lib/kbufferlayout.h
@@ -24,7 +24,7 @@
namespace KHE {
-/**@short the logical layout of a plain buffer view
+/**@short the logical tqlayout of a plain buffer view
*
* Given the values for
* * length of the buffer,
@@ -38,7 +38,7 @@ namespace KHE {
* * final position in this line, and
* * the total number of lines (is final line +1 or 0)
*
- * This layout sees the buffer as a continous stream of byte,
+ * This tqlayout sees the buffer as a continous stream of byte,
* thus uses each line after the start from the begin to the end.
*
* If the buffer is empty the end coord will be set one pos left to the start coord
@@ -75,7 +75,7 @@ class KBufferLayout
/** returns the coord of the end */
KBufferCoord final() const;
- /** tells how much lines this layout needs (incl. blank leading lines due to StartOffset) */
+ /** tells how much lines this tqlayout needs (incl. blank leading lines due to StartOffset) */
int noOfLines() const;
diff --git a/khexedit/lib/kbufferranges.h b/khexedit/lib/kbufferranges.h
index ed2cbce..6b293b2 100644
--- a/khexedit/lib/kbufferranges.h
+++ b/khexedit/lib/kbufferranges.h
@@ -28,7 +28,7 @@ namespace KHE
{
/** a class to control all the ranges like marking and selections
- * holds also all modified ranges and merges them so a repaint can take its info from here
+ * holds also all modified ranges and merges them so a tqrepaint can take its info from here
*
* @author Friedrich W. H. Kossebau
*/
diff --git a/khexedit/lib/kbytesedit.cpp b/khexedit/lib/kbytesedit.cpp
index 3eb49bd..db4b193 100644
--- a/khexedit/lib/kbytesedit.cpp
+++ b/khexedit/lib/kbytesedit.cpp
@@ -129,7 +129,7 @@ void KBytesEdit::setKeepsMemory( bool KM )
bool KBytesEdit::isAutoDelete() const { return AutoDelete; }
-void KBytesEdit::repaintRange( int i1, int i2 )
+void KBytesEdit::tqrepaintRange( int i1, int i2 )
{
bool ChangeCursor = !(CursorPaused) && KSection(i1,i2).includes( BufferCursor->index() );
if( ChangeCursor )
@@ -137,7 +137,7 @@ void KBytesEdit::repaintRange( int i1, int i2 )
BufferRanges->addChangedRange( i1, i2 );
- repaintChanged();
+ tqrepaintChanged();
if( ChangeCursor )
unpauseCursor();
diff --git a/khexedit/lib/kbytesedit.h b/khexedit/lib/kbytesedit.h
index e57d73a..884f565 100644
--- a/khexedit/lib/kbytesedit.h
+++ b/khexedit/lib/kbytesedit.h
@@ -36,10 +36,10 @@ class KBytesEditPrivate;
*
* 1. used as viewer
* a) static data ranges -> no changes for data pointer and length
- * possible changes are told to the widget by repaintRange
+ * possible changes are told to the widget by tqrepaintRange
* b) changing data ranges -> data pointer and length might change
* changes told by
- * * resetData( char *, int size, bool repaint );
+ * * resetData( char *, int size, bool tqrepaint );
* *
* 2. used as editor
* a) static data ranges
@@ -57,10 +57,11 @@ class KBytesEditPrivate;
class KHEXEDIT_EXPORT KBytesEdit : public KHexEdit
{
Q_OBJECT
+ TQ_OBJECT
//_PROPERTY( char * Data READ data )
- Q_PROPERTY( int DataSize READ dataSize )
- Q_PROPERTY( int MaxDataSize READ maxDataSize WRITE setMaxDataSize )
- Q_PROPERTY( bool AutoDelete READ isAutoDelete WRITE setAutoDelete DESIGNABLE false )
+ TQ_PROPERTY( int DataSize READ dataSize )
+ TQ_PROPERTY( int MaxDataSize READ maxDataSize WRITE setMaxDataSize )
+ TQ_PROPERTY( bool AutoDelete READ isAutoDelete WRITE setAutoDelete DESIGNABLE false )
public:
@@ -69,7 +70,7 @@ class KHEXEDIT_EXPORT KBytesEdit : public KHexEdit
* @param S size of used memory
* @param RS_ real size of the memory
* @param KM keep the memory on resize (RS_ is then the maximum size)
- * @param Parent parent widget
+ * @param Parent tqparent widget
* @param Name name for this widget
* @param F flags
*/
@@ -136,8 +137,8 @@ class KHEXEDIT_EXPORT KBytesEdit : public KHexEdit
*/
void setKeepsMemory( bool KM = true );
- /** repaint the indizes from i1 to i2 */
- void repaintRange( int i1, int i2 );
+ /** tqrepaint the indizes from i1 to i2 */
+ void tqrepaintRange( int i1, int i2 );
protected:
/** deletes the databuffer */
diff --git a/khexedit/lib/kcolumnsview.cpp b/khexedit/lib/kcolumnsview.cpp
index c855b51..90fa10c 100644
--- a/khexedit/lib/kcolumnsview.cpp
+++ b/khexedit/lib/kcolumnsview.cpp
@@ -129,10 +129,10 @@ void KColumnsView::updateView()
}
-void KColumnsView::repaintView()
+void KColumnsView::tqrepaintView()
{
resizeContents( totalWidth(), totalHeight() );
- repaintContents( false );
+ tqrepaintContents( false );
}
@@ -167,7 +167,7 @@ void KColumnsView::drawContents( TQPainter *P, int cx, int cy, int cw, int ch )
if( AffectedLines.isValid() )
{
TQPainter Paint;
- Paint.begin( &LineBuffer, this );
+ Paint.tqbegin( const_cast<TQPixmap*>(&LineBuffer), this );
// starting painting with the first line
KColumn *C = RedrawColumns.first();
@@ -198,7 +198,7 @@ void KColumnsView::drawContents( TQPainter *P, int cx, int cy, int cw, int ch )
break;
// to avoid flickers we first paint to the linebuffer
- Paint.begin( &LineBuffer, this );
+ Paint.tqbegin( TQT_TQPAINTDEVICE(&LineBuffer), this );
KColumn *C = RedrawColumns.first();
Paint.translate( C->x(), 0 );
diff --git a/khexedit/lib/kcolumnsview.h b/khexedit/lib/kcolumnsview.h
index 372a6f5..f3e00da 100644
--- a/khexedit/lib/kcolumnsview.h
+++ b/khexedit/lib/kcolumnsview.h
@@ -39,14 +39,15 @@ class KColumnsViewPrivate;
*@author Friedrich W. H. Kossebau
*/
-class KColumnsView : public QScrollView
+class KColumnsView : public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
friend class KColumn;
public:
- KColumnsView( /*bool R = false,*/ TQWidget *parent=0, const char *name=0, WFlags Flags=0 );
+ KColumnsView( /*bool R = false,*/ TQWidget *tqparent=0, const char *name=0, WFlags Flags=0 );
virtual ~KColumnsView();
public: // drawing
@@ -112,7 +113,7 @@ class KColumnsView : public QScrollView
protected: // painting
void updateView();
- void repaintView();
+ void tqrepaintView();
private:
/** hiding it*/
diff --git a/khexedit/lib/kcursor.h b/khexedit/lib/kcursor.h
index 17b4371..bb66003 100644
--- a/khexedit/lib/kcursor.h
+++ b/khexedit/lib/kcursor.h
@@ -38,7 +38,7 @@ class KCursor
public:
/** sets size of the full cursor */
void setSize( KPixelX Width, KPixelY Height );
- /** sets the shape of the cursor to be drawn */
+ /** sets the tqshape of the cursor to be drawn */
void setShape( KPixelX X, KPixelX W );
public: // access
diff --git a/khexedit/lib/kdatabuffer.cpp b/khexedit/lib/kdatabuffer.cpp
index 054d792..4c4f365 100644
--- a/khexedit/lib/kdatabuffer.cpp
+++ b/khexedit/lib/kdatabuffer.cpp
@@ -25,13 +25,13 @@ using namespace KHE;
int KDataBuffer::insert( int Pos, const char* D, int Length )
{
- return replace( Pos,0,D,Length );
+ return tqreplace( Pos,0,D,Length );
}
int KDataBuffer::remove( KSection Remove )
{
- replace( Remove, 0, 0 );
+ tqreplace( Remove, 0, 0 );
return Remove.width(); // TODO: check if this is true
}
diff --git a/khexedit/lib/kdatabuffer.h b/khexedit/lib/kdatabuffer.h
index e7cc3bc..796ccd6 100644
--- a/khexedit/lib/kdatabuffer.h
+++ b/khexedit/lib/kdatabuffer.h
@@ -146,9 +146,9 @@ class KHEXEDIT_EXPORT KDataBuffer
* @param SourceLength
* @return length of replacced data
*/
- virtual unsigned int replace( KSection DestSection, const char* Source, unsigned int SourceLength ) = 0;
+ virtual unsigned int tqreplace( KSection DestSection, const char* Source, unsigned int SourceLength ) = 0;
/** convenience function, behaves as above */
- unsigned int replace( unsigned int Pos, unsigned int RemoveLength,
+ unsigned int tqreplace( unsigned int Pos, unsigned int RemoveLength,
const char* Source, unsigned int SourceLength );
/** moves a part of the data to a new position, while floating the other data around
@@ -201,7 +201,7 @@ class KHEXEDIT_EXPORT KDataBuffer
* @param Pos the position to start the search
* @return index of the first or -1
*/
- //virtual int find( const char*, int Length, int Pos = 0 ) const = 0;
+ //virtual int tqfind( const char*, int Length, int Pos = 0 ) const = 0;
/** searches for a given data string
* The section limits the data within which the key has to be found
* If the end of the section is lower then the start the search continues at the start???
@@ -210,7 +210,7 @@ class KHEXEDIT_EXPORT KDataBuffer
* @param Section section within the keydata is to be found
* @return index of the first occurence or -1
*/
- virtual int find( const char*KeyData, int Length, KSection Section ) const = 0;
+ virtual int tqfind( const char*KeyData, int Length, KSection Section ) const = 0;
/** searches backward beginning with byte at Pos.
* @param
* @param Length length of search string
@@ -219,7 +219,7 @@ class KHEXEDIT_EXPORT KDataBuffer
*/
virtual int rfind( const char*, int Length, int Pos = -1 ) const = 0;
-/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
+/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
};
@@ -235,9 +235,9 @@ inline const char *KDataBuffer::dataSet( int Offset, int Length ) const
inline int KDataBuffer::remove( int Pos, int Length )
{ return remove( KSection(Pos,Pos+Length-1) ); }
-inline unsigned int KDataBuffer::replace( unsigned int Pos, unsigned int RemoveLength,
+inline unsigned int KDataBuffer::tqreplace( unsigned int Pos, unsigned int RemoveLength,
const char* D, unsigned int InputLength )
-{ return replace( KSection(Pos,Pos+RemoveLength-1), D, InputLength ); }
+{ return tqreplace( KSection(Pos,Pos+RemoveLength-1), D, InputLength ); }
inline bool KDataBuffer::isReadOnly() const { return false; }
diff --git a/khexedit/lib/kfixedsizebuffer.cpp b/khexedit/lib/kfixedsizebuffer.cpp
index 784858c..0c13e94 100644
--- a/khexedit/lib/kfixedsizebuffer.cpp
+++ b/khexedit/lib/kfixedsizebuffer.cpp
@@ -89,7 +89,7 @@ int KFixedSizeBuffer::remove( KSection Remove )
}
-unsigned int KFixedSizeBuffer::replace( KSection Remove, const char* D, unsigned int InputLength )
+unsigned int KFixedSizeBuffer::tqreplace( KSection Remove, const char* D, unsigned int InputLength )
{
// check all parameters
if( Remove.startsBehind( Size-1 ) || (Remove.width()==0 && InputLength==0) )
@@ -214,7 +214,7 @@ int KFixedSizeBuffer::fill( const char FChar, int FillLength, unsigned int Pos )
int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, unsigned int Pos )
{
- //kdDebug() << TQString("Pos: %1, OtherRange: (%3/%4)" ).arg(Pos).arg(OtherRange.start()).arg(OtherRange.end())
+ //kdDebug() << TQString("Pos: %1, OtherRange: (%3/%4)" ).tqarg(Pos).tqarg(OtherRange.start()).tqarg(OtherRange.end())
// << endl;
// test other values
if( OtherRange.startsBehind(Other.size()-1) )
@@ -245,14 +245,14 @@ int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, un
ValueByLength = -1;
}
//kdDebug()
- // << TQString( "Range: (%1/%2), OtherRange: (%3/%4)" ).arg(Range.start()).arg(Range.end()).arg(OtherRange.start()).arg(OtherRange.end())
+ // << TQString( "Range: (%1/%2), OtherRange: (%3/%4)" ).tqarg(Range.start()).tqarg(Range.end()).tqarg(OtherRange.start()).tqarg(OtherRange.end())
// << endl;
int oi = OtherRange.start();
for( int i=Range.start(); i<=Range.end(); ++i,++oi )
{
char OD = Other.datum(oi);
char D = Data[i];
- //kdDebug() << TQString("%1==%2").arg((int)D).arg((int)OD) << endl;
+ //kdDebug() << TQString("%1==%2").tqarg((int)D).tqarg((int)OD) << endl;
if( OD == D )
continue;
return OD < D ? 1 : -1;
@@ -262,7 +262,7 @@ int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, un
}
-int KFixedSizeBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; }
+int KFixedSizeBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; }
int KFixedSizeBuffer::rfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; }
diff --git a/khexedit/lib/kfixedsizebuffer.h b/khexedit/lib/kfixedsizebuffer.h
index 90060f0..e5997c3 100644
--- a/khexedit/lib/kfixedsizebuffer.h
+++ b/khexedit/lib/kfixedsizebuffer.h
@@ -48,17 +48,17 @@ class KFixedSizeBuffer : public KDataBuffer
virtual int insert( int Pos, const char*, int Length );
virtual int remove( KSection Remove );
- virtual unsigned int replace( KSection Remove, const char*, unsigned int InputLength );
+ virtual unsigned int tqreplace( KSection Remove, const char*, unsigned int InputLength );
virtual int move( int DestPos, KSection SourceSection );
virtual int fill( const char FillChar, int Length = -1, unsigned int Pos = 0 );
virtual void setDatum( unsigned int Offset, const char Char );
virtual void setModified( bool M = true );
- virtual int find( const char*KeyData, int Length, KSection Section ) const;
+ virtual int tqfind( const char*KeyData, int Length, KSection Section ) const;
virtual int rfind( const char*, int Length, int Pos = -1 ) const;
-/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
+/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
public:
void setReadOnly( bool RO = true );
diff --git a/khexedit/lib/khechar.h b/khexedit/lib/khechar.h
index 04b4016..6f4cd7f 100644
--- a/khexedit/lib/khechar.h
+++ b/khexedit/lib/khechar.h
@@ -23,7 +23,7 @@
namespace KHE
{
-class KHEChar : public QChar
+class KHEChar : public TQChar
{
public:
KHEChar( TQChar C );
diff --git a/khexedit/lib/khexedit.cpp b/khexedit/lib/khexedit.cpp
index a7a27c5..49030bf 100644
--- a/khexedit/lib/khexedit.cpp
+++ b/khexedit/lib/khexedit.cpp
@@ -29,7 +29,7 @@
#include <tqcursor.h>
#include <tqapplication.h>
// kde specific
-#ifndef QT_ONLY
+#ifndef TQT_ONLY
#include <kglobalsettings.h>
#endif
// lib specific
@@ -78,7 +78,7 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFl
TrippleClickTimer( new TQTimer(this) ),
CursorPixmaps( new KCursor() ),
Codec( 0 ),
- ClipboardMode( QClipboard::Clipboard ),
+ ClipboardMode( TQClipboard::Clipboard ),
ResizeStyle( DefaultResizeStyle ),
Encoding( MaxEncodingId ), // forces update
ReadOnly( false ),
@@ -94,7 +94,7 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFl
InZooming( false ),
d( 0 )
{
- // initalize layout
+ // initalize tqlayout
if( DataBuffer )
BufferLayout->setLength( DataBuffer->size() );
BufferLayout->setNoOfLinesPerPage( noOfLinesPerPage() );
@@ -123,7 +123,7 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFl
Controller = Navigator;
-#ifdef QT_ONLY
+#ifdef TQT_ONLY
TQFont FixedFont( "fixed", 10 );
FixedFont.setFixedPitch( true );
setFont( FixedFont );
@@ -133,7 +133,7 @@ KHexEdit::KHexEdit( KDataBuffer *Buffer, TQWidget *Parent, const char *Name, WFl
// get the full control
viewport()->setFocusProxy( this );
- viewport()->setFocusPolicy( WheelFocus );
+ viewport()->setFocusPolicy( TQ_WheelFocus );
viewport()->installEventFilter( this );
installEventFilter( this );
@@ -199,7 +199,7 @@ void KHexEdit::setOverwriteMode( bool OM )
OverWrite = OM;
// affected:
- // cursor shape
+ // cursor tqshape
bool ChangeCursor = !( CursorPaused || ValueEditor->isInEditMode() );
if( ChangeCursor )
pauseCursor();
@@ -478,7 +478,7 @@ void KHexEdit::zoomOut( int PointDec )
{
InZooming = true;
TQFont F( font() );
- F.setPointSize( QMAX( 1, TQFontInfo(F).pointSize() - PointDec ) );
+ F.setPointSize( TQMAX( 1, TQFontInfo(F).pointSize() - PointDec ) );
setFont( F );
InZooming = false;
}
@@ -548,17 +548,17 @@ void KHexEdit::toggleOffsetColumn( bool Visible )
}
-TQSize KHexEdit::sizeHint() const
+TQSize KHexEdit::tqsizeHint() const
{
return TQSize( totalWidth(), totalHeight() );
}
-TQSize KHexEdit::minimumSizeHint() const
+TQSize KHexEdit::tqminimumSizeHint() const
{
// TODO: better minimal width (visibility!)
return TQSize( OffsetColumn->visibleWidth()+FirstBorderColumn->visibleWidth()+SecondBorderColumn->visibleWidth()+valueColumn().byteWidth()+charColumn().byteWidth(),
- lineHeight() + noOfLines()>1? style().pixelMetric(TQStyle::PM_ScrollBarExtent):0 );
+ lineHeight() + noOfLines()>1? tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent):0 );
}
@@ -598,7 +598,7 @@ int KHexEdit::fittingBytesPerLine( const TQSize &NewSize ) const
// check influence of dis-/appearing of the vertical scrollbar
bool VerticalScrollbarIsVisible = verticalScrollBar()->isVisible();
- KPixelX ScrollbarExtent = style().pixelMetric( TQStyle::PM_ScrollBarExtent );//verticalScrollBar()->width();
+ KPixelX ScrollbarExtent = tqstyle().tqpixelMetric( TQStyle::PM_ScrollBarExtent );//verticalScrollBar()->width();
KPixelX AvailableWidth = FullWidth;
if( VerticalScrollbarIsVisible )
@@ -737,7 +737,7 @@ bool KHexEdit::selectWord( /*unsigned TODO:change all unneeded signed into unsig
BufferRanges->setFirstWordSelection( WordSection );
BufferCursor->gotoIndex( WordSection.end()+1 );
- repaintChanged();
+ tqrepaintChanged();
unpauseCursor();
return true;
@@ -757,7 +757,7 @@ void KHexEdit::select( KSection Section )
BufferRanges->setSelection( Section );
BufferCursor->gotoIndex( Section.end()+1 );
- repaintChanged();
+ tqrepaintChanged();
unpauseCursor();
@@ -781,7 +781,7 @@ void KHexEdit::selectAll( bool Select )
BufferCursor->gotoEnd();
}
- repaintChanged();
+ tqrepaintChanged();
unpauseCursor();
@@ -850,7 +850,7 @@ void KHexEdit::cut()
if( !Drag )
return;
- TQApplication::clipboard()->setData( Drag, ClipboardMode );
+ TQApplication::tqclipboard()->setData( Drag, ClipboardMode );
removeSelectedData();
}
@@ -862,7 +862,7 @@ void KHexEdit::copy()
if( !Drag )
return;
- TQApplication::clipboard()->setData( Drag, ClipboardMode );
+ TQApplication::tqclipboard()->setData( Drag, ClipboardMode );
}
@@ -871,7 +871,7 @@ void KHexEdit::paste()
if( isReadOnly() )
return;
- TQMimeSource *Source = TQApplication::clipboard()->data( ClipboardMode );
+ TQMimeSource *Source = TQApplication::tqclipboard()->data( ClipboardMode );
pasteFromSource( Source );
}
@@ -904,7 +904,7 @@ void KHexEdit::insert( const TQByteArray &D )
// we restrict the replacement to the minimum length of selection and input
ChangedRange = BufferRanges->selection();
ChangedRange.restrictEndTo( ChangedRange.start()+D.size()-1 );
- int W = DataBuffer->replace( ChangedRange, D.data(), ChangedRange.width() );
+ int W = DataBuffer->tqreplace( ChangedRange, D.data(), ChangedRange.width() );
BufferCursor->gotoCIndex( ChangedRange.start()+W );
BufferRanges->removeSelection();
}
@@ -917,7 +917,7 @@ void KHexEdit::insert( const TQByteArray &D )
ChangedRange.restrictEndTo( BufferLayout->length()-1 );
if( ChangedRange.isValid() )
{
- int W = DataBuffer->replace( ChangedRange, D.data(), ChangedRange.width() );
+ int W = DataBuffer->tqreplace( ChangedRange, D.data(), ChangedRange.width() );
BufferCursor->gotoNextByte( W );
}
}
@@ -930,7 +930,7 @@ void KHexEdit::insert( const TQByteArray &D )
// replacing the selection
KSection Selection = BufferRanges->selection();
int OldLastIndex = BufferLayout->length() - 1;
- int W = DataBuffer->replace( Selection, D.data(), D.size() );
+ int W = DataBuffer->tqreplace( Selection, D.data(), D.size() );
updateLength();
BufferCursor->gotoIndex( Selection.start() + W );
if( W > 0 )
@@ -967,7 +967,7 @@ void KHexEdit::insert( const TQByteArray &D )
if( Changed )
{
BufferRanges->addChangedRange( ChangedRange );
- repaintChanged();
+ tqrepaintChanged();
}
ensureCursorVisible();
@@ -994,7 +994,7 @@ void KHexEdit::removeSelectedData()
KSection ChangedRange = removeData( Selection );
BufferRanges->removeSelection();
- repaintChanged();
+ tqrepaintChanged();
BufferCursor->gotoCIndex( Selection.start() );
@@ -1017,7 +1017,7 @@ KSection KHexEdit::removeData( KSection Indizes )
// if( !undoRedoInfo.valid() )
// {
// doc->selectionStart( selNum, undoRedoInfo.id, undoRedoInfo.index );
-// undoRedoInfo.d->text = TQString::null;
+// undoRedoInfo.d->text = TQString();
// }
// readFormats( c1, c2, undoRedoInfo.d->text, TRUE );
// }
@@ -1042,7 +1042,7 @@ void KHexEdit::updateLength()
void KHexEdit::clipboardChanged()
{
// don't listen to selection changes
- disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0 );
+ disconnect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, 0 );
selectAll( false );
}
@@ -1059,7 +1059,7 @@ void KHexEdit::setCursorPosition( int Index, bool Behind )
bool RangesModifed = BufferRanges->isModified();
if( RangesModifed )
{
- repaintChanged();
+ tqrepaintChanged();
viewport()->setCursor( isReadOnly() ? arrowCursor : ibeamCursor );
@@ -1178,7 +1178,7 @@ void KHexEdit::showEvent( TQShowEvent *e )
bool KHexEdit::eventFilter( TQObject *O, TQEvent *E )
{
- if( O == this || O == viewport() )
+ if( TQT_BASE_OBJECT(O) == TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(O) == TQT_BASE_OBJECT(viewport()) )
{
if( E->type() == TQEvent::FocusIn )
{
@@ -1192,16 +1192,16 @@ bool KHexEdit::eventFilter( TQObject *O, TQEvent *E )
// if( O == this && E->type() == TQEvent::PaletteChange )
// {
-// TQColor old( viewport()->colorGroup().color(TQColorGroup::Text) );
+// TQColor old( viewport()->tqcolorGroup().color(TQColorGroup::Text) );
//
-// if( old != colorGroup().color(TQColorGroup::Text) )
+// if( old != tqcolorGroup().color(TQColorGroup::Text) )
// {
-// TQColor c( colorGroup().color(TQColorGroup::Text) );
+// TQColor c( tqcolorGroup().color(TQColorGroup::Text) );
// doc->setMinimumWidth( -1 );
// doc->setDefaultFormat( doc->formatCollection()->defaultFormat()->font(), c );
// lastFormatted = doc->firstParagraph();
// formatMore();
-// repaintChanged();
+// tqrepaintChanged();
// }
// }
@@ -1275,20 +1275,20 @@ void KHexEdit::createCursorPixmaps()
int Index = BufferCursor->validIndex();
TQPainter Paint;
- Paint.begin( &CursorPixmaps->offPixmap(), this );
+ Paint.tqbegin( const_cast<TQPixmap*>(&CursorPixmaps->offPixmap()), this );
activeColumn().paintByte( &Paint, Index );
Paint.end();
- Paint.begin( &CursorPixmaps->onPixmap(), this );
+ Paint.tqbegin( const_cast<TQPixmap*>(&CursorPixmaps->onPixmap()), this );
activeColumn().paintCursor( &Paint, Index );
Paint.end();
- // calculat the shape
+ // calculat the tqshape
KPixelX CursorX;
KPixelX CursorW;
if( BufferCursor->isBehind() )
{
- CursorX = QMAX( 0, CursorPixmaps->onPixmap().width()-InsertCursorWidth );
+ CursorX = TQMAX( 0, CursorPixmaps->onPixmap().width()-InsertCursorWidth );
CursorW = InsertCursorWidth;
}
else
@@ -1397,12 +1397,12 @@ void KHexEdit::keyPressEvent( TQKeyEvent *KeyEvent )
}
-void KHexEdit::repaintChanged()
+void KHexEdit::tqrepaintChanged()
{
if( !isUpdatesEnabled() || !viewport()->isUpdatesEnabled() || !BufferRanges->isModified() )
return;
- // TODO: we do this only to let the scrollview handle new or removed lines. overlaps with repaintRange
+ // TODO: we do this only to let the scrollview handle new or removed lines. overlaps with tqrepaintRange
resizeContents( totalWidth(), totalHeight() );
KPixelXs Xs( contentsX(), visibleWidth(), true );
@@ -1498,7 +1498,7 @@ void KHexEdit::paintLine( KBufferColumn *C, int Line, KSection Positions )
// to avoid flickers we first paint to the linebuffer
TQPainter Paint;
- Paint.begin( &LineBuffer, this );
+ Paint.tqbegin( &LineBuffer, this );
Paint.translate( C->x(), 0 );
C->paintPositions( &Paint, Line, Positions );
@@ -1548,7 +1548,7 @@ void KHexEdit::contentsMousePressEvent( TQMouseEvent *e )
pauseCursor( true );
// care about a left button press?
- if( e->button() == LeftButton )
+ if( e->button() == Qt::LeftButton )
{
MousePressed = true;
@@ -1559,7 +1559,7 @@ void KHexEdit::contentsMousePressEvent( TQMouseEvent *e )
BufferRanges->setSelectionStart( BufferLayout->indexAtLineStart(DoubleClickLine) );
BufferCursor->gotoLineEnd();
BufferRanges->setSelectionEnd( BufferCursor->realIndex() );
- repaintChanged();
+ tqrepaintChanged();
unpauseCursor();
return;
@@ -1601,12 +1601,12 @@ void KHexEdit::contentsMousePressEvent( TQMouseEvent *e )
BufferRanges->removeFurtherSelections();
}
- else if( e->button() == MidButton )
+ else if( e->button() == Qt::MidButton )
BufferRanges->removeSelection();
if( BufferRanges->isModified() )
{
- repaintChanged();
+ tqrepaintChanged();
viewport()->setCursor( isReadOnly() ? arrowCursor : ibeamCursor );
}
@@ -1671,20 +1671,20 @@ void KHexEdit::contentsMouseReleaseEvent( TQMouseEvent *e )
// was end of selection operation?
else if( BufferRanges->hasSelection() )
{
- if( TQApplication::clipboard()->supportsSelection() )
+ if( TQApplication::tqclipboard()->supportsSelection() )
{
- ClipboardMode = QClipboard::Selection;
- disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0);
+ ClipboardMode = TQClipboard::Selection;
+ disconnect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, 0);
copy();
- connect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) );
- ClipboardMode = QClipboard::Clipboard;
+ connect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) );
+ ClipboardMode = TQClipboard::Clipboard;
}
}
}
// middle mouse button paste?
- else if( e->button() == MidButton && !isReadOnly() )
+ else if( e->button() == Qt::MidButton && !isReadOnly() )
{
pauseCursor();
@@ -1694,12 +1694,12 @@ void KHexEdit::contentsMouseReleaseEvent( TQMouseEvent *e )
if( BufferRanges->hasSelection() && !BufferRanges->selectionIncludes(BufferCursor->index()) )
BufferRanges->removeSelection();
- ClipboardMode = QClipboard::Selection;
+ ClipboardMode = TQClipboard::Selection;
paste();
- ClipboardMode = QClipboard::Clipboard;
+ ClipboardMode = TQClipboard::Clipboard;
// ensure selection changes to be drawn TODO: create a insert/pasteAtCursor that leaves out drawing
- repaintChanged();
+ tqrepaintChanged();
ensureCursorVisible();
unpauseCursor();
@@ -1738,7 +1738,7 @@ void KHexEdit::contentsMouseDoubleClickEvent( TQMouseEvent *e )
selectWord( Index );
// as we already have a doubleclick maybe it is a tripple click
- TrippleClickTimer->start( qApp->doubleClickInterval(), true );
+ TrippleClickTimer->start( tqApp->doubleClickInterval(), true );
DoubleClickPoint = e->globalPos();
}
// else
@@ -1803,7 +1803,7 @@ void KHexEdit::handleMouseMove( const TQPoint& Point ) // handles the move of th
if( BufferRanges->selectionStarted() )
BufferRanges->setSelectionEnd( BufferCursor->realIndex() );
- repaintChanged();
+ tqrepaintChanged();
unpauseCursor();
}
@@ -1915,7 +1915,7 @@ void KHexEdit::handleInternalDrag( TQDropEvent *e )
if( NewIndex != Selection.start() )
{
BufferCursor->gotoCIndex( NewIndex+Selection.width() );
- ChangedRange.set( QMIN(InsertIndex,Selection.start()), QMAX(InsertIndex,Selection.end()) );
+ ChangedRange.set( TQMIN(InsertIndex,Selection.start()), TQMAX(InsertIndex,Selection.end()) );
}
}
// is a copy
@@ -1933,7 +1933,7 @@ void KHexEdit::handleInternalDrag( TQDropEvent *e )
ChangedRange.restrictEndTo( BufferLayout->length()-1 );
if( ChangedRange.isValid() )
{
- int NoOfReplaced = DataBuffer->replace( ChangedRange, Data.data(), ChangedRange.width() );
+ int NoOfReplaced = DataBuffer->tqreplace( ChangedRange, Data.data(), ChangedRange.width() );
BufferCursor->gotoNextByte( NoOfReplaced );
}
}
@@ -1953,7 +1953,7 @@ void KHexEdit::handleInternalDrag( TQDropEvent *e )
BufferRanges->addChangedRange( ChangedRange );
BufferRanges->removeSelection();
- repaintChanged();
+ tqrepaintChanged();
ensureCursorVisible();
// open ui
@@ -2005,15 +2005,15 @@ void KHexEdit::contentsContextMenuEvent( TQContextMenuEvent *e )
{
selectAll();
// if the clipboard support selections, put the newly selected text into the clipboard
- if( TQApplication::clipboard()->supportsSelection() )
+ if( TQApplication::tqclipboard()->supportsSelection() )
{
- ClipboardMode = QClipboard::Selection;
- disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0);
+ ClipboardMode = TQClipboard::Selection;
+ disconnect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, 0);
copy();
- connect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) );
- ClipboardMode = QClipboard::Clipboard;
+ connect( TQApplication::tqclipboard(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(clipboardChanged()) );
+ ClipboardMode = TQClipboard::Clipboard;
}
}
else if( r == d->id[IdUndo] )
diff --git a/khexedit/lib/khexedit.h b/khexedit/lib/khexedit.h
index 8e81fd8..80d36d9 100644
--- a/khexedit/lib/khexedit.h
+++ b/khexedit/lib/khexedit.h
@@ -81,31 +81,32 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
friend class KCharEditor;
Q_OBJECT
+ TQ_OBJECT
Q_ENUMS( KResizeStyle KCoding )
- Q_PROPERTY( bool OverwriteMode READ isOverwriteMode WRITE setOverwriteMode )
- Q_PROPERTY( bool OverwriteOnly READ isOverwriteOnly WRITE setOverwriteOnly )
- Q_PROPERTY( bool Modified READ isModified WRITE setModified DESIGNABLE false )
- Q_PROPERTY( bool ReadOnly READ isReadOnly WRITE setReadOnly )
-
- Q_PROPERTY( int NoOfBytesPerLine READ noOfBytesPerLine WRITE setNoOfBytesPerLine )
- Q_PROPERTY( bool TabChangesFocus READ tabChangesFocus WRITE setTabChangesFocus )
-
- //Q_PROPERTY( bool hasSelectedData READ hasSelectedData )
- //Q_PROPERTY( TQByteArray SelectedData READ selectedData )
- Q_PROPERTY( KResizeStyle ResizeStyle READ resizeStyle WRITE setResizeStyle )
- Q_PROPERTY( int StartOffset READ startOffset WRITE setStartOffset )
- Q_PROPERTY( int FirstLineOffset READ firstLineOffset WRITE setFirstLineOffset )
+ TQ_PROPERTY( bool OverwriteMode READ isOverwriteMode WRITE setOverwriteMode )
+ TQ_PROPERTY( bool OverwriteOnly READ isOverwriteOnly WRITE setOverwriteOnly )
+ TQ_PROPERTY( bool Modified READ isModified WRITE setModified DESIGNABLE false )
+ TQ_PROPERTY( bool ReadOnly READ isReadOnly WRITE setReadOnly )
+
+ TQ_PROPERTY( int NoOfBytesPerLine READ noOfBytesPerLine WRITE setNoOfBytesPerLine )
+ TQ_PROPERTY( bool TabChangesFocus READ tabChangesFocus WRITE setTabChangesFocus )
+
+ //TQ_PROPERTY( bool hasSelectedData READ hasSelectedData )
+ //TQ_PROPERTY( TQByteArray SelectedData READ selectedData )
+ TQ_PROPERTY( KResizeStyle ResizeStyle READ resizeStyle WRITE setResizeStyle )
+ TQ_PROPERTY( int StartOffset READ startOffset WRITE setStartOffset )
+ TQ_PROPERTY( int FirstLineOffset READ firstLineOffset WRITE setFirstLineOffset )
//_PROPERTY( int undoDepth READ undoDepth WRITE setUndoDepth )
//_PROPERTY( bool undoRedoEnabled READ isUndoRedoEnabled WRITE setUndoRedoEnabled )
// value column
- Q_PROPERTY( KCoding Coding READ coding WRITE setCoding )
- Q_PROPERTY( int ByteSpacingWidth READ byteSpacingWidth WRITE setByteSpacingWidth )
- Q_PROPERTY( int NoOfGroupedBytes READ noOfGroupedBytes WRITE setNoOfGroupedBytes )
- Q_PROPERTY( int GroupSpacingWidth READ groupSpacingWidth WRITE setGroupSpacingWidth )
- Q_PROPERTY( int BinaryGapWidth READ binaryGapWidth WRITE setBinaryGapWidth )
+ TQ_PROPERTY( KCoding Coding READ coding WRITE setCoding )
+ TQ_PROPERTY( int ByteSpacingWidth READ byteSpacingWidth WRITE setByteSpacingWidth )
+ TQ_PROPERTY( int NoOfGroupedBytes READ noOfGroupedBytes WRITE setNoOfGroupedBytes )
+ TQ_PROPERTY( int GroupSpacingWidth READ groupSpacingWidth WRITE setGroupSpacingWidth )
+ TQ_PROPERTY( int BinaryGapWidth READ binaryGapWidth WRITE setBinaryGapWidth )
// char column
- Q_PROPERTY( bool ShowUnprintable READ showUnprintable WRITE setShowUnprintable )
- Q_PROPERTY( TQChar SubstituteChar READ substituteChar WRITE setSubstituteChar )
+ TQ_PROPERTY( bool ShowUnprintable READ showUnprintable WRITE setShowUnprintable )
+ TQ_PROPERTY( TQChar SubstituteChar READ substituteChar WRITE setSubstituteChar )
public:
enum KResizeStyle { NoResize=0, LockGrouping=1, FullSizeUsage=2, MaxResizeStyleId=0xFF };
@@ -129,8 +130,8 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
// void focusOutEvent( TQFocusEvent *FocusEvent );
virtual bool eventFilter( TQObject *O, TQEvent *E );
- virtual TQSize sizeHint() const;
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
public: // value access
@@ -215,7 +216,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
void placeCursor( const TQPoint &Point );
/***/
void setCursorColumn( KBufferColumnId );
-// void repaintByte( int row, int column, bool Erase = true );
+// void tqrepaintByte( int row, int column, bool Erase = true );
// void updateByte( int row, int column );
// void ensureByteVisible( int row, int column );
@@ -396,8 +397,8 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
/** handles screen update in case of a change to any of the width sizes
*/
void updateViewByWidth();
- /** repaints all the parts that are signed as changed */
- void repaintChanged();
+ /** tqrepaints all the parts that are signed as changed */
+ void tqrepaintChanged();
protected: // drawing related operations
/** recreates the cursor pixmaps and paints active and inactive cursors if doable */
@@ -424,7 +425,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
protected:
/** recalcs all dependant values with the actual NoOfBytesPerLine */
void adjustToLayoutNoOfBytesPerLine();
- /** recalcs a layout due to the resize style that fits into the view size
+ /** recalcs a tqlayout due to the resize style that fits into the view size
* and updates the dependant values
*/
void adjustLayoutToSize();
@@ -451,7 +452,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
/** Buffer with the data */
KDataBuffer *DataBuffer;
- /** holds the logical layout */
+ /** holds the logical tqlayout */
KBufferLayout *BufferLayout;
/** */
KBufferCursor *BufferCursor;
@@ -506,7 +507,7 @@ class KHEXEDIT_EXPORT KHexEdit : public KColumnsView
/** point at which the current dragging started */
TQPoint DragStartPoint;
/** */
- QClipboard::Mode ClipboardMode;
+ TQClipboard::Mode ClipboardMode;
/** font size as set by user (used for zooming) */
int DefaultFontSize;
diff --git a/khexedit/lib/koffsetcolumn.cpp b/khexedit/lib/koffsetcolumn.cpp
index fb8e694..c2be15a 100644
--- a/khexedit/lib/koffsetcolumn.cpp
+++ b/khexedit/lib/koffsetcolumn.cpp
@@ -42,8 +42,8 @@ KOffsetColumn::~KOffsetColumn()
void KOffsetColumn::paintLine( TQPainter *P, int Line )
{
- const TQColor &ButtonColor = View->colorGroup().button();
- P->fillRect( 0,0,width(),LineHeight, TQBrush(ButtonColor,Qt::SolidPattern) );
+ const TQColor &ButtonColor = View->tqcolorGroup().button();
+ P->fillRect( 0,0,width(),LineHeight, TQBrush(ButtonColor,TQt::SolidPattern) );
printFunction()( CodedOffset,FirstLineOffset+Delta*Line );
P->drawText( 0, DigitBaseLine, TQString().append(CodedOffset) );
@@ -68,8 +68,8 @@ void KOffsetColumn::paintEmptyColumn( TQPainter *P, KPixelXs Xs, KPixelYs Ys )
{
Xs.restrictTo( XSpan );
- const TQColor &ButtonColor = View->colorGroup().button();
- P->fillRect( Xs.start(), Ys.start(), Xs.width(), Ys.width(), TQBrush(ButtonColor,Qt::SolidPattern) );
+ const TQColor &ButtonColor = View->tqcolorGroup().button();
+ P->fillRect( Xs.start(), Ys.start(), Xs.width(), Ys.width(), TQBrush(ButtonColor,TQt::SolidPattern) );
}
void KOffsetColumn::setFormat( KOffsetFormat::KFormat F )
diff --git a/khexedit/lib/koffsetcolumn.h b/khexedit/lib/koffsetcolumn.h
index 497d7ef..56b48f1 100644
--- a/khexedit/lib/koffsetcolumn.h
+++ b/khexedit/lib/koffsetcolumn.h
@@ -81,7 +81,7 @@ class KOffsetColumn : public KColumn
/** */
KPixelY DigitBaseLine;
- protected: // general layout
+ protected: // general tqlayout
KOffsetFormat::KFormat Format;
int CodingWidth;
diff --git a/khexedit/lib/kplainbuffer.cpp b/khexedit/lib/kplainbuffer.cpp
index 02b9d70..1d79756 100644
--- a/khexedit/lib/kplainbuffer.cpp
+++ b/khexedit/lib/kplainbuffer.cpp
@@ -72,7 +72,7 @@ int KPlainBuffer::insert( int Pos, const char* D, int Length )
// check all parameters
if( Length == 0 )
return 0;
- //kdDebug() << TQString("before: Size: %1, RawSize: %2").arg(Size).arg(RawSize) << endl;
+ //kdDebug() << TQString("before: Size: %1, RawSize: %2").tqarg(Size).tqarg(RawSize) << endl;
// correct for appending
if( Pos > (int)Size )
Pos = Size;
@@ -82,7 +82,7 @@ int KPlainBuffer::insert( int Pos, const char* D, int Length )
// copy new data to its place
memcpy( &Data[Pos], D, Length );
- //kdDebug() << TQString("after: Size: %1, RawSize: %2").arg(Size).arg(RawSize) << endl;
+ //kdDebug() << TQString("after: Size: %1, RawSize: %2").tqarg(Size).tqarg(RawSize) << endl;
Modified = true;
return Length;
@@ -108,7 +108,7 @@ int KPlainBuffer::remove( KSection Remove )
}
-unsigned int KPlainBuffer::replace( KSection Remove, const char* D, unsigned int InputLength )
+unsigned int KPlainBuffer::tqreplace( KSection Remove, const char* D, unsigned int InputLength )
{
// check all parameters
if( Remove.start() >= (int)Size || (Remove.width()==0 && InputLength==0) )
@@ -259,7 +259,7 @@ int KPlainBuffer::fill( const char FChar, int FillLength, unsigned int Pos )
}
-int KPlainBuffer::find( const char* SearchString, int Length, KSection Section ) const
+int KPlainBuffer::tqfind( const char* SearchString, int Length, KSection Section ) const
{
Section.restrictEndTo( Size-1 );
diff --git a/khexedit/lib/kplainbuffer.h b/khexedit/lib/kplainbuffer.h
index 31851ae..c0d8846 100644
--- a/khexedit/lib/kplainbuffer.h
+++ b/khexedit/lib/kplainbuffer.h
@@ -54,18 +54,18 @@ class KPlainBuffer : public KDataBuffer
virtual int insert( int Pos, const char*, int Length );
virtual int remove( KSection Remove );
- virtual unsigned int replace( KSection Remove, const char*, unsigned int InputLength );
+ virtual unsigned int tqreplace( KSection Remove, const char*, unsigned int InputLength );
virtual int move( int DestPos, KSection SourceSection );
virtual int fill( const char FillChar, int Length = -1, unsigned int Pos = 0 );
virtual void setDatum( unsigned int Offset, const char Char );
virtual void setModified( bool M = true );
- //virtual int find( const char*, int Length, int Pos = 0 ) const;
- virtual int find( const char*KeyData, int Length, KSection Section ) const;
+ //virtual int tqfind( const char*, int Length, int Pos = 0 ) const;
+ virtual int tqfind( const char*KeyData, int Length, KSection Section ) const;
virtual int rfind( const char*, int Length, int Pos = -1 ) const;
-/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
+/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
public:
void setReadOnly( bool RO = true );
diff --git a/khexedit/lib/kvaluecolumn.cpp b/khexedit/lib/kvaluecolumn.cpp
index 62d36c0..beb706a 100644
--- a/khexedit/lib/kvaluecolumn.cpp
+++ b/khexedit/lib/kvaluecolumn.cpp
@@ -105,9 +105,9 @@ void KValueColumn::paintEditedByte( TQPainter *P, char Byte, const TQString &Edi
{
KHEChar B = Codec->decode( Byte );
- const TQColorGroup &CG = View->colorGroup();
+ const TQColorGroup &CG = View->tqcolorGroup();
- P->fillRect( 0,0,ByteWidth,LineHeight, TQBrush(colorForChar(B),Qt::SolidPattern) );
+ P->fillRect( 0,0,ByteWidth,LineHeight, TQBrush(colorForChar(B),TQt::SolidPattern) );
drawCode( P, EditBuffer, CG.base() );
}
diff --git a/khexedit/lib/kwrappingrobuffer.cpp b/khexedit/lib/kwrappingrobuffer.cpp
index b913c1a..a47745c 100644
--- a/khexedit/lib/kwrappingrobuffer.cpp
+++ b/khexedit/lib/kwrappingrobuffer.cpp
@@ -50,7 +50,7 @@ void KWrappingROBuffer::set( const char* D, int L )
}
-int KWrappingROBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const
+int KWrappingROBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const
{
return 0;
}
diff --git a/khexedit/lib/kwrappingrobuffer.h b/khexedit/lib/kwrappingrobuffer.h
index 51ee7b8..97ae33c 100644
--- a/khexedit/lib/kwrappingrobuffer.h
+++ b/khexedit/lib/kwrappingrobuffer.h
@@ -47,13 +47,13 @@ class KWrappingROBuffer : public KReadOnlyBuffer
virtual int insert( int Pos, const char*, int Length );
virtual int remove( KSection S );
- virtual unsigned int replace( KSection S, const char*, unsigned int Length );
+ virtual unsigned int tqreplace( KSection S, const char*, unsigned int Length );
virtual int fill( const char FillChar, int, int );
virtual void setDatum( unsigned int Offset, const char Char );
virtual void setModified( bool M );
- virtual int find( const char*KeyData, int Length, KSection Section ) const;
+ virtual int tqfind( const char*KeyData, int Length, KSection Section ) const;
virtual int rfind( const char*, int Length, int Pos = -1 ) const;
@@ -75,7 +75,7 @@ inline char KWrappingROBuffer::datum( unsigned int Offset ) const { return Data[
inline int KWrappingROBuffer::insert( int, const char*, int ) { return 0; }
inline int KWrappingROBuffer::remove( KSection ) { return 0; }
-inline unsigned int KWrappingROBuffer::replace( KSection, const char*, unsigned int ) { return 0; }
+inline unsigned int KWrappingROBuffer::tqreplace( KSection, const char*, unsigned int ) { return 0; }
inline int KWrappingROBuffer::fill( const char , int, int ) { return 0; }
inline void KWrappingROBuffer::setDatum( unsigned int, const char ) {}
diff --git a/khexedit/listview.cc b/khexedit/listview.cc
index e02e1c7..b6af69b 100644
--- a/khexedit/listview.cc
+++ b/khexedit/listview.cc
@@ -24,31 +24,31 @@
#include "listview.h"
-CListView::CListView( TQWidget *parent, const char *name, int visibleItem )
- :KListView( parent, name ), mVisibleItem(QMAX( 1, visibleItem ))
+CListView::CListView( TQWidget *tqparent, const char *name, int visibleItem )
+ :KListView( tqparent, name ), mVisibleItem(TQMAX( 1, visibleItem ))
{
setVisibleItem(visibleItem);
}
void CListView::setVisibleItem( int visibleItem, bool updateSize )
{
- mVisibleItem = QMAX( 1, visibleItem );
+ mVisibleItem = TQMAX( 1, visibleItem );
if( updateSize == true )
{
- TQSize s = sizeHint();
- setMinimumSize( s.width() + verticalScrollBar()->sizeHint().width() +
+ TQSize s = tqsizeHint();
+ setMinimumSize( s.width() + verticalScrollBar()->tqsizeHint().width() +
lineWidth() * 2, s.height() );
}
}
-TQSize CListView::sizeHint( void ) const
+TQSize CListView::tqsizeHint( void ) const
{
- TQSize s = TQListView::sizeHint();
+ TQSize s = TQListView::tqsizeHint();
int h = fontMetrics().height() + 2*itemMargin();
if( h % 2 > 0 ) { h++; }
- s.setHeight( h*mVisibleItem + lineWidth()*2 + header()->sizeHint().height());
+ s.setHeight( h*mVisibleItem + lineWidth()*2 + header()->tqsizeHint().height());
return( s );
}
#include "listview.moc"
diff --git a/khexedit/listview.h b/khexedit/listview.h
index e87a17d..f549539 100644
--- a/khexedit/listview.h
+++ b/khexedit/listview.h
@@ -26,12 +26,13 @@
class CListView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- CListView( TQWidget *parent=0, const char *name=0, int visibleItem=10 );
+ CListView( TQWidget *tqparent=0, const char *name=0, int visibleItem=10 );
void setVisibleItem( int visibleItem, bool updateSize=true );
- virtual TQSize sizeHint( void ) const;
+ virtual TQSize tqsizeHint( void ) const;
private:
int mVisibleItem;
diff --git a/khexedit/optiondialog.cc b/khexedit/optiondialog.cc
index c1bbb39..783a8c0 100644
--- a/khexedit/optiondialog.cc
+++ b/khexedit/optiondialog.cc
@@ -46,9 +46,9 @@
#include <tqobjectlist.h>
static void enableWidget( TQWidget *w, bool state )
{
- if( w->children() )
+ if( w->tqchildren() )
{
- TQObjectList *l = (TQObjectList*)w->children(); // silence please
+ TQObjectList *l = (TQObjectList*)w->tqchildren(); // silence please
for( uint i=0; i < l->count(); i++ )
{
TQObject *o = l->at(i);
@@ -64,11 +64,11 @@ static void enableWidget( TQWidget *w, bool state )
-COptionDialog::COptionDialog( TQWidget *parent, char *name, bool modal )
+COptionDialog::COptionDialog( TQWidget *tqparent, char *name, bool modal )
:KDialogBase( IconList, i18n("Configure"), Help|Default|Apply|Ok|Cancel,
- Ok, parent, name, modal, true )
+ Ok, tqparent, name, modal, true )
{
- setHelp( "khexedit/khexedit.html", TQString::null );
+ setHelp( "khexedit/khexedit.html", TQString() );
setupLayoutPage();
setupCursorPage();
@@ -260,7 +260,7 @@ void COptionDialog::setupCursorPage( void )
TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
TQVButtonGroup *group = new TQVButtonGroup( i18n("Blinking"), page );
- group->layout()->setMargin( spacingHint() );
+ group->tqlayout()->setMargin( spacingHint() );
topLayout->addWidget( group );
text = i18n("Do not b&link");
@@ -282,7 +282,7 @@ void COptionDialog::setupCursorPage( void )
TQT_SLOT( slotChanged()));
group = new TQVButtonGroup( i18n("Shape"), page );
- group->layout()->setMargin( spacingHint() );
+ group->tqlayout()->setMargin( spacingHint() );
topLayout->addWidget( group );
text = i18n("Always &use block (rectangular) cursor");
@@ -298,7 +298,7 @@ void COptionDialog::setupCursorPage( void )
text = i18n("Cursor Behavior When Editor Loses Focus");
group = new TQVButtonGroup( text, page );
- group->layout()->setMargin( spacingHint() );
+ group->tqlayout()->setMargin( spacingHint() );
topLayout->addWidget( group );
text = i18n("&Stop blinking (if blinking is enabled)");
@@ -351,7 +351,7 @@ void COptionDialog::setupColorPage( void )
modeList.append( i18n("Marked Background") );
modeList.append( i18n("Marked Text") );
modeList.append( i18n("Cursor Background") );
- modeList.append( i18n("Cursor Text (block shape)") );
+ modeList.append( i18n("Cursor Text (block tqshape)") );
modeList.append( i18n("Bookmark Background") );
modeList.append( i18n("Bookmark Text") );
modeList.append( i18n("Separator") );
@@ -439,7 +439,7 @@ void COptionDialog::setupFilePage( void )
modeList.append( i18n("Most Recent Document") );
modeList.append( i18n("All Recent Documents") );
mFile.openCombo->insertStringList( modeList );
- mFile.openCombo->setMinimumWidth( mFile.openCombo->sizeHint().width() );
+ mFile.openCombo->setMinimumWidth( mFile.openCombo->tqsizeHint().width() );
connect( mFile.openCombo, TQT_SIGNAL(activated(int)),
this, TQT_SLOT( slotChanged()));
@@ -548,7 +548,7 @@ void COptionDialog::setupMiscPage( void )
this, TQT_SLOT( slotChanged()));
TQVButtonGroup *group = new TQVButtonGroup( i18n("Sounds"), page );
- group->layout()->setMargin( spacingHint() );
+ group->tqlayout()->setMargin( spacingHint() );
topLayout->addWidget( group );
text = i18n("Make sound on data &input (eg. typing) failure");
mMisc.inputCheck = new TQCheckBox( text, group );
@@ -560,7 +560,7 @@ void COptionDialog::setupMiscPage( void )
this, TQT_SLOT( slotChanged()));
group = new TQVButtonGroup( i18n("Bookmark Visibility"), page );
- group->layout()->setMargin( spacingHint() );
+ group->tqlayout()->setMargin( spacingHint() );
topLayout->addWidget( group );
text = i18n("Use visible bookmarks in the offset column");
mMisc.bookmarkColumnCheck = new TQCheckBox( text, group );
@@ -696,9 +696,9 @@ void COptionDialog::slotDefault( void )
{
case page_layout:
{
- SDisplayLayout layout;
+ SDisplayLayout tqlayout;
SDisplayLine line;
- setLayout( layout, line );
+ setLayout( tqlayout, line );
}
break;
@@ -758,7 +758,7 @@ void COptionDialog::slotApply( void )
mDisplayState.line.setColumnSize(index, mLayout.columnSizeSpin->value());
emit lineSizeChoice( mDisplayState.line );
- SDisplayLayout &l = mDisplayState.layout;
+ SDisplayLayout &l = mDisplayState.tqlayout;
l.lockLine = mLayout.lockLineCheck->isChecked();
l.lockColumn = mLayout.lockColumnCheck->isChecked();
l.leftSeparatorWidth = mLayout.leftSepWidthSpin->value();
@@ -789,7 +789,7 @@ void COptionDialog::slotApply( void )
l.horzGridWidth = l.vertGridWidth = 1;
}
- emit layoutChoice( mDisplayState.layout );
+ emit tqlayoutChoice( mDisplayState.tqlayout );
}
break;
@@ -883,35 +883,35 @@ void COptionDialog::slotApply( void )
configChanged = false;
}
-void COptionDialog::setLayout( SDisplayLayout &layout, SDisplayLine &line )
+void COptionDialog::setLayout( SDisplayLayout &tqlayout, SDisplayLine &line )
{
mDisplayState.line = line;
- mDisplayState.layout = layout;
+ mDisplayState.tqlayout = tqlayout;
slotModeSelectorChanged( mLayout.formatCombo->currentItem() );
- mLayout.lockLineCheck->setChecked( layout.lockLine );
- mLayout.lockColumnCheck->setChecked( layout.lockColumn );
- mLayout.leftSepWidthSpin->setValue( layout.leftSeparatorWidth );
- mLayout.rightSepWidthSpin->setValue( layout.rightSeparatorWidth );
- mLayout.separatorSpin->setValue( layout.separatorMarginWidth );
- mLayout.edgeSpin->setValue( layout.edgeMarginWidth );
- mLayout.leftSepWidthSpin->setValue( layout.leftSeparatorWidth );
- mLayout.rightSepWidthSpin->setValue( layout.rightSeparatorWidth );
- mLayout.columnCheck->setChecked( layout.columnCharSpace );
- slotColumnSepCheck( layout.columnCharSpace );
- mLayout.columnSepSpin->setValue( layout.columnSpacing );
-
- if( layout.horzGridWidth == 0 && layout.vertGridWidth == 0 )
+ mLayout.lockLineCheck->setChecked( tqlayout.lockLine );
+ mLayout.lockColumnCheck->setChecked( tqlayout.lockColumn );
+ mLayout.leftSepWidthSpin->setValue( tqlayout.leftSeparatorWidth );
+ mLayout.rightSepWidthSpin->setValue( tqlayout.rightSeparatorWidth );
+ mLayout.separatorSpin->setValue( tqlayout.separatorMarginWidth );
+ mLayout.edgeSpin->setValue( tqlayout.edgeMarginWidth );
+ mLayout.leftSepWidthSpin->setValue( tqlayout.leftSeparatorWidth );
+ mLayout.rightSepWidthSpin->setValue( tqlayout.rightSeparatorWidth );
+ mLayout.columnCheck->setChecked( tqlayout.columnCharSpace );
+ slotColumnSepCheck( tqlayout.columnCharSpace );
+ mLayout.columnSepSpin->setValue( tqlayout.columnSpacing );
+
+ if( tqlayout.horzGridWidth == 0 && tqlayout.vertGridWidth == 0 )
{
mLayout.gridCombo->setCurrentItem(0);
}
- else if( layout.horzGridWidth != 0 && layout.vertGridWidth != 0 )
+ else if( tqlayout.horzGridWidth != 0 && tqlayout.vertGridWidth != 0 )
{
mLayout.gridCombo->setCurrentItem(3);
}
else
{
- mLayout.gridCombo->setCurrentItem( layout.vertGridWidth != 0 ? 1 : 2 );
+ mLayout.gridCombo->setCurrentItem( tqlayout.vertGridWidth != 0 ? 1 : 2 );
}
}
@@ -1021,7 +1021,7 @@ void COptionDialog::setFile( SDisplayMisc &misc )
void COptionDialog::setState( SDisplayState &state )
{
- setLayout( state.layout, state.line );
+ setLayout( state.tqlayout, state.line );
setCursor( state.cursor );
setColor( state.color );
setFont( state.font );
@@ -1050,8 +1050,8 @@ SDisplayCursor::EFocusMode COptionDialog::cursorFocusMode( void )
-CColorListBox::CColorListBox( TQWidget *parent, const char *name, WFlags f )
- :KListBox( parent, name, f ), mCurrentOnDragEnter(-1)
+CColorListBox::CColorListBox( TQWidget *tqparent, const char *name, WFlags f )
+ :KListBox( tqparent, name, f ), mCurrentOnDragEnter(-1)
{
connect( this, TQT_SIGNAL(selected(int)), this, TQT_SLOT(newColor(int)) );
setAcceptDrops( true);
@@ -1199,7 +1199,7 @@ void CColorListItem::paint( TQPainter *p )
p->drawText( mBoxWidth+3*2, fm.ascent() + fm.leading()/2, text() );
- p->setPen( Qt::black );
+ p->setPen( TQt::black );
p->drawRect( 3, 1, mBoxWidth, h-1 );
p->fillRect( 4, 2, mBoxWidth-2, h-3, mColor );
}
diff --git a/khexedit/optiondialog.h b/khexedit/optiondialog.h
index b53a806..0089155 100644
--- a/khexedit/optiondialog.h
+++ b/khexedit/optiondialog.h
@@ -27,7 +27,7 @@ class TQFrame;
class TQCheckBox;
class TQLabel;
class TQLineEdit;
-class QPushbutton;
+class TQPushbutton;
class TQRadioButton;
class TQSpinBox;
class TQComboBox;
@@ -43,9 +43,10 @@ class KFontChooser;
class CColorListBox : public KListBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- CColorListBox( TQWidget *parent=0, const char * name=0, WFlags f=0 );
+ CColorListBox( TQWidget *tqparent=0, const char * name=0, WFlags f=0 );
void setColor( uint index, const TQColor &color );
const TQColor color( uint index );
@@ -69,10 +70,10 @@ class CColorListBox : public KListBox
};
-class CColorListItem : public QListBoxItem
+class CColorListItem : public TQListBoxItem
{
public:
- CColorListItem( const TQString &text, const TQColor &color=Qt::black );
+ CColorListItem( const TQString &text, const TQColor &color=TQt::black );
const TQColor &color( void );
void setColor( const TQColor &color );
@@ -92,6 +93,7 @@ class CColorListItem : public QListBoxItem
class COptionDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum EPage
@@ -105,10 +107,10 @@ class COptionDialog : public KDialogBase
page_max
};
- COptionDialog( TQWidget *parent = 0, char *name = 0, bool modal = false );
+ COptionDialog( TQWidget *tqparent = 0, char *name = 0, bool modal = false );
~COptionDialog( void );
- void setLayout( SDisplayLayout &layout, SDisplayLine &line );
+ void setLayout( SDisplayLayout &tqlayout, SDisplayLine &line );
void setCursor( SDisplayCursor &cursor );
void setColor( SDisplayColor &color );
void setFont( SDisplayFont &font );
@@ -236,7 +238,7 @@ class COptionDialog : public KDialogBase
signals:
void lineSizeChoice( const SDisplayLine &lineSize );
- void layoutChoice( const SDisplayLayout &layout );
+ void tqlayoutChoice( const SDisplayLayout &tqlayout );
void cursorChoice( const SDisplayCursor &cursor );
void colorChoice( const SDisplayColor &color );
void fontChoice( const SDisplayFont &font );
diff --git a/khexedit/parts/kbytesedit/kbyteseditwidget.cpp b/khexedit/parts/kbytesedit/kbyteseditwidget.cpp
index cb2b549..1e53c05 100644
--- a/khexedit/parts/kbytesedit/kbyteseditwidget.cpp
+++ b/khexedit/parts/kbytesedit/kbyteseditwidget.cpp
@@ -26,8 +26,8 @@
#include "kbyteseditwidget.h"
-KBytesEditWidget::KBytesEditWidget( TQWidget *parent, const char *name, const TQStringList & )
- : TQWidget( parent, name)
+KBytesEditWidget::KBytesEditWidget( TQWidget *tqparent, const char *name, const TQStringList & )
+ : TQWidget( tqparent, name)
{
TQHBoxLayout* Layout = new TQHBoxLayout( this );
BytesEdit = new KHE::KBytesEdit( this, "BytesEdit" );
@@ -247,9 +247,9 @@ bool KBytesEditWidget::hasSelectedData() const
}
-void KBytesEditWidget::repaintRange( int i1, int i2 )
+void KBytesEditWidget::tqrepaintRange( int i1, int i2 )
{
- BytesEdit->repaintRange( i1, i2 );
+ BytesEdit->tqrepaintRange( i1, i2 );
}
diff --git a/khexedit/parts/kbytesedit/kbyteseditwidget.h b/khexedit/parts/kbytesedit/kbyteseditwidget.h
index 72bfeb6..616981f 100644
--- a/khexedit/parts/kbytesedit/kbyteseditwidget.h
+++ b/khexedit/parts/kbytesedit/kbyteseditwidget.h
@@ -43,10 +43,11 @@ class KBytesEditWidget : public TQWidget, public KHE::BytesEditInterface,
public KHE::ZoomInterface, public KHE::ClipboardInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
/** constructor API as demanded by KGenericFactory */
- KBytesEditWidget( TQWidget *parent, const char *name, const TQStringList & = TQStringList() );
+ KBytesEditWidget( TQWidget *tqparent, const char *name, const TQStringList & = TQStringList() );
public: // bytesedit interface
/** hands over to the editor a new byte array.
@@ -85,15 +86,15 @@ class KBytesEditWidget : public TQWidget, public KHE::BytesEditInterface,
virtual bool isOverwriteOnly() const;
virtual bool isReadOnly() const;
virtual bool isModified() const;
- /** repaint the indizes from i1 to i2 */
- virtual void repaintRange( int i1, int i2 );
+ /** tqrepaint the indizes from i1 to i2 */
+ virtual void tqrepaintRange( int i1, int i2 );
public: // cursor interface
/** */
virtual void setCursorPosition( int Index );
// virtual bool tabChangesFocus() const;
- public: // layout interface ??
+ public: // tqlayout interface ??
/** sets the resizestyle for the value column. Default is KHE::FullSizeUsage */
virtual void setResizeStyle( KResizeStyle Style );
/** sets the number of bytes per line, switching the resize style to KHE::NoResize */
diff --git a/khexedit/parts/kpart/khebrowserextension.h b/khexedit/parts/kpart/khebrowserextension.h
index 67a6d45..f962b0b 100644
--- a/khexedit/parts/kpart/khebrowserextension.h
+++ b/khexedit/parts/kpart/khebrowserextension.h
@@ -34,6 +34,7 @@ class KHexEditPart;
class KHexEditBrowserExtension : public KParts::BrowserExtension
{
Q_OBJECT
+ TQ_OBJECT
public:
KHexEditBrowserExtension( KHexEditPart *P );
diff --git a/khexedit/parts/kpart/khepart.cpp b/khexedit/parts/kpart/khepart.cpp
index 1fa95fb..3d17dd5 100644
--- a/khexedit/parts/kpart/khepart.cpp
+++ b/khexedit/parts/kpart/khepart.cpp
@@ -83,7 +83,7 @@ void KHexEditPart::setupActions( bool BrowserViewWanted )
{
KActionCollection *AC = actionCollection();
// create our actions
- CopyAction = BrowserViewWanted ? 0 : KStdAction::copy( HexEdit, TQT_SLOT(copy()), AC );
+ CopyAction = BrowserViewWanted ? 0 : KStdAction::copy( TQT_TQOBJECT(HexEdit), TQT_SLOT(copy()), AC );
KStdAction::selectAll( this, TQT_SLOT(slotSelectAll()), AC );
KStdAction::deselect( this, TQT_SLOT(slotUnselect()), AC );
@@ -105,8 +105,8 @@ void KHexEditPart::setupActions( bool BrowserViewWanted )
ShowUnprintableAction = new KToggleAction( i18n("Show &Unprintable Chars (<32)"), 0, this, TQT_SLOT(slotSetShowUnprintable()), actionCollection(), "view_showunprintable" );
- KStdAction::zoomIn( HexEdit, TQT_SLOT(zoomIn()), actionCollection() );
- KStdAction::zoomOut( HexEdit, TQT_SLOT(zoomOut()), actionCollection() );
+ KStdAction::zoomIn( TQT_TQOBJECT(HexEdit), TQT_SLOT(zoomIn()), actionCollection() );
+ KStdAction::zoomOut( TQT_TQOBJECT(HexEdit), TQT_SLOT(zoomOut()), actionCollection() );
// resize style
ResizeStyleAction = new KSelectAction( i18n("&Resize Style"), 0, AC, "resizestyle" );
@@ -141,7 +141,7 @@ void KHexEditPart::fitActionSettings()
ShowUnprintableAction->setChecked( HexEdit->showUnprintable() );
CodingAction->setCurrentItem( (int)HexEdit->coding() );
- EncodingAction->setCurrentItem( KCharCodec::codecNames().findIndex(HexEdit->encodingName()) );
+ EncodingAction->setCurrentItem( KCharCodec::codecNames().tqfindIndex(HexEdit->encodingName()) );
ResizeStyleAction->setCurrentItem( (int)HexEdit->resizeStyle() );
diff --git a/khexedit/parts/kpart/khepart.h b/khexedit/parts/kpart/khepart.h
index 0526462..4c3fcd9 100644
--- a/khexedit/parts/kpart/khepart.h
+++ b/khexedit/parts/kpart/khepart.h
@@ -45,6 +45,7 @@ class KHexEdit;
class KHexEditPart : public KParts::ReadOnlyPart
{
Q_OBJECT
+ TQ_OBJECT
friend class KHexEditBrowserExtension;
diff --git a/khexedit/parts/kpart/khepartfactory.h b/khexedit/parts/kpart/khepartfactory.h
index 15a1cee..cc918a7 100644
--- a/khexedit/parts/kpart/khepartfactory.h
+++ b/khexedit/parts/kpart/khepartfactory.h
@@ -27,14 +27,15 @@ class KAboutData;
class KHexEditPartFactory : public KParts::Factory
{
Q_OBJECT
+ TQ_OBJECT
public:
KHexEditPartFactory();
virtual ~KHexEditPartFactory();
public:
- virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name,
+ virtual KParts::Part* createPartObject( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name,
const char *classname, const TQStringList &args );
static KInstance* instance();
diff --git a/khexedit/printdialogpage.cc b/khexedit/printdialogpage.cc
index 2677ac4..ff65f10 100644
--- a/khexedit/printdialogpage.cc
+++ b/khexedit/printdialogpage.cc
@@ -31,8 +31,8 @@
#include "printdialogpage.h"
-LayoutDialogPage::LayoutDialogPage( TQWidget *parent, const char *name )
- : KPrintDialogPage( parent, name )
+LayoutDialogPage::LayoutDialogPage( TQWidget *tqparent, const char *name )
+ : KPrintDialogPage( tqparent, name )
{
mConfig = 0;
setTitle( i18n( "Page Layout" ) );
@@ -78,14 +78,14 @@ void LayoutDialogPage::setupLayoutPage( void )
{
mLayout.marginSpin[i] = new TQSpinBox( group );
mLayout.marginSpin[i]->setFixedHeight(
- mLayout.marginSpin[i]->sizeHint().height() );
+ mLayout.marginSpin[i]->tqsizeHint().height() );
mLayout.marginSpin[i]->setMinimumWidth(
mLayout.marginSpin[i]->fontMetrics().width("M")*10 );
mLayout.marginSpin[i]->setRange( 0, INT_MAX );
TQLabel *label = new TQLabel( mLayout.marginSpin[i], name[i], group );
- label->setFixedHeight( mLayout.marginSpin[i]->sizeHint().height() );
- label->setFixedWidth( label->sizeHint().width() );
+ label->setFixedHeight( mLayout.marginSpin[i]->tqsizeHint().height() );
+ label->setFixedWidth( label->tqsizeHint().width() );
if( i < 2 )
{
@@ -101,7 +101,7 @@ void LayoutDialogPage::setupLayoutPage( void )
text = i18n("Draw h&eader above text");
mLayout.headerCheck = new TQCheckBox( text, this );
- mLayout.headerCheck->setFixedSize( mLayout.headerCheck->sizeHint() );
+ mLayout.headerCheck->setFixedSize( mLayout.headerCheck->tqsizeHint() );
connect( mLayout.headerCheck, TQT_SIGNAL( toggled(bool)),
TQT_SLOT( slotDrawHeader(bool)));
topLayout->addWidget( mLayout.headerCheck, 0, AlignLeft );
@@ -135,16 +135,16 @@ void LayoutDialogPage::setupLayoutPage( void )
{
mLayout.headerCombo[i] = new TQComboBox( false, this );
mLayout.headerCombo[i]->setFixedHeight(
- mLayout.headerCombo[i]->sizeHint().height() );
+ mLayout.headerCombo[i]->tqsizeHint().height() );
mLayout.headerCombo[i]->setMinimumWidth(
mLayout.headerCombo[i]->fontMetrics().width("M")*10 );
mLayout.headerLabel[i] = new TQLabel( mLayout.headerCombo[i], name[i],
this );
mLayout.headerLabel[i]->setFixedHeight(
- mLayout.headerLabel[i]->sizeHint().height() );
+ mLayout.headerLabel[i]->tqsizeHint().height() );
mLayout.headerLabel[i]->setFixedWidth(
- mLayout.headerLabel[i]->sizeHint().width() );
+ mLayout.headerLabel[i]->tqsizeHint().width() );
if( i<3 )
{
@@ -163,7 +163,7 @@ void LayoutDialogPage::setupLayoutPage( void )
text = i18n("Draw &footer below text");
mLayout.footerCheck = new TQCheckBox( text, this );
- mLayout.footerCheck->setFixedSize( mLayout.footerCheck->sizeHint() );
+ mLayout.footerCheck->setFixedSize( mLayout.footerCheck->tqsizeHint() );
connect( mLayout.footerCheck, TQT_SIGNAL( toggled(bool)),
TQT_SLOT( slotDrawFooter(bool)));
topLayout->addWidget( mLayout.footerCheck, 0, AlignLeft );
@@ -181,16 +181,16 @@ void LayoutDialogPage::setupLayoutPage( void )
{
mLayout.footerCombo[i] = new TQComboBox( false, this );
mLayout.footerCombo[i]->setFixedHeight(
- mLayout.footerCombo[i]->sizeHint().height() );
+ mLayout.footerCombo[i]->tqsizeHint().height() );
mLayout.footerCombo[i]->setMinimumWidth(
mLayout.footerCombo[i]->fontMetrics().width("M")*10 );
mLayout.footerLabel[i] = new TQLabel( mLayout.footerCombo[i], name[i],
this );
mLayout.footerLabel[i]->setFixedHeight(
- mLayout.footerLabel[i]->sizeHint().height() );
+ mLayout.footerLabel[i]->tqsizeHint().height() );
mLayout.footerLabel[i]->setFixedWidth(
- mLayout.footerLabel[i]->sizeHint().width() );
+ mLayout.footerLabel[i]->tqsizeHint().width() );
if( i<3 )
{
diff --git a/khexedit/printdialogpage.h b/khexedit/printdialogpage.h
index 8ec7b3f..6e2a1fb 100644
--- a/khexedit/printdialogpage.h
+++ b/khexedit/printdialogpage.h
@@ -33,9 +33,10 @@ class TQSpinBox;
class LayoutDialogPage : public KPrintDialogPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- LayoutDialogPage( TQWidget *parent = 0, const char *name = 0 );
+ LayoutDialogPage( TQWidget *tqparent = 0, const char *name = 0 );
~LayoutDialogPage( void );
void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false );
diff --git a/khexedit/searchbar.cc b/khexedit/searchbar.cc
index 73baba6..3de511d 100644
--- a/khexedit/searchbar.cc
+++ b/khexedit/searchbar.cc
@@ -51,8 +51,8 @@ static const char * close_xpm[] = {
" ",
" "};
-CSearchBar::CSearchBar( TQWidget *parent, const char *name, WFlags f )
- :TQFrame( parent, name, f )
+CSearchBar::CSearchBar( TQWidget *tqparent, const char *name, WFlags f )
+ :TQFrame( tqparent, name, f )
{
setFrameStyle( TQFrame::Panel | TQFrame::Raised );
setLineWidth( 1 );
@@ -74,7 +74,7 @@ CSearchBar::CSearchBar( TQWidget *parent, const char *name, WFlags f )
mFindButton->setAutoDefault(false);
connect( mFindButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(start()) );
connect(mInputEdit,TQT_SIGNAL(returnPressed()),mFindButton,TQT_SLOT(animateClick()));
- mFindButton->setFixedHeight( mTypeCombo->sizeHint().height() );
+ mFindButton->setFixedHeight( mTypeCombo->tqsizeHint().height() );
mBackwards = new TQCheckBox( i18n("Backwards"), this );
mIgnoreCase = new TQCheckBox( i18n("Ignore case"), this );
@@ -85,7 +85,7 @@ CSearchBar::CSearchBar( TQWidget *parent, const char *name, WFlags f )
connect( mCloseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(hideWidget()) );
//
- // Make layout
+ // Make tqlayout
//
TQHBoxLayout *hlay = new TQHBoxLayout( this, 4, 6 );
hlay->addWidget( mTypeCombo );
@@ -105,12 +105,12 @@ CSearchBar::CSearchBar( TQWidget *parent, const char *name, WFlags f )
//
// Espen 2000-04-21
-// Qt 2.1: Seems like the TQLineEdit::returnPressed() does not work when
+// TQt 2.1: Seems like the TQLineEdit::returnPressed() does not work when
// I install a validator. So I catch the event manually
//
bool CSearchBar::eventFilter( TQObject *o, TQEvent *e )
{
- if( o == mInputEdit && e->type() == TQEvent::KeyPress )
+ if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(mInputEdit) && e->type() == TQEvent::KeyPress )
{
TQKeyEvent *ke = (TQKeyEvent*)e;
if( ke->key() == Key_Return )
diff --git a/khexedit/searchbar.h b/khexedit/searchbar.h
index 752f6d6..00b25a8 100644
--- a/khexedit/searchbar.h
+++ b/khexedit/searchbar.h
@@ -30,12 +30,13 @@ class TQPushButton;
class TQCheckBox;
class CHexValidator;
-class CSearchBar : public QFrame
+class CSearchBar : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- CSearchBar( TQWidget *parent=0, const char *name=0, WFlags f=0 );
+ CSearchBar( TQWidget *tqparent=0, const char *name=0, WFlags f=0 );
virtual bool eventFilter( TQObject *o, TQEvent *e );
public slots:
diff --git a/khexedit/statusbarprogress.cc b/khexedit/statusbarprogress.cc
index 872698e..fda0c9d 100644
--- a/khexedit/statusbarprogress.cc
+++ b/khexedit/statusbarprogress.cc
@@ -28,16 +28,16 @@
#include <klocale.h>
#include <tqstyle.h>
-CStatusBarProgress::CStatusBarProgress( TQWidget *parent, const char *name )
- : TQFrame(parent, name), TQRangeControl(0, 100, 1, 10, 0),
- mOrientation( Horizontal )
+CStatusBarProgress::CStatusBarProgress( TQWidget *tqparent, const char *name )
+ : TQFrame(tqparent, name), TQRangeControl(0, 100, 1, 10, 0),
+ mOrientation(Horizontal )
{
initialize();
}
CStatusBarProgress::CStatusBarProgress( Orientation orientation,
- TQWidget *parent, const char *name )
- : TQFrame(parent, name), TQRangeControl(0, 100, 1, 10, 0),
+ TQWidget *tqparent, const char *name )
+ : TQFrame(tqparent, name), TQRangeControl(0, 100, 1, 10, 0),
mOrientation( orientation )
{
initialize();
@@ -45,8 +45,8 @@ CStatusBarProgress::CStatusBarProgress( Orientation orientation,
CStatusBarProgress::CStatusBarProgress( int minValue, int maxValue, int value,
Orientation orientation,
- TQWidget *parent, const char *name )
- : TQFrame(parent, name), TQRangeControl(minValue, maxValue, 1, 10, value),
+ TQWidget *tqparent, const char *name )
+ : TQFrame(tqparent, name), TQRangeControl(minValue, maxValue, 1, 10, value),
mOrientation(orientation)
{
initialize();
@@ -67,10 +67,10 @@ void CStatusBarProgress::initialize( void )
mBarPixmap = 0;
mBarStyle = Solid;
- mBarColor = palette().active().highlight();
- mBarTextColor = palette().active().highlightedText();
- mTextColor = palette().active().text();
- setBackgroundColor( palette().active().background() );
+ mBarColor = tqpalette().active().highlight();
+ mBarTextColor = tqpalette().active().highlightedText();
+ mTextColor = tqpalette().active().text();
+ setBackgroundColor( tqpalette().active().background() );
TQFont font( KGlobalSettings::generalFont() );
font.setBold( true );
@@ -176,7 +176,7 @@ bool CStatusBarProgress::textEnabled( void ) const
return( mTextEnabled );
}
-TQSize CStatusBarProgress::sizeHint( void ) const
+TQSize CStatusBarProgress::tqsizeHint( void ) const
{
TQSize s( size() );
@@ -212,13 +212,13 @@ int CStatusBarProgress::recalcValue(int range)
void CStatusBarProgress::valueChange()
{
- repaint(contentsRect(), FALSE);
+ tqrepaint(contentsRect(), FALSE);
emit percentageChanged(recalcValue(100));
}
void CStatusBarProgress::rangeChange()
{
- repaint(contentsRect(), FALSE);
+ tqrepaint(contentsRect(), FALSE);
emit percentageChanged(recalcValue(100));
}
@@ -229,7 +229,7 @@ void CStatusBarProgress::styleChange( GUIStyle )
void CStatusBarProgress::adjustStyle( void )
{
- switch( style().SH_GUIStyle)
+ switch( tqstyle().SH_GUIStyle)
{
case WindowsStyle:
setFrameStyle( TQFrame::NoFrame );
@@ -246,10 +246,10 @@ void CStatusBarProgress::adjustStyle( void )
void CStatusBarProgress::paletteChange( const TQPalette & )
{
- mBarColor = palette().active().highlight();
- mBarTextColor = palette().active().highlightedText();
- mTextColor = palette().active().text();
- setBackgroundColor( palette().active().background() );
+ mBarColor = tqpalette().active().highlight();
+ mBarTextColor = tqpalette().active().highlightedText();
+ mTextColor = tqpalette().active().text();
+ setBackgroundColor( tqpalette().active().background() );
}
void CStatusBarProgress::drawText( TQPainter *p )
@@ -259,17 +259,17 @@ void CStatusBarProgress::drawText( TQPainter *p )
if( mMsg.isEmpty() == true )
{
- s = TQString("%1%").arg(recalcValue(100));
+ s = TQString("%1%").tqarg(recalcValue(100));
}
else
{
if( mCurPage > 0 )
{
- s = i18n("%1... %2 of %3").arg(mMsg).arg(mCurPage).arg(mMaxPage);
+ s = i18n("%1... %2 of %3").tqarg(mMsg).tqarg(mCurPage).tqarg(mMaxPage);
}
else
{
- s = i18n("%1... %2%").arg(mMsg).arg(recalcValue(100));
+ s = i18n("%1... %2%").tqarg(mMsg).tqarg(recalcValue(100));
}
}
@@ -297,7 +297,7 @@ void CStatusBarProgress::drawContents(TQPainter *p)
switch( mBarStyle )
{
case Solid:
- if( mOrientation == Horizontal )
+ if( mOrientation ==Qt::Horizontal )
{
fr.setWidth(recalcValue(cr.width()));
er.setLeft(fr.right() + 1);
@@ -319,7 +319,7 @@ void CStatusBarProgress::drawContents(TQPainter *p)
case Blocked:
const int margin = 2;
int max, num, dx, dy;
- if( mOrientation == Horizontal )
+ if( mOrientation ==Qt::Horizontal )
{
fr.setHeight(cr.height() - 2 * margin);
fr.setWidth((int)(0.67 * fr.height()));
@@ -350,7 +350,7 @@ void CStatusBarProgress::drawContents(TQPainter *p)
if (num != max)
{
- if( mOrientation == Horizontal )
+ if( mOrientation ==Qt::Horizontal )
er.setLeft(fr.right() + 1);
else
er.setBottom(fr.bottom() + 1);
diff --git a/khexedit/statusbarprogress.h b/khexedit/statusbarprogress.h
index de93b5a..43dfd9d 100644
--- a/khexedit/statusbarprogress.h
+++ b/khexedit/statusbarprogress.h
@@ -28,6 +28,7 @@
class CStatusBarProgress : public TQFrame, public TQRangeControl
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -46,18 +47,18 @@ class CStatusBarProgress : public TQFrame, public TQRangeControl
/**
* Construct a default progress bar. Orientation is horizontal.
*/
- CStatusBarProgress(TQWidget *parent=0, const char *name=0);
+ CStatusBarProgress(TQWidget *tqparent=0, const char *name=0);
/**
* Construct a KProgress bar with an orientation.
*/
- CStatusBarProgress(Orientation, TQWidget *parent=0, const char *name=0);
+ CStatusBarProgress(Orientation, TQWidget *tqparent=0, const char *name=0);
/**
* Construct a KProgress bar with minimum, maximum and initial value.
*/
CStatusBarProgress(int minValue, int maxValue, int value, Orientation,
- TQWidget *parent=0, const char *name=0);
+ TQWidget *tqparent=0, const char *name=0);
/**
* Destructor
@@ -81,7 +82,7 @@ class CStatusBarProgress : public TQFrame, public TQRangeControl
/**
* Set the orientation of the progress bar.
- * Allowed values are Horizonzal and Vertical.
+ * Allowed values are Horizonzal andQt::Vertical.
*/
void setOrientation(Orientation);
@@ -114,7 +115,7 @@ class CStatusBarProgress : public TQFrame, public TQRangeControl
* Returns the recommended width for vertical progress bars or
* the recommended height for vertical progress bars
*/
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
public slots:
@@ -138,9 +139,9 @@ class CStatusBarProgress : public TQFrame, public TQRangeControl
private:
TQPixmap *mBarPixmap;
- QColor mBarColor;
- QColor mBarTextColor;
- QColor mTextColor;
+ TQColor mBarColor;
+ TQColor mBarTextColor;
+ TQColor mTextColor;
TQRect fr;
BarStyle mBarStyle;
Orientation mOrientation;
diff --git a/khexedit/stringdialog.cc b/khexedit/stringdialog.cc
index 5e93f28..d960da1 100644
--- a/khexedit/stringdialog.cc
+++ b/khexedit/stringdialog.cc
@@ -34,12 +34,12 @@
#include <tqpushbutton.h>
-CStringDialog::CStringDialog( TQWidget *parent, const char *name, bool modal )
+CStringDialog::CStringDialog( TQWidget *tqparent, const char *name, bool modal )
: KDialogBase( Plain, i18n("Extract Strings"), Help|User1|Cancel, User1,
- parent, name, modal, true, i18n("&Update") ),
+ tqparent, name, modal, true, i18n("&Update") ),
mMaxLength(0), mBusy(false), mDirty(false)
{
- setHelp( "khexedit/khexedit.html", TQString::null );
+ setHelp( "khexedit/khexedit.html", TQString() );
TQString text;
TQVBoxLayout *topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
@@ -270,14 +270,14 @@ void CStringDialog::setClean( void )
void CStringDialog::selectionChanged()
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
startTimer( 200 );
}
void CStringDialog::timerEvent( TQTimerEvent * )
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
TQListViewItem *item = mStringList->currentItem();
if( item == 0 )
@@ -307,7 +307,7 @@ int CStringDialog::updateList( CProgress &p )
for( const TQString *str = list.first(); str != 0; str = list.next() )
{
appendListItem( *str, offsetLen );
- mMaxLength = QMAX( mMaxLength, str->length() );
+ mMaxLength = TQMAX( mMaxLength, str->length() );
if( p.expired() == true )
{
@@ -372,8 +372,8 @@ void CStringDialog::appendListItem( const TQString &str, uint offsetLen )
void CStringDialog::updateListInfo( void )
{
- mListSizeLabel->setText( TQString("%1").arg(mStringData.count()) );
- mDisplaySizeLabel->setText( TQString("%1").arg(mStringList->childCount()) );
+ mListSizeLabel->setText( TQString("%1").tqarg(mStringData.count()) );
+ mDisplaySizeLabel->setText( TQString("%1").tqarg(mStringList->childCount()) );
setColumnWidth();
}
diff --git a/khexedit/stringdialog.h b/khexedit/stringdialog.h
index eb462f9..36b46f8 100644
--- a/khexedit/stringdialog.h
+++ b/khexedit/stringdialog.h
@@ -41,9 +41,10 @@ class CListView;
class CStringDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- CStringDialog( TQWidget *parent=0, const char *name = 0, bool modal=false );
+ CStringDialog( TQWidget *tqparent=0, const char *name = 0, bool modal=false );
~CStringDialog( void );
int updateList( CProgress &p );
diff --git a/khexedit/toplevel.cc b/khexedit/toplevel.cc
index 3d65820..f23d9ad 100644
--- a/khexedit/toplevel.cc
+++ b/khexedit/toplevel.cc
@@ -18,7 +18,7 @@
*
*/
-// kate: space-indent on; indent-width 2; replace-tabs on;
+// kate: space-indent on; indent-width 2; tqreplace-tabs on;
#include <tqptrlist.h>
#include <tqsignalmapper.h>
@@ -68,43 +68,43 @@ KHexEdit::KHexEdit( void )
//
// Prepare menus and status bar
//
- mAction.bookmarkMapper = new TQSignalMapper(this);
- connect(mAction.bookmarkMapper, TQT_SIGNAL(mapped(int)), editor(), TQT_SLOT(gotoBookmark(int)));
+ mAction.bookmarkMapper = new TQSignalMapper(TQT_TQOBJECT(this));
+ connect(mAction.bookmarkMapper, TQT_SIGNAL(mapped(int)), TQT_TQOBJECT(editor()), TQT_SLOT(gotoBookmark(int)));
setupActions();
setupStatusBar();
connect( hexView(), TQT_SIGNAL( cursorChanged( SCursorState & ) ),
- this, TQT_SLOT( cursorChanged( SCursorState & ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( cursorChanged( SCursorState & ) ) );
connect( hexView(), TQT_SIGNAL( editMode( CHexBuffer::EEditMode ) ),
- this, TQT_SLOT( editMode( CHexBuffer::EEditMode ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( editMode( CHexBuffer::EEditMode ) ) );
connect( hexView(), TQT_SIGNAL( encodingChanged( const SEncodeState &)),
- this, TQT_SLOT( encodingChanged( const SEncodeState & )) );
+ TQT_TQOBJECT(this), TQT_SLOT( encodingChanged( const SEncodeState & )) );
connect( hexView(), TQT_SIGNAL( textWidth( uint ) ),
- this, TQT_SLOT( textWidth( uint ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( textWidth( uint ) ) );
connect( hexView(), TQT_SIGNAL( fileState( SFileState & ) ),
- this, TQT_SLOT( fileState( SFileState & ) ) );
- connect( hexView(), TQT_SIGNAL( layoutChanged( const SDisplayLayout & ) ),
- this, TQT_SLOT( layoutChanged( const SDisplayLayout & ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( fileState( SFileState & ) ) );
+ connect( hexView(), TQT_SIGNAL( tqlayoutChanged( const SDisplayLayout & ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( tqlayoutChanged( const SDisplayLayout & ) ) );
connect( hexView(), TQT_SIGNAL( inputModeChanged( const SDisplayInputMode & ) ),
- this, TQT_SLOT( inputModeChanged( const SDisplayInputMode & ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( inputModeChanged( const SDisplayInputMode & ) ) );
connect( hexView(), TQT_SIGNAL( bookmarkChanged( TQPtrList<SCursorOffset> &)),
- this, TQT_SLOT( bookmarkChanged( TQPtrList<SCursorOffset> & ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( bookmarkChanged( TQPtrList<SCursorOffset> & ) ) );
connect( hexView(), TQT_SIGNAL( fileName( const TQString &, bool ) ),
- this, TQT_SLOT( fileActive( const TQString &, bool ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( fileActive( const TQString &, bool ) ) );
connect( hexView(), TQT_SIGNAL( fileRename( const TQString &, const TQString & )),
- this, TQT_SLOT( fileRename( const TQString &, const TQString & ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( fileRename( const TQString &, const TQString & ) ) );
connect( hexView(), TQT_SIGNAL( fileClosed( const TQString & ) ),
- this, TQT_SLOT( fileClosed( const TQString & ) ) );
- connect( editor(), TQT_SIGNAL( errorLoadFile( const TQString & ) ),
- this, TQT_SLOT( removeRecentFile( const TQString & ) ) );
- connect( editor(), TQT_SIGNAL( operationChanged( bool ) ),
- this, TQT_SLOT( operationChanged( bool ) ) );
- connect( editor(), TQT_SIGNAL( removeRecentFiles() ),
- this, TQT_SLOT( removeRecentFiles() ) );
+ TQT_TQOBJECT(this), TQT_SLOT( fileClosed( const TQString & ) ) );
+ connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( errorLoadFile( const TQString & ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( removeRecentFile( const TQString & ) ) );
+ connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( operationChanged( bool ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( operationChanged( bool ) ) );
+ connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( removeRecentFiles() ),
+ TQT_TQOBJECT(this), TQT_SLOT( removeRecentFiles() ) );
connect( mManager, TQT_SIGNAL( conversionClosed() ),
- this, TQT_SLOT(conversionClosed()) );
+ TQT_TQOBJECT(this), TQT_SLOT(conversionClosed()) );
connect( mManager, TQT_SIGNAL( searchBarClosed() ),
- this, TQT_SLOT(searchBarClosed()) );
+ TQT_TQOBJECT(this), TQT_SLOT(searchBarClosed()) );
//
// Read configuration from file and set the default editor size.
@@ -125,68 +125,68 @@ KHexEdit::~KHexEdit( void )
void KHexEdit::setupActions( void )
{
- KStdAction::openNew( editor(), TQT_SLOT(newFile()), actionCollection() );
- KStdAction::open( editor(), TQT_SLOT(open()), actionCollection() );
+ KStdAction::openNew( TQT_TQOBJECT(editor()), TQT_SLOT(newFile()), actionCollection() );
+ KStdAction::open( TQT_TQOBJECT(editor()), TQT_SLOT(open()), actionCollection() );
KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()),
actionCollection());
mAction.insert = new KAction( i18n("&Insert..."), CTRL+Key_I,
- editor(), TQT_SLOT(insertFile()), actionCollection(), "insert_file" );
- mAction.openRecent = KStdAction::openRecent( this, TQT_SLOT( slotFileOpenRecent( const KURL& ) ), actionCollection() );
- mAction.save = KStdAction::save( editor(), TQT_SLOT(save()), actionCollection() );
- mAction.saveAs = KStdAction::saveAs( editor(), TQT_SLOT(saveAs()), actionCollection() );
- mAction.revert = KStdAction::revert( editor(), TQT_SLOT(reload()), actionCollection() );
- //mAction.revert = KStdAction::revert( this, TQT_SLOT(resizeTest()), actionCollection() );
-
- mAction.close = KStdAction::close( editor(), TQT_SLOT(close()), actionCollection() );
- mAction.print = KStdAction::print( editor(), TQT_SLOT(print()), actionCollection() );
+ TQT_TQOBJECT(editor()), TQT_SLOT(insertFile()), actionCollection(), "insert_file" );
+ mAction.openRecent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpenRecent( const KURL& ) ), actionCollection() );
+ mAction.save = KStdAction::save( TQT_TQOBJECT(editor()), TQT_SLOT(save()), actionCollection() );
+ mAction.saveAs = KStdAction::saveAs( TQT_TQOBJECT(editor()), TQT_SLOT(saveAs()), actionCollection() );
+ mAction.revert = KStdAction::revert( TQT_TQOBJECT(editor()), TQT_SLOT(reload()), actionCollection() );
+ //mAction.revert = KStdAction::revert( TQT_TQOBJECT(this), TQT_SLOT(resizeTest()), actionCollection() );
+
+ mAction.close = KStdAction::close( TQT_TQOBJECT(editor()), TQT_SLOT(close()), actionCollection() );
+ mAction.print = KStdAction::print( TQT_TQOBJECT(editor()), TQT_SLOT(print()), actionCollection() );
mAction.exportData = new KAction( i18n("E&xport..."), 0,
- editor(), TQT_SLOT(exportDialog()), actionCollection(), "export" );
+ TQT_TQOBJECT(editor()), TQT_SLOT(exportDialog()), actionCollection(), "export" );
mAction.cancel = new KAction( i18n("&Cancel Operation"),
- "stop", 0, editor(), TQT_SLOT(stop()), actionCollection(), "cancel" );
+ "stop", 0, TQT_TQOBJECT(editor()), TQT_SLOT(stop()), actionCollection(), "cancel" );
mAction.readOnly = new KToggleAction( i18n("&Read Only"),
- 0, editor(), TQT_SLOT(toggleWriteProtection()),actionCollection(), "read_only" );
+ 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleWriteProtection()),actionCollection(), "read_only" );
mAction.resizeLock = new KToggleAction( i18n("&Allow Resize"),
- 0, editor(), TQT_SLOT(toggleResizeLock()),actionCollection(), "resize_lock" );
+ 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleResizeLock()),actionCollection(), "resize_lock" );
mAction.newWindow = new KAction( i18n("N&ew Window"),
- 0, this, TQT_SLOT(newWindow()),actionCollection(), "new_window" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(newWindow()),actionCollection(), "new_window" );
mAction.closeWindow= new KAction( i18n("Close &Window"),
- 0, this, TQT_SLOT(closeWindow()),actionCollection(), "close_window" );
- mAction.quit = KStdAction::quit( this, TQT_SLOT(closeProgram()), actionCollection() );
-
- mAction.undo = KStdAction::undo( editor(), TQT_SLOT(undo()), actionCollection() );
- mAction.redo = KStdAction::redo( editor(), TQT_SLOT(redo()), actionCollection() );
- mAction.cut = KStdAction::cut( editor(), TQT_SLOT(cut()), actionCollection() );
- mAction.copy = KStdAction::copy( editor(), TQT_SLOT(copy()), actionCollection() );
- mAction.paste = KStdAction::paste( editor(), TQT_SLOT(paste()), actionCollection() );
- mAction.selectAll = KStdAction::selectAll(editor(), TQT_SLOT(selectAll()),actionCollection() );
- mAction.unselect = KStdAction::deselect(editor(), TQT_SLOT(unselect()), actionCollection());
- mAction.find = KStdAction::find( editor(), TQT_SLOT(find()), actionCollection() );
- mAction.findNext = KStdAction::findNext(editor(), TQT_SLOT(findNext()), actionCollection() );
- mAction.findPrev = KStdAction::findPrev(editor(),TQT_SLOT(findPrevious()),actionCollection() );
- mAction.replace = KStdAction::replace( editor(), TQT_SLOT(replace()), actionCollection() );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(closeWindow()),actionCollection(), "close_window" );
+ mAction.quit = KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(closeProgram()), actionCollection() );
+
+ mAction.undo = KStdAction::undo( TQT_TQOBJECT(editor()), TQT_SLOT(undo()), actionCollection() );
+ mAction.redo = KStdAction::redo( TQT_TQOBJECT(editor()), TQT_SLOT(redo()), actionCollection() );
+ mAction.cut = KStdAction::cut( TQT_TQOBJECT(editor()), TQT_SLOT(cut()), actionCollection() );
+ mAction.copy = KStdAction::copy( TQT_TQOBJECT(editor()), TQT_SLOT(copy()), actionCollection() );
+ mAction.paste = KStdAction::paste( TQT_TQOBJECT(editor()), TQT_SLOT(paste()), actionCollection() );
+ mAction.selectAll = KStdAction::selectAll( TQT_TQOBJECT(editor()), TQT_SLOT(selectAll()),actionCollection() );
+ mAction.unselect = KStdAction::deselect( TQT_TQOBJECT(editor()), TQT_SLOT(unselect()), actionCollection());
+ mAction.tqfind = KStdAction::find( TQT_TQOBJECT(editor()), TQT_SLOT(tqfind()), actionCollection() );
+ mAction.findNext = KStdAction::findNext( TQT_TQOBJECT(editor()), TQT_SLOT(findNext()), actionCollection() );
+ mAction.findPrev = KStdAction::findPrev( TQT_TQOBJECT(editor()),TQT_SLOT(findPrevious()),actionCollection() );
+ mAction.tqreplace = KStdAction::replace( TQT_TQOBJECT(editor()), TQT_SLOT(tqreplace()), actionCollection() );
mAction.gotoOffset = new KAction( i18n("&Goto Offset..."), CTRL+Key_G,
- editor(), TQT_SLOT(gotoOffset()),actionCollection(), "goto_offset" );
+ TQT_TQOBJECT(editor()), TQT_SLOT(gotoOffset()),actionCollection(), "goto_offset" );
mAction.insertPattern = new KAction( i18n("&Insert Pattern..."), CTRL+Key_Insert,
- editor(), TQT_SLOT(insertPattern()), actionCollection(), "insert_pattern" );
+ TQT_TQOBJECT(editor()), TQT_SLOT(insertPattern()), actionCollection(), "insert_pattern" );
mAction.copyAsText = new KAction( i18n("Copy as &Text"), 0,
- editor(), TQT_SLOT(copyText()), actionCollection(), "copy_as_text" );
+ TQT_TQOBJECT(editor()), TQT_SLOT(copyText()), actionCollection(), "copy_as_text" );
mAction.pasteToNewFile = new KAction( i18n("Paste into New &File"), 0,
- editor(), TQT_SLOT(pasteNewFile()), actionCollection(), "paste_into_new_file" );
+ TQT_TQOBJECT(editor()), TQT_SLOT(pasteNewFile()), actionCollection(), "paste_into_new_file" );
mAction.pasteToNewWindow = new KAction( i18n("Paste into New &Window"), 0,
- this, TQT_SLOT(pasteNewWindow()), actionCollection(), "paste_into_new_window" );
+ TQT_TQOBJECT(this), TQT_SLOT(pasteNewWindow()), actionCollection(), "paste_into_new_window" );
mAction.hexadecimal = new KRadioAction( i18n("&Hexadecimal"),
- 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_hex" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(setDisplayMode()), actionCollection(), "mode_hex" );
mAction.decimal = new KRadioAction( i18n("&Decimal"),
- 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_dec" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(setDisplayMode()), actionCollection(), "mode_dec" );
mAction.octal = new KRadioAction( i18n("&Octal"),
- 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_oct" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(setDisplayMode()), actionCollection(), "mode_oct" );
mAction.binary = new KRadioAction( i18n("&Binary"),
- 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_bin" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(setDisplayMode()), actionCollection(), "mode_bin" );
mAction.textOnly = new KRadioAction( i18n("&Text"),
- 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_text" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(setDisplayMode()), actionCollection(), "mode_text" );
mAction.hexadecimal->setExclusiveGroup( "displayMode" );
mAction.decimal->setExclusiveGroup( "displayMode" );
mAction.octal->setExclusiveGroup( "displayMode" );
@@ -194,104 +194,104 @@ actionCollection());
mAction.textOnly->setExclusiveGroup( "displayMode" );
mAction.showOffsetColumn = new KToggleAction( i18n("Show O&ffset Column"),
- 0, editor(), TQT_SLOT(toggleOffsetColumnVisibility()),actionCollection(), "show_offset_column" );
+ 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleOffsetColumnVisibility()),actionCollection(), "show_offset_column" );
mAction.showTextColumn = new KToggleAction( i18n("Show Te&xt Field"),
- 0, editor(), TQT_SLOT(toggleTextColumnVisibility()),actionCollection(), "show_text_field" );
+ 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleTextColumnVisibility()),actionCollection(), "show_text_field" );
mAction.offsetAsDecimal = new KToggleAction( i18n("Off&set as Decimal"),
- 0, editor(), TQT_SLOT(toggleOffsetAsDecimal()),actionCollection(), "offset_as_decimal" );
+ 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleOffsetAsDecimal()),actionCollection(), "offset_as_decimal" );
mAction.dataUppercase = new KToggleAction( i18n("&Upper Case (Data)"),
- 0, editor(), TQT_SLOT(toggleDataUppercase()),actionCollection(), "upper_case_data" );
+ 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleDataUppercase()),actionCollection(), "upper_case_data" );
mAction.offsetUppercase = new KToggleAction( i18n("Upper &Case (Offset)"),
- 0, editor(), TQT_SLOT(toggleOffsetUppercase()),actionCollection(), "upper_case_offset" );
+ 0, TQT_TQOBJECT(editor()), TQT_SLOT(toggleOffsetUppercase()),actionCollection(), "upper_case_offset" );
mAction.defaultEncoding = new KRadioAction( i18n("&Default encoding", "&Default"),
- 0, this, TQT_SLOT( setEncoding()), actionCollection(), "enc_default" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT( setEncoding()), actionCollection(), "enc_default" );
mAction.usAsciiEncoding = new KRadioAction( i18n("US-&ASCII (7 bit)"),
- 0, this, TQT_SLOT( setEncoding()), actionCollection(), "enc_ascii");
+ 0, TQT_TQOBJECT(this), TQT_SLOT( setEncoding()), actionCollection(), "enc_ascii");
mAction.ebcdicEncoding = new KRadioAction( i18n("&EBCDIC"),
- 0, this, TQT_SLOT( setEncoding()), actionCollection(), "enc_ebcdic" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT( setEncoding()), actionCollection(), "enc_ebcdic" );
// mAction.customEncoding = new KAction( i18n("&Custom..."),
-// 0, editor(), TQT_SLOT( encoding()), actionCollection(), "enc_custom" );
+// 0, TQT_TQOBJECT(editor()), TQT_SLOT( encoding()), actionCollection(), "enc_custom" );
mAction.defaultEncoding->setExclusiveGroup( "encodingMode" );
mAction.usAsciiEncoding->setExclusiveGroup( "encodingMode" );
mAction.ebcdicEncoding->setExclusiveGroup( "encodingMode" );
mAction.strings = new KAction( i18n("&Extract Strings..."), 0,
- editor(), TQT_SLOT(strings()), actionCollection(), "extract_strings" );
+ TQT_TQOBJECT(editor()), TQT_SLOT(strings()), actionCollection(), "extract_strings" );
// mAction.recordViewer = new KAction( i18n("&Record Viewer"), 0,
-// editor(), TQT_SLOT(recordView()), actionCollection(), "record_viewer" );
+// TQT_TQOBJECT(editor()), TQT_SLOT(recordView()), actionCollection(), "record_viewer" );
mAction.filter = new KAction( i18n("&Binary Filter..."), 0,
- editor(), TQT_SLOT(filter()), actionCollection(), "binary_filter" );
+ TQT_TQOBJECT(editor()), TQT_SLOT(filter()), actionCollection(), "binary_filter" );
mAction.characterTable = new KAction( i18n("&Character Table"), 0,
- editor(), TQT_SLOT(chart()), actionCollection(), "char_table" );
+ TQT_TQOBJECT(editor()), TQT_SLOT(chart()), actionCollection(), "char_table" );
mAction.converter = new KAction( i18n("C&onverter"), 0,
- editor(), TQT_SLOT(converter()), actionCollection(), "converter" );
+ TQT_TQOBJECT(editor()), TQT_SLOT(converter()), actionCollection(), "converter" );
mAction.statistics = new KAction( i18n("&Statistics"), 0,
- editor(), TQT_SLOT(statistics()), actionCollection(), "statistics" );
+ TQT_TQOBJECT(editor()), TQT_SLOT(statistics()), actionCollection(), "statistics" );
- mAction.addBookmark = KStdAction::addBookmark( editor(),
+ mAction.addBookmark = KStdAction::addBookmark( TQT_TQOBJECT(editor()),
TQT_SLOT(addBookmark()), actionCollection() );
mAction.replaceBookmark = new KAction( i18n("&Replace Bookmark"), CTRL+Key_E,
- editor(), TQT_SLOT(replaceBookmark()), actionCollection(), "replace_bookmark");
+ TQT_TQOBJECT(editor()), TQT_SLOT(replaceBookmark()), actionCollection(), "replace_bookmark");
mAction.removeBookmark = new KAction( i18n("R&emove Bookmark"), CTRL+Key_U,
- editor(), TQT_SLOT(removeBookmark()), actionCollection(), "remove_bookmark" );
+ TQT_TQOBJECT(editor()), TQT_SLOT(removeBookmark()), actionCollection(), "remove_bookmark" );
mAction.removeAllBookmark = new KAction( i18n("Re&move All"), 0,
- editor(), TQT_SLOT(removeAllBookmark()), actionCollection(), "remove_all_bookmarks" );
+ TQT_TQOBJECT(editor()), TQT_SLOT(removeAllBookmark()), actionCollection(), "remove_all_bookmarks" );
mAction.nextBookmark = new KAction( i18n("Goto &Next Bookmark"),
- ALT+Key_Down, editor(),
+ ALT+Key_Down, TQT_TQOBJECT(editor()),
TQT_SLOT(gotoNextBookmark()), actionCollection(), "next_bookmark" );
mAction.prevBookmark = new KAction( i18n("Goto &Previous Bookmark"),
- ALT+Key_Up, editor(),
+ ALT+Key_Up, TQT_TQOBJECT(editor()),
TQT_SLOT(gotoPrevBookmark()), actionCollection(), "prev_bookmark" );
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
mAction.showFullPath = new KToggleAction( i18n("Show F&ull Path"),
- 0, this, TQT_SLOT(showFullPath()), actionCollection(), "show_full_path" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(showFullPath()), actionCollection(), "show_full_path" );
mAction.tabHide = new KRadioAction( i18n("&Hide"),
- 0, this, TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_hide" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_hide" );
mAction.tabShowAboveEditor = new KRadioAction( i18n("&Above Editor"),
- 0, this, TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_above" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_above" );
mAction.tabShowBelowEditor = new KRadioAction( i18n("&Below Editor"),
- 0, this, TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_below" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_below" );
mAction.tabHide->setExclusiveGroup( "editorTab" );
mAction.tabShowAboveEditor->setExclusiveGroup( "editorTab" );
mAction.tabShowBelowEditor->setExclusiveGroup( "editorTab" );
mAction.conversionHide = new KRadioAction( i18n("&Hide"),
- 0, this, TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_hide");
+ 0, TQT_TQOBJECT(this), TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_hide");
mAction.conversionFloat = new KRadioAction( i18n("&Floating"),
- 0, this, TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_float");
+ 0, TQT_TQOBJECT(this), TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_float");
mAction.conversionEmbed = new KRadioAction( i18n("&Embed in Main Window"),
- 0, this, TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_embed");
+ 0, TQT_TQOBJECT(this), TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_embed");
mAction.conversionHide->setExclusiveGroup( "conversionField" );
mAction.conversionFloat->setExclusiveGroup( "conversionField" );
mAction.conversionEmbed->setExclusiveGroup( "conversionField" );
mAction.searchHide = new KRadioAction( i18n("&Hide"),
- 0, this, TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_hide" );
+ 0, TQT_TQOBJECT(this), TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_hide" );
mAction.searchShowAboveEditor = new KRadioAction( i18n("&Above Editor"),
- Key_F5, this, TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_above" );
+ Key_F5, TQT_TQOBJECT(this), TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_above" );
mAction.searchShowBelowEditor = new KRadioAction( i18n("&Below Editor"),
- Key_F6, this, TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_below" );
+ Key_F6, TQT_TQOBJECT(this), TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_below" );
mAction.searchHide->setExclusiveGroup( "searchBar" );
mAction.searchShowAboveEditor->setExclusiveGroup( "searchBar" );
mAction.searchShowBelowEditor->setExclusiveGroup( "searchBar" );
- KStdAction::saveOptions(this, TQT_SLOT(writeConfiguration()), actionCollection());
- KStdAction::preferences(editor(),TQT_SLOT(options()),actionCollection() );
+ KStdAction::saveOptions(TQT_TQOBJECT(this), TQT_SLOT(writeConfiguration()), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(editor()) ,TQT_SLOT(options()),actionCollection() );
// mAction.favorites = new KAction( i18n("P&rofiles..."), 0,
-// editor(), TQT_SLOT(favorites()), actionCollection(), "favorites" );
+// TQT_TQOBJECT(editor()), TQT_SLOT(favorites()), actionCollection(), "favorites" );
- KStdAction::help( this, TQT_SLOT(appHelpActivated()), actionCollection() );
+ KStdAction::help( TQT_TQOBJECT(this), TQT_SLOT(appHelpActivated()), actionCollection() );
mDragLabel = new CDragLabel(this);
mDragLabel->setPixmap( UserIcon( "hexdrag" ) );
- mDragLabel->setDragMask( UserIcon( "hexmask" ) );
+ mDragLabel->setDragMask( UserIcon( "hextqmask" ) );
mDragLabel->setEnabled( false ); // Enabled once we open a document
TQToolTip::add( mDragLabel, i18n("Drag document") );
- (void) new KWidgetAction(mDragLabel, i18n("Drag Document"), 0, editor(), TQT_SLOT(options()), actionCollection(), "drag_document");
+ (void) new KWidgetAction(mDragLabel, i18n("Drag Document"), 0, TQT_TQOBJECT(editor()), TQT_SLOT(options()), actionCollection(), "drag_document");
createGUI("khexeditui.rc", false);
@@ -300,7 +300,7 @@ actionCollection());
int id = 100;
toolBar(0)->insertButton( MainBarIcon("lock"), id, TQT_SIGNAL(clicked()),
- editor(), TQT_SLOT(toggleWriteProtection()), true,
+ TQT_TQOBJECT(editor()), TQT_SLOT(toggleWriteProtection()), true,
i18n("Toggle write protection") );
toolBar(0)->alignItemRight( id );
mWriteProtectButton = toolBar(0)->getButton(id);
@@ -316,14 +316,14 @@ void KHexEdit::setupStatusBar( void )
{
CStatusBarProgress *progess = new CStatusBarProgress( statusBar() );
statusBar()->addWidget( progess, 10 );
- connect( progess, TQT_SIGNAL(pressed()), editor(), TQT_SLOT(stop()) );
- connect( editor(), TQT_SIGNAL( setProgress( int ) ),
+ connect( progess, TQT_SIGNAL(pressed()), TQT_TQOBJECT(editor()), TQT_SLOT(stop()) );
+ connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( setProgress( int ) ),
progess, TQT_SLOT( setValue( int ) ) );
- connect( editor(), TQT_SIGNAL( setProgress( int, int ) ),
+ connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( setProgress( int, int ) ),
progess, TQT_SLOT( setValue( int, int ) ) );
- connect( editor(), TQT_SIGNAL( enableProgressText( bool ) ),
+ connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( enableProgressText( bool ) ),
progess, TQT_SLOT( setTextEnabled( bool ) ) );
- connect( editor(), TQT_SIGNAL( setProgressText( const TQString & ) ),
+ connect( TQT_TQOBJECT(editor()), TQT_SIGNAL( setProgressText( const TQString & ) ),
progess, TQT_SLOT( setText( const TQString & ) ) );
statusBar()->insertFixedItem( i18n("Selection: 0000:0000 0000:0000"),
@@ -391,7 +391,7 @@ void KHexEdit::initialize( bool openFiles )
maxItems = 1;
for( unsigned int i = 1 ; i <= maxItems ; i++ )
{
- const TQString key = TQString( "File%1" ).arg( i );
+ const TQString key = TQString( "File%1" ).tqarg( i );
const TQString value = config->readPathEntry( key );
if (!value.isEmpty())
@@ -411,7 +411,7 @@ void KHexEdit::initialize( bool openFiles )
// is displayed, then the editor will not be visible until the error
// is confirmed and the (modal) dialog is closed.
//
- TQTimer::singleShot( 100, this, TQT_SLOT(delayedStartupOpen()) );
+ TQTimer::singleShot( 100, TQT_TQOBJECT(this), TQT_SLOT(delayedStartupOpen()) );
}
@@ -479,7 +479,7 @@ void KHexEdit::addRecentFile( const TQString &fileName )
return;
}
- if( fileName.contains( i18n( "Untitled" ), false ) )
+ if( fileName.tqcontains( i18n( "Untitled" ), false ) )
{
return;
}
@@ -498,7 +498,7 @@ void KHexEdit::removeRecentFile( const TQString &fileName )
return;
}
- if( fileName.contains( i18n( "Untitled" ), false ) )
+ if( fileName.tqcontains( i18n( "Untitled" ), false ) )
{
return;
}
@@ -511,7 +511,7 @@ void KHexEdit::removeRecentFile( const TQString &fileName )
void KHexEdit::renameRecentFile(const TQString &curName, const TQString &newName)
{
- if( curName.contains( i18n( "Untitled" ), false ) )
+ if( curName.tqcontains( i18n( "Untitled" ), false ) )
{
addRecentFile( newName );
}
@@ -533,7 +533,7 @@ void KHexEdit::slotFileOpenRecent( const KURL& url )
else
{
// ### TODO: support network transparency
- KMessageBox::error( this, i18n("Non local recent file: %1").arg( url.prettyURL() ) );
+ KMessageBox::error( this, i18n("Non local recent file: %1").tqarg( url.prettyURL() ) );
}
}
@@ -545,7 +545,7 @@ KHexEdit *KHexEdit::newWindow( void )
{
TQString msg = i18n( "Can not create new window.\n" );
msg += hexError( Err_NoMemory );
- KMessageBox::error( topLevelWidget(), msg );
+ KMessageBox::error( tqtopLevelWidget(), msg );
return(0);
}
hexEdit->show();
@@ -582,7 +582,7 @@ void KHexEdit::closeProgram( void )
TQString msg = i18n(""
"There are windows with unsaved modified documents. "
"If you quit now, these modifications will be lost.");
- int reply = KMessageBox::warningContinueCancel( topLevelWidget(), msg, TQString::null, KStdGuiItem::quit() );
+ int reply = KMessageBox::warningContinueCancel( tqtopLevelWidget(), msg, TQString(), KStdGuiItem::quit() );
if( reply == KMessageBox::Continue )
{
break;
@@ -755,11 +755,11 @@ void KHexEdit::cursorChanged( SCursorState &state )
}
else
{
- SDisplayLayout &layout = editor()->layout();
+ SDisplayLayout &tqlayout = editor()->tqlayout();
- if( layout.offsetMode == SDisplayLayout::hexadecimal )
+ if( tqlayout.offsetMode == SDisplayLayout::hexadecimal )
{
- if( layout.offsetUpperCase == false )
+ if( tqlayout.offsetUpperCase == false )
{
offset += TQString().sprintf( " %04x:%04x-%u", state.offset>>16,
state.offset&0x0000FFFF, state.cell );
@@ -788,7 +788,7 @@ void KHexEdit::fileState( SFileState &state )
{
if( state.valid == true )
{
- statusBar()->changeItem( i18n("Size: %1").arg( state.size ), status_Size);
+ statusBar()->changeItem( i18n("Size: %1").tqarg( state.size ), status_Size);
statusBar()->changeItem( state.modified ? "!" : "", status_Modified);
if( mIsModified != state.modified )
@@ -807,23 +807,23 @@ void KHexEdit::fileState( SFileState &state )
-void KHexEdit::layoutChanged( const SDisplayLayout &layout )
+void KHexEdit::tqlayoutChanged( const SDisplayLayout &tqlayout )
{
KRadioAction *radioAction;
- if( layout.primaryMode == SDisplayLayout::hexadecimal )
+ if( tqlayout.primaryMode == SDisplayLayout::hexadecimal )
{
radioAction = mAction.hexadecimal;
}
- else if( layout.primaryMode == SDisplayLayout::decimal )
+ else if( tqlayout.primaryMode == SDisplayLayout::decimal )
{
radioAction = mAction.decimal;
}
- else if( layout.primaryMode == SDisplayLayout::octal )
+ else if( tqlayout.primaryMode == SDisplayLayout::octal )
{
radioAction = mAction.octal;
}
- else if( layout.primaryMode == SDisplayLayout::binary )
+ else if( tqlayout.primaryMode == SDisplayLayout::binary )
{
radioAction = mAction.binary;
}
@@ -841,15 +841,15 @@ void KHexEdit::layoutChanged( const SDisplayLayout &layout )
mAction.dataUppercase->blockSignals(true);
mAction.offsetUppercase->blockSignals(true);
- mAction.showOffsetColumn->setChecked( layout.offsetVisible );
+ mAction.showOffsetColumn->setChecked( tqlayout.offsetVisible );
mAction.showTextColumn->setEnabled(
- layout.primaryMode != SDisplayLayout::textOnly );
+ tqlayout.primaryMode != SDisplayLayout::textOnly );
mAction.showTextColumn->setChecked(
- layout.secondaryMode != SDisplayLayout::hide );
+ tqlayout.secondaryMode != SDisplayLayout::hide );
mAction.offsetAsDecimal->setChecked(
- layout.offsetMode != SDisplayLayout::hexadecimal);
- mAction.dataUppercase->setChecked( layout.primaryUpperCase );
- mAction.offsetUppercase->setChecked( layout.offsetUpperCase );
+ tqlayout.offsetMode != SDisplayLayout::hexadecimal);
+ mAction.dataUppercase->setChecked( tqlayout.primaryUpperCase );
+ mAction.offsetUppercase->setChecked( tqlayout.offsetUpperCase );
mAction.showOffsetColumn->blockSignals(false);
mAction.showTextColumn->blockSignals(false);
@@ -857,23 +857,23 @@ void KHexEdit::layoutChanged( const SDisplayLayout &layout )
mAction.dataUppercase->blockSignals(false);
mAction.offsetUppercase->blockSignals(false);
- if( layout.primaryMode == SDisplayLayout::hexadecimal )
+ if( tqlayout.primaryMode == SDisplayLayout::hexadecimal )
{
statusBar()->changeItem( i18n("Hex"), status_Layout );
}
- else if( layout.primaryMode == SDisplayLayout::decimal )
+ else if( tqlayout.primaryMode == SDisplayLayout::decimal )
{
statusBar()->changeItem( i18n("Dec"), status_Layout );
}
- else if( layout.primaryMode == SDisplayLayout::octal )
+ else if( tqlayout.primaryMode == SDisplayLayout::octal )
{
statusBar()->changeItem( i18n("Oct"), status_Layout );
}
- else if( layout.primaryMode == SDisplayLayout::binary )
+ else if( tqlayout.primaryMode == SDisplayLayout::binary )
{
statusBar()->changeItem( i18n("Bin"), status_Layout );
}
- else if( layout.primaryMode == SDisplayLayout::textOnly )
+ else if( tqlayout.primaryMode == SDisplayLayout::textOnly )
{
statusBar()->changeItem( i18n("Txt"), status_Layout );
}
@@ -922,8 +922,8 @@ void KHexEdit::bookmarkChanged( TQPtrList<SCursorOffset> &list )
for( SCursorOffset *p=list.first(); p!=0; p=list.next(), i++ )
{
offset.sprintf("%04X:%04X", p->offset>>16, p->offset&0x0000FFFF );
- text = i18n("Offset: %1").arg(offset);
- KAction *action = new KAction(text, 0, mAction.bookmarkMapper, TQT_SLOT(map()), this, text.latin1());
+ text = i18n("Offset: %1").tqarg(offset);
+ KAction *action = new KAction(text, 0, mAction.bookmarkMapper, TQT_SLOT(map()), TQT_TQOBJECT(this), text.latin1());
int key = acceleratorNumKey( i );
if( key > 0 )
{
@@ -1021,7 +1021,7 @@ void KHexEdit::encodingChanged( const SEncodeState &encodeState )
if( mSelectionSize == 0 )
{
- statusBar()->changeItem( i18n("Encoding: %1").arg(encodeState.name),
+ statusBar()->changeItem( i18n("Encoding: %1").tqarg(encodeState.name),
status_Selection );
}
}
@@ -1186,7 +1186,7 @@ void KHexEdit::setSelectionText( uint selectionOffset, uint selectionSize )
else
{
statusBar()->changeItem(
- i18n("Encoding: %1").arg(hexView()->encoding().name), status_Selection);
+ i18n("Encoding: %1").tqarg(hexView()->encoding().name), status_Selection);
}
}
@@ -1232,7 +1232,7 @@ void KHexEdit::removeDocument( const TQString &fileName )
{
TQPopupMenu *documentMenu = (TQPopupMenu *)factory()->container("documents", this);
- documentMenu->removeItemAt( mDocumentList.findIndex(*it) );
+ documentMenu->removeItemAt( mDocumentList.tqfindIndex(*it) );
mDocumentList.remove( it );
for( uint i=0; i < mDocumentList.count(); i++ )
@@ -1259,7 +1259,7 @@ void KHexEdit::renameDocument( const TQString &curName, const TQString &newName
if( *it == curName )
{
TQPopupMenu *documentMenu = (TQPopupMenu *)factory()->container("documents", this);
- documentMenu->changeItem( newName, mDocumentList.findIndex(*it) );
+ documentMenu->changeItem( newName, mDocumentList.tqfindIndex(*it) );
mDocumentList.insert( it, newName );
mDocumentList.remove( it );
return;
diff --git a/khexedit/toplevel.h b/khexedit/toplevel.h
index f65cb9f..b15517c 100644
--- a/khexedit/toplevel.h
+++ b/khexedit/toplevel.h
@@ -48,6 +48,7 @@ class CDragLabel;
class KHexEdit : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
enum StatusBarId
{
@@ -84,10 +85,10 @@ class KHexEdit : public KMainWindow
KAction *paste;
KAction *selectAll;
KAction *unselect;
- KAction *find;
+ KAction *tqfind;
KAction *findNext;
KAction *findPrev;
- KAction *replace;
+ KAction *tqreplace;
KAction *gotoOffset;
KAction *insertPattern;
KAction *copyAsText;
@@ -156,7 +157,7 @@ class KHexEdit : public KMainWindow
void operationChanged( bool state );
void cursorChanged( SCursorState &state );
void fileState( SFileState &state );
- void layoutChanged( const SDisplayLayout &layout );
+ void tqlayoutChanged( const SDisplayLayout &tqlayout );
void inputModeChanged( const SDisplayInputMode &mode );
void bookmarkChanged( TQPtrList<SCursorOffset> &list );
void removeRecentFile( const TQString &fileName );
@@ -248,7 +249,7 @@ protected:
inline void KHexEdit::addStartupFile( const TQString &fileName )
{
mStartupFileList.prepend( fileName );
- mStartupOffsetList.prepend( TQString("%1").arg(mStartupOffset,0,16) );
+ mStartupOffsetList.prepend( TQString("%1").tqarg(mStartupOffset,0,16) );
mStartupOffset = 0;
}