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.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kjsembed/bindings/image_imp.cpp b/kjsembed/bindings/image_imp.cpp
index 8c79e946..eb428ab3 100644
--- a/kjsembed/bindings/image_imp.cpp
+++ b/kjsembed/bindings/image_imp.cpp
@@ -43,7 +43,7 @@ ImageImp::~ImageImp()
void ImageImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) {
- if( !JSProxy::checkType(object, JSProxy::ValueProxy, "TTQImage") ) 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, "TTQImage") ) 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: {
- TTQString arg0 = extractTQString( exec, args, 0);
+ TQString arg0 = extractTQString( exec, args, 0);
retValue = KJS::Boolean( load( arg0 ));
break;
}
case Methodsave: {
- TTQString arg0 = extractTQString( exec, args, 0);
- TTQString arg1 = extractTQString( exec, args, 1);
+ TQString arg0 = extractTQString( exec, args, 0);
+ TQString arg1 = extractTQString( exec, args, 1);
retValue = KJS::Boolean( save( arg0, arg1 ));
break;
}
case MethodsetFormat: {
- TTQString arg0 = extractTQString( exec, args, 0);
+ TQString arg0 = extractTQString( 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: {
- TTQPixmap pix = extractTQPixmap(exec, args, 0);
+ TQPixmap pix = extractTQPixmap(exec, args, 0);
setPixmap(pix);
break;
}
@@ -184,50 +184,50 @@ bool ImageImp::isOk() const {
return !img.isNull();
}
-TTQPixmap ImageImp::pixmap() const {
+TQPixmap ImageImp::pixmap() const {
if ( img.isNull() )
- return TTQPixmap();
+ return TQPixmap();
- TTQPixmap pix;
+ TQPixmap pix;
pix.convertFromImage( img );
return pix;
}
-void ImageImp::setPixmap( const TTQPixmap &pix ) {
+void ImageImp::setPixmap( const TQPixmap &pix ) {
if ( img.isNull() )
- img = TTQImage();
+ img = TQImage();
img = pix.convertToImage();
}
-TTQString ImageImp::format() const {
+TQString ImageImp::format() const {
return fmt;
}
-TTQString ImageImp::filename() const {
+TQString ImageImp::filename() const {
return nm;
}
-void ImageImp::setFormat( const TTQString &f ) {
+void ImageImp::setFormat( const TQString &f ) {
fmt = f;
}
-bool ImageImp::load( const TTQString &filename ) {
+bool ImageImp::load( const TQString &filename ) {
if ( !img.isNull() )
- img = TTQImage();
+ img = TQImage();
nm = filename;
- fmt = TTQImageIO::imageFormat( filename );
+ fmt = TQImageIO::imageFormat( filename );
bool ok = img.load( filename );
if ( !ok ) {
kdWarning() << "Error loading " << filename << endl;
- img = TTQImage();
+ img = TQImage();
}
return ok;
}
-bool ImageImp::save( const TTQString &filename, const TTQString &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, TTQImage::ScaleMin );
+ img = img.smoothScale( w, h, TQImage::ScaleMin );
}