diff options
author | Slávek Banko <[email protected]> | 2013-06-29 12:56:53 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-07-04 03:11:35 +0200 |
commit | 5f5e7c5455d52826b0bd50f64fcffb7695ce970d (patch) | |
tree | c8ee8792d3fb139365abbf70c2255f1e69d2aa34 /src/fileexporterps.cpp | |
parent | 251c9a439759c830d34c70683d0fc9454d703010 (diff) | |
download | kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.tar.gz kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.zip |
Initial TQt conversion
Diffstat (limited to 'src/fileexporterps.cpp')
-rw-r--r-- | src/fileexporterps.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/fileexporterps.cpp b/src/fileexporterps.cpp index 8627836..1da2601 100644 --- a/src/fileexporterps.cpp +++ b/src/fileexporterps.cpp @@ -17,8 +17,8 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include <qfile.h> -#include <qstringlist.h> +#include <ntqfile.h> +#include <ntqstringlist.h> #include <settings.h> #include <element.h> @@ -31,9 +31,9 @@ namespace BibTeX FileExporterPS::FileExporterPS() : FileExporterToolchain(), m_latexLanguage( "english" ), m_latexBibStyle( "plain" ) { - laTeXFilename = QString( workingDir ).append( "/bibtex-to-ps.tex" ); - bibTeXFilename = QString( workingDir ).append( "/bibtex-to-ps.bib" ); - outputFilename = QString( workingDir ).append( "/bibtex-to-ps.ps" ); + laTeXFilename = TQString( workingDir ).append( "/bibtex-to-ps.tex" ); + bibTeXFilename = TQString( workingDir ).append( "/bibtex-to-ps.bib" ); + outputFilename = TQString( workingDir ).append( "/bibtex-to-ps.ps" ); } FileExporterPS::~FileExporterPS() @@ -41,12 +41,12 @@ namespace BibTeX // nothing } - bool FileExporterPS::save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog ) + bool FileExporterPS::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog ) { m_mutex.lock(); bool result = FALSE; - QFile bibtexFile( bibTeXFilename ); + TQFile bibtexFile( bibTeXFilename ); if ( bibtexFile.open( IO_WriteOnly ) ) { FileExporter * bibtexExporter = new FileExporterBibTeX(); @@ -62,12 +62,12 @@ namespace BibTeX return result; } - bool FileExporterPS::save( QIODevice* iodevice, const Element* element, QStringList *errorLog ) + bool FileExporterPS::save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog ) { m_mutex.lock(); bool result = FALSE; - QFile bibtexFile( bibTeXFilename ); + TQFile bibtexFile( bibTeXFilename ); if ( bibtexFile.open( IO_WriteOnly ) ) { FileExporter * bibtexExporter = new FileExporterBibTeX(); @@ -83,19 +83,19 @@ namespace BibTeX return result; } - void FileExporterPS::setLaTeXLanguage( const QString& language ) + void FileExporterPS::setLaTeXLanguage( const TQString& language ) { m_latexLanguage = language; } - void FileExporterPS::setLaTeXBibliographyStyle( const QString& bibStyle ) + void FileExporterPS::setLaTeXBibliographyStyle( const TQString& bibStyle ) { m_latexBibStyle = bibStyle; } - bool FileExporterPS::generatePS( QIODevice* iodevice, QStringList *errorLog ) + bool FileExporterPS::generatePS( TQIODevice* iodevice, TQStringList *errorLog ) { - QStringList cmdLines = QStringList::split( '|', "latex -halt-on-error bibtex-to-ps.tex|bibtex bibtex-to-ps|latex -halt-on-error bibtex-to-ps.tex|latex -halt-on-error bibtex-to-ps.tex|dvips -o bibtex-to-ps.ps bibtex-to-ps.dvi" ); + TQStringList cmdLines = TQStringList::split( '|', "latex -halt-on-error bibtex-to-ps.tex|bibtex bibtex-to-ps|latex -halt-on-error bibtex-to-ps.tex|latex -halt-on-error bibtex-to-ps.tex|dvips -o bibtex-to-ps.ps bibtex-to-ps.dvi" ); if ( writeLatexFile( laTeXFilename ) && runProcesses( cmdLines, errorLog ) && writeFileToIODevice( outputFilename, iodevice ) ) return TRUE; @@ -103,13 +103,13 @@ namespace BibTeX return FALSE; } - bool FileExporterPS::writeLatexFile( const QString &filename ) + bool FileExporterPS::writeLatexFile( const TQString &filename ) { - QFile latexFile( filename ); + TQFile latexFile( filename ); if ( latexFile.open( IO_WriteOnly ) ) { - QTextStream ts( &latexFile ); - ts.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream ts( &latexFile ); + ts.setEncoding( TQTextStream::UnicodeUTF8 ); ts << "\\documentclass{article}\n"; if ( kpsewhich( "t1enc.dfu" ) ) ts << "\\usepackage[T1]{fontenc}\n"; |