diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
commit | a2277b6bc715464e83882b90c2a058139b8a6b54 (patch) | |
tree | ab09b14014f59b4d8e2ddd12226aa0b22e4dfc5d /khexedit/hexeditorwidget.cc | |
parent | d3f79e04b34bd1f70a458b81b28fc8799498c8dc (diff) | |
download | tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.tar.gz tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.zip |
TQt4 port kdeutils
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khexedit/hexeditorwidget.cc')
-rw-r--r-- | khexedit/hexeditorwidget.cc | 364 |
1 files changed, 182 insertions, 182 deletions
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 ); |