summaryrefslogtreecommitdiffstats
path: root/khexedit/hexeditorwidget.cc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:52 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:52 -0600
commitbf280726d5d22f33d33e4f9e771220c725249407 (patch)
tree48b7496821910eb85179d543acee981cf5d16dd8 /khexedit/hexeditorwidget.cc
parentc78266617c282543427d2c000b3b68fe2b6b6722 (diff)
downloadtdeutils-bf280726d5d22f33d33e4f9e771220c725249407.tar.gz
tdeutils-bf280726d5d22f33d33e4f9e771220c725249407.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'khexedit/hexeditorwidget.cc')
-rw-r--r--khexedit/hexeditorwidget.cc346
1 files changed, 173 insertions, 173 deletions
diff --git a/khexedit/hexeditorwidget.cc b/khexedit/hexeditorwidget.cc
index 6235e09..894b70f 100644
--- a/khexedit/hexeditorwidget.cc
+++ b/khexedit/hexeditorwidget.cc
@@ -72,7 +72,7 @@ CHexEditorWidget::CHexEditorWidget( TQWidget *parent, const char *name )
this, TQT_SLOT( inputModeChanged( const SDisplayInputMode & ) ) );
mHexView->setFocus();
- setBackgroundColor( tqpalette().active().base() );
+ setBackgroundColor( palette().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.tqlayout );
+ mHexView->setLayout( mDisplayState.layout );
mHexView->setInputMode( mDisplayState.input );
mHexView->setInsertMode( mDisplayState.misc.insertMode );
}
@@ -123,25 +123,25 @@ void CHexEditorWidget::initialize( void )
void CHexEditorWidget::writeConfiguration( KConfig &config )
{
- SDisplayLayout &tqlayout = mDisplayState.tqlayout;
+ SDisplayLayout &layout = mDisplayState.layout;
config.setGroup( "Display Options" );
- 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() );
+ 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() );
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.tqunicode() );
+ config.writeEntry( "NonPrintChar", font.nonPrintChar.unicode() );
SDisplayCursor &cursor = mDisplayState.cursor;
config.setGroup( "Display Cursor" );
@@ -221,38 +221,38 @@ void CHexEditorWidget::writeConfiguration( KConfig &config )
void CHexEditorWidget::readConfiguration( KConfig &config )
{
- SDisplayLayout &tqlayout = mDisplayState.tqlayout;
+ SDisplayLayout &layout = mDisplayState.layout;
config.setGroup( "Display Options" );
- 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") );
+ 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") );
SDisplayLine &line = mDisplayState.line;
config.setGroup( "Line Size" );
@@ -398,9 +398,9 @@ void CHexEditorWidget::paletteChanged( void )
setColor( mDisplayState.color );
}
-void CHexEditorWidget::layoutChanged( const SDisplayLayout &/*tqlayout*/ )
+void CHexEditorWidget::layoutChanged( const SDisplayLayout &/*layout*/ )
{
- //mDisplayState.tqlayout = tqlayout;
+ //mDisplayState.layout = layout;
}
void CHexEditorWidget::inputModeChanged( const SDisplayInputMode &input )
@@ -414,30 +414,30 @@ void CHexEditorWidget::setLineSize(const SDisplayLine &line )
mDisplayState.line = line;
}
-void CHexEditorWidget::setLayout( const SDisplayLayout &tqlayout )
+void CHexEditorWidget::setLayout( const SDisplayLayout &layout )
{
//
// We only set the values that can be modified by the dialog
//
- 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;
+ 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;
//
// Select the line and column sizes we shall use now.
//
- SDisplayLayout &l = mDisplayState.tqlayout;
+ SDisplayLayout &l = mDisplayState.layout;
l.lineSize = mDisplayState.line.lineSize[ l.primaryMode ];
l.columnSize = mDisplayState.line.columnSize[ l.primaryMode ];
- mHexView->setLayout( mDisplayState.tqlayout );
+ mHexView->setLayout( mDisplayState.layout );
}
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->tqpalette().active().highlight();
- mDisplayState.color.selectFg = kapp->tqpalette().active().highlightedText();
+ mDisplayState.color.selectBg = kapp->palette().active().highlight();
+ mDisplayState.color.selectFg = kapp->palette().active().highlightedText();
if( mDisplayState.color.useSystemColor == true )
{
SDisplayColor c = mDisplayState.color;
- 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();
+ 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();
SDisplayColor defaultColor;
c.bookmarkBg = defaultColor.bookmarkBg;
c.bookmarkFg = defaultColor.bookmarkFg;
@@ -513,46 +513,46 @@ void CHexEditorWidget::setMisc( const SDisplayMisc &misc )
void CHexEditorWidget::setHexadecimalMode( void )
{
- tqlayout().primaryMode = SDisplayLayout::hexadecimal;
- tqlayout().lineSize = line().lineSize[ SDisplayLine::hexadecimal ];
- tqlayout().columnSize = line().columnSize[ SDisplayLine::hexadecimal ];
- mHexView->setLayout( tqlayout() );
+ layout().primaryMode = SDisplayLayout::hexadecimal;
+ layout().lineSize = line().lineSize[ SDisplayLine::hexadecimal ];
+ layout().columnSize = line().columnSize[ SDisplayLine::hexadecimal ];
+ mHexView->setLayout( layout() );
}
void CHexEditorWidget::setDecimalMode( void )
{
- tqlayout().primaryMode = SDisplayLayout::decimal;
- tqlayout().lineSize = line().lineSize[ SDisplayLine::decimal ];
- tqlayout().columnSize = line().columnSize[ SDisplayLine::decimal ];
- mHexView->setLayout( tqlayout() );
+ layout().primaryMode = SDisplayLayout::decimal;
+ layout().lineSize = line().lineSize[ SDisplayLine::decimal ];
+ layout().columnSize = line().columnSize[ SDisplayLine::decimal ];
+ mHexView->setLayout( layout() );
}
void CHexEditorWidget::setOctalMode( void )
{
- tqlayout().primaryMode = SDisplayLayout::octal;
- tqlayout().lineSize = line().lineSize[ SDisplayLine::octal ];
- tqlayout().columnSize = line().columnSize[ SDisplayLine::octal ];
- mHexView->setLayout( tqlayout() );
+ layout().primaryMode = SDisplayLayout::octal;
+ layout().lineSize = line().lineSize[ SDisplayLine::octal ];
+ layout().columnSize = line().columnSize[ SDisplayLine::octal ];
+ mHexView->setLayout( layout() );
}
void CHexEditorWidget::setBinaryMode( void )
{
- tqlayout().primaryMode = SDisplayLayout::binary;
- tqlayout().lineSize = line().lineSize[ SDisplayLine::binary ];
- tqlayout().columnSize = line().columnSize[ SDisplayLine::binary ];
- mHexView->setLayout( tqlayout() );
+ layout().primaryMode = SDisplayLayout::binary;
+ layout().lineSize = line().lineSize[ SDisplayLine::binary ];
+ layout().columnSize = line().columnSize[ SDisplayLine::binary ];
+ mHexView->setLayout( layout() );
}
void CHexEditorWidget::setTextMode( void )
{
- tqlayout().primaryMode = SDisplayLayout::textOnly;
- tqlayout().lineSize = line().lineSize[ SDisplayLine::textOnly ];
- tqlayout().columnSize = line().columnSize[ SDisplayLine::textOnly ];
- mHexView->setLayout( tqlayout() );
+ layout().primaryMode = SDisplayLayout::textOnly;
+ layout().lineSize = line().lineSize[ SDisplayLine::textOnly ];
+ layout().columnSize = line().columnSize[ SDisplayLine::textOnly ];
+ mHexView->setLayout( layout() );
}
@@ -580,7 +580,7 @@ void CHexEditorWidget::newFile( void )
return;
}
- TQString url = i18n("Untitled %1").tqarg( mUntitledCount );
+ TQString url = i18n("Untitled %1").arg( 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( tqtopLevelWidget(), msg, i18n("Operation Failed") );
+ KMessageBox::sorry( topLevelWidget(), msg, i18n("Operation Failed") );
return;
}
@@ -626,7 +626,7 @@ void CHexEditorWidget::newFile( const TQByteArray &data )
void CHexEditorWidget::open()
{
- KURL file = KFileDialog::getOpenURL( mWorkDir, "*" ,tqtopLevelWidget() );
+ KURL file = KFileDialog::getOpenURL( mWorkDir, "*" ,topLevelWidget() );
if( file.isEmpty() )
return;
@@ -764,7 +764,7 @@ bool CHexEditorWidget::selectDocument( const TQString &url,
void CHexEditorWidget::insertFile( void )
{
- KFileDialog fdlg(mWorkDir, TQString(), tqtopLevelWidget(), 0, TRUE);
+ KFileDialog fdlg(mWorkDir, TQString(), topLevelWidget(), 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( tqtopLevelWidget(), msg, TQString(), KStdGuiItem::save(), KStdGuiItem::discard() );
+ int reply = KMessageBox::warningYesNoCancel( topLevelWidget(), 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( tqtopLevelWidget(), msg,
+ int reply = KMessageBox::warningYesNoCancel( topLevelWidget(), 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( tqtopLevelWidget(), msg,
+ int reply = KMessageBox::warningContinueCancel( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Reload") );
+ KMessageBox::sorry( topLevelWidget(), 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(tqtopLevelWidget(),msg,i18n("Reload"), i18n("&Reload"));
+ int reply = KMessageBox::warningContinueCancel(topLevelWidget(),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(tqtopLevelWidget(), i18n("Print Hex-Document")))
+ if (prt.setup(topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Print") );
+ KMessageBox::sorry( topLevelWidget(), 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( tqtopLevelWidget(), msg,
+ int reply = KMessageBox::warningYesNo( topLevelWidget(), 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( tqtopLevelWidget(), 0, false );
+ mExportDialog = new CExportDialog( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Export") );
+ KMessageBox::sorry( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Export") );
+ KMessageBox::sorry( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Export") );
+ KMessageBox::sorry( topLevelWidget(), 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( tqtopLevelWidget(), msg,
+ int reply = KMessageBox::warningContinueCancel( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Encode") );
+ KMessageBox::sorry( topLevelWidget(), msg, i18n("Encode") );
}
}
@@ -1306,34 +1306,34 @@ void CHexEditorWidget::enableInputLock( bool inputLock )
void CHexEditorWidget::toggleOffsetColumnVisibility( void )
{
- tqlayout().offsetVisible = tqlayout().offsetVisible == true ? false : true;
- mHexView->setLayout( tqlayout() );
+ layout().offsetVisible = layout().offsetVisible == true ? false : true;
+ mHexView->setLayout( layout() );
}
void CHexEditorWidget::toggleTextColumnVisibility( void )
{
- tqlayout().secondaryMode = tqlayout().secondaryMode == SDisplayLayout::hide ?
+ layout().secondaryMode = layout().secondaryMode == SDisplayLayout::hide ?
SDisplayLayout::textOnly : SDisplayLayout::hide;
- mHexView->setLayout( tqlayout() );
+ mHexView->setLayout( layout() );
}
void CHexEditorWidget::toggleOffsetAsDecimal( void )
{
- tqlayout().offsetMode = tqlayout().offsetMode == SDisplayLayout::hexadecimal ?
+ layout().offsetMode = layout().offsetMode == SDisplayLayout::hexadecimal ?
SDisplayLayout::decimal : SDisplayLayout::hexadecimal;
- mHexView->setLayout( tqlayout() );
+ mHexView->setLayout( layout() );
}
void CHexEditorWidget::toggleDataUppercase( void )
{
- tqlayout().primaryUpperCase = tqlayout().primaryUpperCase == true ? false : true;
- mHexView->setLayout( tqlayout() );
+ layout().primaryUpperCase = layout().primaryUpperCase == true ? false : true;
+ mHexView->setLayout( layout() );
}
void CHexEditorWidget::toggleOffsetUppercase( void )
{
- tqlayout().offsetUpperCase = tqlayout().offsetUpperCase == true ? false : true;
- mHexView->setLayout( tqlayout() );
+ layout().offsetUpperCase = layout().offsetUpperCase == true ? false : true;
+ mHexView->setLayout( layout() );
}
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( tqtopLevelWidget(), msg );
+ int reply = KMessageBox::warningContinueCancel( topLevelWidget(), msg );
if( reply != KMessageBox::Continue )
{
return;
@@ -1447,7 +1447,7 @@ void CHexEditorWidget::gotoOffset( void )
{
if( mGotoDialog == 0 )
{
- mGotoDialog = new CGotoDialog( tqtopLevelWidget(), 0, false );
+ mGotoDialog = new CGotoDialog( topLevelWidget(), 0, false );
if( mGotoDialog == 0 ) { return; }
connect( mGotoDialog, TQT_SIGNAL(gotoOffset( uint, uint, bool, bool )),
mHexView, TQT_SLOT(gotoOffset( uint, uint, bool, bool )) );
@@ -1465,7 +1465,7 @@ void CHexEditorWidget::find( void )
if( mFindDialog == 0 )
{
- mFindDialog = new CFindDialog( tqtopLevelWidget(), 0, false );
+ mFindDialog = new CFindDialog( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Find") );
+ KMessageBox::sorry( topLevelWidget(), msg, i18n("Find") );
}
}
@@ -1580,7 +1580,7 @@ bool CHexEditorWidget::askWrap( bool fwd, const TQString &header )
"Continue from the end?" );
}
- int reply = KMessageBox::questionYesNo( tqtopLevelWidget(), msg, header, KStdGuiItem::cont(), KStdGuiItem::cancel() );
+ int reply = KMessageBox::questionYesNo( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Find") );
+ KMessageBox::sorry( topLevelWidget(), msg, i18n("Find") );
}
return( false );
}
@@ -1613,7 +1613,7 @@ void CHexEditorWidget::findNavigator( SSearchControl &sc )
if( mFindNavigatorDialog == 0 )
{
- mFindNavigatorDialog = new CFindNavigatorDialog(tqtopLevelWidget(),0,false);
+ mFindNavigatorDialog = new CFindNavigatorDialog(topLevelWidget(),0,false);
if( mFindNavigatorDialog == 0 ) { return; }
connect( mFindNavigatorDialog,
TQT_SIGNAL(findData(SSearchControl &, uint, bool)),
@@ -1636,7 +1636,7 @@ void CHexEditorWidget::replace( void )
if( mReplaceDialog == 0 )
{
- mReplaceDialog = new CReplaceDialog( tqtopLevelWidget(), 0, false );
+ mReplaceDialog = new CReplaceDialog( topLevelWidget(), 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(tqtopLevelWidget(), 0,false);
+ mReplacePromptDialog = new CReplacePromptDialog(topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Find & Replace"));
+ KMessageBox::information( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Find & Replace"));
+ KMessageBox::information( topLevelWidget(), msg, i18n("Find & Replace"));
}
}
@@ -1781,7 +1781,7 @@ void CHexEditorWidget::insertPattern( void )
{
if( mInsertDialog == 0 )
{
- mInsertDialog = new CInsertDialog( tqtopLevelWidget(), 0, false );
+ mInsertDialog = new CInsertDialog( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Encoding") );
+ KMessageBox::sorry( topLevelWidget(), msg, i18n("Encoding") );
}
@@ -1803,7 +1803,7 @@ void CHexEditorWidget::strings( void )
{
if( mStringDialog == 0 )
{
- mStringDialog = new CStringDialog( tqtopLevelWidget(), 0, false );
+ mStringDialog = new CStringDialog( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Collect Strings") );
+ KMessageBox::sorry( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Record Viewer") );
+ KMessageBox::sorry( topLevelWidget(), msg, i18n("Record Viewer") );
}
void CHexEditorWidget::filter( void )
{
if( mFilterDialog == 0 )
{
- mFilterDialog = new CFilterDialog( tqtopLevelWidget(), 0, false );
+ mFilterDialog = new CFilterDialog( topLevelWidget(), 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( tqtopLevelWidget(), 0, false );
+ mCharTableDialog = new CCharTableDialog( topLevelWidget(), 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( tqtopLevelWidget(), 0, false );
+ mFileInfoDialog = new CFileInfoDialog( topLevelWidget(), 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( tqtopLevelWidget(), msg,
+ KMessageBox::sorry( topLevelWidget(), msg,
i18n("Collect Document Statistics") );
}
@@ -1927,7 +1927,7 @@ void CHexEditorWidget::options( void )
{
if( mOptionDialog == 0 )
{
- mOptionDialog = new COptionDialog( tqtopLevelWidget(), 0, false );
+ mOptionDialog = new COptionDialog( topLevelWidget(), 0, false );
if( mOptionDialog == 0 ) { return; }
connect( mOptionDialog, TQT_SIGNAL(lineSizeChoice(const SDisplayLine &)),
@@ -1958,8 +1958,8 @@ void CHexEditorWidget::favorites( void )
{
TQString msg = i18n(""
"Not available yet!\n"
- "Save or retrive your favorite tqlayout" );
- KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Profiles") );
+ "Save or retrive your favorite layout" );
+ KMessageBox::sorry( topLevelWidget(), 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").tqarg( url.url() );
- KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read URL") );
+ TQString msg = i18n("Malformed URL\n%1").arg( url.url() );
+ KMessageBox::sorry( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Write Failure") );
+ KMessageBox::sorry( topLevelWidget(), 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").tqarg( diskPath );
- KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read") );
+ const TQString msg = i18n("The specified file does not exist.\n%1").arg( diskPath );
+ KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") );
return( false );
}
if( info.isDir() == true )
{
- const TQString msg = i18n("You have specified a folder.\n%1").tqarg( diskPath );
- KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read") );
+ const TQString msg = i18n("You have specified a folder.\n%1").arg( diskPath );
+ KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") );
return( false );
}
if( info.isReadable() == false )
{
- const TQString msg = i18n("You do not have read permission to this file.\n%1").tqarg( diskPath );
- KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read") );
+ const TQString msg = i18n("You do not have read permission to this file.\n%1").arg( diskPath );
+ KMessageBox::sorry( topLevelWidget(), 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").tqarg( diskPath );
- KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Read") );
+ const TQString msg = i18n("An error occurred while trying to open the file.\n%1").arg( diskPath );
+ KMessageBox::sorry( topLevelWidget(), 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( tqtopLevelWidget(), msg, header );
+ KMessageBox::sorry( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Write Failure") );
+ KMessageBox::sorry( topLevelWidget(), msg, i18n("Write Failure") );
return( false );
}
if( info.isWritable() == false )
{
TQString msg = i18n("You do not have write permission.");
- KMessageBox::sorry( tqtopLevelWidget(), msg, i18n("Write Failure") );
+ KMessageBox::sorry( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Write Failure") );
+ KMessageBox::sorry( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Write Failure") );
+ KMessageBox::sorry( topLevelWidget(), 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( tqtopLevelWidget(), msg, i18n("Loading Failed" ) );
+ KMessageBox::error( topLevelWidget(), msg, i18n("Loading Failed" ) );
return( false );
}
@@ -2418,7 +2418,7 @@ int CHexEditorWidget::progressParse( const SProgressData &pd )
}
- int reply = KMessageBox::warningYesNo( tqtopLevelWidget(), msg, header, KStdGuiItem::cancel(), KStdGuiItem::cont() );
+ int reply = KMessageBox::warningYesNo( topLevelWidget(), 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( tqtopLevelWidget(), msg );
+ KMessageBox::sorry( topLevelWidget(), msg );
}
return( mProgressBusy );