summaryrefslogtreecommitdiffstats
path: root/src/kbibtex_part.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kbibtex_part.cpp')
-rw-r--r--src/kbibtex_part.cpp206
1 files changed, 103 insertions, 103 deletions
diff --git a/src/kbibtex_part.cpp b/src/kbibtex_part.cpp
index fdbb904..bf8d80d 100644
--- a/src/kbibtex_part.cpp
+++ b/src/kbibtex_part.cpp
@@ -32,7 +32,7 @@
#include <tqlabel.h>
#include <tqtextedit.h>
#include <tqclipboard.h>
-#include <kinstance.h>
+#include <tdeinstance.h>
#include <tdeaction.h>
#include <kstdaction.h>
#include <tdelistview.h>
@@ -46,7 +46,7 @@
#include <tdemessagebox.h>
#include <kinputdialog.h>
#include <tdeshortcut.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include <kiconloader.h>
#include <tdeapplication.h>
#include <kxmlguifactory.h>
@@ -74,7 +74,7 @@ const TQString inPipeFilename = TQDir::homeDirPath() + "/.kbibtex.in";
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 )
+ : KParts::ReadWritePart( parent, name ), m_defInitCounter( 0 ), m_settingsDlg( NULL ), m_initializationDone( false ), m_inPipe( NULL )
{
m_mainWindow = dynamic_cast<TDEMainWindow*>( parent );
if ( m_mainWindow == NULL )
@@ -93,15 +93,15 @@ KBibTeXPart::KBibTeXPart( TQWidget *parentWidget, const char *widgetName,
setupActions();
// we are read-write by default
- setReadWrite( TRUE );
+ setReadWrite( true );
// we are not modified since we haven't done anything yet
- setModified( FALSE );
+ setModified( false );
// read configuration
readSettings();
- TQTimer::singleShot( 100, this, SLOT( slotDeferredInitialization() ) );
+ TQTimer::singleShot( 100, this, TQ_SLOT( slotDeferredInitialization() ) );
}
KBibTeXPart::~KBibTeXPart()
@@ -116,12 +116,12 @@ void KBibTeXPart::setReadWrite( bool rw )
{
if ( rw )
{
- connect( m_documentWidget, SIGNAL( modified( ) ), this, SLOT( setModified( ) ) );
+ connect( m_documentWidget, TQ_SIGNAL( modified( ) ), this, TQ_SLOT( setModified( ) ) );
m_actionEditElement->setText( i18n( "&Edit" ) );
}
else
{
- disconnect( m_documentWidget, SIGNAL( modified( ) ), this, SLOT( setModified( ) ) );
+ disconnect( m_documentWidget, TQ_SIGNAL( modified( ) ), this, TQ_SLOT( setModified( ) ) );
m_actionEditElement->setText( i18n( "&View" ) );
}
ReadWritePart::setReadWrite( rw );
@@ -149,7 +149,7 @@ bool KBibTeXPart::queryClose()
writeSettings();
if ( !isReadWrite() || !isModified() )
- return TRUE;
+ return true;
TQString docName = url().fileName();
if ( docName.isEmpty() ) docName = i18n( "Untitled" );
@@ -173,12 +173,12 @@ bool KBibTeXPart::queryClose()
else
save();
}
- else if ( abortClose ) return FALSE;
+ else if ( abortClose ) return false;
return waitSaveComplete();
case KMessageBox::No :
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -198,7 +198,7 @@ bool KBibTeXPart::closeURL()
bool KBibTeXPart::openFile()
{
- return m_documentWidget->open( m_file, FALSE );
+ return m_documentWidget->open( m_file, false );
}
/**
@@ -206,8 +206,8 @@ bool KBibTeXPart::openFile()
*/
bool KBibTeXPart::saveFile()
{
- if ( isReadWrite() == FALSE )
- return FALSE;
+ if ( isReadWrite() == false )
+ return false;
if ( !url().isValid() || url().isEmpty() )
return saveAs();
@@ -218,7 +218,7 @@ bool KBibTeXPart::saveFile()
settings->createBackup( url(), widget() );
KTempFile tempBibFile = KTempFile( locateLocal( "tmp", "bibsave" ) );
- tempBibFile.setAutoDelete( TRUE );
+ tempBibFile.setAutoDelete( true );
bool success = m_documentWidget->save( tempBibFile.file() );
tempBibFile.close();
if ( success )
@@ -244,7 +244,7 @@ void KBibTeXPart::slotFileSaveAs()
bool KBibTeXPart::saveAs()
{
- bool result = FALSE;
+ bool result = false;
KBibTeX::Settings * settings = KBibTeX::Settings::self( NULL );
TQString startDir = ! url().isEmpty() ? url().url() : TQDir::currentDirPath();
@@ -253,13 +253,13 @@ bool KBibTeXPart::saveAs()
if ( saveURL.isValid() && !saveURL.isEmpty() )
{
- 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 )
+ 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 ) )
{
emit signalAddRecentURL( saveURL );
- result = TRUE;
+ result = true;
}
}
@@ -274,7 +274,7 @@ void KBibTeXPart::slotFileExport()
if ( exportURL.isValid() && !exportURL.isEmpty() )
{
- if ( TDEIO::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 ;
@@ -285,21 +285,21 @@ void KBibTeXPart::slotFileExport()
}
KTempFile tempBibFile = KTempFile( locateLocal( "tmp", "bibexport" ) );
- tempBibFile.setAutoDelete( TRUE );
+ tempBibFile.setAutoDelete( true );
BibTeX::File::FileFormat format = BibTeX::File::formatBibTeX;
- if ( exportURL.fileName().endsWith( ".rtf", FALSE ) )
+ if ( exportURL.fileName().endsWith( ".rtf", false ) )
format = BibTeX::File::formatRTF;
- else if ( exportURL.fileName().endsWith( ".pdf", FALSE ) )
+ else if ( exportURL.fileName().endsWith( ".pdf", false ) )
format = BibTeX::File::formatPDF;
- else if ( exportURL.fileName().endsWith( ".ps", FALSE ) )
+ else if ( exportURL.fileName().endsWith( ".ps", false ) )
format = BibTeX::File::formatPS;
- else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( exportURL.fileName().endsWith( ".ref", FALSE ) || exportURL.fileName().endsWith( ".refer", FALSE ) || exportURL.fileName().endsWith( ".txt", FALSE ) || exportURL.fileName().endsWith( ".rfr", FALSE ) ) )
+ else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( exportURL.fileName().endsWith( ".ref", false ) || exportURL.fileName().endsWith( ".refer", false ) || exportURL.fileName().endsWith( ".txt", false ) || exportURL.fileName().endsWith( ".rfr", false ) ) )
format = BibTeX::File::formatEndNote;
- else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( exportURL.fileName().endsWith( ".isi", FALSE ) || exportURL.fileName().endsWith( ".cgi", FALSE ) ) )
+ else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( exportURL.fileName().endsWith( ".isi", false ) || exportURL.fileName().endsWith( ".cgi", false ) ) )
format = BibTeX::File::formatISI;
- else if ( exportURL.fileName().endsWith( ".ris", FALSE ) )
+ else if ( exportURL.fileName().endsWith( ".ris", false ) )
format = BibTeX::File::formatRIS;
- else if ( exportURL.fileName().endsWith( ".xml", FALSE ) )
+ else if ( exportURL.fileName().endsWith( ".xml", false ) )
{
TQStringList options = TQStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "DocBook5|MODS|internal XML" : "DocBook5|internal XML" ) );
bool ok = false;
@@ -311,7 +311,7 @@ void KBibTeXPart::slotFileExport()
else if ( ok && !answer.isNull() && answer == "internal XML" )
format = BibTeX::File::formatXML;
}
- else if ( exportURL.fileName().endsWith( ".html", FALSE ) )
+ else if ( exportURL.fileName().endsWith( ".html", false ) )
format = BibTeX::File::formatHTML;
else
{
@@ -334,7 +334,7 @@ void KBibTeXPart::slotFileExport()
if ( !error )
{
tempBibFile.close();
- error = !TDEIO::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 )
@@ -378,18 +378,18 @@ void KBibTeXPart::slotFileMerge()
return;
extension = extension.mid( extPos );
- if ( !TDEIO::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 ;
}
KTempFile tempBibFile = KTempFile( locateLocal( "tmp", "bibmerge" ), extension );
- tempBibFile.setAutoDelete( TRUE );
- bool error = !TDEIO::NetAccess::file_copy( mergeURL, KURL( tempBibFile.name() ), -1, TRUE, FALSE, widget() );
+ tempBibFile.setAutoDelete( true );
+ bool error = !TDEIO::NetAccess::file_copy( mergeURL, KURL( tempBibFile.name() ), -1, true, false, widget() );
if ( !error )
- error = !m_documentWidget->open( tempBibFile.name(), TRUE );
+ error = !m_documentWidget->open( tempBibFile.name(), true );
tempBibFile.close();
@@ -399,7 +399,7 @@ void KBibTeXPart::slotFileMerge()
return;
}
else
- setModified( TRUE );
+ setModified( true );
}
void KBibTeXPart::slotPreferences()
@@ -424,111 +424,111 @@ void KBibTeXPart::setupActions()
{
if ( isReadWrite() )
{
- 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" ) );
+ KStdAction::save( this, TQ_SLOT( save() ), actionCollection() ) ->setToolTip( i18n( "Save the current file" ) );
+ KStdAction::saveAs( this, TQ_SLOT( slotFileSaveAs() ), actionCollection() ) ->setToolTip( i18n( "Save the current file under a new filename" ) );
}
- 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_actionFileStatistics = new TDEAction( i18n( "Statistics..." ), CTRL + SHIFT + Key_I, this, TQ_SLOT( slotFileStatistics() ), actionCollection(), "file_statistics" );
+ m_actionFileFindDups = new TDEAction( i18n( "Find Duplicates..." ), CTRL + SHIFT + Key_D, this, TQ_SLOT( slotFileFindDups() ), actionCollection(), "file_finddups" );
+ m_actionFileExport = new TDEAction( i18n( "Export..." ), SmallIconSet( "goto" ), CTRL + Key_E, this, TQ_SLOT( slotFileExport() ), actionCollection(), "file_export" );
m_actionFileExport->setToolTip( i18n( "Export to a different file format" ) );
- m_actionFileMerge = new TDEAction( 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, TQ_SLOT( slotFileMerge() ), actionCollection(), "file_merge" );
m_actionFileMerge->setToolTip( i18n( "Merge BibTeX entries from another file" ) );
- m_actionEditCut = KStdAction::cut( m_documentWidget, SLOT( cutElements() ), actionCollection() );
+ m_actionEditCut = KStdAction::cut( m_documentWidget, TQ_SLOT( cutElements() ), actionCollection() );
m_actionEditCut->setToolTip( i18n( "Cut the selected BibTeX elements to the clipboard" ) );
- m_actionEditCut->setEnabled( FALSE );
- m_actionEditCopy = KStdAction::copy( m_documentWidget, SLOT( copyElements() ), actionCollection() );
+ m_actionEditCut->setEnabled( false );
+ m_actionEditCopy = KStdAction::copy( m_documentWidget, TQ_SLOT( copyElements() ), actionCollection() );
m_actionEditCopy->setToolTip( i18n( "Copy the selected BibTeX elements to the clipboard" ) );
- 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 TDEAction( i18n( "Copy &Reference" ), CTRL + SHIFT + Key_C, m_documentWidget, SLOT( copyRefElements() ), actionCollection(), "edit_copyref" );
+ m_actionEditCopy->setEnabled( false );
+ m_actionEditUndo = KStdAction::undo( m_documentWidget, TQ_SLOT( undoEditor() ), actionCollection() );
+ connect( m_documentWidget, TQ_SIGNAL( undoChanged( bool ) ), this, TQ_SLOT( slotUndoChanged( bool ) ) );
+ m_actionEditCopyRef = new TDEAction( i18n( "Copy &Reference" ), CTRL + SHIFT + Key_C, m_documentWidget, TQ_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_actionEditCopyRef->setEnabled( false );
+ m_actionEditPaste = KStdAction::paste( m_documentWidget, TQ_SLOT( pasteElements() ), actionCollection() );
m_actionEditPaste->setToolTip( i18n( "Paste BibTeX elements from the clipboard" ) );
- m_actionEditSelectAll = KStdAction::selectAll( m_documentWidget, SLOT( selectAll() ), actionCollection() );
+ m_actionEditSelectAll = KStdAction::selectAll( m_documentWidget, TQ_SLOT( selectAll() ), actionCollection() );
m_actionEditSelectAll->setToolTip( i18n( "Select all BibTeX elements" ) );
- m_actionElementSendToLyX = new TDEAction( 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, TQ_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() );
+ m_actionElementSendToLyX->setEnabled( false );
+ m_actionEditFind = KStdAction::find( m_documentWidget, TQ_SLOT( find() ), actionCollection() );
m_actionEditFind->setToolTip( i18n( "Find text" ) );
- m_actionEditFindNext = KStdAction::findNext( m_documentWidget, SLOT( findNext() ), actionCollection() );
+ m_actionEditFindNext = KStdAction::findNext( m_documentWidget, TQ_SLOT( findNext() ), actionCollection() );
m_actionEditFindNext->setToolTip( i18n( "Find next occurrence" ) );
- m_actionEditFind->setEnabled( FALSE );
- m_actionEditFindNext->setEnabled( FALSE );
+ m_actionEditFind->setEnabled( false );
+ m_actionEditFindNext->setEnabled( false );
- m_actionSearchOnlineDatabases = new TDEAction( 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, TQ_SLOT( onlineSearch() ), actionCollection(), "search_onlinedatabases" );
m_actionSearchOnlineDatabases->setToolTip( i18n( "Search online databases to import bibliography data" ) );
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 );
+ connect( m_actionMenuSearchWebsites->popupMenu(), TQ_SIGNAL( activated( int ) ), this, TQ_SLOT( slotSearchWebsites( int ) ) );
+ m_actionMenuSearchWebsites->setEnabled( false );
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 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 TDEAction( i18n( "View Primary Document" ), 0, m_documentWidget, SLOT( slotViewFirstDocument() ), actionCollection(), "view_first_document" );
+ m_actionViewDocument->setEnabled( false );
+ m_actionViewFirstDocument = new TDEAction( i18n( "View Primary Document" ), 0, m_documentWidget, TQ_SLOT( slotViewFirstDocument() ), actionCollection(), "view_first_document" );
m_actionViewFirstDocument->setShortcut( TQt::Key_F4 );
- m_actionViewDocumentOnlineRef = new TDEAction( 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, TQ_SLOT( slotViewFirstDocumentsOnlineRef() ), actionCollection(), "view_first_documents_online_ref" );
m_actionViewDocumentOnlineRef->setShortcut( TQt::Key_F5 );
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 TDEAction( i18n( "Normalize Entry Ids" ), 0, m_documentWidget, SLOT( slotNormalizeIds() ), actionCollection( ), "normalize_ids" );
+ m_actionAssignKeywords->setEnabled( false );
+ m_actionNormalizeIds = new TDEAction( i18n( "Normalize Entry Ids" ), 0, m_documentWidget, TQ_SLOT( slotNormalizeIds() ), actionCollection( ), "normalize_ids" );
m_actionNormalizeIds->setToolTip( i18n( "Set entry ids as specified in the id suggestion settings" ) );
- m_actionNormalizeIds->setEnabled( FALSE );
+ m_actionNormalizeIds->setEnabled( false );
- m_actionPreferences = KStdAction::preferences( this, SLOT( slotPreferences() ), actionCollection() );
+ m_actionPreferences = KStdAction::preferences( this, TQ_SLOT( slotPreferences() ), actionCollection() );
m_actionPreferences->setToolTip( i18n( "Configure KBibTeX" ) );
- TDEAction *actionSourceEditor = new TDEAction( i18n( "Configure Source View..." ), 0, m_documentWidget, SLOT( configureEditor() ), actionCollection(), "options_configure_editor" );
+ TDEAction *actionSourceEditor = new TDEAction( i18n( "Configure Source View..." ), 0, m_documentWidget, TQ_SLOT( configureEditor() ), actionCollection(), "options_configure_editor" );
actionSourceEditor ->setToolTip( i18n( "Configure the Source Editor" ) );
- ( 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" );
+ ( new TDEAction( i18n( "Article" ), 0, this, TQ_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, TQ_SLOT( slotNewElement() ), actionCollection(), "element_new_entry_book" ) ) ->setToolTip( i18n( "Add a book to the BibTeX file" ) );
+ ( new TDEAction( i18n( "Booklet" ), 0, this, TQ_SLOT( slotNewElement() ), actionCollection(), "element_new_entry_booklet" ) ) ->setToolTip( i18n( "Add a booklet to the BibTeX file" ) );
+ ( new TDEAction( i18n( "Electronic (IEEE)" ), 0, this, TQ_SLOT( slotNewElement() ), actionCollection(), "element_new_entry_electronic" ) ) ->setToolTip( i18n( "Add an electronic reference (IEEE) to the BibTeX file" ) );
+ ( new TDEAction( i18n( "InBook" ), 0, this, TQ_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, TQ_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, TQ_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, TQ_SLOT( slotNewElement() ), actionCollection(), "element_new_entry_manual" ) ) ->setToolTip( i18n( "Add a manual to the BibTeX file" ) );
+ ( new TDEAction( i18n( "MastersThesis" ), 0, this, TQ_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, TQ_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, TQ_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, TQ_SLOT( slotNewElement() ), actionCollection(), "element_new_entry_proceedings" ) ) ->setToolTip( i18n( "Add some proceedings to the BibTeX file" ) );
+ ( new TDEAction( i18n( "TechReport" ), 0, this, TQ_SLOT( slotNewElement() ), actionCollection(), "element_new_entry_techreport" ) ) ->setToolTip( i18n( "Add a technical report to the BibTeX file" ) );
+ ( new TDEAction( i18n( "Unpublished" ), 0, this, TQ_SLOT( slotNewElement() ), actionCollection(), "element_new_entry_unpublished" ) ) ->setToolTip( i18n( "Add an unpublished document to the BibTeX file" ) );
+ ( new TDEAction( i18n( "Preamble" ), 0, this, TQ_SLOT( slotNewElement() ), actionCollection(), "element_new_preamble" ) ) ->setToolTip( i18n( "Add a preamble to the BibTeX file" ) );
+ ( new TDEAction( i18n( "Comment" ), 0, this, TQ_SLOT( slotNewElement() ), actionCollection(), "element_new_comment" ) ) ->setToolTip( i18n( "Add a comment to the BibTeX file" ) );
+ ( new TDEAction( i18n( "Macro" ), 0, this, TQ_SLOT( slotNewElement() ), actionCollection(), "element_new_macro" ) ) ->setToolTip( i18n( "Add a macro to the BibTeX file" ) );
+
+ m_actionEditElement = new TDEAction( i18n( "&Edit" ), 0, m_documentWidget, TQ_SLOT( editElement() ), actionCollection(), "element_edit" );
m_actionEditElement->setToolTip( i18n( "Edit the selected BibTeX element" ) );
- m_actionEditElement->setEnabled( FALSE );
- m_actionDeleteElement = new TDEAction( i18n( "&Delete" ), 0, m_documentWidget, SLOT( deleteElements() ), actionCollection(), "element_delete" );
+ m_actionEditElement->setEnabled( false );
+ m_actionDeleteElement = new TDEAction( i18n( "&Delete" ), 0, m_documentWidget, TQ_SLOT( deleteElements() ), actionCollection(), "element_delete" );
m_actionDeleteElement->setToolTip( i18n( "Delete the selected BibTeX elements" ) );
- m_actionDeleteElement->setEnabled( FALSE );
+ m_actionDeleteElement->setEnabled( false );
- m_actionShowComments = new TDEToggleAction( i18n( "Show &Comments" ), 0, this, SLOT( slotToggleShowSpecialElements() ), actionCollection(), "view_showcomments" );
+ m_actionShowComments = new TDEToggleAction( i18n( "Show &Comments" ), 0, this, TQ_SLOT( slotToggleShowSpecialElements() ), actionCollection(), "view_showcomments" );
m_actionShowComments->setToolTip( i18n( "Show the comments of a BibTeX document" ) );
- m_actionShowMacros = new TDEToggleAction( i18n( "Show &Macros" ), 0, this, SLOT( slotToggleShowSpecialElements() ), actionCollection(), "view_showmacros" );
+ m_actionShowMacros = new TDEToggleAction( i18n( "Show &Macros" ), 0, this, TQ_SLOT( slotToggleShowSpecialElements() ), actionCollection(), "view_showmacros" );
m_actionShowMacros->setToolTip( i18n( "Show the macros of a BibTeX document" ) );
- m_actionUseInPipe = new TDEToggleAction( i18n( "Accept input from other programs" ), 0, this , SLOT( slotUseInPipe() ), actionCollection(), "useinpipe" );
+ m_actionUseInPipe = new TDEToggleAction( i18n( "Accept input from other programs" ), 0, this , TQ_SLOT( slotUseInPipe() ), actionCollection(), "useinpipe" );
- connect( m_documentWidget, SIGNAL( listViewSelectionChanged( int ) ), this, SLOT( slotUpdateMenu( int ) ) );
+ connect( m_documentWidget, TQ_SIGNAL( listViewSelectionChanged( int ) ), this, TQ_SLOT( slotUpdateMenu( int ) ) );
if ( m_mainWindow != NULL )
{
KStatusBar * statusBar = m_mainWindow->statusBar();
if ( statusBar != NULL )
{
- connect( actionCollection(), SIGNAL( actionStatusText( const TQString & ) ), statusBar, SLOT( message( const TQString & ) ) );
- connect( actionCollection(), SIGNAL( clearStatusText() ), statusBar, SLOT( clear() ) );
+ connect( actionCollection(), TQ_SIGNAL( actionStatusText( const TQString & ) ), statusBar, TQ_SLOT( message( const TQString & ) ) );
+ connect( actionCollection(), TQ_SIGNAL( clearStatusText() ), statusBar, TQ_SLOT( clear() ) );
}
}
@@ -536,7 +536,7 @@ void KBibTeXPart::setupActions()
TDEActionMenu *acmElementNew = new TDEActionMenu( i18n( "&New" ), TQIconSet( SmallIcon( "document-new" ) ), actionCollection(), "element_new" );
acmElementNew->setToolTip( i18n( "Add a new element to this BibTeX document" ) );
- acmElementNew->setEnabled( FALSE );
+ acmElementNew->setEnabled( false );
}
bool KBibTeXPart::slotNewElement()
@@ -554,15 +554,15 @@ bool KBibTeXPart::slotNewElement()
else if ( strcmp( sender() ->name(), "element_new_preamble" ) == 0 )
elementType = "preamble";
else
- return FALSE;
+ return false;
bool result = m_documentWidget->newElement( elementType );
if ( result )
- setModified( TRUE );
+ setModified( true );
return result;
}
- return FALSE;
+ return false;
}
void KBibTeXPart::readSettings()
@@ -684,7 +684,7 @@ void KBibTeXPart::slotDeferredInitialization()
{
m_documentWidget->setFactory( factory(), this );
m_documentWidget->deferredInitialization();
- m_initializationDone = TRUE;
+ m_initializationDone = true;
}
else
{
@@ -695,7 +695,7 @@ void KBibTeXPart::slotDeferredInitialization()
KMessageBox::sorry( widget(), i18n( "The KBibTeX part has problems to initialize itself. Only limited functionality will be available." ), i18n( "KBibTeX Part" ) );
return ;
}
- TQTimer::singleShot( 250, this, SLOT( slotDeferredInitialization() ) );
+ TQTimer::singleShot( 250, this, TQ_SLOT( slotDeferredInitialization() ) );
}
}
@@ -748,7 +748,7 @@ TDEInstance* KBibTeXPartFactory::instance()
extern "C"
{
- KDE_EXPORT void* init_libkbibtexpart()
+ TDE_EXPORT void* init_libkbibtexpart()
{
return new KBibTeXPartFactory;
}