diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
commit | 5f5ee2367157176ed223b86343eb0a9e4022e020 (patch) | |
tree | 6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /khexedit/toplevel.cc | |
parent | 4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff) | |
download | tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khexedit/toplevel.cc')
-rw-r--r-- | khexedit/toplevel.cc | 354 |
1 files changed, 177 insertions, 177 deletions
diff --git a/khexedit/toplevel.cc b/khexedit/toplevel.cc index 733173e..3d65820 100644 --- a/khexedit/toplevel.cc +++ b/khexedit/toplevel.cc @@ -20,10 +20,10 @@ // kate: space-indent on; indent-width 2; replace-tabs on; -#include <qptrlist.h> -#include <qsignalmapper.h> -#include <qtimer.h> -#include <qtooltip.h> +#include <tqptrlist.h> +#include <tqsignalmapper.h> +#include <tqtimer.h> +#include <tqtooltip.h> #include <kaction.h> #include <kiconloader.h> @@ -43,7 +43,7 @@ #include "toplevel.h" -QPtrList<KHexEdit> KHexEdit::mWindowList; +TQPtrList<KHexEdit> KHexEdit::mWindowList; KHexEdit::KHexEdit( void ) : KMainWindow(0, "toplevel"), mStartupOffset(0), @@ -60,7 +60,7 @@ KHexEdit::KHexEdit( void ) // // I use an eventfilter to catch all drag/drop events for the // area outside the editor window. It will only accept KURLDrag. - // (The editor window will catch KURLDrag, QTextDrag and CHexDrag) + // (The editor window will catch KURLDrag, TQTextDrag and CHexDrag) // installEventFilter( this ); setAcceptDrops(true); @@ -68,43 +68,43 @@ KHexEdit::KHexEdit( void ) // // Prepare menus and status bar // - mAction.bookmarkMapper = new QSignalMapper(this); - connect(mAction.bookmarkMapper, SIGNAL(mapped(int)), editor(), SLOT(gotoBookmark(int))); + mAction.bookmarkMapper = new TQSignalMapper(this); + connect(mAction.bookmarkMapper, TQT_SIGNAL(mapped(int)), editor(), TQT_SLOT(gotoBookmark(int))); setupActions(); setupStatusBar(); - connect( hexView(), SIGNAL( cursorChanged( SCursorState & ) ), - this, SLOT( cursorChanged( SCursorState & ) ) ); - connect( hexView(), SIGNAL( editMode( CHexBuffer::EEditMode ) ), - this, SLOT( editMode( CHexBuffer::EEditMode ) ) ); - connect( hexView(), SIGNAL( encodingChanged( const SEncodeState &)), - this, SLOT( encodingChanged( const SEncodeState & )) ); - connect( hexView(), SIGNAL( textWidth( uint ) ), - this, SLOT( textWidth( uint ) ) ); - connect( hexView(), SIGNAL( fileState( SFileState & ) ), - this, SLOT( fileState( SFileState & ) ) ); - connect( hexView(), SIGNAL( layoutChanged( const SDisplayLayout & ) ), - this, SLOT( layoutChanged( const SDisplayLayout & ) ) ); - connect( hexView(), SIGNAL( inputModeChanged( const SDisplayInputMode & ) ), - this, SLOT( inputModeChanged( const SDisplayInputMode & ) ) ); - connect( hexView(), SIGNAL( bookmarkChanged( QPtrList<SCursorOffset> &)), - this, SLOT( bookmarkChanged( QPtrList<SCursorOffset> & ) ) ); - connect( hexView(), SIGNAL( fileName( const QString &, bool ) ), - this, SLOT( fileActive( const QString &, bool ) ) ); - connect( hexView(), SIGNAL( fileRename( const QString &, const QString & )), - this, SLOT( fileRename( const QString &, const QString & ) ) ); - connect( hexView(), SIGNAL( fileClosed( const QString & ) ), - this, SLOT( fileClosed( const QString & ) ) ); - connect( editor(), SIGNAL( errorLoadFile( const QString & ) ), - this, SLOT( removeRecentFile( const QString & ) ) ); - connect( editor(), SIGNAL( operationChanged( bool ) ), - this, SLOT( operationChanged( bool ) ) ); - connect( editor(), SIGNAL( removeRecentFiles() ), - this, SLOT( removeRecentFiles() ) ); - connect( mManager, SIGNAL( conversionClosed() ), - this, SLOT(conversionClosed()) ); - connect( mManager, SIGNAL( searchBarClosed() ), - this, SLOT(searchBarClosed()) ); + connect( hexView(), TQT_SIGNAL( cursorChanged( SCursorState & ) ), + this, TQT_SLOT( cursorChanged( SCursorState & ) ) ); + connect( hexView(), TQT_SIGNAL( editMode( CHexBuffer::EEditMode ) ), + this, TQT_SLOT( editMode( CHexBuffer::EEditMode ) ) ); + connect( hexView(), TQT_SIGNAL( encodingChanged( const SEncodeState &)), + this, TQT_SLOT( encodingChanged( const SEncodeState & )) ); + connect( hexView(), TQT_SIGNAL( textWidth( uint ) ), + 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 & ) ) ); + connect( hexView(), TQT_SIGNAL( inputModeChanged( const SDisplayInputMode & ) ), + this, TQT_SLOT( inputModeChanged( const SDisplayInputMode & ) ) ); + connect( hexView(), TQT_SIGNAL( bookmarkChanged( TQPtrList<SCursorOffset> &)), + this, TQT_SLOT( bookmarkChanged( TQPtrList<SCursorOffset> & ) ) ); + connect( hexView(), TQT_SIGNAL( fileName( const TQString &, bool ) ), + this, TQT_SLOT( fileActive( const TQString &, bool ) ) ); + connect( hexView(), TQT_SIGNAL( fileRename( const TQString &, const TQString & )), + 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() ) ); + connect( mManager, TQT_SIGNAL( conversionClosed() ), + this, TQT_SLOT(conversionClosed()) ); + connect( mManager, TQT_SIGNAL( searchBarClosed() ), + 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(), SLOT(newFile()), actionCollection() ); - KStdAction::open( editor(), SLOT(open()), actionCollection() ); - KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), + KStdAction::openNew( editor(), TQT_SLOT(newFile()), actionCollection() ); + KStdAction::open( editor(), TQT_SLOT(open()), actionCollection() ); + KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); mAction.insert = new KAction( i18n("&Insert..."), CTRL+Key_I, - editor(), SLOT(insertFile()), actionCollection(), "insert_file" ); - mAction.openRecent = KStdAction::openRecent( this, SLOT( slotFileOpenRecent( const KURL& ) ), actionCollection() ); - mAction.save = KStdAction::save( editor(), SLOT(save()), actionCollection() ); - mAction.saveAs = KStdAction::saveAs( editor(), SLOT(saveAs()), actionCollection() ); - mAction.revert = KStdAction::revert( editor(), SLOT(reload()), actionCollection() ); - //mAction.revert = KStdAction::revert( this, SLOT(resizeTest()), actionCollection() ); - - mAction.close = KStdAction::close( editor(), SLOT(close()), actionCollection() ); - mAction.print = KStdAction::print( editor(), SLOT(print()), actionCollection() ); + 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() ); mAction.exportData = new KAction( i18n("E&xport..."), 0, - editor(), SLOT(exportDialog()), actionCollection(), "export" ); + editor(), TQT_SLOT(exportDialog()), actionCollection(), "export" ); mAction.cancel = new KAction( i18n("&Cancel Operation"), - "stop", 0, editor(), SLOT(stop()), actionCollection(), "cancel" ); + "stop", 0, editor(), TQT_SLOT(stop()), actionCollection(), "cancel" ); mAction.readOnly = new KToggleAction( i18n("&Read Only"), - 0, editor(), SLOT(toggleWriteProtection()),actionCollection(), "read_only" ); + 0, editor(), TQT_SLOT(toggleWriteProtection()),actionCollection(), "read_only" ); mAction.resizeLock = new KToggleAction( i18n("&Allow Resize"), - 0, editor(), SLOT(toggleResizeLock()),actionCollection(), "resize_lock" ); + 0, editor(), TQT_SLOT(toggleResizeLock()),actionCollection(), "resize_lock" ); mAction.newWindow = new KAction( i18n("N&ew Window"), - 0, this, SLOT(newWindow()),actionCollection(), "new_window" ); + 0, this, TQT_SLOT(newWindow()),actionCollection(), "new_window" ); mAction.closeWindow= new KAction( i18n("Close &Window"), - 0, this, SLOT(closeWindow()),actionCollection(), "close_window" ); - mAction.quit = KStdAction::quit( this, SLOT(closeProgram()), actionCollection() ); - - mAction.undo = KStdAction::undo( editor(), SLOT(undo()), actionCollection() ); - mAction.redo = KStdAction::redo( editor(), SLOT(redo()), actionCollection() ); - mAction.cut = KStdAction::cut( editor(), SLOT(cut()), actionCollection() ); - mAction.copy = KStdAction::copy( editor(), SLOT(copy()), actionCollection() ); - mAction.paste = KStdAction::paste( editor(), SLOT(paste()), actionCollection() ); - mAction.selectAll = KStdAction::selectAll(editor(), SLOT(selectAll()),actionCollection() ); - mAction.unselect = KStdAction::deselect(editor(), SLOT(unselect()), actionCollection()); - mAction.find = KStdAction::find( editor(), SLOT(find()), actionCollection() ); - mAction.findNext = KStdAction::findNext(editor(), SLOT(findNext()), actionCollection() ); - mAction.findPrev = KStdAction::findPrev(editor(),SLOT(findPrevious()),actionCollection() ); - mAction.replace = KStdAction::replace( editor(), SLOT(replace()), actionCollection() ); + 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() ); mAction.gotoOffset = new KAction( i18n("&Goto Offset..."), CTRL+Key_G, - editor(), SLOT(gotoOffset()),actionCollection(), "goto_offset" ); + editor(), TQT_SLOT(gotoOffset()),actionCollection(), "goto_offset" ); mAction.insertPattern = new KAction( i18n("&Insert Pattern..."), CTRL+Key_Insert, - editor(), SLOT(insertPattern()), actionCollection(), "insert_pattern" ); + editor(), TQT_SLOT(insertPattern()), actionCollection(), "insert_pattern" ); mAction.copyAsText = new KAction( i18n("Copy as &Text"), 0, - editor(), SLOT(copyText()), actionCollection(), "copy_as_text" ); + editor(), TQT_SLOT(copyText()), actionCollection(), "copy_as_text" ); mAction.pasteToNewFile = new KAction( i18n("Paste into New &File"), 0, - editor(), SLOT(pasteNewFile()), actionCollection(), "paste_into_new_file" ); + editor(), TQT_SLOT(pasteNewFile()), actionCollection(), "paste_into_new_file" ); mAction.pasteToNewWindow = new KAction( i18n("Paste into New &Window"), 0, - this, SLOT(pasteNewWindow()), actionCollection(), "paste_into_new_window" ); + this, TQT_SLOT(pasteNewWindow()), actionCollection(), "paste_into_new_window" ); mAction.hexadecimal = new KRadioAction( i18n("&Hexadecimal"), - 0, this, SLOT(setDisplayMode()), actionCollection(), "mode_hex" ); + 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_hex" ); mAction.decimal = new KRadioAction( i18n("&Decimal"), - 0, this, SLOT(setDisplayMode()), actionCollection(), "mode_dec" ); + 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_dec" ); mAction.octal = new KRadioAction( i18n("&Octal"), - 0, this, SLOT(setDisplayMode()), actionCollection(), "mode_oct" ); + 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_oct" ); mAction.binary = new KRadioAction( i18n("&Binary"), - 0, this, SLOT(setDisplayMode()), actionCollection(), "mode_bin" ); + 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_bin" ); mAction.textOnly = new KRadioAction( i18n("&Text"), - 0, this, SLOT(setDisplayMode()), actionCollection(), "mode_text" ); + 0, this, TQT_SLOT(setDisplayMode()), actionCollection(), "mode_text" ); mAction.hexadecimal->setExclusiveGroup( "displayMode" ); mAction.decimal->setExclusiveGroup( "displayMode" ); mAction.octal->setExclusiveGroup( "displayMode" ); @@ -194,120 +194,120 @@ actionCollection()); mAction.textOnly->setExclusiveGroup( "displayMode" ); mAction.showOffsetColumn = new KToggleAction( i18n("Show O&ffset Column"), - 0, editor(), SLOT(toggleOffsetColumnVisibility()),actionCollection(), "show_offset_column" ); + 0, editor(), TQT_SLOT(toggleOffsetColumnVisibility()),actionCollection(), "show_offset_column" ); mAction.showTextColumn = new KToggleAction( i18n("Show Te&xt Field"), - 0, editor(), SLOT(toggleTextColumnVisibility()),actionCollection(), "show_text_field" ); + 0, editor(), TQT_SLOT(toggleTextColumnVisibility()),actionCollection(), "show_text_field" ); mAction.offsetAsDecimal = new KToggleAction( i18n("Off&set as Decimal"), - 0, editor(), SLOT(toggleOffsetAsDecimal()),actionCollection(), "offset_as_decimal" ); + 0, editor(), TQT_SLOT(toggleOffsetAsDecimal()),actionCollection(), "offset_as_decimal" ); mAction.dataUppercase = new KToggleAction( i18n("&Upper Case (Data)"), - 0, editor(), SLOT(toggleDataUppercase()),actionCollection(), "upper_case_data" ); + 0, editor(), TQT_SLOT(toggleDataUppercase()),actionCollection(), "upper_case_data" ); mAction.offsetUppercase = new KToggleAction( i18n("Upper &Case (Offset)"), - 0, editor(), SLOT(toggleOffsetUppercase()),actionCollection(), "upper_case_offset" ); + 0, editor(), TQT_SLOT(toggleOffsetUppercase()),actionCollection(), "upper_case_offset" ); mAction.defaultEncoding = new KRadioAction( i18n("&Default encoding", "&Default"), - 0, this, SLOT( setEncoding()), actionCollection(), "enc_default" ); + 0, this, TQT_SLOT( setEncoding()), actionCollection(), "enc_default" ); mAction.usAsciiEncoding = new KRadioAction( i18n("US-&ASCII (7 bit)"), - 0, this, SLOT( setEncoding()), actionCollection(), "enc_ascii"); + 0, this, TQT_SLOT( setEncoding()), actionCollection(), "enc_ascii"); mAction.ebcdicEncoding = new KRadioAction( i18n("&EBCDIC"), - 0, this, SLOT( setEncoding()), actionCollection(), "enc_ebcdic" ); + 0, this, TQT_SLOT( setEncoding()), actionCollection(), "enc_ebcdic" ); // mAction.customEncoding = new KAction( i18n("&Custom..."), -// 0, editor(), SLOT( encoding()), actionCollection(), "enc_custom" ); +// 0, 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(), SLOT(strings()), actionCollection(), "extract_strings" ); + editor(), TQT_SLOT(strings()), actionCollection(), "extract_strings" ); // mAction.recordViewer = new KAction( i18n("&Record Viewer"), 0, -// editor(), SLOT(recordView()), actionCollection(), "record_viewer" ); +// editor(), TQT_SLOT(recordView()), actionCollection(), "record_viewer" ); mAction.filter = new KAction( i18n("&Binary Filter..."), 0, - editor(), SLOT(filter()), actionCollection(), "binary_filter" ); + editor(), TQT_SLOT(filter()), actionCollection(), "binary_filter" ); mAction.characterTable = new KAction( i18n("&Character Table"), 0, - editor(), SLOT(chart()), actionCollection(), "char_table" ); + editor(), TQT_SLOT(chart()), actionCollection(), "char_table" ); mAction.converter = new KAction( i18n("C&onverter"), 0, - editor(), SLOT(converter()), actionCollection(), "converter" ); + editor(), TQT_SLOT(converter()), actionCollection(), "converter" ); mAction.statistics = new KAction( i18n("&Statistics"), 0, - editor(), SLOT(statistics()), actionCollection(), "statistics" ); + editor(), TQT_SLOT(statistics()), actionCollection(), "statistics" ); mAction.addBookmark = KStdAction::addBookmark( editor(), - SLOT(addBookmark()), actionCollection() ); + TQT_SLOT(addBookmark()), actionCollection() ); mAction.replaceBookmark = new KAction( i18n("&Replace Bookmark"), CTRL+Key_E, - editor(), SLOT(replaceBookmark()), actionCollection(), "replace_bookmark"); + editor(), TQT_SLOT(replaceBookmark()), actionCollection(), "replace_bookmark"); mAction.removeBookmark = new KAction( i18n("R&emove Bookmark"), CTRL+Key_U, - editor(), SLOT(removeBookmark()), actionCollection(), "remove_bookmark" ); + editor(), TQT_SLOT(removeBookmark()), actionCollection(), "remove_bookmark" ); mAction.removeAllBookmark = new KAction( i18n("Re&move All"), 0, - editor(), SLOT(removeAllBookmark()), actionCollection(), "remove_all_bookmarks" ); + editor(), TQT_SLOT(removeAllBookmark()), actionCollection(), "remove_all_bookmarks" ); mAction.nextBookmark = new KAction( i18n("Goto &Next Bookmark"), ALT+Key_Down, editor(), - SLOT(gotoNextBookmark()), actionCollection(), "next_bookmark" ); + TQT_SLOT(gotoNextBookmark()), actionCollection(), "next_bookmark" ); mAction.prevBookmark = new KAction( i18n("Goto &Previous Bookmark"), ALT+Key_Up, editor(), - SLOT(gotoPrevBookmark()), actionCollection(), "prev_bookmark" ); + TQT_SLOT(gotoPrevBookmark()), actionCollection(), "prev_bookmark" ); createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); mAction.showFullPath = new KToggleAction( i18n("Show F&ull Path"), - 0, this, SLOT(showFullPath()), actionCollection(), "show_full_path" ); + 0, this, TQT_SLOT(showFullPath()), actionCollection(), "show_full_path" ); mAction.tabHide = new KRadioAction( i18n("&Hide"), - 0, this, SLOT(showDocumentTabs()), actionCollection(), "doctab_hide" ); + 0, this, TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_hide" ); mAction.tabShowAboveEditor = new KRadioAction( i18n("&Above Editor"), - 0, this, SLOT(showDocumentTabs()), actionCollection(), "doctab_above" ); + 0, this, TQT_SLOT(showDocumentTabs()), actionCollection(), "doctab_above" ); mAction.tabShowBelowEditor = new KRadioAction( i18n("&Below Editor"), - 0, this, SLOT(showDocumentTabs()), actionCollection(), "doctab_below" ); + 0, 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, SLOT(showConversionField()), actionCollection(), "conversion_field_hide"); + 0, this, TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_hide"); mAction.conversionFloat = new KRadioAction( i18n("&Floating"), - 0, this, SLOT(showConversionField()), actionCollection(), "conversion_field_float"); + 0, this, TQT_SLOT(showConversionField()), actionCollection(), "conversion_field_float"); mAction.conversionEmbed = new KRadioAction( i18n("&Embed in Main Window"), - 0, this, SLOT(showConversionField()), actionCollection(), "conversion_field_embed"); + 0, 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, SLOT(showSearchBar()), actionCollection(), "searchbar_hide" ); + 0, this, TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_hide" ); mAction.searchShowAboveEditor = new KRadioAction( i18n("&Above Editor"), - Key_F5, this, SLOT(showSearchBar()), actionCollection(), "searchbar_above" ); + Key_F5, this, TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_above" ); mAction.searchShowBelowEditor = new KRadioAction( i18n("&Below Editor"), - Key_F6, this, SLOT(showSearchBar()), actionCollection(), "searchbar_below" ); + Key_F6, this, TQT_SLOT(showSearchBar()), actionCollection(), "searchbar_below" ); mAction.searchHide->setExclusiveGroup( "searchBar" ); mAction.searchShowAboveEditor->setExclusiveGroup( "searchBar" ); mAction.searchShowBelowEditor->setExclusiveGroup( "searchBar" ); - KStdAction::saveOptions(this, SLOT(writeConfiguration()), actionCollection()); - KStdAction::preferences(editor(),SLOT(options()),actionCollection() ); + KStdAction::saveOptions(this, TQT_SLOT(writeConfiguration()), actionCollection()); + KStdAction::preferences(editor(),TQT_SLOT(options()),actionCollection() ); // mAction.favorites = new KAction( i18n("P&rofiles..."), 0, -// editor(), SLOT(favorites()), actionCollection(), "favorites" ); +// editor(), TQT_SLOT(favorites()), actionCollection(), "favorites" ); - KStdAction::help( this, SLOT(appHelpActivated()), actionCollection() ); + KStdAction::help( this, TQT_SLOT(appHelpActivated()), actionCollection() ); mDragLabel = new CDragLabel(this); mDragLabel->setPixmap( UserIcon( "hexdrag" ) ); mDragLabel->setDragMask( UserIcon( "hexmask" ) ); mDragLabel->setEnabled( false ); // Enabled once we open a document - QToolTip::add( mDragLabel, i18n("Drag document") ); - (void) new KWidgetAction(mDragLabel, i18n("Drag Document"), 0, editor(), SLOT(options()), actionCollection(), "drag_document"); + TQToolTip::add( mDragLabel, i18n("Drag document") ); + (void) new KWidgetAction(mDragLabel, i18n("Drag Document"), 0, editor(), TQT_SLOT(options()), actionCollection(), "drag_document"); createGUI("khexeditui.rc", false); - QPopupMenu *popup = (QPopupMenu *)factory()->container("editor_popup", this); + TQPopupMenu *popup = (TQPopupMenu *)factory()->container("editor_popup", this); hexView()->setPopupMenu( popup ); int id = 100; - toolBar(0)->insertButton( MainBarIcon("lock"), id, SIGNAL(clicked()), - editor(), SLOT(toggleWriteProtection()), true, + toolBar(0)->insertButton( MainBarIcon("lock"), id, TQT_SIGNAL(clicked()), + editor(), TQT_SLOT(toggleWriteProtection()), true, i18n("Toggle write protection") ); toolBar(0)->alignItemRight( id ); mWriteProtectButton = toolBar(0)->getButton(id); - QPopupMenu *documentMenu = (QPopupMenu *)factory()->container("documents", this); + TQPopupMenu *documentMenu = (TQPopupMenu *)factory()->container("documents", this); hexView()->setDocumentMenu(documentMenu); - connect(documentMenu, SIGNAL(activated(int)), SLOT(documentMenuCB(int))); + connect(documentMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(documentMenuCB(int))); } @@ -316,15 +316,15 @@ void KHexEdit::setupStatusBar( void ) { CStatusBarProgress *progess = new CStatusBarProgress( statusBar() ); statusBar()->addWidget( progess, 10 ); - connect( progess, SIGNAL(pressed()), editor(), SLOT(stop()) ); - connect( editor(), SIGNAL( setProgress( int ) ), - progess, SLOT( setValue( int ) ) ); - connect( editor(), SIGNAL( setProgress( int, int ) ), - progess, SLOT( setValue( int, int ) ) ); - connect( editor(), SIGNAL( enableProgressText( bool ) ), - progess, SLOT( setTextEnabled( bool ) ) ); - connect( editor(), SIGNAL( setProgressText( const QString & ) ), - progess, SLOT( setText( const QString & ) ) ); + connect( progess, TQT_SIGNAL(pressed()), editor(), TQT_SLOT(stop()) ); + connect( editor(), TQT_SIGNAL( setProgress( int ) ), + progess, TQT_SLOT( setValue( int ) ) ); + connect( editor(), TQT_SIGNAL( setProgress( int, int ) ), + progess, TQT_SLOT( setValue( int, int ) ) ); + connect( editor(), TQT_SIGNAL( enableProgressText( bool ) ), + progess, TQT_SLOT( setTextEnabled( bool ) ) ); + connect( editor(), TQT_SIGNAL( setProgressText( const TQString & ) ), + progess, TQT_SLOT( setText( const TQString & ) ) ); statusBar()->insertFixedItem( i18n("Selection: 0000:0000 0000:0000"), status_Selection ); @@ -347,7 +347,7 @@ void KHexEdit::setupStatusBar( void ) statusBar()->changeItem( i18n("Size:"), status_Size ); statusBar()->changeItem( "", status_Modified ); statusBar()->changeItem( "", status_Selection ); - connect( statusBar(),SIGNAL(pressed(int)),this,SLOT(statusBarPressed(int)) ); + connect( statusBar(),TQT_SIGNAL(pressed(int)),this,TQT_SLOT(statusBarPressed(int)) ); } @@ -380,9 +380,9 @@ void KHexEdit::initialize( bool openFiles ) KConfig* config = kapp->config(); - const QString oldGroup = config->group(); + const TQString oldGroup = config->group(); - const QString groupname = "RecentFiles"; + const TQString groupname = "RecentFiles"; config->setGroup( groupname ); // read file list @@ -391,8 +391,8 @@ void KHexEdit::initialize( bool openFiles ) maxItems = 1; for( unsigned int i = 1 ; i <= maxItems ; i++ ) { - const QString key = QString( "File%1" ).arg( i ); - const QString value = config->readPathEntry( key ); + const TQString key = TQString( "File%1" ).arg( 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. // - QTimer::singleShot( 100, this, SLOT(delayedStartupOpen()) ); + TQTimer::singleShot( 100, this, TQT_SLOT(delayedStartupOpen()) ); } @@ -450,7 +450,7 @@ void KHexEdit::statusBarPressed( int id ) -void KHexEdit::open( QStringList &fileList, QStringList &offsetList ) +void KHexEdit::open( TQStringList &fileList, TQStringList &offsetList ) { // // We load in reverse to allow the first document in @@ -472,7 +472,7 @@ void KHexEdit::open( QStringList &fileList, QStringList &offsetList ) } } -void KHexEdit::addRecentFile( const QString &fileName ) +void KHexEdit::addRecentFile( const TQString &fileName ) { if( fileName.isEmpty() == true ) { @@ -491,7 +491,7 @@ void KHexEdit::addRecentFile( const QString &fileName ) } -void KHexEdit::removeRecentFile( const QString &fileName ) +void KHexEdit::removeRecentFile( const TQString &fileName ) { if( fileName.isEmpty() == true ) { @@ -509,7 +509,7 @@ void KHexEdit::removeRecentFile( const QString &fileName ) } -void KHexEdit::renameRecentFile(const QString &curName, const QString &newName) +void KHexEdit::renameRecentFile(const TQString &curName, const TQString &newName) { if( curName.contains( i18n( "Untitled" ), false ) ) { @@ -543,7 +543,7 @@ KHexEdit *KHexEdit::newWindow( void ) KHexEdit *hexEdit = new KHexEdit; if( hexEdit == 0 ) { - QString msg = i18n( "Can not create new window.\n" ); + TQString msg = i18n( "Can not create new window.\n" ); msg += hexError( Err_NoMemory ); KMessageBox::error( topLevelWidget(), msg ); return(0); @@ -579,10 +579,10 @@ void KHexEdit::closeProgram( void ) { if( w->editor()->modified() == true ) { - QString msg = i18n("" + 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, QString::null, KStdGuiItem::quit() ); + int reply = KMessageBox::warningContinueCancel( topLevelWidget(), msg, TQString::null, KStdGuiItem::quit() ); if( reply == KMessageBox::Continue ) { break; @@ -747,7 +747,7 @@ void KHexEdit::operationChanged( bool state ) void KHexEdit::cursorChanged( SCursorState &state ) { - QString offset( i18n("Offset:") ); + TQString offset( i18n("Offset:") ); if( state.valid == false ) { @@ -761,18 +761,18 @@ void KHexEdit::cursorChanged( SCursorState &state ) { if( layout.offsetUpperCase == false ) { - offset += QString().sprintf( " %04x:%04x-%u", state.offset>>16, + offset += TQString().sprintf( " %04x:%04x-%u", state.offset>>16, state.offset&0x0000FFFF, state.cell ); } else { - offset += QString().sprintf( " %04X:%04X-%u", state.offset>>16, + offset += TQString().sprintf( " %04X:%04X-%u", state.offset>>16, state.offset&0x0000FFFF, state.cell ); } } else { - offset += QString().sprintf( " %010u-%u", state.offset, state.cell ); + offset += TQString().sprintf( " %010u-%u", state.offset, state.cell ); } statusBar()->changeItem( offset, status_Offset ); } @@ -903,7 +903,7 @@ void KHexEdit::inputModeChanged( const SDisplayInputMode &mode ) } -void KHexEdit::bookmarkChanged( QPtrList<SCursorOffset> &list ) +void KHexEdit::bookmarkChanged( TQPtrList<SCursorOffset> &list ) { unplugActionList("bookmark_list"); mAction.bookmarkList.setAutoDelete(true); @@ -916,14 +916,14 @@ void KHexEdit::bookmarkChanged( QPtrList<SCursorOffset> &list ) mAction.bookmarkList.append(new KActionSeparator()); - QString text, offset; + TQString text, offset; int i=0; 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, SLOT(map()), this, text.latin1()); + KAction *action = new KAction(text, 0, mAction.bookmarkMapper, TQT_SLOT(map()), this, text.latin1()); int key = acceleratorNumKey( i ); if( key > 0 ) { @@ -936,7 +936,7 @@ void KHexEdit::bookmarkChanged( QPtrList<SCursorOffset> &list ) } -void KHexEdit::setupCaption( const QString &url ) +void KHexEdit::setupCaption( const TQString &url ) { KURL u(url); if( mShowFullPath == true ) @@ -950,7 +950,7 @@ void KHexEdit::setupCaption( const QString &url ) } -void KHexEdit::fileActive( const QString &url, bool onDisk ) +void KHexEdit::fileActive( const TQString &url, bool onDisk ) { setupCaption( url ); mDragLabel->setUrl( url ); @@ -967,7 +967,7 @@ void KHexEdit::fileActive( const QString &url, bool onDisk ) } -void KHexEdit::fileRename( const QString &curName, const QString &newName ) +void KHexEdit::fileRename( const TQString &curName, const TQString &newName ) { if( newName.isNull() == true ) { @@ -981,7 +981,7 @@ void KHexEdit::fileRename( const QString &curName, const QString &newName ) } -void KHexEdit::fileClosed( const QString &url ) +void KHexEdit::fileClosed( const TQString &url ) { removeDocument( url ); } @@ -1169,16 +1169,16 @@ void KHexEdit::setSelectionText( uint selectionOffset, uint selectionSize ) { if( selectionSize > 0 ) { - QString selection = i18n("Selection:"); + TQString selection = i18n("Selection:"); if( mSelectionAsHexadecimal == true ) { - selection += QString().sprintf( " %04x:%04x %04x:%04x", + selection += TQString().sprintf( " %04x:%04x %04x:%04x", selectionOffset>>16, selectionOffset&0x0000FFFF, selectionSize>>16, selectionSize&0x0000FFFF ); } else { - selection += QString().sprintf( " %08u %08u", + selection += TQString().sprintf( " %08u %08u", selectionOffset, selectionSize); } statusBar()->changeItem( selection, status_Selection ); @@ -1200,7 +1200,7 @@ void KHexEdit::documentMenuCB( int index ) } -void KHexEdit::addDocument( const QString &fileName ) +void KHexEdit::addDocument( const TQString &fileName ) { uint documentCount = mDocumentList.count(); for( uint i=0; i < documentCount; i++ ) @@ -1213,7 +1213,7 @@ void KHexEdit::addDocument( const QString &fileName ) mDocumentList.append( fileName ); - QPopupMenu *documentMenu = (QPopupMenu *)factory()->container("documents", this); + TQPopupMenu *documentMenu = (TQPopupMenu *)factory()->container("documents", this); documentMenu->insertItem( fileName, documentCount, documentCount ); int key = acceleratorNumKey( documentCount ); if( key > 0 ) @@ -1223,14 +1223,14 @@ void KHexEdit::addDocument( const QString &fileName ) } -void KHexEdit::removeDocument( const QString &fileName ) +void KHexEdit::removeDocument( const TQString &fileName ) { - QStringList::Iterator it; + TQStringList::Iterator it; for( it = mDocumentList.begin(); it != mDocumentList.end(); it++ ) { if( *it == fileName ) { - QPopupMenu *documentMenu = (QPopupMenu *)factory()->container("documents", this); + TQPopupMenu *documentMenu = (TQPopupMenu *)factory()->container("documents", this); documentMenu->removeItemAt( mDocumentList.findIndex(*it) ); mDocumentList.remove( it ); @@ -1251,14 +1251,14 @@ void KHexEdit::removeDocument( const QString &fileName ) } -void KHexEdit::renameDocument( const QString &curName, const QString &newName ) +void KHexEdit::renameDocument( const TQString &curName, const TQString &newName ) { - QStringList::Iterator it; + TQStringList::Iterator it; for( it = mDocumentList.begin(); it != mDocumentList.end(); it++ ) { if( *it == curName ) { - QPopupMenu *documentMenu = (QPopupMenu *)factory()->container("documents", this); + TQPopupMenu *documentMenu = (TQPopupMenu *)factory()->container("documents", this); documentMenu->changeItem( newName, mDocumentList.findIndex(*it) ); mDocumentList.insert( it, newName ); mDocumentList.remove( it ); @@ -1268,10 +1268,10 @@ void KHexEdit::renameDocument( const QString &curName, const QString &newName ) } -void KHexEdit::setTickedDocument( const QString &fileName ) +void KHexEdit::setTickedDocument( const TQString &fileName ) { uint documentCount = mDocumentList.count(); - QPopupMenu *documentMenu = (QPopupMenu *)factory()->container("documents", this); + TQPopupMenu *documentMenu = (TQPopupMenu *)factory()->container("documents", this); for( uint i=0; i < documentCount; i++ ) { documentMenu->setItemChecked( i, fileName == mDocumentList[i] ); @@ -1291,11 +1291,11 @@ void KHexEdit::searchBarClosed( void ) } -bool KHexEdit::eventFilter( QObject *o, QEvent *event ) +bool KHexEdit::eventFilter( TQObject *o, TQEvent *event ) { - if( event->type() == QEvent::DragEnter ) + if( event->type() == TQEvent::DragEnter ) { - QDragEnterEvent *e = (QDragEnterEvent*)event; + TQDragEnterEvent *e = (TQDragEnterEvent*)event; if( KURLDrag::canDecode(e) ) { e->accept(); @@ -1303,22 +1303,22 @@ bool KHexEdit::eventFilter( QObject *o, QEvent *event ) } return( true ); } - else if( event->type() == QEvent::Drop ) + else if( event->type() == TQEvent::Drop ) { - QMimeSource &m = *(QDropEvent*)event; + TQMimeSource &m = *(TQDropEvent*)event; hexView()->setDropHighlight( false ); KURL::List list; if( KURLDrag::decode( &m, list ) == true ) { - QStringList offset; - QStringList urlList = list.toStringList(); + TQStringList offset; + TQStringList urlList = list.toStringList(); open( urlList, offset ); return( true ); } return( true ); } - else if( event->type() == QEvent::DragLeave ) + else if( event->type() == TQEvent::DragLeave ) { hexView()->setDropHighlight( false ); return( true ); |