diff options
author | Timothy Pearson <[email protected]> | 2012-02-28 22:31:39 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-02-28 22:31:39 -0600 |
commit | 41bb408dde90e755b07cd2ab8a9bdec7548c84b0 (patch) | |
tree | 6d4d5407c000add30aa78630e009c0e5d633e440 /src/kernel/qpixmap_x11.cpp | |
parent | 1740cd279522c060e738bbbffacab83355d2b794 (diff) | |
download | tqt3-41bb408dde90e755b07cd2ab8a9bdec7548c84b0.tar.gz tqt3-41bb408dde90e755b07cd2ab8a9bdec7548c84b0.zip |
Automated conversion from qt3
Diffstat (limited to 'src/kernel/qpixmap_x11.cpp')
-rw-r--r-- | src/kernel/qpixmap_x11.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/src/kernel/qpixmap_x11.cpp b/src/kernel/qpixmap_x11.cpp index cc8da0d3c..328f78175 100644 --- a/src/kernel/qpixmap_x11.cpp +++ b/src/kernel/qpixmap_x11.cpp @@ -141,7 +141,7 @@ static bool qt_create_mitshm_buffer( const TQPaintDevice* dev, int w, int h ) } else { if ( !XShmQueryVersion(dpy, &major, &minor, &pixmaps_ok) ) return FALSE; // MIT Shm not supported - qAddPostRoutine( qt_cleanup_mitshm ); + tqAddPostRoutine( qt_cleanup_mitshm ); xshminit = TRUE; } @@ -350,14 +350,14 @@ static void build_scale_table( uint **table, uint nBits ) { if ( nBits > 7 ) { #if defined(QT_CHECK_RANGE) - qWarning( "build_scale_table: internal error, nBits = %i", nBits ); + tqWarning( "build_scale_table: internal error, nBits = %i", nBits ); #endif return; } if (!*table) { static bool firstTable = TRUE; if ( firstTable ) { - qAddPostRoutine( cleanup_scale_tables ); + tqAddPostRoutine( cleanup_scale_tables ); firstTable = FALSE; } *table = new uint[256]; @@ -371,8 +371,8 @@ static void build_scale_table( uint **table, uint nBits ) static int defaultScreen = -1; -extern bool qt_use_xrender; // defined in qapplication_x11.cpp -extern bool qt_has_xft; // defined in qfont_x11.cpp +extern bool tqt_use_xrender; // defined in qapplication_x11.cpp +extern bool tqt_has_xft; // defined in qfont_x11.cpp #ifndef QT_NO_XFTFREETYPE #ifndef QT_XFT2 @@ -394,7 +394,7 @@ void TQPixmap::init( int w, int h, int d, bool bitmap, Optimization optim ) { #if defined(QT_CHECK_STATE) if ( tqApp->type() == TQApplication::Tty ) { - qWarning( "TQPixmap: Cannot create a TQPixmap when no GUI " + tqWarning( "TQPixmap: Cannot create a TQPixmap when no GUI " "is being used" ); } #endif @@ -441,7 +441,7 @@ void TQPixmap::init( int w, int h, int d, bool bitmap, Optimization optim ) rendhd = 0; #if defined(QT_CHECK_RANGE) if ( !make_null ) - qWarning( "TQPixmap: Invalid pixmap parameters" ); + tqWarning( "TQPixmap: Invalid pixmap parameters" ); #endif return; } @@ -451,7 +451,7 @@ void TQPixmap::init( int w, int h, int d, bool bitmap, Optimization optim ) w, h, data->d ); #ifndef QT_NO_XFTFREETYPE - if ( qt_has_xft ) { + if ( tqt_has_xft ) { if ( data->d == 1 ) { rendhd = (HANDLE) XftDrawCreateBitmap( x11Display(), hd ); } else { @@ -521,7 +521,7 @@ TQPixmap::TQPixmap( int w, int h, const uchar *bits, bool isXbitmap) (char *)bits, w, h ); #ifndef QT_NO_XFTFREETYPE - if ( qt_has_xft ) + if ( tqt_has_xft ) rendhd = (HANDLE) XftDrawCreateBitmap (x11Display (), hd); #endif // QT_NO_XFTFREETYPE @@ -640,7 +640,7 @@ void TQPixmap::fill( const TQColor &fillColor ) if ( isNull() ) return; detach(); // detach other references - GC gc = qt_xget_temp_gc( x11Screen(), depth()==1 ); + GC gc = tqt_xget_temp_gc( x11Screen(), depth()==1 ); XSetForeground( x11Display(), gc, fillColor.pixel(x11Screen()) ); XFillRectangle( x11Display(), hd, gc, 0, 0, width(), height() ); } @@ -690,7 +690,7 @@ int TQPixmap::metric( int m ) const default: val = 0; #if defined(QT_CHECK_RANGE) - qWarning( "TQPixmap::metric: Invalid metric command" ); + tqWarning( "TQPixmap::metric: Invalid metric command" ); #endif } } @@ -889,7 +889,7 @@ TQImage TQPixmap::convertToImage() const y = h; pixel = 0; // eliminate compiler warning #if defined(QT_CHECK_RANGE) - qWarning( "TQPixmap::convertToImage: Invalid depth %d", + tqWarning( "TQPixmap::convertToImage: Invalid depth %d", bppc ); #endif } @@ -938,7 +938,7 @@ TQImage TQPixmap::convertToImage() const } else { /* Typically 2 or 4 bits display depth */ #if defined(QT_CHECK_RANGE) - qWarning( "TQPixmap::convertToImage: Display not supported (bpp=%d)", + tqWarning( "TQPixmap::convertToImage: Display not supported (bpp=%d)", xi->bits_per_pixel ); #endif image.reset(); @@ -1098,7 +1098,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) { if ( img.isNull() ) { #if defined(QT_CHECK_NULL) - qWarning( "TQPixmap::convertFromImage: Cannot convert a null image" ); + tqWarning( "TQPixmap::convertFromImage: Cannot convert a null image" ); #endif return FALSE; } @@ -1219,7 +1219,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) bits, w, h ); #ifndef QT_NO_XFTFREETYPE - if ( qt_has_xft ) + if ( tqt_has_xft ) rendhd = (HANDLE) XftDrawCreateBitmap( x11Display(), hd ); #endif // QT_NO_XFTFREETYPE @@ -1352,7 +1352,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) int wordsize; bool bigendian; - qSysInfo( &wordsize, &bigendian ); + tqSysInfo( &wordsize, &bigendian ); bool same_msb_lsb = ( xi->byte_order == MSBFirst ) == ( bigendian ); if( bppc == 8 ) // 8 bit @@ -1375,7 +1375,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) else mode = bppc == 33 ? BPP32_LSB : BPP32_MSB; } else - qFatal("Logic error 3"); + tqFatal("Logic error 3"); #define GET_PIXEL \ int pixel; \ @@ -1494,7 +1494,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) ) break; default: - qFatal("Logic error"); + tqFatal("Logic error"); } } else { switch ( mode ) { @@ -1591,7 +1591,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) ) break; default: - qFatal("Logic error 2"); + tqFatal("Logic error 2"); } } xi->data = (char *)newbits; @@ -1756,7 +1756,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) newbits = (uchar *)newerbits; } else if ( xi->bits_per_pixel != 8 ) { #if defined(QT_CHECK_RANGE) - qWarning( "TQPixmap::convertFromImage: Display not supported " + tqWarning( "TQPixmap::convertFromImage: Display not supported " "(bpp=%d)", xi->bits_per_pixel ); #endif } @@ -1789,7 +1789,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) w, h, dd ); #ifndef QT_NO_XFTFREETYPE - if ( qt_has_xft ) { + if ( tqt_has_xft ) { if ( data->d == 1 ) { rendhd = (HANDLE) XftDrawCreateBitmap( x11Display (), hd ); } else { @@ -1803,11 +1803,11 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) #ifdef QT_MITSHM_CONVERSIONS if( mitshm_ximage ) - XShmPutImage( dpy, hd, qt_xget_readonly_gc( x11Screen(), FALSE ), + XShmPutImage( dpy, hd, tqt_xget_readonly_gc( x11Screen(), FALSE ), xi, 0, 0, 0, 0, w, h, False ); else #endif - XPutImage( dpy, hd, qt_xget_readonly_gc( x11Screen(), FALSE ), + XPutImage( dpy, hd, tqt_xget_readonly_gc( x11Screen(), FALSE ), xi, 0, 0, 0, 0, w, h ); data->w = w; @@ -1838,7 +1838,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) } } - if (qt_use_xrender && qt_has_xft && alphamap) { + if (tqt_use_xrender && tqt_has_xft && alphamap) { data->alphapm = new TQPixmap; // create a null pixmap // setup pixmap data @@ -2023,7 +2023,7 @@ TQPixmap TQPixmap::grabWindow( WId window, int x, int y, int w, int h ) pm.data->uninit = FALSE; pm.x11SetScreen( scr ); - GC gc = qt_xget_temp_gc( scr, FALSE ); + GC gc = tqt_xget_temp_gc( scr, FALSE ); XSetSubwindowMode( dpy, gc, IncludeInferiors ); XCopyArea( dpy, window, pm.handle(), gc, x, y, w, h, 0, 0 ); XSetSubwindowMode( dpy, gc, ClipByChildren ); @@ -2155,17 +2155,17 @@ TQPixmap TQPixmap::xForm( const TQWMatrix &matrix ) const // #define QT_DEBUG_XIMAGE #if defined(QT_DEBUG_XIMAGE) - qDebug( "----IMAGE--INFO--------------" ); - qDebug( "width............. %d", xi->width ); - qDebug( "height............ %d", xi->height ); - qDebug( "xoffset........... %d", xi->xoffset ); - qDebug( "format............ %d", xi->format ); - qDebug( "byte order........ %d", xi->byte_order ); - qDebug( "bitmap unit....... %d", xi->bitmap_unit ); - qDebug( "bitmap bit order.. %d", xi->bitmap_bit_order ); - qDebug( "depth............. %d", xi->depth ); - qDebug( "bytes per line.... %d", xi->bytes_per_line ); - qDebug( "bits per pixel.... %d", xi->bits_per_pixel ); + tqDebug( "----IMAGE--INFO--------------" ); + tqDebug( "width............. %d", xi->width ); + tqDebug( "height............ %d", xi->height ); + tqDebug( "xoffset........... %d", xi->xoffset ); + tqDebug( "format............ %d", xi->format ); + tqDebug( "byte order........ %d", xi->byte_order ); + tqDebug( "bitmap unit....... %d", xi->bitmap_unit ); + tqDebug( "bitmap bit order.. %d", xi->bitmap_bit_order ); + tqDebug( "depth............. %d", xi->depth ); + tqDebug( "bytes per line.... %d", xi->bytes_per_line ); + tqDebug( "bits per pixel.... %d", xi->bits_per_pixel ); #endif int type; @@ -2188,7 +2188,7 @@ TQPixmap TQPixmap::xForm( const TQWMatrix &matrix ) const if ( !qt_xForm_helper( mat, xi->xoffset, type, bpp, dptr, xbpl, p_inc, h, sptr, sbpl, ws, hs ) ){ #if defined(QT_CHECK_RANGE) - qWarning( "TQPixmap::xForm: display not supported (bpp=%d)",bpp); + tqWarning( "TQPixmap::xForm: display not supported (bpp=%d)",bpp); #endif TQPixmap pm; return pm; @@ -2213,7 +2213,7 @@ TQPixmap TQPixmap::xForm( const TQWMatrix &matrix ) const } return pm; } else { // color pixmap - GC gc = qt_xget_readonly_gc( x11Screen(), FALSE ); + GC gc = tqt_xget_readonly_gc( x11Screen(), FALSE ); TQPixmap pm( w, h ); pm.data->uninit = FALSE; pm.x11SetScreen( x11Screen() ); @@ -2234,7 +2234,7 @@ TQPixmap TQPixmap::xForm( const TQWMatrix &matrix ) const pm.setMask( data->mask->xForm(matrix) ); #ifndef QT_NO_XFTFREETYPE - if ( qt_use_xrender && qt_has_xft && data->alphapm ) { // xform the alpha channel + if ( tqt_use_xrender && tqt_has_xft && data->alphapm ) { // xform the alpha channel XImage *axi = 0; if ((axi = XGetImage(x11Display(), data->alphapm->handle(), 0, 0, ws, hs, AllPlanes, ZPixmap))) { @@ -2325,7 +2325,7 @@ void TQPixmap::x11SetScreen( int screen ) return; } #if 0 - qDebug("TQPixmap::x11SetScreen for %p from %d to %d. Size is %d/%d", data, x11Screen(), screen, width(), height() ); + tqDebug("TQPixmap::x11SetScreen for %p from %d to %d. Size is %d/%d", data, x11Screen(), screen, width(), height() ); #endif TQImage img = convertToImage(); @@ -2415,8 +2415,8 @@ Q_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy, #ifndef QT_NO_XFTFREETYPE // copy alpha data - extern bool qt_use_xrender; // from qapplication_x11.cpp - if ( ! qt_use_xrender || ! src->data->alphapm ) + extern bool tqt_use_xrender; // from qapplication_x11.cpp + if ( ! tqt_use_xrender || ! src->data->alphapm ) return; if ( sw < 0 ) |