From 87d29563e3ccdeb7fea0197e262e667ef323ff9c Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 7 Jul 2024 14:56:09 +0900 Subject: Rename utility class nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- src/kernel/ntqaccessible.h | 2 +- src/kernel/ntqapplication.h | 2 +- src/kernel/ntqbitmap.h | 73 --------- src/kernel/ntqnetworkprotocol.h | 2 +- src/kernel/ntqpointarray.h | 2 +- src/kernel/ntqt.h | 22 +-- src/kernel/qapplication_x11.cpp | 4 +- src/kernel/qbitmap.cpp | 304 ----------------------------------- src/kernel/qclipboard_x11.cpp | 2 +- src/kernel/qcolor_x11.cpp | 2 +- src/kernel/qcursor.cpp | 2 +- src/kernel/qcursor_x11.cpp | 2 +- src/kernel/qdnd_x11.cpp | 6 +- src/kernel/qdrawutil.cpp | 2 +- src/kernel/qeventloop_unix.cpp | 2 +- src/kernel/qeventloop_unix_glib.cpp | 2 +- src/kernel/qeventloop_x11.cpp | 2 +- src/kernel/qeventloop_x11_glib.cpp | 2 +- src/kernel/qfont.cpp | 4 +- src/kernel/qfontengine_p.h | 2 +- src/kernel/qfontengine_x11.cpp | 4 +- src/kernel/qinputcontext_p.h | 2 +- src/kernel/qinternal_p.h | 2 +- src/kernel/qkeysequence.cpp | 2 +- src/kernel/qmetaobject.cpp | 2 +- src/kernel/qmovie.cpp | 2 +- src/kernel/qpaintdevice_x11.cpp | 2 +- src/kernel/qpainter.cpp | 4 +- src/kernel/qpainter_x11.cpp | 2 +- src/kernel/qpixmap.cpp | 2 +- src/kernel/qpixmap_x11.cpp | 2 +- src/kernel/qpixmapcache.cpp | 2 +- src/kernel/qprocess_unix.cpp | 2 +- src/kernel/qpsprinter.cpp | 10 +- src/kernel/qregion_x11.cpp | 2 +- src/kernel/qrichtext.cpp | 2 +- src/kernel/qrichtext_p.h | 4 +- src/kernel/qt_kernel.pri | 4 +- src/kernel/qt_pch.h | 2 +- src/kernel/qtranslator.cpp | 2 +- src/kernel/qvariant.cpp | 6 +- src/kernel/tqbitmap.cpp | 304 +++++++++++++++++++++++++++++++++++ src/kernel/tqbitmap.h | 73 +++++++++ src/kernel/tqdragobject.cpp | 2 +- src/kernel/tqiconset.cpp | 2 +- src/kernel/tqimage.cpp | 4 +- src/kernel/tqobject.cpp | 2 +- src/kernel/tqobjectdict.h | 2 +- src/kernel/tqstyle.cpp | 2 +- src/kernel/tqstylesheet.h | 2 +- src/kernel/tqttdeintegration_x11.cpp | 2 +- src/kernel/tqwidget_x11.cpp | 2 +- src/kernel/tqwidgetintdict.h | 2 +- 53 files changed, 451 insertions(+), 451 deletions(-) delete mode 100644 src/kernel/ntqbitmap.h delete mode 100644 src/kernel/qbitmap.cpp create mode 100644 src/kernel/tqbitmap.cpp create mode 100644 src/kernel/tqbitmap.h (limited to 'src/kernel') diff --git a/src/kernel/ntqaccessible.h b/src/kernel/ntqaccessible.h index 39f68ee3f..2d0302a9d 100644 --- a/src/kernel/ntqaccessible.h +++ b/src/kernel/ntqaccessible.h @@ -44,7 +44,7 @@ #include #include "ntqrect.h" #include "ntqguardedptr.h" -#include "ntqmemarray.h" +#include "tqmemarray.h" #endif // QT_H #if defined(QT_ACCESSIBILITY_SUPPORT) diff --git a/src/kernel/ntqapplication.h b/src/kernel/ntqapplication.h index 9f4c7938f..3568ad454 100644 --- a/src/kernel/ntqapplication.h +++ b/src/kernel/ntqapplication.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "ntqdesktopwidget.h" -#include "ntqasciidict.h" +#include "tqasciidict.h" #include "ntqpalette.h" #include "ntqtranslator.h" #include "tqstrlist.h" diff --git a/src/kernel/ntqbitmap.h b/src/kernel/ntqbitmap.h deleted file mode 100644 index 22307b551..000000000 --- a/src/kernel/ntqbitmap.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Definition of TQBitmap class -** -** Created : 941020 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQBITMAP_H -#define TQBITMAP_H - -#ifndef QT_H -#include "ntqpixmap.h" -#endif // QT_H - - -class TQ_EXPORT TQBitmap : public TQPixmap -{ -public: - TQBitmap(); - TQBitmap( int w, int h, bool clear = FALSE, - TQPixmap::Optimization = TQPixmap::DefaultOptim ); - TQBitmap( const TQSize &, bool clear = FALSE, - TQPixmap::Optimization = TQPixmap::DefaultOptim ); - TQBitmap( int w, int h, const uchar *bits, bool isXbitmap=FALSE ); - TQBitmap( const TQSize &, const uchar *bits, bool isXbitmap=FALSE ); - TQBitmap( const TQBitmap & ); -#ifndef TQT_NO_IMAGEIO - TQBitmap( const TQString &fileName, const char *format=0 ); -#endif - TQBitmap &operator=( const TQBitmap & ); - TQBitmap &operator=( const TQPixmap & ); - TQBitmap &operator=( const TQImage & ); - -#ifndef TQT_NO_PIXMAP_TRANSFORMATION - TQBitmap xForm( const TQWMatrix & ) const; -#endif -}; - - -#endif // TQBITMAP_H diff --git a/src/kernel/ntqnetworkprotocol.h b/src/kernel/ntqnetworkprotocol.h index f41d14c4d..55c7436da 100644 --- a/src/kernel/ntqnetworkprotocol.h +++ b/src/kernel/ntqnetworkprotocol.h @@ -44,7 +44,7 @@ #ifndef QT_H #include "ntqurlinfo.h" #include "tqstring.h" -#include "ntqdict.h" +#include "tqdict.h" #include "tqobject.h" #endif // QT_H diff --git a/src/kernel/ntqpointarray.h b/src/kernel/ntqpointarray.h index bd7b50fbc..515935ac7 100644 --- a/src/kernel/ntqpointarray.h +++ b/src/kernel/ntqpointarray.h @@ -42,7 +42,7 @@ #define TQPOINTARRAY_H #ifndef QT_H -#include "ntqmemarray.h" +#include "tqmemarray.h" #include "ntqpoint.h" #endif // QT_H diff --git a/src/kernel/ntqt.h b/src/kernel/ntqt.h index 778a0a93c..e9b0343a4 100644 --- a/src/kernel/ntqt.h +++ b/src/kernel/ntqt.h @@ -23,8 +23,8 @@ #include "tqobjectdefs.h" #include "ntqnamespace.h" #include "ntqgarray.h" -#include "ntqmemarray.h" -#include "ntqcstring.h" +#include "tqmemarray.h" +#include "tqcstring.h" #include "tqstring.h" #include "tqptrlist.h" #include "ntqiodevice.h" @@ -42,7 +42,7 @@ #include "ntqtl.h" #include "tqsize.h" #include "ntqrect.h" -#include "ntqbitarray.h" +#include "tqbitarray.h" #include "ntqregion.h" #include "tqsql.h" #include "tqstrlist.h" @@ -50,10 +50,10 @@ #include "tqmap.h" #include "tqdatetime.h" #include "tqmime.h" -#include "ntqasciidict.h" +#include "tqasciidict.h" #include "ntqpaintdevice.h" #include "ntqfontmetrics.h" -#include "ntqdict.h" +#include "tqdict.h" #include "ntqevent.h" #include "ntqhostaddress.h" #include "tqstringlist.h" @@ -89,7 +89,7 @@ #include "ntqgcache.h" #include #include -#include +#include #include #include "ntqgplugin.h" #include @@ -108,8 +108,8 @@ #include "tqimage.h" #include #include "ntqlineedit.h" -#include -#include "ntqintdict.h" +#include +#include "tqintdict.h" #include "ntqmotifstyle.h" #include "ntqpicture.h" #include @@ -126,7 +126,7 @@ #include "ntqdir.h" #include "ntqwindowsstyle.h" #include "ntqconnection.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "ntqvariant.h" #include "ntqsignal.h" #include @@ -163,7 +163,7 @@ #include #include #include "ntqprogressbar.h" -#include +#include #include "tqptrdict.h" #include #include @@ -173,7 +173,7 @@ #include #include #include -#include "ntqregexp.h" +#include "tqregexp.h" #include #include #include diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index c2b64a636..47524c6a5 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -70,7 +70,7 @@ #include "tqobjectlist.h" #include "tqwidgetlist.h" #include "tqwidgetintdict.h" -#include "ntqbitarray.h" +#include "tqbitarray.h" #include "ntqpainter.h" #include "ntqpixmapcache.h" #include "tqdatetime.h" @@ -80,7 +80,7 @@ #include "ntqsocketnotifier.h" #include "tqsessionmanager.h" #include "tqvaluelist.h" -#include "ntqdict.h" +#include "tqdict.h" #include "ntqguardedptr.h" #include "ntqclipboard.h" #include "ntqwhatsthis.h" // ######## dependency diff --git a/src/kernel/qbitmap.cpp b/src/kernel/qbitmap.cpp deleted file mode 100644 index 3c64c22b0..000000000 --- a/src/kernel/qbitmap.cpp +++ /dev/null @@ -1,304 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQBitmap class -** -** Created : 941020 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntqbitmap.h" -#include "tqimage.h" - - -/*! - \class TQBitmap ntqbitmap.h - \brief The TQBitmap class provides monochrome (1-bit depth) pixmaps. - - \ingroup graphics - \ingroup images - \ingroup shared - - The TQBitmap class is a monochrome off-screen paint device used - mainly for creating custom TQCursor and TQBrush objects, in - TQPixmap::setMask() and for TQRegion. - - A TQBitmap is a TQPixmap with a \link TQPixmap::depth() depth\endlink - of 1. If a pixmap with a depth greater than 1 is assigned to a - bitmap, the bitmap will be dithered automatically. A TQBitmap is - guaranteed to always have the depth 1, unless it is - TQPixmap::isNull() which has depth 0. - - When drawing in a TQBitmap (or TQPixmap with depth 1), we recommend - using the TQColor objects \c TQt::color0 and \c TQt::color1. - Painting with \c color0 sets the bitmap bits to 0, and painting - with \c color1 sets the bits to 1. For a bitmap, 0-bits indicate - background (or transparent) and 1-bits indicate foreground (or - opaque). Using the \c black and \c white TQColor objects make no - sense because the TQColor::pixel() value is not necessarily 0 for - black and 1 for white. - - The TQBitmap can be transformed (translated, scaled, sheared or - rotated) using xForm(). - - Just like the TQPixmap class, TQBitmap is optimized by the use of - \link shclass.html implicit sharing\endlink, so it is very - efficient to pass TQBitmap objects as arguments. - - \sa TQPixmap, TQPainter::drawPixmap(), bitBlt(), \link shclass.html Shared Classes\endlink -*/ - - -/*! - Constructs a null bitmap. - - \sa TQPixmap::isNull() -*/ - -TQBitmap::TQBitmap() -{ - data->bitmap = TRUE; -} - - -/*! - Constructs a bitmap with width \a w and height \a h. - - The contents of the bitmap is uninitialized if \a clear is FALSE; - otherwise it is filled with pixel value 0 (the TQColor \c - TQt::color0). - - The optional \a optimization argument specifies the optimization - setting for the bitmap. The default optimization should be used in - most cases. Games and other pixmap-intensive applications may - benefit from setting this argument; see \l{TQPixmap::Optimization}. - - \sa TQPixmap::setOptimization(), TQPixmap::setDefaultOptimization() -*/ - -TQBitmap::TQBitmap( int w, int h, bool clear, - TQPixmap::Optimization optimization ) - : TQPixmap( w, h, 1, optimization ) -{ - data->bitmap = TRUE; - if ( clear ) - fill( TQt::color0 ); -} - - -/*! - \overload - - Constructs a bitmap with the size \a size. - - The contents of the bitmap is uninitialized if \a clear is FALSE; - otherwise it is filled with pixel value 0 (the TQColor \c - TQt::color0). - - The optional \a optimization argument specifies the optimization - setting for the bitmap. The default optimization should be used in - most cases. Games and other pixmap-intensive applications may - benefit from setting this argument; see \l{TQPixmap::Optimization}. -*/ - -TQBitmap::TQBitmap( const TQSize &size, bool clear, - TQPixmap::Optimization optimization ) - : TQPixmap( size, 1, optimization ) -{ - data->bitmap = TRUE; - if ( clear ) - fill( TQt::color0 ); -} - - -/*! - Constructs a bitmap with width \a w and height \a h and sets the - contents to \a bits. - - The \a isXbitmap flag should be TRUE if \a bits was generated by - the X11 bitmap program. The X bitmap bit order is little endian. - The TQImage documentation discusses bit order of monochrome images. - - Example (creates an arrow bitmap): - \code - uchar arrow_bits[] = { 0x3f, 0x1f, 0x0f, 0x1f, 0x3b, 0x71, 0xe0, 0xc0 }; - TQBitmap bm( 8, 8, arrow_bits, TRUE ); - \endcode -*/ - -TQBitmap::TQBitmap( int w, int h, const uchar *bits, bool isXbitmap ) - : TQPixmap( w, h, bits, isXbitmap ) -{ - data->bitmap = TRUE; -} - - -/*! - \overload - - Constructs a bitmap with the size \a size and sets the contents to - \a bits. - - The \a isXbitmap flag should be TRUE if \a bits was generated by - the X11 bitmap program. The X bitmap bit order is little endian. - The TQImage documentation discusses bit order of monochrome images. -*/ - -TQBitmap::TQBitmap( const TQSize &size, const uchar *bits, bool isXbitmap ) - : TQPixmap( size.width(), size.height(), bits, isXbitmap ) -{ - data->bitmap = TRUE; -} - - -/*! - Constructs a bitmap that is a copy of \a bitmap. -*/ - -TQBitmap::TQBitmap( const TQBitmap &bitmap ) - : TQPixmap( bitmap ) -{ -} - -#ifndef TQT_NO_IMAGEIO -/*! - Constructs a bitmap from the file \a fileName. If the file does - not exist or is of an unknown format, the bitmap becomes a null - bitmap. - - The parameters \a fileName and \a format are passed on to - TQPixmap::load(). Dithering will be performed if the file format - uses more than 1 bit per pixel. - - \sa TQPixmap::isNull(), TQPixmap::load(), TQPixmap::loadFromData(), - TQPixmap::save(), TQPixmap::imageFormat() -*/ - -TQBitmap::TQBitmap( const TQString& fileName, const char *format ) - : TQPixmap() // Will set bitmap to null bitmap, explicit call for clarity -{ - data->bitmap = TRUE; - load( fileName, format, Mono ); -} -#endif - -/*! - Assigns the bitmap \a bitmap to this bitmap and returns a - reference to this bitmap. -*/ - -TQBitmap &TQBitmap::operator=( const TQBitmap &bitmap ) -{ - TQPixmap::operator=(bitmap); -#if defined(QT_CHECK_STATE) - Q_ASSERT( data->bitmap ); -#endif - return *this; -} - - -/*! - \overload - - Assigns the pixmap \a pixmap to this bitmap and returns a - reference to this bitmap. - - Dithering will be performed if the pixmap has a TQPixmap::depth() - greater than 1. -*/ - -TQBitmap &TQBitmap::operator=( const TQPixmap &pixmap ) -{ - if ( pixmap.isNull() ) { // a null pixmap - TQBitmap bm( 0, 0, FALSE, pixmap.optimization() ); - TQBitmap::operator=(bm); - } else if ( pixmap.depth() == 1 ) { // 1-bit pixmap - if ( pixmap.isTQBitmap() ) { // another TQBitmap - TQPixmap::operator=(pixmap); // shallow assignment - } else { // not a TQBitmap, but 1-bit - TQBitmap bm( pixmap.size(), FALSE, pixmap.optimization() ); - bitBlt( &bm, 0,0, &pixmap, 0,0,pixmap.width(),pixmap.height() ); - TQBitmap::operator=(bm); - } - } else { // n-bit depth pixmap - TQImage image; - image = pixmap; // convert pixmap to image - *this = image; // will dither image - } - return *this; -} - - -/*! - \overload - - Converts the image \a image to a bitmap and assigns the result to - this bitmap. Returns a reference to the bitmap. - - Dithering will be performed if the image has a TQImage::depth() - greater than 1. -*/ - -TQBitmap &TQBitmap::operator=( const TQImage &image ) -{ - convertFromImage( image ); - return *this; -} - - -#ifndef TQT_NO_PIXMAP_TRANSFORMATION -/*! - Returns a transformed copy of this bitmap by using \a matrix. - - This function does exactly the same as TQPixmap::xForm(), except - that it returns a TQBitmap instead of a TQPixmap. - - \sa TQPixmap::xForm() -*/ - -TQBitmap TQBitmap::xForm( const TQWMatrix &matrix ) const -{ - TQPixmap pm = TQPixmap::xForm( matrix ); - TQBitmap bm; - // Here we fake the pixmap to think it's a TQBitmap. With this trick, - // the TQBitmap::operator=(const TQPixmap&) will just refer the - // pm.data and we do not need to perform a bitBlt. - pm.data->bitmap = TRUE; - bm = pm; - return bm; -} -#endif // TQT_NO_TRANSFORMATIONS - - - diff --git a/src/kernel/qclipboard_x11.cpp b/src/kernel/qclipboard_x11.cpp index e8eeac848..056b3de91 100644 --- a/src/kernel/qclipboard_x11.cpp +++ b/src/kernel/qclipboard_x11.cpp @@ -66,7 +66,7 @@ #include "ntqapplication.h" #include "ntqeventloop.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "tqdatetime.h" #include "tqdragobject.h" #include "ntqbuffer.h" diff --git a/src/kernel/qcolor_x11.cpp b/src/kernel/qcolor_x11.cpp index 8f02bcde9..b223222a9 100644 --- a/src/kernel/qcolor_x11.cpp +++ b/src/kernel/qcolor_x11.cpp @@ -58,7 +58,7 @@ this TQt application. *****************************************************************************/ -#include "ntqintdict.h" +#include "tqintdict.h" struct TQColorData { uint pix; // allocated pixel value diff --git a/src/kernel/qcursor.cpp b/src/kernel/qcursor.cpp index d6b736460..7d1b0a160 100644 --- a/src/kernel/qcursor.cpp +++ b/src/kernel/qcursor.cpp @@ -42,7 +42,7 @@ #ifndef TQT_NO_CURSOR -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "tqimage.h" #include "ntqdatastream.h" diff --git a/src/kernel/qcursor_x11.cpp b/src/kernel/qcursor_x11.cpp index 8cf9f6dde..f7a073612 100644 --- a/src/kernel/qcursor_x11.cpp +++ b/src/kernel/qcursor_x11.cpp @@ -39,7 +39,7 @@ **********************************************************************/ #include "ntqcursor.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "tqimage.h" #include "ntqapplication.h" #include "ntqdatastream.h" diff --git a/src/kernel/qdnd_x11.cpp b/src/kernel/qdnd_x11.cpp index dc4b9678b..0a51b9f2e 100644 --- a/src/kernel/qdnd_x11.cpp +++ b/src/kernel/qdnd_x11.cpp @@ -45,14 +45,14 @@ #ifndef TQT_NO_DRAGANDDROP #include "tqwidget.h" -#include "ntqintdict.h" +#include "tqintdict.h" #include "tqdatetime.h" -#include "ntqdict.h" +#include "tqdict.h" #include "ntqguardedptr.h" #include "tqdragobject.h" #include "tqobjectlist.h" #include "ntqcursor.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "ntqpainter.h" #include "qt_x11_p.h" diff --git a/src/kernel/qdrawutil.cpp b/src/kernel/qdrawutil.cpp index 0ac5bde33..c98ef3dc4 100644 --- a/src/kernel/qdrawutil.cpp +++ b/src/kernel/qdrawutil.cpp @@ -40,7 +40,7 @@ #include "ntqdrawutil.h" #ifndef TQT_NO_DRAWUTIL -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "ntqpixmapcache.h" #include "ntqapplication.h" #include "ntqpainter.h" diff --git a/src/kernel/qeventloop_unix.cpp b/src/kernel/qeventloop_unix.cpp index 89e31da82..2f71b4c05 100644 --- a/src/kernel/qeventloop_unix.cpp +++ b/src/kernel/qeventloop_unix.cpp @@ -39,7 +39,7 @@ #include "qeventloop_p.h" // includes qplatformdefs.h #include "ntqeventloop.h" #include "ntqapplication.h" -#include "ntqbitarray.h" +#include "tqbitarray.h" #include "tqmutex.h" #include #include diff --git a/src/kernel/qeventloop_unix_glib.cpp b/src/kernel/qeventloop_unix_glib.cpp index 5d43a6efb..11cb9ad94 100644 --- a/src/kernel/qeventloop_unix_glib.cpp +++ b/src/kernel/qeventloop_unix_glib.cpp @@ -39,7 +39,7 @@ #include "qeventloop_glib_p.h" // includes qplatformdefs.h #include "ntqeventloop.h" #include "ntqapplication.h" -#include "ntqbitarray.h" +#include "tqbitarray.h" #include "tqmutex.h" #if defined(TQT_THREAD_SUPPORT) diff --git a/src/kernel/qeventloop_x11.cpp b/src/kernel/qeventloop_x11.cpp index 6905bac22..bb6f343c2 100644 --- a/src/kernel/qeventloop_x11.cpp +++ b/src/kernel/qeventloop_x11.cpp @@ -39,7 +39,7 @@ #include "qeventloop_p.h" // includes qplatformdefs.h #include "ntqeventloop.h" #include "ntqapplication.h" -#include "ntqbitarray.h" +#include "tqbitarray.h" #include "qcolor_p.h" #include "qt_x11_p.h" diff --git a/src/kernel/qeventloop_x11_glib.cpp b/src/kernel/qeventloop_x11_glib.cpp index b152d6a38..e000b0ef4 100644 --- a/src/kernel/qeventloop_x11_glib.cpp +++ b/src/kernel/qeventloop_x11_glib.cpp @@ -42,7 +42,7 @@ #include "qeventloop_glib_p.h" // includes qplatformdefs.h #include "ntqeventloop.h" #include "ntqapplication.h" -#include "ntqbitarray.h" +#include "tqbitarray.h" #include "qcolor_p.h" #include "qt_x11_p.h" diff --git a/src/kernel/qfont.cpp b/src/kernel/qfont.cpp index 1ad9ccf9e..99f1dba77 100644 --- a/src/kernel/qfont.cpp +++ b/src/kernel/qfont.cpp @@ -45,8 +45,8 @@ #include "ntqfontmetrics.h" #include "ntqfontinfo.h" #include "ntqpainter.h" -#include "ntqdict.h" -#include "ntqcache.h" +#include "tqdict.h" +#include "tqcache.h" #include "ntqdatastream.h" #include "ntqapplication.h" #include "ntqcleanuphandler.h" diff --git a/src/kernel/qfontengine_p.h b/src/kernel/qfontengine_p.h index 7d0db28c1..3dba677ca 100644 --- a/src/kernel/qfontengine_p.h +++ b/src/kernel/qfontengine_p.h @@ -462,7 +462,7 @@ private: #elif defined( TQ_WS_MAC ) #include "qt_mac.h" #include -#include +#include class TQFontEngineMac : public TQFontEngine { diff --git a/src/kernel/qfontengine_x11.cpp b/src/kernel/qfontengine_x11.cpp index 54bedb33e..0a8164d44 100644 --- a/src/kernel/qfontengine_x11.cpp +++ b/src/kernel/qfontengine_x11.cpp @@ -41,10 +41,10 @@ // #define FONTENGINE_DEBUG #include -#include +#include #include -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "ntqfontdatabase.h" #include "ntqpaintdevice.h" #include "ntqpaintdevicemetrics.h" diff --git a/src/kernel/qinputcontext_p.h b/src/kernel/qinputcontext_p.h index 984660038..0e0f8da0c 100644 --- a/src/kernel/qinputcontext_p.h +++ b/src/kernel/qinputcontext_p.h @@ -61,7 +61,7 @@ class TQString; #ifdef TQ_WS_X11 -#include "ntqmemarray.h" +#include "tqmemarray.h" #include "ntqwindowdefs.h" #include "qt_x11_p.h" #endif diff --git a/src/kernel/qinternal_p.h b/src/kernel/qinternal_p.h index 6b4139f32..837c81421 100644 --- a/src/kernel/qinternal_p.h +++ b/src/kernel/qinternal_p.h @@ -56,7 +56,7 @@ #include "ntqnamespace.h" #include "ntqrect.h" #include "tqptrlist.h" -#include "ntqcstring.h" +#include "tqcstring.h" #include "ntqiodevice.h" #endif // QT_H diff --git a/src/kernel/qkeysequence.cpp b/src/kernel/qkeysequence.cpp index add0df9e4..a1bf49832 100644 --- a/src/kernel/qkeysequence.cpp +++ b/src/kernel/qkeysequence.cpp @@ -46,7 +46,7 @@ #include "ntqshared.h" #include "tqvaluelist.h" #ifndef TQT_NO_REGEXP -# include "ntqregexp.h" +# include "tqregexp.h" #endif #ifdef TQ_WS_MAC diff --git a/src/kernel/qmetaobject.cpp b/src/kernel/qmetaobject.cpp index 624c025d8..ae74503c3 100644 --- a/src/kernel/qmetaobject.cpp +++ b/src/kernel/qmetaobject.cpp @@ -39,7 +39,7 @@ **********************************************************************/ #include "ntqmetaobject.h" -#include "ntqasciidict.h" +#include "tqasciidict.h" #ifdef TQT_THREAD_SUPPORT #include diff --git a/src/kernel/qmovie.cpp b/src/kernel/qmovie.cpp index 7be719725..ea6f99942 100644 --- a/src/kernel/qmovie.cpp +++ b/src/kernel/qmovie.cpp @@ -43,7 +43,7 @@ #include "tqtimer.h" #include "ntqpainter.h" #include "tqptrlist.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "ntqmovie.h" #include "ntqfile.h" #include "ntqbuffer.h" diff --git a/src/kernel/qpaintdevice_x11.cpp b/src/kernel/qpaintdevice_x11.cpp index 1a01803aa..d40d09ba2 100644 --- a/src/kernel/qpaintdevice_x11.cpp +++ b/src/kernel/qpaintdevice_x11.cpp @@ -42,7 +42,7 @@ #include "ntqpaintdevicemetrics.h" #include "ntqpainter.h" #include "tqwidget.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "ntqapplication.h" #include "qt_x11_p.h" diff --git a/src/kernel/qpainter.cpp b/src/kernel/qpainter.cpp index 47d2af11c..731708b77 100644 --- a/src/kernel/qpainter.cpp +++ b/src/kernel/qpainter.cpp @@ -40,7 +40,7 @@ #include "ntqpainter.h" #include "qpainter_p.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "tqptrstack.h" #include "tqptrdict.h" #include "ntqdatastream.h" @@ -49,7 +49,7 @@ #include "ntqpaintdevicemetrics.h" #include "ntqapplication.h" #include "qrichtext_p.h" -#include "ntqregexp.h" +#include "tqregexp.h" #include "ntqcleanuphandler.h" #include diff --git a/src/kernel/qpainter_x11.cpp b/src/kernel/qpainter_x11.cpp index 0e72d64da..f8de8c9a5 100644 --- a/src/kernel/qpainter_x11.cpp +++ b/src/kernel/qpainter_x11.cpp @@ -43,7 +43,7 @@ #include "ntqfont.h" #include "ntqpainter.h" #include "tqwidget.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "ntqpixmapcache.h" #include "tqtextcodec.h" #include "ntqpaintdevicemetrics.h" diff --git a/src/kernel/qpixmap.cpp b/src/kernel/qpixmap.cpp index 9ac10d30c..33fca8ffd 100644 --- a/src/kernel/qpixmap.cpp +++ b/src/kernel/qpixmap.cpp @@ -40,7 +40,7 @@ #include "ntqpixmap.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "tqimage.h" #include "tqwidget.h" #include "ntqpainter.h" diff --git a/src/kernel/qpixmap_x11.cpp b/src/kernel/qpixmap_x11.cpp index b40247af9..1ddb18e02 100644 --- a/src/kernel/qpixmap_x11.cpp +++ b/src/kernel/qpixmap_x11.cpp @@ -67,7 +67,7 @@ #undef QT_MITSHM_XFORM #endif -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "ntqpaintdevicemetrics.h" #include "tqimage.h" #include "ntqwmatrix.h" diff --git a/src/kernel/qpixmapcache.cpp b/src/kernel/qpixmapcache.cpp index 16a7c5ed2..9eb09466c 100644 --- a/src/kernel/qpixmapcache.cpp +++ b/src/kernel/qpixmapcache.cpp @@ -39,7 +39,7 @@ **********************************************************************/ #include "ntqpixmapcache.h" -#include "ntqcache.h" +#include "tqcache.h" #include "tqobject.h" #include "ntqcleanuphandler.h" diff --git a/src/kernel/qprocess_unix.cpp b/src/kernel/qprocess_unix.cpp index 0e5a2299a..a8ed9e4da 100644 --- a/src/kernel/qprocess_unix.cpp +++ b/src/kernel/qprocess_unix.cpp @@ -55,7 +55,7 @@ #include "ntqsocketnotifier.h" #include "tqtimer.h" #include "ntqcleanuphandler.h" -#include "ntqregexp.h" +#include "tqregexp.h" #include "private/qinternal_p.h" #include diff --git a/src/kernel/qpsprinter.cpp b/src/kernel/qpsprinter.cpp index c9ce2ea7d..b70e809df 100644 --- a/src/kernel/qpsprinter.cpp +++ b/src/kernel/qpsprinter.cpp @@ -62,17 +62,17 @@ #include "tqimage.h" #include "tqdatetime.h" #include "tqstring.h" -#include "ntqdict.h" -#include "ntqmemarray.h" +#include "tqdict.h" +#include "tqmemarray.h" #include "ntqfile.h" #include "ntqbuffer.h" -#include "ntqintdict.h" +#include "tqintdict.h" #include "tqtextcodec.h" #include "ntqsettings.h" #include "tqmap.h" #include "ntqfontdatabase.h" -#include "ntqregexp.h" -#include "ntqbitmap.h" +#include "tqregexp.h" +#include "tqbitmap.h" #include #if defined(Q_OS_WIN32) diff --git a/src/kernel/qregion_x11.cpp b/src/kernel/qregion_x11.cpp index 30d0fe9c2..55a7d8380 100644 --- a/src/kernel/qregion_x11.cpp +++ b/src/kernel/qregion_x11.cpp @@ -42,7 +42,7 @@ #include "ntqpointarray.h" #include "ntqbuffer.h" #include "tqimage.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "qt_x11_p.h" #include diff --git a/src/kernel/qrichtext.cpp b/src/kernel/qrichtext.cpp index a1dfd6719..0228a58fe 100644 --- a/src/kernel/qrichtext.cpp +++ b/src/kernel/qrichtext.cpp @@ -6694,7 +6694,7 @@ void TQTextImage::adjustToPainter( TQPainter* p ) } #if !defined(TQ_WS_X11) -#include +#include #include static TQPixmap *qrt_selection = 0; static TQSingleCleanupHandler qrt_cleanup_pixmap; diff --git a/src/kernel/qrichtext_p.h b/src/kernel/qrichtext_p.h index c8c68360e..e9422ec14 100644 --- a/src/kernel/qrichtext_p.h +++ b/src/kernel/qrichtext_p.h @@ -58,7 +58,7 @@ #include "tqptrlist.h" #include "ntqrect.h" #include "ntqfontmetrics.h" -#include "ntqintdict.h" +#include "tqintdict.h" #include "tqmap.h" #include "tqstringlist.h" #include "ntqfont.h" @@ -67,7 +67,7 @@ #include "tqvaluelist.h" #include "tqvaluestack.h" #include "tqobject.h" -#include "ntqdict.h" +#include "tqdict.h" #include "ntqpixmap.h" #include "tqstylesheet.h" #include "tqptrvector.h" diff --git a/src/kernel/qt_kernel.pri b/src/kernel/qt_kernel.pri index 6a6cce7ef..eca64009e 100644 --- a/src/kernel/qt_kernel.pri +++ b/src/kernel/qt_kernel.pri @@ -9,7 +9,7 @@ kernel { $$KERNEL_P/qapplication_p.h \ $$KERNEL_H/ntqasyncimageio.h \ $$KERNEL_H/ntqasyncio.h \ - $$KERNEL_H/ntqbitmap.h \ + $$KERNEL_H/tqbitmap.h \ $$KERNEL_H/ntqbrush.h \ $$KERNEL_H/ntqclipboard.h \ $$KERNEL_H/ntqcolor.h \ @@ -199,7 +199,7 @@ kernel { $$KERNEL_CPP/qapplication.cpp \ $$KERNEL_CPP/qasyncimageio.cpp \ $$KERNEL_CPP/qasyncio.cpp \ - $$KERNEL_CPP/qbitmap.cpp \ + $$KERNEL_CPP/tqbitmap.cpp \ $$KERNEL_CPP/qclipboard.cpp \ $$KERNEL_CPP/qcolor.cpp \ $$KERNEL_CPP/qcolor_p.cpp \ diff --git a/src/kernel/qt_pch.h b/src/kernel/qt_pch.h index aff826dc0..8222ec592 100644 --- a/src/kernel/qt_pch.h +++ b/src/kernel/qt_pch.h @@ -24,7 +24,7 @@ #include // I must be first! #include // All moc genereated code has this include #include -#include +#include #include #include #include diff --git a/src/kernel/qtranslator.cpp b/src/kernel/qtranslator.cpp index ce01453fe..42c741e8a 100644 --- a/src/kernel/qtranslator.cpp +++ b/src/kernel/qtranslator.cpp @@ -58,7 +58,7 @@ static inline int qt_open(const char *pathname, int flags, mode_t mode) #include "ntqfileinfo.h" #include "tqwidgetlist.h" -#include "ntqintdict.h" +#include "tqintdict.h" #include "tqstring.h" #include "ntqapplication.h" #include "ntqfile.h" diff --git a/src/kernel/qvariant.cpp b/src/kernel/qvariant.cpp index 0b2cd0f3f..1de08c389 100644 --- a/src/kernel/qvariant.cpp +++ b/src/kernel/qvariant.cpp @@ -43,7 +43,7 @@ #include "ntqvariant.h" #ifndef TQT_NO_VARIANT #include "tqstring.h" -#include "ntqcstring.h" +#include "tqcstring.h" #include "ntqfont.h" #include "ntqpixmap.h" #include "tqimage.h" @@ -57,12 +57,12 @@ #include "ntqdatastream.h" #include "ntqregion.h" #include "ntqpointarray.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "ntqcursor.h" #include "tqdatetime.h" #include "tqsizepolicy.h" #include "ntqshared.h" -#include "ntqbitarray.h" +#include "tqbitarray.h" #include "ntqkeysequence.h" #include "ntqpen.h" diff --git a/src/kernel/tqbitmap.cpp b/src/kernel/tqbitmap.cpp new file mode 100644 index 000000000..c23116d0e --- /dev/null +++ b/src/kernel/tqbitmap.cpp @@ -0,0 +1,304 @@ +/**************************************************************************** +** +** Implementation of TQBitmap class +** +** Created : 941020 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqbitmap.h" +#include "tqimage.h" + + +/*! + \class TQBitmap tqbitmap.h + \brief The TQBitmap class provides monochrome (1-bit depth) pixmaps. + + \ingroup graphics + \ingroup images + \ingroup shared + + The TQBitmap class is a monochrome off-screen paint device used + mainly for creating custom TQCursor and TQBrush objects, in + TQPixmap::setMask() and for TQRegion. + + A TQBitmap is a TQPixmap with a \link TQPixmap::depth() depth\endlink + of 1. If a pixmap with a depth greater than 1 is assigned to a + bitmap, the bitmap will be dithered automatically. A TQBitmap is + guaranteed to always have the depth 1, unless it is + TQPixmap::isNull() which has depth 0. + + When drawing in a TQBitmap (or TQPixmap with depth 1), we recommend + using the TQColor objects \c TQt::color0 and \c TQt::color1. + Painting with \c color0 sets the bitmap bits to 0, and painting + with \c color1 sets the bits to 1. For a bitmap, 0-bits indicate + background (or transparent) and 1-bits indicate foreground (or + opaque). Using the \c black and \c white TQColor objects make no + sense because the TQColor::pixel() value is not necessarily 0 for + black and 1 for white. + + The TQBitmap can be transformed (translated, scaled, sheared or + rotated) using xForm(). + + Just like the TQPixmap class, TQBitmap is optimized by the use of + \link shclass.html implicit sharing\endlink, so it is very + efficient to pass TQBitmap objects as arguments. + + \sa TQPixmap, TQPainter::drawPixmap(), bitBlt(), \link shclass.html Shared Classes\endlink +*/ + + +/*! + Constructs a null bitmap. + + \sa TQPixmap::isNull() +*/ + +TQBitmap::TQBitmap() +{ + data->bitmap = TRUE; +} + + +/*! + Constructs a bitmap with width \a w and height \a h. + + The contents of the bitmap is uninitialized if \a clear is FALSE; + otherwise it is filled with pixel value 0 (the TQColor \c + TQt::color0). + + The optional \a optimization argument specifies the optimization + setting for the bitmap. The default optimization should be used in + most cases. Games and other pixmap-intensive applications may + benefit from setting this argument; see \l{TQPixmap::Optimization}. + + \sa TQPixmap::setOptimization(), TQPixmap::setDefaultOptimization() +*/ + +TQBitmap::TQBitmap( int w, int h, bool clear, + TQPixmap::Optimization optimization ) + : TQPixmap( w, h, 1, optimization ) +{ + data->bitmap = TRUE; + if ( clear ) + fill( TQt::color0 ); +} + + +/*! + \overload + + Constructs a bitmap with the size \a size. + + The contents of the bitmap is uninitialized if \a clear is FALSE; + otherwise it is filled with pixel value 0 (the TQColor \c + TQt::color0). + + The optional \a optimization argument specifies the optimization + setting for the bitmap. The default optimization should be used in + most cases. Games and other pixmap-intensive applications may + benefit from setting this argument; see \l{TQPixmap::Optimization}. +*/ + +TQBitmap::TQBitmap( const TQSize &size, bool clear, + TQPixmap::Optimization optimization ) + : TQPixmap( size, 1, optimization ) +{ + data->bitmap = TRUE; + if ( clear ) + fill( TQt::color0 ); +} + + +/*! + Constructs a bitmap with width \a w and height \a h and sets the + contents to \a bits. + + The \a isXbitmap flag should be TRUE if \a bits was generated by + the X11 bitmap program. The X bitmap bit order is little endian. + The TQImage documentation discusses bit order of monochrome images. + + Example (creates an arrow bitmap): + \code + uchar arrow_bits[] = { 0x3f, 0x1f, 0x0f, 0x1f, 0x3b, 0x71, 0xe0, 0xc0 }; + TQBitmap bm( 8, 8, arrow_bits, TRUE ); + \endcode +*/ + +TQBitmap::TQBitmap( int w, int h, const uchar *bits, bool isXbitmap ) + : TQPixmap( w, h, bits, isXbitmap ) +{ + data->bitmap = TRUE; +} + + +/*! + \overload + + Constructs a bitmap with the size \a size and sets the contents to + \a bits. + + The \a isXbitmap flag should be TRUE if \a bits was generated by + the X11 bitmap program. The X bitmap bit order is little endian. + The TQImage documentation discusses bit order of monochrome images. +*/ + +TQBitmap::TQBitmap( const TQSize &size, const uchar *bits, bool isXbitmap ) + : TQPixmap( size.width(), size.height(), bits, isXbitmap ) +{ + data->bitmap = TRUE; +} + + +/*! + Constructs a bitmap that is a copy of \a bitmap. +*/ + +TQBitmap::TQBitmap( const TQBitmap &bitmap ) + : TQPixmap( bitmap ) +{ +} + +#ifndef TQT_NO_IMAGEIO +/*! + Constructs a bitmap from the file \a fileName. If the file does + not exist or is of an unknown format, the bitmap becomes a null + bitmap. + + The parameters \a fileName and \a format are passed on to + TQPixmap::load(). Dithering will be performed if the file format + uses more than 1 bit per pixel. + + \sa TQPixmap::isNull(), TQPixmap::load(), TQPixmap::loadFromData(), + TQPixmap::save(), TQPixmap::imageFormat() +*/ + +TQBitmap::TQBitmap( const TQString& fileName, const char *format ) + : TQPixmap() // Will set bitmap to null bitmap, explicit call for clarity +{ + data->bitmap = TRUE; + load( fileName, format, Mono ); +} +#endif + +/*! + Assigns the bitmap \a bitmap to this bitmap and returns a + reference to this bitmap. +*/ + +TQBitmap &TQBitmap::operator=( const TQBitmap &bitmap ) +{ + TQPixmap::operator=(bitmap); +#if defined(QT_CHECK_STATE) + Q_ASSERT( data->bitmap ); +#endif + return *this; +} + + +/*! + \overload + + Assigns the pixmap \a pixmap to this bitmap and returns a + reference to this bitmap. + + Dithering will be performed if the pixmap has a TQPixmap::depth() + greater than 1. +*/ + +TQBitmap &TQBitmap::operator=( const TQPixmap &pixmap ) +{ + if ( pixmap.isNull() ) { // a null pixmap + TQBitmap bm( 0, 0, FALSE, pixmap.optimization() ); + TQBitmap::operator=(bm); + } else if ( pixmap.depth() == 1 ) { // 1-bit pixmap + if ( pixmap.isTQBitmap() ) { // another TQBitmap + TQPixmap::operator=(pixmap); // shallow assignment + } else { // not a TQBitmap, but 1-bit + TQBitmap bm( pixmap.size(), FALSE, pixmap.optimization() ); + bitBlt( &bm, 0,0, &pixmap, 0,0,pixmap.width(),pixmap.height() ); + TQBitmap::operator=(bm); + } + } else { // n-bit depth pixmap + TQImage image; + image = pixmap; // convert pixmap to image + *this = image; // will dither image + } + return *this; +} + + +/*! + \overload + + Converts the image \a image to a bitmap and assigns the result to + this bitmap. Returns a reference to the bitmap. + + Dithering will be performed if the image has a TQImage::depth() + greater than 1. +*/ + +TQBitmap &TQBitmap::operator=( const TQImage &image ) +{ + convertFromImage( image ); + return *this; +} + + +#ifndef TQT_NO_PIXMAP_TRANSFORMATION +/*! + Returns a transformed copy of this bitmap by using \a matrix. + + This function does exactly the same as TQPixmap::xForm(), except + that it returns a TQBitmap instead of a TQPixmap. + + \sa TQPixmap::xForm() +*/ + +TQBitmap TQBitmap::xForm( const TQWMatrix &matrix ) const +{ + TQPixmap pm = TQPixmap::xForm( matrix ); + TQBitmap bm; + // Here we fake the pixmap to think it's a TQBitmap. With this trick, + // the TQBitmap::operator=(const TQPixmap&) will just refer the + // pm.data and we do not need to perform a bitBlt. + pm.data->bitmap = TRUE; + bm = pm; + return bm; +} +#endif // TQT_NO_TRANSFORMATIONS + + + diff --git a/src/kernel/tqbitmap.h b/src/kernel/tqbitmap.h new file mode 100644 index 000000000..22307b551 --- /dev/null +++ b/src/kernel/tqbitmap.h @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Definition of TQBitmap class +** +** Created : 941020 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQBITMAP_H +#define TQBITMAP_H + +#ifndef QT_H +#include "ntqpixmap.h" +#endif // QT_H + + +class TQ_EXPORT TQBitmap : public TQPixmap +{ +public: + TQBitmap(); + TQBitmap( int w, int h, bool clear = FALSE, + TQPixmap::Optimization = TQPixmap::DefaultOptim ); + TQBitmap( const TQSize &, bool clear = FALSE, + TQPixmap::Optimization = TQPixmap::DefaultOptim ); + TQBitmap( int w, int h, const uchar *bits, bool isXbitmap=FALSE ); + TQBitmap( const TQSize &, const uchar *bits, bool isXbitmap=FALSE ); + TQBitmap( const TQBitmap & ); +#ifndef TQT_NO_IMAGEIO + TQBitmap( const TQString &fileName, const char *format=0 ); +#endif + TQBitmap &operator=( const TQBitmap & ); + TQBitmap &operator=( const TQPixmap & ); + TQBitmap &operator=( const TQImage & ); + +#ifndef TQT_NO_PIXMAP_TRANSFORMATION + TQBitmap xForm( const TQWMatrix & ) const; +#endif +}; + + +#endif // TQBITMAP_H diff --git a/src/kernel/tqdragobject.cpp b/src/kernel/tqdragobject.cpp index 77e726477..68678e7d6 100644 --- a/src/kernel/tqdragobject.cpp +++ b/src/kernel/tqdragobject.cpp @@ -52,7 +52,7 @@ #include "tqwidget.h" #include "ntqbuffer.h" #include "ntqgif.h" -#include "ntqregexp.h" +#include "tqregexp.h" #include "ntqdir.h" #include diff --git a/src/kernel/tqiconset.cpp b/src/kernel/tqiconset.cpp index 6bbf4c17a..f3e8ac123 100644 --- a/src/kernel/tqiconset.cpp +++ b/src/kernel/tqiconset.cpp @@ -43,7 +43,7 @@ #ifndef TQT_NO_ICONSET #include "ntqapplication.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "ntqcleanuphandler.h" #include "tqimage.h" #include "ntqpainter.h" diff --git a/src/kernel/tqimage.cpp b/src/kernel/tqimage.cpp index d7bc30d49..5f45e2fdc 100644 --- a/src/kernel/tqimage.cpp +++ b/src/kernel/tqimage.cpp @@ -39,7 +39,7 @@ **********************************************************************/ #include "tqimage.h" -#include "ntqregexp.h" +#include "tqregexp.h" #include "ntqfile.h" #include "ntqdatastream.h" #include "tqtextstream.h" @@ -3878,7 +3878,7 @@ static TQImageHandler *get_image_handler( const char *format ) /*! Defines an image I/O handler for the image format called \a - format, which is recognized using the \link ntqregexp.html#details + format, which is recognized using the \link tqregexp.html#details regular expression\endlink \a header, read using \a readImage and written using \a writeImage. diff --git a/src/kernel/tqobject.cpp b/src/kernel/tqobject.cpp index 3923b46d0..293f374e5 100644 --- a/src/kernel/tqobject.cpp +++ b/src/kernel/tqobject.cpp @@ -43,7 +43,7 @@ #include "tqobject.h" #include "tqobjectlist.h" #include "ntqsignalslotimp.h" -#include "ntqregexp.h" +#include "tqregexp.h" #include "ntqmetaobject.h" #include #include "qucomextra_p.h" diff --git a/src/kernel/tqobjectdict.h b/src/kernel/tqobjectdict.h index 4ee49faf2..8ff8c31f4 100644 --- a/src/kernel/tqobjectdict.h +++ b/src/kernel/tqobjectdict.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "ntqmetaobject.h" -#include "ntqasciidict.h" +#include "tqasciidict.h" #endif // QT_H diff --git a/src/kernel/tqstyle.cpp b/src/kernel/tqstyle.cpp index b3c496da6..47755c4ba 100644 --- a/src/kernel/tqstyle.cpp +++ b/src/kernel/tqstyle.cpp @@ -42,7 +42,7 @@ #ifndef TQT_NO_STYLE #include "ntqapplication.h" #include "ntqpainter.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "ntqpixmapcache.h" #include "ntqframe.h" #include "ntqlayout.h" diff --git a/src/kernel/tqstylesheet.h b/src/kernel/tqstylesheet.h index 1c12775cc..4880726a0 100644 --- a/src/kernel/tqstylesheet.h +++ b/src/kernel/tqstylesheet.h @@ -45,7 +45,7 @@ #include "tqstring.h" #include "tqvaluelist.h" #include "tqptrvector.h" -#include "ntqdict.h" +#include "tqdict.h" #include "tqobject.h" #endif // QT_H diff --git a/src/kernel/tqttdeintegration_x11.cpp b/src/kernel/tqttdeintegration_x11.cpp index b3565b3d4..cf96ba280 100644 --- a/src/kernel/tqttdeintegration_x11.cpp +++ b/src/kernel/tqttdeintegration_x11.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/kernel/tqwidget_x11.cpp b/src/kernel/tqwidget_x11.cpp index bc31e7e75..c3a54d3d8 100644 --- a/src/kernel/tqwidget_x11.cpp +++ b/src/kernel/tqwidget_x11.cpp @@ -43,7 +43,7 @@ #include "ntqnamespace.h" #include "ntqpaintdevicemetrics.h" #include "ntqpainter.h" -#include "ntqbitmap.h" +#include "tqbitmap.h" #include "tqimage.h" #include "tqobjectlist.h" #include "ntqlayout.h" diff --git a/src/kernel/tqwidgetintdict.h b/src/kernel/tqwidgetintdict.h index 8a4694804..4f001d7ec 100644 --- a/src/kernel/tqwidgetintdict.h +++ b/src/kernel/tqwidgetintdict.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "tqwidget.h" -#include "ntqintdict.h" +#include "tqintdict.h" #endif // QT_H -- cgit v1.2.3