From 6f57abfc9cd3acf1d648aee696947ac9216adb71 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 9 Sep 2024 14:57:42 +0900 Subject: Rename remaining ntq[s-z]* related files to equivalent tq* Signed-off-by: Michele Calgaro --- src/kernel/ntqsound.h | 125 -- src/kernel/ntqt.h | 326 ---- src/kernel/ntqvariant.h | 395 ----- src/kernel/ntqwindowdefs.h | 183 -- src/kernel/qapplication.cpp | 2 +- src/kernel/qsound.cpp | 313 ---- src/kernel/qsound_x11.cpp | 281 --- src/kernel/qt_kernel.pri | 16 +- src/kernel/qt_x11_p.h | 2 +- src/kernel/qucomextra.cpp | 2 +- src/kernel/qvariant.cpp | 3494 -------------------------------------- src/kernel/tqaccessible.h | 2 +- src/kernel/tqbrush.h | 2 +- src/kernel/tqclipboard.h | 2 +- src/kernel/tqcolor.h | 2 +- src/kernel/tqconnection.h | 2 +- src/kernel/tqcursor.h | 2 +- src/kernel/tqevent.h | 2 +- src/kernel/tqeventloop_glib_p.h | 2 +- src/kernel/tqeventloop_p.h | 2 +- src/kernel/tqfont.h | 2 +- src/kernel/tqfontdatabase.cpp | 2 +- src/kernel/tqfontdatabase.h | 2 +- src/kernel/tqguardedptr.h | 2 +- src/kernel/tqinputcontext_p.h | 2 +- src/kernel/tqkeysequence.cpp | 2 +- src/kernel/tqlayoutengine_p.h | 2 +- src/kernel/tqmime.h | 2 +- src/kernel/tqobject.cpp | 2 +- src/kernel/tqobject.h | 4 +- src/kernel/tqpaintdevice.h | 2 +- src/kernel/tqpaintdevice_x11.cpp | 2 +- src/kernel/tqpalette.h | 4 +- src/kernel/tqpen.h | 2 +- src/kernel/tqpoint.h | 4 +- src/kernel/tqprinter_p.h | 2 +- src/kernel/tqrect.cpp | 2 +- src/kernel/tqrect.h | 2 +- src/kernel/tqregion.h | 2 +- src/kernel/tqsessionmanager.h | 2 +- src/kernel/tqsignal.h | 2 +- src/kernel/tqsignalslotimp.h | 2 +- src/kernel/tqsize.cpp | 2 +- src/kernel/tqsize.h | 2 +- src/kernel/tqsound.cpp | 313 ++++ src/kernel/tqsound.h | 125 ++ src/kernel/tqsound_x11.cpp | 281 +++ src/kernel/tqt3.h | 326 ++++ src/kernel/tqthread.h | 2 +- src/kernel/tqtranslator.cpp | 2 +- src/kernel/tqvariant.cpp | 3494 ++++++++++++++++++++++++++++++++++++++ src/kernel/tqvariant.h | 395 +++++ src/kernel/tqwidget.cpp | 2 +- src/kernel/tqwidget.h | 4 +- src/kernel/tqwindowdefs.h | 183 ++ src/kernel/tqwmatrix.h | 2 +- 56 files changed, 5170 insertions(+), 5170 deletions(-) delete mode 100644 src/kernel/ntqsound.h delete mode 100644 src/kernel/ntqt.h delete mode 100644 src/kernel/ntqvariant.h delete mode 100644 src/kernel/ntqwindowdefs.h delete mode 100644 src/kernel/qsound.cpp delete mode 100644 src/kernel/qsound_x11.cpp delete mode 100644 src/kernel/qvariant.cpp create mode 100644 src/kernel/tqsound.cpp create mode 100644 src/kernel/tqsound.h create mode 100644 src/kernel/tqsound_x11.cpp create mode 100644 src/kernel/tqt3.h create mode 100644 src/kernel/tqvariant.cpp create mode 100644 src/kernel/tqvariant.h create mode 100644 src/kernel/tqwindowdefs.h (limited to 'src/kernel') diff --git a/src/kernel/ntqsound.h b/src/kernel/ntqsound.h deleted file mode 100644 index d3ba92ed3..000000000 --- a/src/kernel/ntqsound.h +++ /dev/null @@ -1,125 +0,0 @@ -/**************************************************************************** -** -** Definition of TQSound class and TQAuServer internal class -** -** Created : 000117 -** -** Copyright (C) 1999-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 TQSOUND_H -#define TQSOUND_H - -#ifndef QT_H -#include "tqobject.h" -#endif // QT_H - -#ifndef TQT_NO_SOUND - -class TQSoundData; - -class TQ_EXPORT TQSound : public TQObject { - TQ_OBJECT -public: - static bool isAvailable(); - static void play(const TQString& filename); - - TQSound(const TQString& filename, TQObject* parent=0, const char* name=0); - ~TQSound(); - - /* Coming soon... - ? - TQSound(int hertz, Type type=Mono); - int play(const ushort* data, int samples); - bool full(); - signal void notFull(); - ? - */ - -#ifndef TQT_NO_COMPAT - static bool available() { return isAvailable(); } -#endif - - int loops() const; - int loopsRemaining() const; - void setLoops(int); - TQString fileName() const; - - bool isFinished() const; - -public slots: - void play(); - void stop(); - -private: - TQSoundData* d; - friend class TQAuServer; -}; - - -/* - TQAuServer is an INTERNAL class. If you wish to provide support for - additional audio servers, you can make a subclass of TQAuServer to do - so, HOWEVER, your class may need to be re-engineered to some degree - with each new TQt release, including minor releases. - - TQAuBucket is whatever you want. -*/ - -class TQ_EXPORT TQAuBucket { -public: - virtual ~TQAuBucket(); -}; - -class TQ_EXPORT TQAuServer : public TQObject { - TQ_OBJECT - -public: - TQAuServer(TQObject* parent, const char* name); - ~TQAuServer(); - - virtual void init(TQSound*); - virtual void play(const TQString& filename); - virtual void play(TQSound*)=0; - virtual void stop(TQSound*)=0; - virtual bool okay()=0; - -protected: - void setBucket(TQSound*, TQAuBucket*); - TQAuBucket* bucket(TQSound*); - int decLoop(TQSound*); -}; - -#endif // TQT_NO_SOUND - -#endif diff --git a/src/kernel/ntqt.h b/src/kernel/ntqt.h deleted file mode 100644 index 7032b7383..000000000 --- a/src/kernel/ntqt.h +++ /dev/null @@ -1,326 +0,0 @@ -/**************************************************************************** -** -** TQt GUI Toolkit -** -** This header file efficiently includes all TQt GUI Toolkit functionality. -** -** Generated : Mon Oct 13 13:07:29 CEST 2003 - -** -** Copyright (C) 1995-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the TQt GUI Toolkit. -** -*****************************************************************************/ - -#ifndef QT_H -#define QT_H -#include "tqglobal.h" -#include "tqfeatures.h" -#include "ntqshared.h" -#include "tqptrcollection.h" -#include "tqglist.h" -#include "tqobjectdefs.h" -#include "tqnamespace.h" -#include "tqgarray.h" -#include "tqmemarray.h" -#include "tqcstring.h" -#include "tqstring.h" -#include "tqptrlist.h" -#include "tqiodevice.h" -#include "tqkeysequence.h" -#include "ntqwindowdefs.h" -#include "tqgdict.h" -#include "tqfont.h" -#include "tqdatastream.h" -#include "tqpair.h" -#include "tqpoint.h" -#include -#include "tqtextstream.h" -#include "tqfontinfo.h" -#include "tqsizepolicy.h" -#include "ntqtl.h" -#include "tqsize.h" -#include "tqrect.h" -#include "tqbitarray.h" -#include "tqregion.h" -#include "tqsql.h" -#include "tqstrlist.h" -#include "tqvaluelist.h" -#include "tqmap.h" -#include "tqdatetime.h" -#include "tqmime.h" -#include "tqasciidict.h" -#include "tqpaintdevice.h" -#include "tqfontmetrics.h" -#include "tqdict.h" -#include "tqevent.h" -#include "tqhostaddress.h" -#include "tqstringlist.h" -#include "tqcolor.h" -#include -#include "tqobject.h" -#include -#include "tqbrush.h" -#include "tqpalette.h" -#include "tqwidget.h" -#include "tqjpunicode.h" -#include "tqtextcodec.h" -#include "tqpixmap.h" -#include -#include "tqiconset.h" -#include "tqbutton.h" -#include -#include "tqstyle.h" -#include "tqframe.h" -#include "tqfile.h" -#include "tqfileinfo.h" -#include "tqurlinfo.h" -#include "tqwidgetlist.h" -#include -#include "tqgroupbox.h" -#include "tqdialog.h" -#include -#include "tqdockwindow.h" -#include "tqcommonstyle.h" -#include "tqnetworkprotocol.h" -#include -#include -#include "tqgcache.h" -#include -#include -#include -#include -#include "tqgplugin.h" -#include -#include "tqrangecontrol.h" -#include "tqbuttongroup.h" -#include -#include "tqgvector.h" -#include "tqhbox.h" -#include -#include -#include "tqsocketnotifier.h" -#include -#include -#include -#include "tqbuffer.h" -#include "tqimage.h" -#include -#include "tqlineedit.h" -#include -#include "tqintdict.h" -#include "tqmotifstyle.h" -#include "tqpicture.h" -#include -#include -#include -#include -#include "tqlabel.h" -#include "tqlayout.h" -#include -#include -#include -#include "tqscrollbar.h" -#include "tqscrollview.h" -#include "tqdir.h" -#include "tqwindowsstyle.h" -#include "tqconnection.h" -#include "tqbitmap.h" -#include "ntqvariant.h" -#include "tqsignal.h" -#include -#include "tqmetaobject.h" -#include "tqheader.h" -#include -#include -#include -#include "tqptrvector.h" -#include "tqmutex.h" -#include -#include -#include "tqguardedptr.h" -#include -#include "tqsqlfield.h" -#include -#include -#include -#include -#include "tqpointarray.h" -#include "tqmenudata.h" -#include -#include "tqpen.h" -#include "tqdragobject.h" -#include -#include -#include -#include -#include -#include -#include -#include "tqpopupmenu.h" -#include -#include -#include -#include "tqprogressbar.h" -#include -#include "tqptrdict.h" -#include -#include -#include -#include "tqstylesheet.h" -#include -#include -#include -#include -#include "tqregexp.h" -#include -#include -#include -#include -#include "tqsemaphore.h" -#include -#include "tqsocketdevice.h" -#include -#include -#include -#include -#include "tqtimer.h" -#include -#include -#include -#include "tqwmatrix.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "tqsqlerror.h" -#include "tqeditorfactory.h" -#include "tqsqlquery.h" -#include "tqsqlrecord.h" -#include -#include "tqsqlindex.h" -#include "tqsqlcursor.h" -#include -#include -#include "tqtable.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include "tqtranslator.h" -#include -#include -#include -#include -#include "tqtextedit.h" -#include -#include -#include "tqsqleditorfactory.h" -#include -#include -#include -#include -#include -#include -#include "tqtoolbar.h" -#include -#include "tqwaitcondition.h" -#include -#include -#include -#include -#include -#include "tqdesktopwidget.h" -#include -#include "tqurl.h" -#include "tqurloperator.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined( QT_MOC_CPP ) || defined( QT_H_CPP ) || defined( Q_OS_MACX ) -#include -#include -#include "private/qcom_p.h" -#include "private/tqimageformatinterface_p.h" -#include "private/tqisciicodec_p.h" -#include "private/tqlayoutengine_p.h" -#include "private/qcomlibrary_p.h" -#include "private/qeffects_p.h" -#include "private/tqgpluginmanager_p.h" -#include "private/qinternal_p.h" -#include "private/tqsqldriverinterface_p.h" -#include "private/tqsqlmanager_p.h" -#include "private/qlock_p.h" -#include "private/tqcomponentfactory_p.h" -#include "private/tqstyleinterface_p.h" -#include "private/qrichtext_p.h" -#include "private/qsvgdevice_p.h" -#include "private/tqfontcodecs_p.h" -#include "private/tqtextcodecinterface_p.h" -#include "private/qpsprinter_p.h" -#include "private/qtitlebar_p.h" -#include "private/qucom_p.h" -#include "private/qucomextra_p.h" -#include "private/qpluginmanager_p.h" -#include "private/tqdir_p.h" -#include "private/tqsettings_p.h" -#include "private/tqsqlextension_p.h" -#include "private/tqdialogbuttons_p.h" -#include "private/tqwidgetinterface_p.h" -#include "private/tqwidgetresizehandler_p.h" -#include "private/tqlibrary_p.h" -#endif // Private headers - - -#ifdef TQ_WS_X11 -#include "private/tqttdeintegration_x11_p.h" -#endif - -#ifdef TQ_WS_MAC -#include -#include -#endif // TQ_WS_MAC - -#ifdef TQ_WS_WIN -#include -#endif - -#ifdef TQ_WS_WCE -#include -#endif // TQ_WS_WCE - -#endif // QT_H diff --git a/src/kernel/ntqvariant.h b/src/kernel/ntqvariant.h deleted file mode 100644 index 2a6eeec19..000000000 --- a/src/kernel/ntqvariant.h +++ /dev/null @@ -1,395 +0,0 @@ -/**************************************************************************** -** -** Definition of TQVariant class -** -** Created : 990414 -** -** 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 TQVARIANT_H -#define TQVARIANT_H - -#ifndef QT_H -#include "tqmap.h" -#include "tqstring.h" -#include "tqstringlist.h" -#include "tqvaluelist.h" -#endif // QT_H - -#ifndef TQT_NO_VARIANT -class TQString; -class TQCString; -class TQFont; -class TQPixmap; -class TQBrush; -class TQRect; -class TQPoint; -class TQImage; -class TQSize; -class TQColor; -class TQPalette; -class TQColorGroup; -class TQIconSet; -class TQDataStream; -class TQPointArray; -class TQRegion; -class TQBitmap; -class TQCursor; -class TQStringList; -class TQSizePolicy; -class TQDate; -class TQTime; -class TQDateTime; -class TQBitArray; -class TQKeySequence; -class TQPen; -// Some headers rejected after TQVariant declaration for GCC 2.7.* compatibility -class TQVariant; -#ifndef TQT_NO_TEMPLATE_VARIANT -template class TQValueList; -template class TQValueListConstIterator; -template class TQValueListNode; -template class TQMap; -template class TQMapConstIterator; - -typedef TQMap TQStringVariantMap; -typedef TQMapIterator TQStringVariantMapIterator; -typedef TQMapConstIterator TQStringVariantMapConstIterator; -#endif - -class TQ_EXPORT TQVariant -{ -public: - enum Type { - Invalid, - Map, - List, - String, - StringList, - Font, - Pixmap, - Brush, - Rect, - Size, - Color, - Palette, - ColorGroup, - IconSet, - Point, - Image, - Int, - UInt, - Bool, - Double, - CString, - PointArray, - Region, - Bitmap, - Cursor, - SizePolicy, - Date, - Time, - DateTime, - ByteArray, - BitArray, - KeySequence, - Pen, - LongLong, - ULongLong - }; - - TQVariant(); - ~TQVariant(); - TQVariant( const TQVariant& ); -#ifndef TQT_NO_DATASTREAM - TQVariant( TQDataStream& s ); -#endif - TQVariant( const TQString& ); - TQVariant( const TQCString& ); - TQVariant( const char* ); -#ifndef TQT_NO_STRINGLIST - TQVariant( const TQStringList& ); -#endif - TQVariant( const TQFont& ); - TQVariant( const TQPixmap& ); - TQVariant( const TQImage& ); - TQVariant( const TQBrush& ); - TQVariant( const TQPoint& ); - TQVariant( const TQRect& ); - TQVariant( const TQSize& ); - TQVariant( const TQColor& ); - TQVariant( const TQPalette& ); - TQVariant( const TQColorGroup& ); - TQVariant( const TQIconSet& ); - TQVariant( const TQPointArray& ); - TQVariant( const TQRegion& ); - TQVariant( const TQBitmap& ); - TQVariant( const TQCursor& ); - TQVariant( const TQDate& ); - TQVariant( const TQTime& ); - TQVariant( const TQDateTime& ); - TQVariant( const TQByteArray& ); - TQVariant( const TQBitArray& ); -#ifndef TQT_NO_ACCEL - TQVariant( const TQKeySequence& ); -#endif - TQVariant( const TQPen& ); -#ifndef TQT_NO_TEMPLATE_VARIANT - TQVariant( const TQValueList& ); - TQVariant( const TQMap& ); -#endif - TQVariant( int ); - TQVariant( uint ); - TQVariant( TQ_LLONG ); - TQVariant( TQ_ULLONG ); - TQVariant( bool ); - TQVariant( double ); - TQVariant( TQSizePolicy ); - - TQVariant& operator= ( const TQVariant& ); - bool operator==( const TQVariant& ) const; - bool operator!=( const TQVariant& ) const; - - Type type() const; - const char* typeName() const; - - bool canCast( Type ) const; - bool cast( Type ); - - bool isValid() const; - bool isNull() const; - - void clear(); - - const TQString toString() const; - const TQCString toCString() const; -#ifndef TQT_NO_STRINGLIST - const TQStringList toStringList() const; -#endif - const TQFont toFont() const; - const TQPixmap toPixmap() const; - const TQImage toImage() const; - const TQBrush toBrush() const; - const TQPoint toPoint() const; - const TQRect toRect() const; - const TQSize toSize() const; - const TQColor toColor() const; - const TQPalette toPalette() const; - const TQColorGroup toColorGroup() const; - const TQIconSet toIconSet() const; - const TQPointArray toPointArray() const; - const TQBitmap toBitmap() const; - const TQRegion toRegion() const; - const TQCursor toCursor() const; - const TQDate toDate() const; - const TQTime toTime() const; - const TQDateTime toDateTime() const; - const TQByteArray toByteArray() const; - const TQBitArray toBitArray() const; -#ifndef TQT_NO_ACCEL - const TQKeySequence toKeySequence() const; -#endif - const TQPen toPen() const; - int toInt( bool * ok=0 ) const; - uint toUInt( bool * ok=0 ) const; - TQ_LLONG toLongLong( bool * ok=0 ) const; - TQ_ULLONG toULongLong( bool * ok=0 ) const; - bool toBool() const; - double toDouble( bool * ok=0 ) const; -#ifndef TQT_NO_TEMPLATE_VARIANT - const TQValueList toList() const; - const TQMap toMap() const; -#endif - TQSizePolicy toSizePolicy() const; - -#ifndef TQT_NO_TEMPLATE_VARIANT - TQValueListConstIterator stringListBegin() const; - TQValueListConstIterator stringListEnd() const; - TQValueListConstIterator listBegin() const; - TQValueListConstIterator listEnd() const; - TQMapConstIterator mapBegin() const; - TQMapConstIterator mapEnd() const; - TQMapConstIterator mapFind( const TQString& ) const; -#endif - TQString& asString(); - TQCString& asCString(); -#ifndef TQT_NO_STRINGLIST - TQStringList& asStringList(); -#endif - TQFont& asFont(); - TQPixmap& asPixmap(); - TQImage& asImage(); - TQBrush& asBrush(); - TQPoint& asPoint(); - TQRect& asRect(); - TQSize& asSize(); - TQColor& asColor(); - TQPalette& asPalette(); - TQColorGroup& asColorGroup(); - TQIconSet& asIconSet(); - TQPointArray& asPointArray(); - TQBitmap& asBitmap(); - TQRegion& asRegion(); - TQCursor& asCursor(); - TQDate& asDate(); - TQTime& asTime(); - TQDateTime& asDateTime(); - TQByteArray& asByteArray(); - TQBitArray& asBitArray(); -#ifndef TQT_NO_ACCEL - TQKeySequence& asKeySequence(); -#endif - TQPen& asPen(); - int& asInt(); - uint& asUInt(); - TQ_LLONG& asLongLong(); - TQ_ULLONG& asULongLong(); - bool& asBool(); - double& asDouble(); -#ifndef TQT_NO_TEMPLATE_VARIANT - TQValueList& asList(); - TQMap& asMap(); -#endif - TQSizePolicy& asSizePolicy(); - -#ifndef TQT_NO_DATASTREAM - void load( TQDataStream& ); - void save( TQDataStream& ) const; -#endif - static const char* typeToName( Type typ ); - static Type nameToType( const char* name ); - -private: - void detach(); - - class Private : public TQShared - { - public: - Private(); - Private( Private* ); - ~Private(); - - void clear(); - - Type typ; - union - { - uint u; - int i; - TQ_LLONG ll; - TQ_ULLONG ull; - bool b; - double d; - void *ptr; - } value; - uint is_null : 1; // ## 4.0 merge with typ - }; - - Private* d; - -public: - void* rawAccess( void* ptr = 0, Type typ = Invalid, bool deepCopy = FALSE ); -}; - -inline TQVariant::Type TQVariant::type() const -{ - return d->typ; -} - -inline bool TQVariant::isValid() const -{ - return (d->typ != Invalid); -} - -#ifndef TQT_NO_TEMPLATE_VARIANT -inline TQValueListConstIterator TQVariant::stringListBegin() const -{ - if ( d->typ != StringList ) - return TQValueListConstIterator(); - return ((const TQStringList*)d->value.ptr)->begin(); -} - -inline TQValueListConstIterator TQVariant::stringListEnd() const -{ - if ( d->typ != StringList ) - return TQValueListConstIterator(); - return ((const TQStringList*)d->value.ptr)->end(); -} - -inline TQValueListConstIterator TQVariant::listBegin() const -{ - if ( d->typ != List ) - return TQValueListConstIterator(); - return ((const TQValueList*)d->value.ptr)->begin(); -} - -inline TQValueListConstIterator TQVariant::listEnd() const -{ - if ( d->typ != List ) - return TQValueListConstIterator(); - return ((const TQValueList*)d->value.ptr)->end(); -} - -inline TQMapConstIterator TQVariant::mapBegin() const -{ - if ( d->typ != Map ) - return TQMapConstIterator(); - return ((const TQMap*)d->value.ptr)->begin(); -} - -inline TQMapConstIterator TQVariant::mapEnd() const -{ - if ( d->typ != Map ) - return TQMapConstIterator(); - return ((const TQMap*)d->value.ptr)->end(); -} - -inline TQMapConstIterator TQVariant::mapFind( const TQString& key ) const -{ - if ( d->typ != Map ) - return TQMapConstIterator(); - return ((const TQMap*)d->value.ptr)->find( key ); -} -#endif - -#ifndef TQT_NO_DATASTREAM -TQ_EXPORT TQDataStream& operator>> ( TQDataStream& s, TQVariant& p ); -TQ_EXPORT TQDataStream& operator<< ( TQDataStream& s, const TQVariant& p ); -TQ_EXPORT TQDataStream& operator>> ( TQDataStream& s, TQVariant::Type& p ); -TQ_EXPORT TQDataStream& operator<< ( TQDataStream& s, const TQVariant::Type p ); -#endif - -#endif //TQT_NO_VARIANT -#endif // TQVARIANT_H diff --git a/src/kernel/ntqwindowdefs.h b/src/kernel/ntqwindowdefs.h deleted file mode 100644 index 166cc0638..000000000 --- a/src/kernel/ntqwindowdefs.h +++ /dev/null @@ -1,183 +0,0 @@ -/**************************************************************************** -** -** Definition of general window system dependent functions, types and -** constants -** -** Created : 931029 -** -** 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 TQWINDOWDEFS_H -#define TQWINDOWDEFS_H - -#ifndef QT_H -#include "tqobjectdefs.h" -#include "tqstring.h" -#include "tqnamespace.h" -#endif // QT_H - -// Class forward definitions - -class TQPaintDevice; -class TQPaintDeviceMetrics; -class TQWidget; -class TQWidgetMapper; -class TQDialog; -class TQColor; -class TQColorGroup; -class TQPalette; -class TQCursor; -class TQPoint; -class TQSize; -class TQRect; -class TQPointArray; -class TQPainter; -class TQRegion; -class TQFont; -class TQFontMetrics; -class TQFontInfo; -class TQPen; -class TQBrush; -class TQWMatrix; -class TQPixmap; -class TQBitmap; -class TQMovie; -class TQImage; -class TQImageIO; -class TQPicture; -class TQPrinter; -class TQAccel; -class TQTimer; -class TQTime; -class TQClipboard; - - -// Widget list (defined in tqwidgetlist.h) - -class TQWidgetList; -class TQWidgetListIt; - - -// Window system dependent definitions - -#if defined(TQ_WS_MAC) -#if QT_MACOSX_VERSION < 0x1020 -typedef struct OpaqueEventLoopTimerRef* EventLoopTimerRef; -typedef struct OpaqueMenuHandle *MenuRef; -#else -typedef struct __EventLoopTimer* EventLoopTimerRef; -typedef struct OpaqueMenuRef* MenuRef; -#endif - -#ifndef TQ_WS_MACX -typedef struct CGContext *CGContextRef; -#endif -typedef struct OpaqueWindowGroupRef *WindowGroupRef; -typedef struct OpaqueGrafPtr *CGrafPtr; -typedef struct OpaquePMPrintSession *PMPrintSession; -typedef struct OpaquePMPrintSettings *PMPrintSettings; -typedef struct OpaquePMPageFormat *PMPageFormat; -typedef struct Point Point; -typedef struct OpaqueEventHandlerRef* EventHandlerRef; -typedef struct OpaqueEventHandlerCallRef* EventHandlerCallRef; -typedef struct OpaqueEventRef* EventRef; -typedef long int OSStatus; -typedef struct OpaqueScrapRef *ScrapRef; -typedef struct OpaqueRgnHandle *RgnHandle; -typedef struct OpaqueWindowPtr *WindowPtr; -typedef WindowPtr WindowRef; -typedef struct OpaqueGrafPtr *GWorldPtr; -typedef GWorldPtr GrafPtr; -typedef struct GDevice **GDHandle; -typedef struct ColorTable ColorTable; -typedef struct BitMap BitMap; -typedef struct EventRecord EventRecord; -typedef void * MSG; -typedef int WId; -typedef struct AEDesc AppleEvent; - -#endif // TQ_WS_MAC - -#if defined(TQ_WS_WIN) -#include "qwindowdefs_win.h" -#endif // TQ_WS_WIN - - -#if defined(Q_OS_TEMP) -#include "qwinfunctions_wce.h" -#endif // Q_OS_TEMP - -#if defined(TQ_WS_X11) - -typedef struct _XDisplay Display; -typedef union _XEvent XEvent; -typedef struct _XGC *GC; -typedef struct _XRegion *Region; -typedef unsigned long WId; - -TQ_EXPORT Display *tqt_xdisplay(); -TQ_EXPORT int tqt_xscreen(); -TQ_EXPORT WId tqt_xrootwin(); // ### REMOVE 4.0 -TQ_EXPORT WId tqt_xrootwin( int scrn ); // ### 4.0 add default arg of -1 -TQ_EXPORT GC tqt_xget_readonly_gc( int scrn, bool monochrome ); -TQ_EXPORT GC tqt_xget_temp_gc( int scrn, bool monochrome ); - -TQ_EXPORT const char *tqAppClass(); // get application class - -#endif // TQ_WS_X11 - -class TQApplication; - -#if defined(NEEDS_QMAIN) -#define main qMain -#endif - -// Global platform-independent types and functions - -typedef TQ_INT32 TQCOORD; // coordinate type -const TQCOORD TQCOORD_MAX = 2147483647; -const TQCOORD TQCOORD_MIN = -TQCOORD_MAX - 1; - -typedef unsigned int TQRgb; // RGB triplet - -TQ_EXPORT const char *tqAppName(); // get application name - -// Misc functions - -typedef void (*TQtCleanUpFunction)(); -TQ_EXPORT void tqAddPostRoutine( TQtCleanUpFunction ); -TQ_EXPORT void tqRemovePostRoutine( TQtCleanUpFunction ); - -#endif // TQWINDOWDEFS_H diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index 8ad7f5a55..db0fa0278 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -282,7 +282,7 @@ a non-GUI server and a GUI client. \headerfile tqnamespace.h - \headerfile ntqwindowdefs.h + \headerfile tqwindowdefs.h \headerfile tqglobal.h */ diff --git a/src/kernel/qsound.cpp b/src/kernel/qsound.cpp deleted file mode 100644 index 3141fc2b5..000000000 --- a/src/kernel/qsound.cpp +++ /dev/null @@ -1,313 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQSound class and TQAuServer internal class -** -** Created : 000117 -** -** Copyright (C) 1999-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 "ntqsound.h" - -#ifndef TQT_NO_SOUND - -#include "tqptrlist.h" - -static TQPtrList *servers=0; - -TQAuServer::TQAuServer(TQObject* parent, const char* name) : - TQObject(parent,name) -{ - if ( !servers ) { - servers = new TQPtrList; - // ### add cleanup - } - servers->prepend(this); -} - -TQAuServer::~TQAuServer() -{ - servers->remove(this); - if ( servers->count() == 0 ) { - delete servers; - servers = 0; - } -} - -void TQAuServer::play(const TQString& filename) -{ - TQSound s(filename); - play(&s); -} - -extern TQAuServer* qt_new_audio_server(); - -static TQAuServer& server() -{ - if (!servers) qt_new_audio_server(); - return *servers->first(); -} - -class TQSoundData { -public: - TQSoundData(const TQString& fname) : - filename(fname), bucket(0), looprem(0), looptotal(1) - { - } - - ~TQSoundData() - { - delete bucket; - } - - TQString filename; - TQAuBucket* bucket; - int looprem; - int looptotal; -}; - -/*! - \class TQSound ntqsound.h - \brief The TQSound class provides access to the platform audio facilities. - - \ingroup multimedia - \mainclass - - TQt provides the most commonly required audio operation in GUI - applications: asynchronously playing a sound file. This is most - easily accomplished with a single call: - \code - TQSound::play("mysounds/bells.wav"); - \endcode - - A second API is provided in which a TQSound object is created from - a sound file and is played later: - \code - TQSound bells("mysounds/bells.wav"); - - bells.play(); - \endcode - - Sounds played using the second model may use more memory but play - more immediately than sounds played using the first model, - depending on the underlying platform audio facilities. - - On Microsoft Windows the underlying multimedia system is used; - only WAVE format sound files are supported. - - On X11 the \link ftp://ftp.x.org/contrib/audio/nas/ Network Audio - System\endlink is used if available, otherwise all operations work - silently. NAS supports WAVE and AU files. - - On Macintosh, ironically, we use QT (\link - http://quicktime.apple.com QuickTime\endlink) for sound, this - means all QuickTime formats are supported by TQt/Mac. - - The availability of sound can be tested with - TQSound::isAvailable(). -*/ - -/*! - \fn static bool TQSound::available() - - Returns TRUE if sound support is available; otherwise returns FALSE. -*/ - -/*! - Plays the sound in a file called \a filename. -*/ -void TQSound::play(const TQString& filename) -{ - server().play(filename); -} - -/*! - Constructs a TQSound that can quickly play the sound in a file - named \a filename. - - This may use more memory than the static \c play function. - - The \a parent and \a name arguments (default 0) are passed on to - the TQObject constructor. -*/ -TQSound::TQSound(const TQString& filename, TQObject* parent, const char* name) : - TQObject(parent,name), - d(new TQSoundData(filename)) -{ - server().init(this); -} - -/*! - Destroys the sound object. If the sound is not finished playing stop() is called on it. - - \sa stop() isFinished() -*/ -TQSound::~TQSound() -{ - if ( !isFinished() ) - stop(); - delete d; -} - -/*! - Returns TRUE if the sound has finished playing; otherwise returns FALSE. - - \warning On Windows this function always returns TRUE for unlooped sounds. -*/ -bool TQSound::isFinished() const -{ - return d->looprem == 0; -} - -/*! - \overload - - Starts the sound playing. The function returns immediately. - Depending on the platform audio facilities, other sounds may stop - or may be mixed with the new sound. - - The sound can be played again at any time, possibly mixing or - replacing previous plays of the sound. -*/ -void TQSound::play() -{ - d->looprem = d->looptotal; - server().play(this); -} - -/*! - Returns the number of times the sound will play. -*/ -int TQSound::loops() const -{ - return d->looptotal; -} - -/*! - Returns the number of times the sound will loop. This value - decreases each time the sound loops. -*/ -int TQSound::loopsRemaining() const -{ - return d->looprem; -} - -/*! - Sets the sound to repeat \a l times when it is played. Passing the - value -1 will cause the sound to loop indefinitely. - - \sa loops() -*/ -void TQSound::setLoops(int l) -{ - d->looptotal = l; -} - -/*! - Returns the filename associated with the sound. -*/ -TQString TQSound::fileName() const -{ - return d->filename; -} - -/*! - Stops the sound playing. - - On Windows the current loop will finish if a sound is played - in a loop. - - \sa play() -*/ -void TQSound::stop() -{ - server().stop(this); -} - - -/*! - Returns TRUE if sound facilities exist on the platform; otherwise - returns FALSE. An application may choose either to notify the user - if sound is crucial to the application or to operate silently - without bothering the user. - - If no sound is available, all TQSound operations work silently and - quickly. -*/ -bool TQSound::isAvailable() -{ - return server().okay(); -} - -/*! - Sets the internal bucket record of sound \a s to \a b, deleting - any previous setting. -*/ -void TQAuServer::setBucket(TQSound* s, TQAuBucket* b) -{ - delete s->d->bucket; - s->d->bucket = b; -} - -/*! - Returns the internal bucket record of sound \a s. -*/ -TQAuBucket* TQAuServer::bucket(TQSound* s) -{ - return s->d->bucket; -} - -/*! - Decrements the TQSound::loopRemaining() value for sound \a s, - returning the result. -*/ -int TQAuServer::decLoop(TQSound* s) -{ - if ( s->d->looprem > 0 ) - --s->d->looprem; - return s->d->looprem; -} - -/*! - Initializes the sound. The default implementation does nothing. -*/ -void TQAuServer::init(TQSound*) -{ -} - -TQAuBucket::~TQAuBucket() -{ -} - -#endif // TQT_NO_SOUND diff --git a/src/kernel/qsound_x11.cpp b/src/kernel/qsound_x11.cpp deleted file mode 100644 index ea0d8f212..000000000 --- a/src/kernel/qsound_x11.cpp +++ /dev/null @@ -1,281 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQSound class and TQAuServer internal class -** -** Created : 000117 -** -** Copyright (C) 1999-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 "ntqsound.h" - -#ifndef TQT_NO_SOUND - -#include "tqptrdict.h" -#include "tqsocketnotifier.h" -#include "ntqapplication.h" - - -#ifdef QT_NAS_SUPPORT - -#include