diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kformula/kformula_doc.cc | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-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 'kformula/kformula_doc.cc')
-rw-r--r-- | kformula/kformula_doc.cc | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/kformula/kformula_doc.cc b/kformula/kformula_doc.cc index 4e83baf8..5b605e60 100644 --- a/kformula/kformula_doc.cc +++ b/kformula/kformula_doc.cc @@ -23,15 +23,15 @@ #include "kformula_view.h" #include "kformula_factory.h" -#include <qbitmap.h> -#include <qcolor.h> -#include <qdom.h> -#include <qpainter.h> -#include <qpopupmenu.h> -#include <qprinter.h> -#include <qstring.h> -#include <qwmatrix.h> -#include <qfile.h> +#include <tqbitmap.h> +#include <tqcolor.h> +#include <tqdom.h> +#include <tqpainter.h> +#include <tqpopupmenu.h> +#include <tqprinter.h> +#include <tqstring.h> +#include <tqwmatrix.h> +#include <tqfile.h> #include <config.h> #include <unistd.h> @@ -55,8 +55,8 @@ #include <kformuladocument.h> -KFormulaDoc::KFormulaDoc(QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, bool singleViewMode) - : KoDocument(parentWidget, widgetName, parent, name, singleViewMode) +KFormulaDoc::KFormulaDoc(TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, bool singleViewMode) + : KoDocument(tqparentWidget, widgetName, tqparent, name, singleViewMode) { setInstance(KFormulaFactory::global(), false); //kdDebug(39001) << "General Settings" << endl; @@ -72,8 +72,8 @@ KFormulaDoc::KFormulaDoc(QWidget *parentWidget, const char *widgetName, QObject* document->setEnabled( true ); // the modify flag - connect(history, SIGNAL(commandExecuted()), this, SLOT(commandExecuted())); - connect(history, SIGNAL(documentRestored()), this, SLOT(documentRestored())); + connect(history, TQT_SIGNAL(commandExecuted()), this, TQT_SLOT(commandExecuted())); + connect(history, TQT_SIGNAL(documentRestored()), this, TQT_SLOT(documentRestored())); dcopObject(); } @@ -96,15 +96,15 @@ bool KFormulaDoc::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) KTempFile contentTmpFile; contentTmpFile.setAutoDelete( true ); - QFile* tmpFile = contentTmpFile.file(); + TQFile* tmpFile = contentTmpFile.file(); //todo save content - QTextStream stream(tmpFile); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream stream(tmpFile); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); formula->saveMathML( stream, true ); tmpFile->close(); - contentWriter->addCompleteElement( tmpFile ); + contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) ); contentTmpFile.close(); @@ -123,14 +123,14 @@ bool KFormulaDoc::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) } -QDomDocument KFormulaDoc::saveXML() +TQDomDocument KFormulaDoc::saveXML() { - QDomDocument doc = document->saveXML(); + TQDomDocument doc = document->saveXML(); history->documentSaved(); return doc; } -bool KFormulaDoc::loadOasis( const QDomDocument& doc, KoOasisStyles&, const QDomDocument&, KoStore* ) +bool KFormulaDoc::loadOasis( const TQDomDocument& doc, KoOasisStyles&, const TQDomDocument&, KoStore* ) { // we don't have style into this format // we don't have settings into kformula (for the moment) @@ -144,7 +144,7 @@ bool KFormulaDoc::loadOasis( const QDomDocument& doc, KoOasisStyles&, const QDom return false; } -bool KFormulaDoc::loadXML(QIODevice *, const QDomDocument& doc) +bool KFormulaDoc::loadXML(TQIODevice *, const TQDomDocument& doc) { if ( doc.doctype().name().lower() == "math" || doc.documentElement().tagName().lower() == "math" ) @@ -166,16 +166,16 @@ bool KFormulaDoc::loadXML(QIODevice *, const QDomDocument& doc) * It is reimplemented to handle the special case of MathML, since it is * a native format but not compressed. */ -bool KFormulaDoc::saveNativeFormat( const QString & file ) +bool KFormulaDoc::saveNativeFormat( const TQString & file ) { - QCString mimeType = outputMimeType(); - bool mathml = !mimeType.isEmpty() && mimeType.contains( "mathml", false ); + TQCString mimeType = outputMimeType(); + bool mathml = !mimeType.isEmpty() && mimeType.tqcontains( "mathml", false ); if ( mathml ) { - QFile f( file ); + TQFile f( file ); if ( f.open( IO_WriteOnly | IO_Translate ) ) { - QTextStream stream( &f ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream stream( &f ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); formula->saveMathML( stream, false ); f.close(); return true; @@ -183,11 +183,11 @@ bool KFormulaDoc::saveNativeFormat( const QString & file ) else return false; } - // If it's not MathML, let the parent handle it + // If it's not MathML, let the tqparent handle it return KoDocument::saveNativeFormat( file ); } -KoView* KFormulaDoc::createViewInstance(QWidget* _parent, const char *name) +KoView* KFormulaDoc::createViewInstance(TQWidget* _parent, const char *name) { return new KFormulaPartView(this, _parent, name); } @@ -206,42 +206,42 @@ void KFormulaDoc::documentRestored() } -bool KFormulaDoc::initDoc(InitDocFlags /*flags*/, QWidget* /*parentWidget*/) +bool KFormulaDoc::initDoc(InitDocFlags /*flags*/, TQWidget* /*tqparentWidget*/) { // If nothing is loaded, do initialize here return TRUE; } -void KFormulaDoc::showStartUpWidget(KoMainWindow* parent, bool /*alwaysShow*/) +void KFormulaDoc::showStartUpWidget(KoMainWindow* tqparent, bool /*alwaysShow*/) { - parent->setRootDocument( this ); + tqparent->setRootDocument( this ); } -bool KFormulaDoc::showEmbedInitDialog(QWidget* /*parent*/) +bool KFormulaDoc::showEmbedInitDialog(TQWidget* /*tqparent*/) { return true; } -void KFormulaDoc::paintContent(QPainter& painter, const QRect& rect, bool transparent, double zoomX, double zoomY) +void KFormulaDoc::paintContent(TQPainter& painter, const TQRect& rect, bool transparent, double zoomX, double zoomY) { // ####### handle transparency and zoom // Need to draw only the document rectangle described in the parameter rect. - bool forPrint = painter.device() && painter.device()->devType() == QInternal::Printer; + bool forPrint = painter.device() && painter.device()->devType() == TQInternal::Printer; document->setZoomAndResolution( 100, zoomX, zoomY, true, forPrint ); if ( !transparent ) { - painter.fillRect( rect, Qt::white ); + painter.fillRect( rect, TQt::white ); } formula->draw( painter, rect ); } -QString KFormulaDoc::configFile() const +TQString KFormulaDoc::configFile() const { // return readConfigFile( locate( "data", "kformula/kformula.rc", // KFormulaFactory::global() ) ); // return readConfigFile( "kformula.rc" ); - return QString::null; + return TQString(); } #include "kformula_doc.moc" |