summaryrefslogtreecommitdiffstats
path: root/kjsembed/bindings/image_imp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/bindings/image_imp.cpp')
-rw-r--r--kjsembed/bindings/image_imp.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/kjsembed/bindings/image_imp.cpp b/kjsembed/bindings/image_imp.cpp
index 7f6abdca..65dd10eb 100644
--- a/kjsembed/bindings/image_imp.cpp
+++ b/kjsembed/bindings/image_imp.cpp
@@ -19,12 +19,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kjsembed/global.h>
#include <kjsembed/jsopaqueproxy.h>
#include <kjsembed/jsvalueproxy.h>
#include <kjsembed/jsbinding.h>
-#include <qvariant.h>
+#include <tqvariant.h>
#include "image_imp.h"
@@ -43,7 +43,7 @@ ImageImp::~ImageImp()
void ImageImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) {
- if( !JSProxy::checkType(object, JSProxy::ValueProxy, "QImage") ) return;
+ if( !JSProxy::checkType(object, JSProxy::ValueProxy, "TQImage") ) return;
JSProxy::MethodTable methods[] = {
{ Methodwidth, "width" },
@@ -68,7 +68,7 @@ void ImageImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) {
}
KJS::Value ImageImp::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args ) {
- if( !JSProxy::checkType(self, JSProxy::ValueProxy, "QImage") ) return KJS::Value();
+ if( !JSProxy::checkType(self, JSProxy::ValueProxy, "TQImage") ) return KJS::Value();
JSValueProxy *op = JSProxy::toValueProxy( self.imp() );
img = op->toVariant().toImage();
@@ -99,18 +99,18 @@ KJS::Value ImageImp::call( KJS::ExecState *exec, KJS::Object &self, const KJS::L
}
case Methodload: {
- QString arg0 = extractQString( exec, args, 0);
+ TQString arg0 = extractQString( exec, args, 0);
retValue = KJS::Boolean( load( arg0 ));
break;
}
case Methodsave: {
- QString arg0 = extractQString( exec, args, 0);
- QString arg1 = extractQString( exec, args, 1);
+ TQString arg0 = extractQString( exec, args, 0);
+ TQString arg1 = extractQString( exec, args, 1);
retValue = KJS::Boolean( save( arg0, arg1 ));
break;
}
case MethodsetFormat: {
- QString arg0 = extractQString( exec, args, 0);
+ TQString arg0 = extractQString( exec, args, 0);
setFormat( arg0 );
break;
}
@@ -127,7 +127,7 @@ KJS::Value ImageImp::call( KJS::ExecState *exec, KJS::Object &self, const KJS::L
break;
}
case MethodsetPixmap: {
- QPixmap pix = extractQPixmap(exec, args, 0);
+ TQPixmap pix = extractQPixmap(exec, args, 0);
setPixmap(pix);
break;
}
@@ -184,50 +184,50 @@ bool ImageImp::isOk() const {
return !img.isNull();
}
-QPixmap ImageImp::pixmap() const {
+TQPixmap ImageImp::pixmap() const {
if ( img.isNull() )
- return QPixmap();
+ return TQPixmap();
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage( img );
return pix;
}
-void ImageImp::setPixmap( const QPixmap &pix ) {
+void ImageImp::setPixmap( const TQPixmap &pix ) {
if ( img.isNull() )
- img = QImage();
+ img = TQImage();
img = pix.convertToImage();
}
-QString ImageImp::format() const {
+TQString ImageImp::format() const {
return fmt;
}
-QString ImageImp::filename() const {
+TQString ImageImp::filename() const {
return nm;
}
-void ImageImp::setFormat( const QString &f ) {
+void ImageImp::setFormat( const TQString &f ) {
fmt = f;
}
-bool ImageImp::load( const QString &filename ) {
+bool ImageImp::load( const TQString &filename ) {
if ( !img.isNull() )
- img = QImage();
+ img = TQImage();
nm = filename;
- fmt = QImageIO::imageFormat( filename );
+ fmt = TQImageIO::imageFormat( filename );
bool ok = img.load( filename );
if ( !ok ) {
kdWarning() << "Error loading " << filename << endl;
- img = QImage();
+ img = TQImage();
}
return ok;
}
-bool ImageImp::save( const QString &filename, const QString &fmt ) {
+bool ImageImp::save( const TQString &filename, const TQString &fmt ) {
if ( img.isNull() ) {
kdWarning() << "Attempt to save a null image to '" << filename << "'" << endl;
@@ -250,7 +250,7 @@ void ImageImp::smoothScale( int w, int h ) {
void ImageImp::smoothScaleMin( int w, int h ) {
if ( img.isNull())
return;
- img = img.smoothScale( w, h, QImage::ScaleMin );
+ img = img.smoothScale( w, h, TQImage::ScaleMin );
}