diff options
Diffstat (limited to 'src/kbibtexshell.cpp')
-rw-r--r-- | src/kbibtexshell.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/kbibtexshell.cpp b/src/kbibtexshell.cpp index e3182dd..531d4e2 100644 --- a/src/kbibtexshell.cpp +++ b/src/kbibtexshell.cpp @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include <qprocess.h> +#include <ntqprocess.h> #include <kkeydialog.h> #include <kencodingfiledialog.h> @@ -37,7 +37,7 @@ #include <kbibtex_part.h> #include "kbibtexshell.h" -KBibTeXShell::KBibTeXShell( QWidget* parentWidget, const char* name ) +KBibTeXShell::KBibTeXShell( TQWidget* parentWidget, const char* name ) : KParts::MainWindow( parentWidget, name ), m_part( NULL ), m_parentWidget( parentWidget ) { // set the shell's ui resource file @@ -164,7 +164,7 @@ void KBibTeXShell::writeConfig() writeConfig( config ); } -QString KBibTeXShell::encoding() +TQString KBibTeXShell::encoding() { return "utf8"; } @@ -198,11 +198,11 @@ void KBibTeXShell::setupActions() KStdAction::keyBindings( this, SLOT( optionsConfigureKeys() ), actionCollection() ) ->setToolTip( i18n( "Configure key bindings for KBibTeX" ) ); KStdAction::configureToolbars( this, SLOT( optionsConfigureToolbars() ), actionCollection() ) ->setToolTip( i18n( "Configure the tool bar for KBibTeX" ) ); - connect( actionCollection(), SIGNAL( actionStatusText( const QString & ) ), this, SLOT( slotActionStatusText( const QString & ) ) ); + connect( actionCollection(), SIGNAL( actionStatusText( const TQString & ) ), this, SLOT( slotActionStatusText( const TQString & ) ) ); connect( actionCollection(), SIGNAL( clearStatusText( ) ), statusBar(), SLOT( clear() ) ); } -void KBibTeXShell::slotActionStatusText( const QString &text ) +void KBibTeXShell::slotActionStatusText( const TQString &text ) { KStatusBar * stb = statusBar(); @@ -238,8 +238,8 @@ void KBibTeXShell::optionsShowStatusbar() void KBibTeXShell::optionsConfigureKeys() { KKeyDialog dlg( false, this ); - QPtrList<KXMLGUIClient> clients = guiFactory()->clients(); - for ( QPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it ) + TQPtrList<KXMLGUIClient> clients = guiFactory()->clients(); + for ( TQPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it ) { dlg.insert(( *it )->actionCollection() ); } @@ -311,8 +311,8 @@ void KBibTeXShell::slotFileNew() void KBibTeXShell::slotFileOpen() { bool bibUtilsAvailable = checkExternalToolAvailable( "xml2bib" ) && checkExternalToolAvailable( "end2xml" ); - QString startDir = ! m_part->url().isEmpty() ? m_part->url().url() : QDir::currentDirPath(); - KURL mergeURL = KFileDialog::getOpenURL( startDir, QString( "*.bib *.ris" ) + + TQString startDir = ! m_part->url().isEmpty() ? m_part->url().url() : TQDir::currentDirPath(); + KURL mergeURL = KFileDialog::getOpenURL( startDir, TQString( "*.bib *.ris" ) + ( bibUtilsAvailable ? " *.xml *.ref *.refer *.rfr *.txt *.isi *.cgi" : "" ) + "|" + i18n( "Supported Bibliographies" ) + "\n*.bib|" + i18n( "BibTeX (*.bib)" ) + "\n*.ris|" + i18n( "Reference Manager (*.ris)" ) + ( bibUtilsAvailable ? "\n*.ref *.refer *.rfr *.txt|" + i18n( "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)" ) + "\n*.isi *.cgi|" + i18n( "ISI Web of Knowledge (*.isi *.cgi)" ) + "\n*.xml|" + i18n( "MODS or EndNote XML (*.xml)" ) : "" ) + "\n*|" + i18n( "All files (*.*)" ) , widget() ); slotFileOpen( mergeURL ); @@ -369,9 +369,9 @@ void KBibTeXShell::initializePart( KParts::ReadWritePart* part ) } } -bool KBibTeXShell::checkExternalToolAvailable( const QString &binary ) +bool KBibTeXShell::checkExternalToolAvailable( const TQString &binary ) { - QProcess *process = new QProcess( binary ); + TQProcess *process = new TQProcess( binary ); bool ok = process->start(); ok &= process->normalExit(); if ( process->isRunning() ) |