summaryrefslogtreecommitdiffstats
path: root/filters/kformula
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /filters/kformula
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filters/kformula')
-rw-r--r--filters/kformula/latex/latexexport.cc24
-rw-r--r--filters/kformula/latex/latexexport.h9
-rw-r--r--filters/kformula/mathml/mathmlexport.cc24
-rw-r--r--filters/kformula/mathml/mathmlexport.h9
-rw-r--r--filters/kformula/mathml/mathmlimport.cc26
-rw-r--r--filters/kformula/mathml/mathmlimport.h13
-rw-r--r--filters/kformula/png/pngexport.cc14
-rw-r--r--filters/kformula/png/pngexport.h9
-rw-r--r--filters/kformula/png/pngexportdia.cc124
-rw-r--r--filters/kformula/png/pngexportdia.h15
-rw-r--r--filters/kformula/svg/svgexport.cc20
-rw-r--r--filters/kformula/svg/svgexport.h5
12 files changed, 149 insertions, 143 deletions
diff --git a/filters/kformula/latex/latexexport.cc b/filters/kformula/latex/latexexport.cc
index 20cecdcf..b280df1c 100644
--- a/filters/kformula/latex/latexexport.cc
+++ b/filters/kformula/latex/latexexport.cc
@@ -17,9 +17,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -40,34 +40,34 @@ typedef KGenericFactory<LATEXExport, KoFilter> LATEXExportFactory;
K_EXPORT_COMPONENT_FACTORY( libkfolatexexport, LATEXExportFactory( "kofficefilters" ) )
-LATEXExport::LATEXExport( KoFilter */*parent*/, const char */*name*/, const QStringList& )
+LATEXExport::LATEXExport( KoFilter */*tqparent*/, const char */*name*/, const TQStringList& )
: KoFilter()
{
}
-KoFilter::ConversionStatus LATEXExport::convert( const QCString& from, const QCString& to )
+KoFilter::ConversiontqStatus LATEXExport::convert( const TQCString& from, const TQCString& to )
{
if ( to != "text/x-tex" || from != "application/x-kformula" )
return KoFilter::NotImplemented;
KoStoreDevice* in = m_chain->storageFile( "root", KoStore::Read );
if(!in) {
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
KMessageBox::error( 0, i18n( "Failed to read data." ), i18n( "LaTeX Export Error" ) );
return KoFilter::StorageCreationError;
}
- QDomDocument dom( "KFORMULA" );
+ TQDomDocument dom( "KFORMULA" );
if ( !dom.setContent( in, false ) ) {
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
KMessageBox::error( 0, i18n( "Malformed XML data." ), i18n( "LaTeX Export Error" ) );
return KoFilter::WrongFormat;
}
- QFile f( m_chain->outputFile() );
+ TQFile f( m_chain->outputFile() );
if( !f.open( IO_Truncate | IO_ReadWrite ) ) {
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
KMessageBox::error( 0, i18n( "Failed to write file." ), i18n( "LaTeX Export Error" ) );
return KoFilter::FileNotFound;
}
@@ -80,8 +80,8 @@ KoFilter::ConversionStatus LATEXExport::convert( const QCString& from, const QCS
kdError(30522) << "Failed." << endl;
}
- QTextStream stream(&f);
- //stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&f);
+ //stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << "\\documentclass{article}\n\\usepackage{amsmath}\n\\begin{document}\n\\[\n"
<< formula->texString()
<< "\n\\]\n\\end{document}";
diff --git a/filters/kformula/latex/latexexport.h b/filters/kformula/latex/latexexport.h
index af24003d..1da761be 100644
--- a/filters/kformula/latex/latexexport.h
+++ b/filters/kformula/latex/latexexport.h
@@ -20,19 +20,20 @@
#ifndef LATEXEXPORT_H
#define LATEXEXPORT_H
-class QCString;
-class QStringList;
+class TQCString;
+class TQStringList;
#include <KoFilter.h>
class LATEXExport : public KoFilter
{
Q_OBJECT
+ TQ_OBJECT
public:
- LATEXExport( KoFilter *parent, const char *name, const QStringList& );
+ LATEXExport( KoFilter *tqparent, const char *name, const TQStringList& );
virtual ~LATEXExport() {}
- virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to );
+ virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to );
};
#endif // LATEXEXPORT_H
diff --git a/filters/kformula/mathml/mathmlexport.cc b/filters/kformula/mathml/mathmlexport.cc
index cbf8489e..667c18ef 100644
--- a/filters/kformula/mathml/mathmlexport.cc
+++ b/filters/kformula/mathml/mathmlexport.cc
@@ -17,9 +17,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -40,34 +40,34 @@ typedef KGenericFactory<MathMLExport, KoFilter> MathMLExportFactory;
K_EXPORT_COMPONENT_FACTORY( libkfomathmlexport, MathMLExportFactory( "kofficefilters" ) )
-MathMLExport::MathMLExport( KoFilter */*parent*/, const char */*name*/, const QStringList& )
+MathMLExport::MathMLExport( KoFilter */*tqparent*/, const char */*name*/, const TQStringList& )
: KoFilter()
{
}
-KoFilter::ConversionStatus MathMLExport::convert( const QCString& from, const QCString& to )
+KoFilter::ConversiontqStatus MathMLExport::convert( const TQCString& from, const TQCString& to )
{
if ( to != "application/mathml+xml" || from != "application/x-kformula" )
return KoFilter::NotImplemented;
KoStoreDevice* in = m_chain->storageFile( "root", KoStore::Read );
if(!in) {
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
KMessageBox::error( 0, i18n( "Failed to read data." ), i18n( "MathML Export Error" ) );
return KoFilter::StorageCreationError;
}
- QDomDocument dom;
+ TQDomDocument dom;
if ( !dom.setContent( in, false ) ) {
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
KMessageBox::error( 0, i18n( "Malformed XML data." ), i18n( "MathML Export Error" ) );
return KoFilter::WrongFormat;
}
- QFile f( m_chain->outputFile() );
+ TQFile f( m_chain->outputFile() );
if( !f.open( IO_Truncate | IO_ReadWrite ) ) {
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
KMessageBox::error( 0, i18n( "Failed to write file." ), i18n( "MathML Export Error" ) );
return KoFilter::FileNotFound;
}
@@ -80,8 +80,8 @@ KoFilter::ConversionStatus MathMLExport::convert( const QCString& from, const QC
kdError() << "Failed." << endl;
}
- QTextStream stream(&f);
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream(&f);
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
formula->saveMathML( stream );
f.close();
diff --git a/filters/kformula/mathml/mathmlexport.h b/filters/kformula/mathml/mathmlexport.h
index 0e15b7a0..7f3eee19 100644
--- a/filters/kformula/mathml/mathmlexport.h
+++ b/filters/kformula/mathml/mathmlexport.h
@@ -20,19 +20,20 @@
#ifndef MATHMLEXPORT_H
#define MATHMLEXPORT_H
-class QCString;
-class QStringList;
+class TQCString;
+class TQStringList;
#include <KoFilter.h>
class MathMLExport : public KoFilter
{
Q_OBJECT
+ TQ_OBJECT
public:
- MathMLExport( KoFilter *parent, const char *name, const QStringList& );
+ MathMLExport( KoFilter *tqparent, const char *name, const TQStringList& );
virtual ~MathMLExport() {}
- virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to );
+ virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to );
};
#endif // MATHMLEXPORT_H
diff --git a/filters/kformula/mathml/mathmlimport.cc b/filters/kformula/mathml/mathmlimport.cc
index 9ede69ce..87ce2182 100644
--- a/filters/kformula/mathml/mathmlimport.cc
+++ b/filters/kformula/mathml/mathmlimport.cc
@@ -25,7 +25,7 @@
#include <kmessagebox.h>
#include <KoFilterChain.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kformuladocument.h>
#include <kformulacontainer.h>
@@ -39,12 +39,12 @@ typedef KGenericFactory<MathMLImport, KoFilter> MathMLImportFactory;
K_EXPORT_COMPONENT_FACTORY( libkfomathmlimport, MathMLImportFactory( "kofficefilters" ) )
-MathMLImport::MathMLImport(KoFilter *, const char *, const QStringList&)
+MathMLImport::MathMLImport(KoFilter *, const char *, const TQStringList&)
: KoFilter()
{
}
-KoFilter::ConversionStatus MathMLImport::convert( const QCString& from, const QCString& to )
+KoFilter::ConversiontqStatus MathMLImport::convert( const TQCString& from, const TQCString& to )
{
kdDebug( KFormula::DEBUGID ) << "From: " << from << endl;
kdDebug( KFormula::DEBUGID ) << "To: " << to << endl;
@@ -52,7 +52,7 @@ KoFilter::ConversionStatus MathMLImport::convert( const QCString& from, const QC
if(from != "application/mathml+xml" || to != "application/x-kformula")
return KoFilter::NotImplemented;
- KoStore* out = KoStore::createStore(QString(m_chain->outputFile()), KoStore::Write);
+ KoStore* out = KoStore::createStore(TQString(m_chain->outputFile()), KoStore::Write);
if(!out || !out->open("root")) {
KMessageBox::error( 0, i18n( "Unable to open output file." ), i18n( "MathML Import Error" ) );
delete out;
@@ -65,26 +65,26 @@ KoFilter::ConversionStatus MathMLImport::convert( const QCString& from, const QC
KFormula::Container* formula = doc->createFormula();
//formula->loadMathML( m_chain->inputFile() );
- const QString filename( m_chain->inputFile() );
- QFile f( filename );
+ const TQString filename( m_chain->inputFile() );
+ TQFile f( filename );
if ( !f.open( IO_ReadOnly ) ) {
- KMessageBox::error( 0, i18n( "Failed to open input file: %1" ).arg( filename ), i18n( "MathML Import Error" ) );
+ KMessageBox::error( 0, i18n( "Failed to open input file: %1" ).tqarg( filename ), i18n( "MathML Import Error" ) );
delete wrapper;
return KoFilter::FileNotFound;
}
- QDomDocument mathML;
- // Error variables for QDomDocument::setContent
- QString errorMsg;
+ TQDomDocument mathML;
+ // Error variables for TQDomDocument::setContent
+ TQString errorMsg;
int errorLine, errorColumn;
if ( !mathML.setContent( &f, true, &errorMsg, &errorLine, &errorColumn ) ) {
delete wrapper;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
kdError(KFormula::DEBUGID) << "Parsing error in " << filename << "! Aborting!" << endl
<< " In line: " << errorLine << ", column: " << errorColumn << endl
<< " Error message: " << errorMsg << endl;
KMessageBox::error( 0, i18n( "Parsing error in MathML file %4 at line %1, column %2\nError message: %3" )
- .arg( errorLine ).arg( errorColumn ).arg( i18n ( "QXml", errorMsg.utf8() ).arg( filename ) ), i18n( "MathML Import Error" ) );
+ .tqarg( errorLine ).tqarg( errorColumn ).tqarg( i18n ( "TQXml", errorMsg.utf8() ).tqarg( filename ) ), i18n( "MathML Import Error" ) );
return KoFilter::WrongFormat;
}
f.close();
@@ -95,7 +95,7 @@ KoFilter::ConversionStatus MathMLImport::convert( const QCString& from, const QC
// taken from KoDocument::saveToStore
KoStoreDevice dev( out );
- const QCString s = doc->saveXML().toCString(); // utf8 already
+ const TQCString s = doc->saveXML().toCString(); // utf8 already
const int nwritten = dev.writeBlock( s.data(), s.size()-1 );
if ( nwritten != (int)s.size()-1 ) {
kdWarning() << "wrote " << nwritten << " - expected " << s.size()-1 << endl;
diff --git a/filters/kformula/mathml/mathmlimport.h b/filters/kformula/mathml/mathmlimport.h
index 79f6c052..b1d1152f 100644
--- a/filters/kformula/mathml/mathmlimport.h
+++ b/filters/kformula/mathml/mathmlimport.h
@@ -20,10 +20,10 @@
#ifndef MATHMLIMPORT_H
#define MATHMLIMPORT_H
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqobject.h>
#include <KoFilter.h>
#include <KoStore.h>
@@ -31,11 +31,12 @@
class MathMLImport : public KoFilter
{
Q_OBJECT
+ TQ_OBJECT
public:
- MathMLImport(KoFilter *parent, const char *name, const QStringList&);
+ MathMLImport(KoFilter *tqparent, const char *name, const TQStringList&);
virtual ~MathMLImport() {}
- virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to );
+ virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to );
};
#endif /* MATHMLIMPORT_H */
diff --git a/filters/kformula/png/pngexport.cc b/filters/kformula/png/pngexport.cc
index f51bc1f1..b8d0f3d3 100644
--- a/filters/kformula/png/pngexport.cc
+++ b/filters/kformula/png/pngexport.cc
@@ -17,10 +17,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqobject.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -40,13 +40,13 @@ typedef KGenericFactory<PNGExport, KoFilter> PNGExportFactory;
K_EXPORT_COMPONENT_FACTORY( libkfopngexport, PNGExportFactory( "kofficefilters" ) )
-PNGExport::PNGExport( KoFilter */*parent*/, const char */*name*/, const QStringList& )
+PNGExport::PNGExport( KoFilter */*tqparent*/, const char */*name*/, const TQStringList& )
: KoFilter()
{
}
-KoFilter::ConversionStatus PNGExport::convert( const QCString& from, const QCString& to )
+KoFilter::ConversiontqStatus PNGExport::convert( const TQCString& from, const TQCString& to )
{
if ( to != "image/png" || from != "application/x-kformula" )
return KoFilter::NotImplemented;
@@ -58,7 +58,7 @@ KoFilter::ConversionStatus PNGExport::convert( const QCString& from, const QCStr
return KoFilter::FileNotFound;
}
- QDomDocument dom( "KFORMULA" );
+ TQDomDocument dom( "KFORMULA" );
if ( !dom.setContent( in, false ) ) {
kapp->restoreOverrideCursor();
KMessageBox::error( 0, i18n( "Malformed XML data." ), i18n( "PNG Export Error" ) );
diff --git a/filters/kformula/png/pngexport.h b/filters/kformula/png/pngexport.h
index b9425439..54c121e3 100644
--- a/filters/kformula/png/pngexport.h
+++ b/filters/kformula/png/pngexport.h
@@ -20,19 +20,20 @@
#ifndef PNGEXPORT_H
#define PNGEXPORT_H
-class QCString;
-class QStringList;
+class TQCString;
+class TQStringList;
#include <KoFilter.h>
class PNGExport : public KoFilter
{
Q_OBJECT
+ TQ_OBJECT
public:
- PNGExport( KoFilter *parent, const char *name, const QStringList& );
+ PNGExport( KoFilter *tqparent, const char *name, const TQStringList& );
virtual ~PNGExport() {}
- virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to );
+ virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to );
};
#endif // PNGEXPORT_H
diff --git a/filters/kformula/png/pngexportdia.cc b/filters/kformula/png/pngexportdia.cc
index 8de33b75..e366882c 100644
--- a/filters/kformula/png/pngexportdia.cc
+++ b/filters/kformula/png/pngexportdia.cc
@@ -17,15 +17,15 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpaintdevice.h>
-#include <qrect.h>
-#include <qvbuttongroup.h>
-#include <qwidget.h>
+#include <tqcheckbox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpaintdevice.h>
+#include <tqrect.h>
+#include <tqvbuttongroup.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -39,8 +39,8 @@
#include "pngexportdia.h"
#include <knuminput.h>
-PNGExportDia::PNGExportDia( const QDomDocument &dom, const QString &outFile, QWidget *parent, const char *name )
- : KDialogBase( parent, name, true, i18n("PNG Export Filter Parameters" ), Ok|Cancel ),
+PNGExportDia::PNGExportDia( const TQDomDocument &dom, const TQString &outFile, TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name, true, i18n("PNG Export Filter Parameters" ), Ok|Cancel ),
_fileOut( outFile )
{
kapp->restoreOverrideCursor();
@@ -54,7 +54,7 @@ PNGExportDia::PNGExportDia( const QDomDocument &dom, const QString &outFile, QWi
setupGUI();
- QRect rect = formula->boundingRect();
+ TQRect rect = formula->boundingRect();
realWidth = rect.width();
realHeight = rect.height();
widthEdit->setValue( realWidth );
@@ -63,8 +63,8 @@ PNGExportDia::PNGExportDia( const QDomDocument &dom, const QString &outFile, QWi
percHeightEdit->setValue( 100 );
connectAll();
- connect( proportional, SIGNAL( clicked() ),
- this, SLOT( proportionalClicked() ) );
+ connect( proportional, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( proportionalClicked() ) );
}
PNGExportDia::~PNGExportDia()
@@ -74,33 +74,33 @@ PNGExportDia::~PNGExportDia()
void PNGExportDia::connectAll()
{
- connect( widthEdit, SIGNAL( valueChanged(int) ),
- this, SLOT( widthChanged( int ) ) );
- connect( heightEdit, SIGNAL( valueChanged(int) ),
- this, SLOT( heightChanged( int ) ) );
- connect( percWidthEdit, SIGNAL( valueChanged(double) ),
- this, SLOT( percentWidthChanged( double ) ) );
- connect( percHeightEdit, SIGNAL( valueChanged(double) ),
- this, SLOT( percentHeightChanged(double ) ) );
+ connect( widthEdit, TQT_SIGNAL( valueChanged(int) ),
+ this, TQT_SLOT( widthChanged( int ) ) );
+ connect( heightEdit, TQT_SIGNAL( valueChanged(int) ),
+ this, TQT_SLOT( heightChanged( int ) ) );
+ connect( percWidthEdit, TQT_SIGNAL( valueChanged(double) ),
+ this, TQT_SLOT( percentWidthChanged( double ) ) );
+ connect( percHeightEdit, TQT_SIGNAL( valueChanged(double) ),
+ this, TQT_SLOT( percentHeightChanged(double ) ) );
}
void PNGExportDia::disconnectAll()
{
- disconnect( widthEdit, SIGNAL( valueChanged(int) ),
- this, SLOT( widthChanged( int ) ) );
- disconnect( heightEdit, SIGNAL( valueChanged(int) ),
- this, SLOT( heightChanged( int ) ) );
- disconnect( percWidthEdit, SIGNAL( valueChanged(double) ),
- this, SLOT( percentWidthChanged( double ) ) );
- disconnect( percHeightEdit, SIGNAL( valueChanged(double) ),
- this, SLOT( percentHeightChanged(double ) ) );
+ disconnect( widthEdit, TQT_SIGNAL( valueChanged(int) ),
+ this, TQT_SLOT( widthChanged( int ) ) );
+ disconnect( heightEdit, TQT_SIGNAL( valueChanged(int) ),
+ this, TQT_SLOT( heightChanged( int ) ) );
+ disconnect( percWidthEdit, TQT_SIGNAL( valueChanged(double) ),
+ this, TQT_SLOT( percentWidthChanged( double ) ) );
+ disconnect( percHeightEdit, TQT_SIGNAL( valueChanged(double) ),
+ this, TQT_SLOT( percentHeightChanged(double ) ) );
}
void PNGExportDia::widthChanged( int width )
{
disconnectAll();
- width = QMIN( width, realWidth*10 );
- width = QMAX( width, realWidth/10 );
+ width = TQMIN( width, realWidth*10 );
+ width = TQMAX( width, realWidth/10 );
double percent = 100.*static_cast<double>( width )/static_cast<double>( realWidth );
percWidthEdit->setValue( percent );
if ( proportional->isChecked() ) {
@@ -114,8 +114,8 @@ void PNGExportDia::widthChanged( int width )
void PNGExportDia::heightChanged( int height )
{
disconnectAll();
- height = QMIN( height, realHeight*10 );
- height = QMAX( height, realHeight/10 );
+ height = TQMIN( height, realHeight*10 );
+ height = TQMAX( height, realHeight/10 );
double percent = 100.*static_cast<double>( height )/static_cast<double>( realHeight );
percHeightEdit->setValue( percent );
if ( proportional->isChecked() ) {
@@ -129,8 +129,8 @@ void PNGExportDia::heightChanged( int height )
void PNGExportDia::percentWidthChanged( double percent )
{
disconnectAll();
- percent = QMIN( percent, 1000 );
- percent = QMAX( percent, 10 );
+ percent = TQMIN( percent, 1000 );
+ percent = TQMAX( percent, 10 );
int width = static_cast<int>( realWidth*percent/100. );
widthEdit->setValue( width );
if ( proportional->isChecked() ) {
@@ -144,8 +144,8 @@ void PNGExportDia::percentWidthChanged( double percent )
void PNGExportDia::percentHeightChanged( double percent )
{
disconnectAll();
- percent = QMIN( percent, 1000 );
- percent = QMAX( percent, 10 );
+ percent = TQMIN( percent, 1000 );
+ percent = TQMAX( percent, 10 );
if ( proportional->isChecked() ) {
int width = static_cast<int>( realWidth*percent/100. );
widthEdit->setValue( width );
@@ -161,8 +161,8 @@ void PNGExportDia::proportionalClicked()
if ( proportional->isChecked() ) {
disconnectAll();
int width = widthEdit->value( );
- width = QMIN( width, realWidth*10 );
- width = QMAX( width, realWidth/10 );
+ width = TQMIN( width, realWidth*10 );
+ width = TQMAX( width, realWidth/10 );
double percent = 100.*static_cast<double>( width )/static_cast<double>( realWidth );
percHeightEdit->setValue( percent );
int height = static_cast<int>( realHeight*percent/100. );
@@ -173,47 +173,47 @@ void PNGExportDia::proportionalClicked()
void PNGExportDia::setupGUI()
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QBoxLayout* mainLayout = new QVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() );
+ TQBoxLayout* mainLayout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() );
- proportional = new QCheckBox( page, "proportional" );
+ proportional = new TQCheckBox( page, "proportional" );
proportional->setText( i18n( "Keep ratio" ) );
proportional->setChecked( true );
mainLayout->addWidget( proportional );
- QLabel* height = new QLabel( page, "Height" );
+ TQLabel* height = new TQLabel( page, "Height" );
height->setText( i18n( "Height" ) );
widthEdit = new KIntNumInput( page, "widthEdit" );
- QLabel* width = new QLabel( page, "Width" );
+ TQLabel* width = new TQLabel( page, "Width" );
width->setText( i18n( "Width" ) );
heightEdit = new KIntNumInput( page, "heightEdit" );
- QGridLayout* layout1 = new QGridLayout;
- layout1->addWidget( height, 1, 0 );
- layout1->addWidget( widthEdit, 0, 1 );
- layout1->addWidget( width, 0, 0 );
- layout1->addWidget( heightEdit, 1, 1 );
+ TQGridLayout* tqlayout1 = new TQGridLayout;
+ tqlayout1->addWidget( height, 1, 0 );
+ tqlayout1->addWidget( widthEdit, 0, 1 );
+ tqlayout1->addWidget( width, 0, 0 );
+ tqlayout1->addWidget( heightEdit, 1, 1 );
- mainLayout->addLayout( layout1 );
+ mainLayout->addLayout( tqlayout1 );
- QLabel* percentHeight = new QLabel( page, "PercentHeight" );
+ TQLabel* percentHeight = new TQLabel( page, "PercentHeight" );
percentHeight->setText( i18n( "Height (%)" ) );
- QLabel* percentWidth = new QLabel( page, "PercentWidth" );
+ TQLabel* percentWidth = new TQLabel( page, "PercentWidth" );
percentWidth->setText( i18n( "Width (%)" ) );
percWidthEdit = new KDoubleNumInput( page, "percWidthEdit" );
percHeightEdit = new KDoubleNumInput( page, "percHeightEdit" );
- QGridLayout* layout2 = new QGridLayout;
- layout2->addWidget( percWidthEdit, 0, 1 );
- layout2->addWidget( percHeightEdit, 1, 1 );
- layout2->addWidget( percentHeight, 1, 0 );
- layout2->addWidget( percentWidth, 0, 0 );
+ TQGridLayout* tqlayout2 = new TQGridLayout;
+ tqlayout2->addWidget( percWidthEdit, 0, 1 );
+ tqlayout2->addWidget( percHeightEdit, 1, 1 );
+ tqlayout2->addWidget( percentHeight, 1, 0 );
+ tqlayout2->addWidget( percentWidth, 0, 0 );
- mainLayout->addLayout( layout2 );
+ mainLayout->addLayout( tqlayout2 );
- /* Display the main layout */
+ /* Display the main tqlayout */
mainLayout->addStretch( 5 );
mainLayout->activate();
}
@@ -223,7 +223,7 @@ void PNGExportDia::slotOk()
{
hide();
//doc->setZoomAndResolution( 100, 600, 600 );
- //doc->setZoomAndResolution( 1000, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() );
+ //doc->setZoomAndResolution( 1000, TQPaintDevice::x11AppDpiX(), TQPaintDevice::x11AppDpiY() );
//doc->newZoomAndResolution( false, false );
int width = widthEdit->value();
int height = heightEdit->value();
@@ -232,7 +232,7 @@ void PNGExportDia::slotOk()
// << endl;
// width = realWidth;
// height = realHeight;
- QImage image = formula->drawImage( width, height );
+ TQImage image = formula->drawImage( width, height );
if ( !image.save( _fileOut, "PNG" ) ) {
KMessageBox::error( 0, i18n( "Failed to write file." ), i18n( "PNG Export Error" ) );
}
diff --git a/filters/kformula/png/pngexportdia.h b/filters/kformula/png/pngexportdia.h
index 3957ef88..4d04d429 100644
--- a/filters/kformula/png/pngexportdia.h
+++ b/filters/kformula/png/pngexportdia.h
@@ -20,8 +20,8 @@
#ifndef PNGEXPORTDIA_H
#define PNGEXPORTDIA_H
-class QCheckBox;
-class QString;
+class TQCheckBox;
+class TQString;
class KIntNumInput;
class KDoubleNumInput;
@@ -30,7 +30,7 @@ namespace KFormula {
class DocumentWrapper;
}
-#include <qdom.h>
+#include <tqdom.h>
#include <kdialogbase.h>
@@ -38,9 +38,10 @@ namespace KFormula {
class PNGExportDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- PNGExportDia( const QDomDocument &dom, const QString &outFile, QWidget *parent=0L, const char *name=0L );
+ PNGExportDia( const TQDomDocument &dom, const TQString &outFile, TQWidget *tqparent=0L, const char *name=0L );
~PNGExportDia();
public slots:
@@ -65,13 +66,13 @@ private:
int realWidth;
int realHeight;
- QString _fileOut;
- QByteArray _arrayOut;
+ TQString _fileOut;
+ TQByteArray _arrayOut;
KFormula::Container* formula;
KFormula::DocumentWrapper* wrapper;
- QCheckBox* proportional;
+ TQCheckBox* proportional;
KIntNumInput* widthEdit;
KIntNumInput* heightEdit;
KDoubleNumInput* percWidthEdit;
diff --git a/filters/kformula/svg/svgexport.cc b/filters/kformula/svg/svgexport.cc
index 46177a9a..25758e82 100644
--- a/filters/kformula/svg/svgexport.cc
+++ b/filters/kformula/svg/svgexport.cc
@@ -18,8 +18,8 @@
Boston, MA 02110-1301 USA.
*/
-#include <qpicture.h>
-#include <qpainter.h>
+#include <tqpicture.h>
+#include <tqpainter.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -38,7 +38,7 @@
typedef KGenericFactory<SvgExport, KoFilter> SvgExportFactory;
K_EXPORT_COMPONENT_FACTORY( libkfosvgexport, SvgExportFactory( "svgexport" ) )
-SvgExport::SvgExport(KoFilter *, const char *, const QStringList&)
+SvgExport::SvgExport(KoFilter *, const char *, const TQStringList&)
: KoFilter()
{
}
@@ -48,8 +48,8 @@ SvgExport::~SvgExport()
}
-KoFilter::ConversionStatus
-SvgExport::convert(const QCString& from, const QCString& to)
+KoFilter::ConversiontqStatus
+SvgExport::convert(const TQCString& from, const TQCString& to)
{
// Check for proper conversion.
if ( from != "application/x-kformula" || to != "image/svg+xml" )
@@ -64,9 +64,9 @@ SvgExport::convert(const QCString& from, const QCString& to)
}
// Get the XML tree.
- QDomDocument domIn;
+ TQDomDocument domIn;
domIn.setContent( storeIn );
- QDomElement docNode = domIn.documentElement();
+ TQDomElement docNode = domIn.documentElement();
// Read the document from the XML tree.
KFormula::DocumentWrapper* wrapper = new KFormula::DocumentWrapper( kapp->config(), 0 );
@@ -81,9 +81,9 @@ SvgExport::convert(const QCString& from, const QCString& to)
}
// Draw the actual bitmap.
- QPicture picture;
- QPainter painter(&picture);
- QRect rect(QPoint(0, 0), QPoint(500, 400));
+ TQPicture picture;
+ TQPainter painter(&picture);
+ TQRect rect(TQPoint(0, 0), TQPoint(500, 400));
formula->draw( painter, rect, false );
painter.end();
diff --git a/filters/kformula/svg/svgexport.h b/filters/kformula/svg/svgexport.h
index 085654a0..98d4d8d4 100644
--- a/filters/kformula/svg/svgexport.h
+++ b/filters/kformula/svg/svgexport.h
@@ -26,12 +26,13 @@
class SvgExport : public KoFilter
{
Q_OBJECT
+ TQ_OBJECT
public:
- SvgExport(KoFilter *parent, const char *name, const QStringList&);
+ SvgExport(KoFilter *tqparent, const char *name, const TQStringList&);
virtual ~SvgExport();
- virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to);
+ virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to);
};
#endif // __SVGEXPORT_H__