summaryrefslogtreecommitdiffstats
path: root/kjsembed/bindings/image_imp.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:44:01 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:44:01 +0000
commit479f5f799523bffbcc83dff581a2299c047c6fff (patch)
tree186aae707ed02aac6c7cab2fb14e97f72aca5e36 /kjsembed/bindings/image_imp.cpp
parentf1dbff6145c98324ff82e34448b7483727e8ace4 (diff)
downloadtdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.tar.gz
tdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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 );
}