From f2d4b48ad7f6ce4f23c6cbba3e85c67486f922db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 29 Jun 2013 16:33:55 +0200 Subject: Initial TDE conversion --- src/kbibtex_part.cpp | 142 +++++++++++++++++++++++++-------------------------- 1 file changed, 71 insertions(+), 71 deletions(-) (limited to 'src/kbibtex_part.cpp') diff --git a/src/kbibtex_part.cpp b/src/kbibtex_part.cpp index eaf72b8..d41fcb8 100644 --- a/src/kbibtex_part.cpp +++ b/src/kbibtex_part.cpp @@ -33,26 +33,26 @@ #include #include #include -#include +#include #include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include -#include +#include #include #include -#include +#include #include -#include -#include -#include +#include +#include +#include #ifdef HAVE_CONFIG_H #include @@ -76,7 +76,7 @@ KBibTeXPart::KBibTeXPart( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name ) : KParts::ReadWritePart( parent, name ), m_defInitCounter( 0 ), m_settingsDlg( NULL ), m_initializationDone( FALSE ), m_inPipe( NULL ) { - m_mainWindow = dynamic_cast( parent ); + m_mainWindow = dynamic_cast( parent ); if ( m_mainWindow == NULL ) kdDebug( ) << "Cannot determine main window" << endl; @@ -131,7 +131,7 @@ void KBibTeXPart::setReadWrite( bool rw ) void KBibTeXPart::setModified( bool modified ) { // get a handle on our Save action and make sure it is valid - KAction * save = actionCollection() ->action( KStdAction::stdName( KStdAction::Save ) ); + TDEAction * save = actionCollection() ->action( KStdAction::stdName( KStdAction::Save ) ); if ( save ) { @@ -229,7 +229,7 @@ bool KBibTeXPart::saveFile() usedFileName = KBibTeX::Settings::resolveLink( m_file, fi.readLink() ); m_documentWidget->dirWatch().stopScan(); - success = KIO::NetAccess::file_copy( KURL( tempBibFile.name() ), KURL( usedFileName ), -1, true, false, widget() ); + success = TDEIO::NetAccess::file_copy( KURL( tempBibFile.name() ), KURL( usedFileName ), -1, true, false, widget() ); m_documentWidget->dirWatch().startScan(); } @@ -253,7 +253,7 @@ bool KBibTeXPart::saveAs() if ( saveURL.isValid() && !saveURL.isEmpty() ) { - if ( KIO::NetAccess::exists( saveURL, FALSE, widget() ) && KMessageBox::warningContinueCancel( widget(), i18n( "A file named '%1' already exists. Are you sure you want to overwrite it?" ).arg( saveURL.filename() ), TQString::null, i18n( "Overwrite" ) ) != KMessageBox::Continue ) + if ( TDEIO::NetAccess::exists( saveURL, FALSE, widget() ) && KMessageBox::warningContinueCancel( widget(), i18n( "A file named '%1' already exists. Are you sure you want to overwrite it?" ).arg( saveURL.filename() ), TQString::null, i18n( "Overwrite" ) ) != KMessageBox::Continue ) return result; if ( ReadWritePart::saveAs( saveURL ) ) @@ -274,7 +274,7 @@ void KBibTeXPart::slotFileExport() if ( exportURL.isValid() && !exportURL.isEmpty() ) { - if ( KIO::NetAccess::exists( exportURL, FALSE, widget() ) ) + if ( TDEIO::NetAccess::exists( exportURL, FALSE, widget() ) ) { if ( KMessageBox::warningContinueCancel( widget(), i18n( "A file named '%1' already exists. Are you sure you want to overwrite it?" ).arg( exportURL.filename() ), TQString::null, i18n( "Overwrite" ) ) != KMessageBox::Continue ) return ; @@ -334,12 +334,12 @@ void KBibTeXPart::slotFileExport() if ( !error ) { tempBibFile.close(); - error = !KIO::NetAccess::file_copy( KURL( tempBibFile.name() ), exportURL, -1, TRUE, FALSE, widget() ); + error = !TDEIO::NetAccess::file_copy( KURL( tempBibFile.name() ), exportURL, -1, TRUE, FALSE, widget() ); } if ( error ) { -#if (KDE_VERSION_MINOR>=4) && (KDE_VERSION_MAJOR>=3) +#if (TDE_VERSION_MINOR>=4) && (TDE_VERSION_MAJOR>=3) if ( !errorLog.empty() ) KMessageBox::errorList( widget(), TQString( i18n( "File could not be exported in '%1'." ) ).arg( exportURL.prettyURL() ).append( i18n( "\n\nSee the following error log for details." ) ), errorLog, i18n( "Exporting failed" ) ); else @@ -378,7 +378,7 @@ void KBibTeXPart::slotFileMerge() return; extension = extension.mid( extPos ); - if ( !KIO::NetAccess::exists( mergeURL, TRUE, widget() ) ) + if ( !TDEIO::NetAccess::exists( mergeURL, TRUE, widget() ) ) { KMessageBox::error( widget(), i18n( "The given file could not be read, check if it exists or if it is readable for the current user." ) ); return ; @@ -386,7 +386,7 @@ void KBibTeXPart::slotFileMerge() KTempFile tempBibFile = KTempFile( locateLocal( "tmp", "bibmerge" ), extension ); tempBibFile.setAutoDelete( TRUE ); - bool error = !KIO::NetAccess::file_copy( mergeURL, KURL( tempBibFile.name() ), -1, TRUE, FALSE, widget() ); + bool error = !TDEIO::NetAccess::file_copy( mergeURL, KURL( tempBibFile.name() ), -1, TRUE, FALSE, widget() ); if ( !error ) error = !m_documentWidget->open( tempBibFile.name(), TRUE ); @@ -427,11 +427,11 @@ void KBibTeXPart::setupActions() KStdAction::save( this, SLOT( save() ), actionCollection() ) ->setToolTip( i18n( "Save the current file" ) ); KStdAction::saveAs( this, SLOT( slotFileSaveAs() ), actionCollection() ) ->setToolTip( i18n( "Save the current file under a new filename" ) ); } - m_actionFileStatistics = new KAction( i18n( "Statistics..." ), CTRL + SHIFT + Key_I, this, SLOT( slotFileStatistics() ), actionCollection(), "file_statistics" ); - m_actionFileFindDups = new KAction( i18n( "Find Duplicates..." ), CTRL + SHIFT + Key_D, this, SLOT( slotFileFindDups() ), actionCollection(), "file_finddups" ); - m_actionFileExport = new KAction( i18n( "Export..." ), SmallIconSet( "goto" ), CTRL + Key_E, this, SLOT( slotFileExport() ), actionCollection(), "file_export" ); + m_actionFileStatistics = new TDEAction( i18n( "Statistics..." ), CTRL + SHIFT + Key_I, this, SLOT( slotFileStatistics() ), actionCollection(), "file_statistics" ); + m_actionFileFindDups = new TDEAction( i18n( "Find Duplicates..." ), CTRL + SHIFT + Key_D, this, SLOT( slotFileFindDups() ), actionCollection(), "file_finddups" ); + m_actionFileExport = new TDEAction( i18n( "Export..." ), SmallIconSet( "goto" ), CTRL + Key_E, this, SLOT( slotFileExport() ), actionCollection(), "file_export" ); m_actionFileExport->setToolTip( i18n( "Export to a different file format" ) ); - m_actionFileMerge = new KAction( i18n( "Merge..." ), SmallIconSet( "reload" ), CTRL + Key_M, this, SLOT( slotFileMerge() ), actionCollection(), "file_merge" ); + m_actionFileMerge = new TDEAction( i18n( "Merge..." ), SmallIconSet( "reload" ), CTRL + Key_M, this, SLOT( slotFileMerge() ), actionCollection(), "file_merge" ); m_actionFileMerge->setToolTip( i18n( "Merge BibTeX entries from another file" ) ); m_actionEditCut = KStdAction::cut( m_documentWidget, SLOT( cutElements() ), actionCollection() ); @@ -442,14 +442,14 @@ void KBibTeXPart::setupActions() m_actionEditCopy->setEnabled( FALSE ); m_actionEditUndo = KStdAction::undo( m_documentWidget, SLOT( undoEditor() ), actionCollection() ); connect( m_documentWidget, SIGNAL( undoChanged( bool ) ), this, SLOT( slotUndoChanged( bool ) ) ); - m_actionEditCopyRef = new KAction( i18n( "Copy &Reference" ), CTRL + SHIFT + Key_C, m_documentWidget, SLOT( copyRefElements() ), actionCollection(), "edit_copyref" ); + m_actionEditCopyRef = new TDEAction( i18n( "Copy &Reference" ), CTRL + SHIFT + Key_C, m_documentWidget, SLOT( copyRefElements() ), actionCollection(), "edit_copyref" ); m_actionEditCopyRef->setToolTip( i18n( "Copy a reference of the selected BibTeX elements to the clipboard" ) ); m_actionEditCopyRef->setEnabled( FALSE ); m_actionEditPaste = KStdAction::paste( m_documentWidget, SLOT( pasteElements() ), actionCollection() ); m_actionEditPaste->setToolTip( i18n( "Paste BibTeX elements from the clipboard" ) ); m_actionEditSelectAll = KStdAction::selectAll( m_documentWidget, SLOT( selectAll() ), actionCollection() ); m_actionEditSelectAll->setToolTip( i18n( "Select all BibTeX elements" ) ); - m_actionElementSendToLyX = new KAction( i18n( "Send Reference to &LyX" ), CTRL + SHIFT + Key_L, m_documentWidget, SLOT( sendSelectedToLyx() ), actionCollection(), "element_sendtolyx" ); + m_actionElementSendToLyX = new TDEAction( i18n( "Send Reference to &LyX" ), CTRL + SHIFT + Key_L, m_documentWidget, SLOT( sendSelectedToLyx() ), actionCollection(), "element_sendtolyx" ); m_actionElementSendToLyX->setToolTip( i18n( "Send a reference of the selected BibTeX elements to LyX" ) ); m_actionElementSendToLyX->setEnabled( FALSE ); m_actionEditFind = KStdAction::find( m_documentWidget, SLOT( find() ), actionCollection() ); @@ -459,66 +459,66 @@ void KBibTeXPart::setupActions() m_actionEditFind->setEnabled( FALSE ); m_actionEditFindNext->setEnabled( FALSE ); - m_actionSearchOnlineDatabases = new KAction( i18n( "Search Online Databases" ), SmallIconSet( "network" ), CTRL + SHIFT + Key_S, m_documentWidget, SLOT( onlineSearch() ), actionCollection(), "search_onlinedatabases" ); + m_actionSearchOnlineDatabases = new TDEAction( i18n( "Search Online Databases" ), SmallIconSet( "network" ), CTRL + SHIFT + Key_S, m_documentWidget, SLOT( onlineSearch() ), actionCollection(), "search_onlinedatabases" ); m_actionSearchOnlineDatabases->setToolTip( i18n( "Search online databases to import bibliography data" ) ); - m_actionMenuSearchWebsites = new KActionMenu( i18n( "Search Document Online" ), actionCollection(), "search_document_online" ); + m_actionMenuSearchWebsites = new TDEActionMenu( i18n( "Search Document Online" ), actionCollection(), "search_document_online" ); m_actionMenuSearchWebsites->setToolTip( i18n( "Search websites for the selected BibTeX element" ) ); connect( m_actionMenuSearchWebsites->popupMenu(), SIGNAL( activated( int ) ), this, SLOT( slotSearchWebsites( int ) ) ); m_actionMenuSearchWebsites->setEnabled( FALSE ); - m_actionViewShowColumns = new KActionMenu( i18n( "&Show Columns" ), actionCollection(), "view_showcolumns" ); + m_actionViewShowColumns = new TDEActionMenu( i18n( "&Show Columns" ), actionCollection(), "view_showcolumns" ); m_actionViewShowColumns->setToolTip( i18n( "Select columns to show in the main list" ) ); - m_actionViewDocument = new KActionMenu( i18n( "View Document" ), actionCollection(), "view_document" ); + m_actionViewDocument = new TDEActionMenu( i18n( "View Document" ), actionCollection(), "view_document" ); m_actionViewDocument->setToolTip( i18n( "View the documents associated with this BibTeX entry" ) ); m_actionViewDocument->setEnabled( FALSE ); - m_actionViewFirstDocument = new KAction( i18n( "View Primary Document" ), 0, m_documentWidget, SLOT( slotViewFirstDocument() ), actionCollection(), "view_first_document" ); + m_actionViewFirstDocument = new TDEAction( i18n( "View Primary Document" ), 0, m_documentWidget, SLOT( slotViewFirstDocument() ), actionCollection(), "view_first_document" ); m_actionViewFirstDocument->setShortcut( TQt::Key_F4 ); - m_actionViewDocumentOnlineRef = new KAction( i18n( "View Primary Online Reference" ), 0, m_documentWidget, SLOT( slotViewFirstDocumentsOnlineRef() ), actionCollection(), "view_first_documents_online_ref" ); + m_actionViewDocumentOnlineRef = new TDEAction( i18n( "View Primary Online Reference" ), 0, m_documentWidget, SLOT( slotViewFirstDocumentsOnlineRef() ), actionCollection(), "view_first_documents_online_ref" ); m_actionViewDocumentOnlineRef->setShortcut( TQt::Key_F5 ); - m_actionAssignKeywords = new KActionMenu( i18n( "Assign Keywords" ), actionCollection(), "assign_keywords" ); + m_actionAssignKeywords = new TDEActionMenu( i18n( "Assign Keywords" ), actionCollection(), "assign_keywords" ); m_actionAssignKeywords->setToolTip( i18n( "Assign keywords to this entry" ) ); m_actionAssignKeywords->setEnabled( FALSE ); - m_actionNormalizeIds = new KAction( i18n( "Normalize Entry Ids" ), 0, m_documentWidget, SLOT( slotNormalizeIds() ), actionCollection( ), "normalize_ids" ); + m_actionNormalizeIds = new TDEAction( i18n( "Normalize Entry Ids" ), 0, m_documentWidget, SLOT( slotNormalizeIds() ), actionCollection( ), "normalize_ids" ); m_actionNormalizeIds->setToolTip( i18n( "Set entry ids as specified in the id suggestion settings" ) ); m_actionNormalizeIds->setEnabled( FALSE ); m_actionPreferences = KStdAction::preferences( this, SLOT( slotPreferences() ), actionCollection() ); m_actionPreferences->setToolTip( i18n( "Configure KBibTeX" ) ); - KAction *actionSourceEditor = new KAction( i18n( "Configure Source View..." ), 0, m_documentWidget, SLOT( configureEditor() ), actionCollection(), "options_configure_editor" ); + TDEAction *actionSourceEditor = new TDEAction( i18n( "Configure Source View..." ), 0, m_documentWidget, SLOT( configureEditor() ), actionCollection(), "options_configure_editor" ); actionSourceEditor ->setToolTip( i18n( "Configure the Source Editor" ) ); - ( new KAction( i18n( "Article" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_article" ) ) ->setToolTip( i18n( "Add an article to the BibTeX file" ) ); - ( new KAction( i18n( "Book" ), "element_new_entry_book", CTRL + Key_B, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_book" ) ) ->setToolTip( i18n( "Add a book to the BibTeX file" ) ); - ( new KAction( i18n( "Booklet" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_booklet" ) ) ->setToolTip( i18n( "Add a booklet to the BibTeX file" ) ); - ( new KAction( i18n( "Electronic (IEEE)" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_electronic" ) ) ->setToolTip( i18n( "Add an electronic reference (IEEE) to the BibTeX file" ) ); - ( new KAction( i18n( "InBook" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_inbook" ) ) ->setToolTip( i18n( "Add a part of a book to the BibTeX file" ) ); - ( new KAction( i18n( "InCollection" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_incollection" ) ) ->setToolTip( i18n( "Add a publication which is part of some collection to the BibTeX file" ) ); - ( new KAction( i18n( "InProceedings" ), "element_new_entry_inproceedings", CTRL + Key_I, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_inproceedings" ) ) ->setToolTip( i18n( "Add a publication which is part of some proceedings to the BibTeX file" ) ); - ( new KAction( i18n( "Manual" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_manual" ) ) ->setToolTip( i18n( "Add a manual to the BibTeX file" ) ); - ( new KAction( i18n( "MastersThesis" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_mastersthesis" ) ) ->setToolTip( i18n( "Add a master or diploma thesis to the BibTeX file" ) ); - ( new KAction( i18n( "Misc" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_misc" ) ) ->setToolTip( i18n( "Add a not specified document or reference to the BibTeX file" ) ); - ( new KAction( i18n( "PhDThesis" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_phdthesis" ) ) ->setToolTip( i18n( "Add a PhD thesis to the BibTeX file" ) ); - ( new KAction( i18n( "Proceedings" ), "element_new_entry_phdthesis" , CTRL + Key_P, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_proceedings" ) ) ->setToolTip( i18n( "Add some proceedings to the BibTeX file" ) ); - ( new KAction( i18n( "TechReport" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_techreport" ) ) ->setToolTip( i18n( "Add a technical report to the BibTeX file" ) ); - ( new KAction( i18n( "Unpublished" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_unpublished" ) ) ->setToolTip( i18n( "Add an unpublished document to the BibTeX file" ) ); - ( new KAction( i18n( "Preamble" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_preamble" ) ) ->setToolTip( i18n( "Add a preamble to the BibTeX file" ) ); - ( new KAction( i18n( "Comment" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_comment" ) ) ->setToolTip( i18n( "Add a comment to the BibTeX file" ) ); - ( new KAction( i18n( "Macro" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_macro" ) ) ->setToolTip( i18n( "Add a macro to the BibTeX file" ) ); - - m_actionEditElement = new KAction( i18n( "&Edit" ), 0, m_documentWidget, SLOT( editElement() ), actionCollection(), "element_edit" ); + ( new TDEAction( i18n( "Article" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_article" ) ) ->setToolTip( i18n( "Add an article to the BibTeX file" ) ); + ( new TDEAction( i18n( "Book" ), "element_new_entry_book", CTRL + Key_B, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_book" ) ) ->setToolTip( i18n( "Add a book to the BibTeX file" ) ); + ( new TDEAction( i18n( "Booklet" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_booklet" ) ) ->setToolTip( i18n( "Add a booklet to the BibTeX file" ) ); + ( new TDEAction( i18n( "Electronic (IEEE)" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_electronic" ) ) ->setToolTip( i18n( "Add an electronic reference (IEEE) to the BibTeX file" ) ); + ( new TDEAction( i18n( "InBook" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_inbook" ) ) ->setToolTip( i18n( "Add a part of a book to the BibTeX file" ) ); + ( new TDEAction( i18n( "InCollection" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_incollection" ) ) ->setToolTip( i18n( "Add a publication which is part of some collection to the BibTeX file" ) ); + ( new TDEAction( i18n( "InProceedings" ), "element_new_entry_inproceedings", CTRL + Key_I, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_inproceedings" ) ) ->setToolTip( i18n( "Add a publication which is part of some proceedings to the BibTeX file" ) ); + ( new TDEAction( i18n( "Manual" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_manual" ) ) ->setToolTip( i18n( "Add a manual to the BibTeX file" ) ); + ( new TDEAction( i18n( "MastersThesis" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_mastersthesis" ) ) ->setToolTip( i18n( "Add a master or diploma thesis to the BibTeX file" ) ); + ( new TDEAction( i18n( "Misc" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_misc" ) ) ->setToolTip( i18n( "Add a not specified document or reference to the BibTeX file" ) ); + ( new TDEAction( i18n( "PhDThesis" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_phdthesis" ) ) ->setToolTip( i18n( "Add a PhD thesis to the BibTeX file" ) ); + ( new TDEAction( i18n( "Proceedings" ), "element_new_entry_phdthesis" , CTRL + Key_P, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_proceedings" ) ) ->setToolTip( i18n( "Add some proceedings to the BibTeX file" ) ); + ( new TDEAction( i18n( "TechReport" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_techreport" ) ) ->setToolTip( i18n( "Add a technical report to the BibTeX file" ) ); + ( new TDEAction( i18n( "Unpublished" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_unpublished" ) ) ->setToolTip( i18n( "Add an unpublished document to the BibTeX file" ) ); + ( new TDEAction( i18n( "Preamble" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_preamble" ) ) ->setToolTip( i18n( "Add a preamble to the BibTeX file" ) ); + ( new TDEAction( i18n( "Comment" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_comment" ) ) ->setToolTip( i18n( "Add a comment to the BibTeX file" ) ); + ( new TDEAction( i18n( "Macro" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_macro" ) ) ->setToolTip( i18n( "Add a macro to the BibTeX file" ) ); + + m_actionEditElement = new TDEAction( i18n( "&Edit" ), 0, m_documentWidget, SLOT( editElement() ), actionCollection(), "element_edit" ); m_actionEditElement->setToolTip( i18n( "Edit the selected BibTeX element" ) ); m_actionEditElement->setEnabled( FALSE ); - m_actionDeleteElement = new KAction( i18n( "&Delete" ), 0, m_documentWidget, SLOT( deleteElements() ), actionCollection(), "element_delete" ); + m_actionDeleteElement = new TDEAction( i18n( "&Delete" ), 0, m_documentWidget, SLOT( deleteElements() ), actionCollection(), "element_delete" ); m_actionDeleteElement->setToolTip( i18n( "Delete the selected BibTeX elements" ) ); m_actionDeleteElement->setEnabled( FALSE ); - m_actionShowComments = new KToggleAction( i18n( "Show &Comments" ), 0, this, SLOT( slotToggleShowSpecialElements() ), actionCollection(), "view_showcomments" ); + m_actionShowComments = new TDEToggleAction( i18n( "Show &Comments" ), 0, this, SLOT( slotToggleShowSpecialElements() ), actionCollection(), "view_showcomments" ); m_actionShowComments->setToolTip( i18n( "Show the comments of a BibTeX document" ) ); - m_actionShowMacros = new KToggleAction( i18n( "Show &Macros" ), 0, this, SLOT( slotToggleShowSpecialElements() ), actionCollection(), "view_showmacros" ); + m_actionShowMacros = new TDEToggleAction( i18n( "Show &Macros" ), 0, this, SLOT( slotToggleShowSpecialElements() ), actionCollection(), "view_showmacros" ); m_actionShowMacros->setToolTip( i18n( "Show the macros of a BibTeX document" ) ); - m_actionUseInPipe = new KToggleAction( i18n( "Accept input from other programs" ), 0, this , SLOT( slotUseInPipe() ), actionCollection(), "useinpipe" ); + m_actionUseInPipe = new TDEToggleAction( i18n( "Accept input from other programs" ), 0, this , SLOT( slotUseInPipe() ), actionCollection(), "useinpipe" ); connect( m_documentWidget, SIGNAL( listViewSelectionChanged( int ) ), this, SLOT( slotUpdateMenu( int ) ) ); @@ -534,7 +534,7 @@ void KBibTeXPart::setupActions() actionCollection() ->setHighlightingEnabled( true ); - KActionMenu *acmElementNew = new KActionMenu( i18n( "&New" ), TQIconSet( SmallIcon( "filenew" ) ), actionCollection(), "element_new" ); + TDEActionMenu *acmElementNew = new TDEActionMenu( i18n( "&New" ), TQIconSet( SmallIcon( "filenew" ) ), actionCollection(), "element_new" ); acmElementNew->setToolTip( i18n( "Add a new element to this BibTeX document" ) ); acmElementNew->setEnabled( FALSE ); } @@ -568,7 +568,7 @@ bool KBibTeXPart::slotNewElement() void KBibTeXPart::readSettings() { KBibTeX::Settings * settings = KBibTeX::Settings::self(); - KConfig * config = KBibTeXPartFactory::instance() ->config(); + TDEConfig * config = KBibTeXPartFactory::instance() ->config(); settings->load( config ); m_actionShowComments->setChecked( settings->editing_ShowComments ); @@ -583,7 +583,7 @@ void KBibTeXPart::writeSettings() KBibTeX::Settings * settings = KBibTeX::Settings::self(); m_documentWidget->saveState(); - KConfig * config = KBibTeXPartFactory::instance() ->config(); + TDEConfig * config = KBibTeXPartFactory::instance() ->config(); settings->editing_ShowComments = m_actionShowComments->isChecked(); settings->editing_ShowMacros = m_actionShowMacros->isChecked(); @@ -700,12 +700,12 @@ void KBibTeXPart::slotDeferredInitialization() } // It's usually safe to leave the factory code alone.. with the -// notable exception of the KAboutData data -#include -#include +// notable exception of the TDEAboutData data +#include +#include -KInstance* KBibTeXPartFactory::s_instance = 0L; -KAboutData* KBibTeXPartFactory::s_about = 0L; +TDEInstance* KBibTeXPartFactory::s_instance = 0L; +TDEAboutData* KBibTeXPartFactory::s_about = 0L; KBibTeXPartFactory::KBibTeXPartFactory() : KParts::Factory() @@ -735,13 +735,13 @@ KParts::Part* KBibTeXPartFactory::createPartObject( TQWidget *parentWidget, cons return obj; } -KInstance* KBibTeXPartFactory::instance() +TDEInstance* KBibTeXPartFactory::instance() { if ( !s_instance ) { - s_about = new KAboutData( "kbibtexpart", I18N_NOOP( "KBibTeXPart" ), "0.2.3.91" ); + s_about = new TDEAboutData( "kbibtexpart", I18N_NOOP( "KBibTeXPart" ), "0.2.3.91" ); s_about->addAuthor( "Thomas Fischer", 0, "fischer@unix-ag.uni-kl.de" ); - s_instance = new KInstance( s_about ); + s_instance = new TDEInstance( s_about ); } return s_instance; } -- cgit v1.2.3