summaryrefslogtreecommitdiffstats
path: root/lib/kformula/kformulamimesource.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kformula/kformulamimesource.cc')
-rw-r--r--lib/kformula/kformulamimesource.cc50
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/kformula/kformulamimesource.cc b/lib/kformula/kformulamimesource.cc
index a0438e5e..af727959 100644
--- a/lib/kformula/kformulamimesource.cc
+++ b/lib/kformula/kformulamimesource.cc
@@ -20,12 +20,12 @@
#include <iostream>
-#include <qpopupmenu.h>
-#include <qbuffer.h>
-#include <qcolor.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqbuffer.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kcommand.h>
@@ -39,7 +39,7 @@ KFORMULA_NAMESPACE_BEGIN
using namespace std;
-MimeSource::MimeSource(Document* doc, const QDomDocument& formula)
+MimeSource::MimeSource(Document* doc, const TQDomDocument& formula)
: formulaDocument( doc ), document(formula)
{
// The query for text/plain comes very often. So make sure
@@ -48,7 +48,7 @@ MimeSource::MimeSource(Document* doc, const QDomDocument& formula)
rootElement = new FormulaElement(this);
FormulaCursor cursor(rootElement);
- QPtrList<BasicElement> list;
+ TQPtrList<BasicElement> list;
list.setAutoDelete(true);
if ( cursor.buildElementsFromDom( document.documentElement(), list ) ) {
cursor.insert(list);
@@ -87,27 +87,27 @@ const char* MimeSource::format( int n ) const
bool MimeSource::provides( const char * format) const
{
//This is not completed
- if(QString(format)==selectionMimeType())
+ if(TQString(format)==selectionMimeType())
return true;
- else if(QString(format)=="image/ppm")
+ else if(TQString(format)=="image/ppm")
return true;
- else if(QString(format)=="text/plain")
+ else if(TQString(format)=="text/plain")
return true;
- else if(QString(format)=="text/x-tex")
+ else if(TQString(format)=="text/x-tex")
return true;
else
return false;
}
-QByteArray MimeSource::encodedData ( const char *format ) const
+TQByteArray MimeSource::tqencodedData ( const char *format ) const
{
- QString fmt=format; //case sensitive?
+ TQString fmt=format; //case sensitive?
if ((fmt=="text/plain") || (fmt=="text/x-tex"))
return latexString;
if (fmt==selectionMimeType()) {
- QByteArray d=document.toCString();
+ TQByteArray d=document.toCString();
d.truncate(d.size()-1);
return d;
}
@@ -119,31 +119,31 @@ QByteArray MimeSource::encodedData ( const char *format ) const
//context.setResolution(5, 5);
rootElement->calcSizes(context);
- QRect rect(rootElement->getX(), rootElement->getY(),
+ TQRect rect(rootElement->getX(), rootElement->getY(),
rootElement->getWidth(), rootElement->getHeight());
- QPixmap pm( context.layoutUnitToPixelX( rootElement->getWidth() ),
- context.layoutUnitToPixelY( rootElement->getHeight() ) );
+ TQPixmap pm( context.tqlayoutUnitToPixelX( rootElement->getWidth() ),
+ context.tqlayoutUnitToPixelY( rootElement->getHeight() ) );
pm.fill();
- QPainter paint(&pm);
+ TQPainter paint(&pm);
rootElement->draw(paint, rect, context);
paint.end();
- QByteArray d;
- QBuffer buff(d);
+ TQByteArray d;
+ TQBuffer buff(d);
buff.open(IO_WriteOnly);
- QImageIO io(&buff,"PPM");
- QImage ima=pm.convertToImage();
+ TQImageIO io(&buff,"PPM");
+ TQImage ima=pm.convertToImage();
ima.detach();
io.setImage(ima);
if(!io.write())
- return QByteArray();
+ return TQByteArray();
buff.close();
return d;
}
- return QByteArray();
+ return TQByteArray();
}
const SymbolTable& MimeSource::getSymbolTable() const