From 479f5f799523bffbcc83dff581a2299c047c6fff Mon Sep 17 00:00:00 2001
From: tpearson
Date: Sat, 31 Jul 2010 19:44:01 +0000
Subject: Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
---
python/pyqt/doc/PyQt.html | 1568 ++++++++++++++---------------
python/pyqt/examples3/SQL/connect.ui.h | 2 +-
python/pyqt/examples3/SQL/sqlex.ui.h | 6 +-
python/pyqt/pylupdate3/fetchtr.cpp | 46 +-
python/pyqt/pylupdate3/main.cpp | 38 +-
python/pyqt/pylupdate3/merge.cpp | 6 +-
python/pyqt/pylupdate3/metatranslator.cpp | 194 ++--
python/pyqt/pylupdate3/metatranslator.h | 30 +-
python/pyqt/pylupdate3/numberh.cpp | 38 +-
python/pyqt/pylupdate3/proparser.cpp | 46 +-
python/pyqt/pylupdate3/proparser.h | 6 +-
python/pyqt/pylupdate3/sametexth.cpp | 12 +-
python/pyqt/pyuic2/domtool.cpp | 112 +--
python/pyqt/pyuic2/domtool.h | 20 +-
python/pyqt/pyuic2/globaldefs.h | 8 +-
python/pyqt/pyuic2/uic.cpp | 520 +++++-----
python/pyqt/pyuic2/uic.h | 106 +-
python/pyqt/pyuic2/widgetdatabase.cpp | 130 +--
python/pyqt/pyuic2/widgetdatabase.h | 34 +-
python/pyqt/pyuic3/domtool.cpp | 166 +--
python/pyqt/pyuic3/domtool.h | 26 +-
python/pyqt/pyuic3/embed.cpp | 64 +-
python/pyqt/pyuic3/form.cpp | 290 +++---
python/pyqt/pyuic3/globaldefs.h | 24 +-
python/pyqt/pyuic3/main.cpp | 52 +-
python/pyqt/pyuic3/object.cpp | 270 ++---
python/pyqt/pyuic3/parser.cpp | 26 +-
python/pyqt/pyuic3/parser.h | 4 +-
python/pyqt/pyuic3/subclassing.cpp | 56 +-
python/pyqt/pyuic3/uic.cpp | 474 ++++-----
python/pyqt/pyuic3/uic.h | 194 ++--
python/pyqt/pyuic3/widgetdatabase.cpp | 210 ++--
python/pyqt/pyuic3/widgetdatabase.h | 38 +-
33 files changed, 2408 insertions(+), 2408 deletions(-)
(limited to 'python/pyqt')
diff --git a/python/pyqt/doc/PyQt.html b/python/pyqt/doc/PyQt.html
index c2768f33..78c04c2a 100644
--- a/python/pyqt/doc/PyQt.html
+++ b/python/pyqt/doc/PyQt.html
@@ -340,7 +340,7 @@ CLASS="PROGRAMLISTING"
>void DebMainWindowFrm::browsePushButtonClicked()
{
if self.debugging:
- QMessageBox.critical(self, "Event", "browse pushbutton was clicked!")
+ TQMessageBox.critical(self, "Event", "browse pushbutton was clicked!")
}class DebMainWindowFrm(QMainWindow):
+>class DebMainWindowFrm(TQMainWindow):
...stuff...
def browsePushButtonClicked(self):
if self.debugging:
- QMessageBox.critical(self, "Event", "browse pushbutton was clicked!") | Unicode support was added to Qt in v2.0 and to Python in v1.6. In Qt, Unicode
support is implemented using the QStringTQString class. It is
important to understand that QStringTQStrings, Python string objects
and Python Unicode objects are all different but conversions between them are
automatic in many cases and easy to achieve manually when needed.
Whenever PyQt expects a QStringTQString as a function argument, a
Python string object or a Python Unicode object can be provided instead, and
PyQt will do the necessary conversion automatically.
You may also manually convert Python string and Unicode objects to
QStringTQStrings by using the QStringTQString constructor
as demonstrated in the following code fragment.qs1 = QString('Converted Python string object')
-qs2 = QString(u'Converted Python Unicode object')qs1 = TQString('Converted Python string object')
+qs2 = TQString(u'Converted Python Unicode object') |
In order to convert a QStringTQString to a Python string object use
the Python str() to a null QStringTQString and an empty
QStringTQString both result in an empty Python string object.
In order to convert a QStringTQString to a Python Unicode object use
the Python unicode() to a null QStringTQString and an empty
QStringTQString both result in an empty Python Unicode object.
c = new QColor();
-c = new QColor(); c = new TQColor();
+c = new TQColor(); | c = QColor()
-c = QColor() c = TQColor()
+c = TQColor() | self.c1 = QColor()
-self.c2 = QColor() self.c1 = TQColor()
+self.c2 = TQColor() | QObjectTQObject (and any of its sub-classes) keeps
pointers to its children and will automatically call their destructors. In
these cases, the corresponding Python object will also keep a reference to the
@@ -1527,7 +1527,7 @@ corresponding child objects.
So, in the following Python fragment, the first QLabelTQLabel is
not destroyed when the second is assigned to because the
parent QWidgetTQWidget still has a reference to it.
p = QWidget()
-l = QLabel('First label',p)
-l = QLabel('Second label',p)p = TQWidget()
+l = TQLabel('First label',p)
+l = TQLabel('Second label',p) |
tab = QTab()
+>tab = TQTab()
tab.label = "First Tab"
-tab.r = QRect(10,10,75,30) | class, and the
QApplication::translate()TQApplication::translate(),
QObject::tr()TQObject::tr()
and
QObject::trUtf8()TQObject::trUtf8() methods. Usually the
and uses the hardcoded class name as the
context. On the other hand, QApplication::translate()TQApplication::translate()
allows to context to be explicitly stated.
class A(QObject):
+>class A(TQObject):
def __init__(self):
- QObject.__init__(self)
+ TQObject.__init__(self)
def hello(self):
return self.tr("Hello")
@@ -1712,7 +1712,7 @@ CLASS="LITERAL"
>The PyQt behaviour is unsatisfactory and may be changed in the future. It is
recommended that QApplication.translate()TQApplication.translate() be used in
preference to that uses
QApplication.translate()TQApplication.translate().class A(QObject):
+>class A(TQObject):
def __init__(self):
- QObject.__init__(self)
+ TQObject.__init__(self)
def hello(self):
return qApp.translate("A","Hello") uses
QApplication.translate()TQApplication.translate().A signal may be either a Qt signal (specified using
SIGNAL()TQT_SIGNAL()) or a Python signal (specified using
PYSIGNAL()PYQT_SIGNAL()).A slot can be either a Python callable object, a Qt signal (specified using
SIGNAL()TQT_SIGNAL()), a Python signal (specified using
PYSIGNAL()PYQT_SIGNAL()), or a Qt slot (specified using
SLOT()TQT_SLOT()). You connect signals to slots (and other signals) as you would from C++. For
@@ -1802,14 +1802,14 @@ WIDTH="100%"
> | QObject.connect(a,SIGNAL("QtSig()"),pyFunction)
-QObject.connect(a,SIGNAL("QtSig()"),pyClass.pyMethod)
-QObject.connect(a,SIGNAL("QtSig()"),PYSIGNAL("PySig"))
-QObject.connect(a,SIGNAL("QtSig()"),SLOT("QtSlot()"))
-QObject.connect(a,PYSIGNAL("PySig"),pyFunction)
-QObject.connect(a,PYSIGNAL("PySig"),pyClass.pyMethod)
-QObject.connect(a,PYSIGNAL("PySig"),SIGNAL("QtSig()"))
-QObject.connect(a,PYSIGNAL("PySig"),SLOT("QtSlot()"))TQObject.connect(a,TQT_SIGNAL("QtSig()"),pyFunction)
+TQObject.connect(a,TQT_SIGNAL("QtSig()"),pyClass.pyMethod)
+TQObject.connect(a,TQT_SIGNAL("QtSig()"),PYQT_SIGNAL("PySig"))
+TQObject.connect(a,TQT_SIGNAL("QtSig()"),TQT_SLOT("QtSlot()"))
+TQObject.connect(a,PYQT_SIGNAL("PySig"),pyFunction)
+TQObject.connect(a,PYQT_SIGNAL("PySig"),pyClass.pyMethod)
+TQObject.connect(a,PYQT_SIGNAL("PySig"),TQT_SIGNAL("QtSig()"))
+TQObject.connect(a,PYQT_SIGNAL("PySig"),TQT_SLOT("QtSlot()")) |
| sbar = QScrollBar()
-lcd = QLCDNumber()
+>sbar = TQScrollBar()
+lcd = TQLCDNumber()
-QObject.connect(sbar,SIGNAL("valueChanged(int)"),lcd.display)
-QObject.connect(sbar,SIGNAL("valueChanged(int)"),lcd,SLOT("display(int)")) | Any instance of a class that is derived from the QObjectTQObject
class can emit a signal using the a.emit(SIGNAL("clicked()"),())
-a.emit(PYSIGNAL("pySig"),("Hello","World"))a.emit(TQT_SIGNAL("clicked()"),())
+a.emit(PYQT_SIGNAL("pySig"),("Hello","World")) | QObject::connect()TQObject::connect() is called from Python as
QObject.connect()TQObject.connect() or self.connect() if
called from a sub-class of QObjectTQObject.
Qt.SolidPattern
-QWidget.TabFocus
-QFrame.TabFocus
QAccelTQAccel
QAccelTQAccel is fully implemented.
QApplicationTQApplication
QApplicationTQApplication(int &argc, char **argv);
QApplicationTQApplication(int &argc, char **argv, bool GUIenabled);
QApplicationTQApplication(int &argc, char **argv, Type type);QBitmapTQBitmapQBitmapTQBitmap is fully implemented.
QBrushTQBrush
QBrushTQBrush is fully implemented, including the Python
QButtonTQButton
QButtonTQButton is fully implemented.
QButtonGroupTQButtonGroup
QButtonGroupTQButtonGroup is fully implemented.
QByteArrayTQByteArray
A Python string can be used whenever a QByteArrayTQByteArray can be
used. A QByteArrayTQByteArray can be converted to a Python string
using the Python QByteArray &assignTQByteArray &assign(const char *data, uint size);
QByteArray &setRawDataTQByteArray &setRawData(const char *data, uintsize);QCDEStyle (Qt v2+)TQCDEStyle (Qt v2+)QCDEStyleTQCDEStyle is fully implemented.
QCheckBoxTQCheckBox
QCheckBoxTQCheckBox is fully implemented.
QColorTQColor
The Python static QRgb getRgba(QRgb initial, bool *ok, QWidget *parent = 0, const char *name = 0);
(QRgb initial, bool *ok, TQWidget *parent = 0, const char *name = 0);
QColorGroupTQColorGroup
QColorGroupTQColorGroup is fully implemented.
QComboBoxTQComboBox
QComboBoxTQComboBox is fully implemented.
QCommonStyle (Qt v2+)TQCommonStyle (Qt v2+)
virtual void tabbarMetrics(const QTabBar *t, int &hframe, int &vframe, int &overlap);
(const TQTabBar *t, int &hframe, int &vframe, int &overlap);
QCString (Qt v2+)TQCString (Qt v2+)
A Python string can be used whenever a QCStringTQCString can be used.
A QCStringTQCString can be converted to a Python string using the
Python QCString &sprintfTQCString &sprintf(const char *format, ...);
QCursorTQCursorQCursorTQCursor is fully implemented.
QDataStreamTQDataStream
QDataStream &readBytesTQDataStream &readBytes(const char *&s, uint &l);
This takes no parameters. The QDataStreamTQDataStream result and the
data read are returned as a tuple.
QDataStream &readRawBytesTQDataStream &readRawBytes(const char *s, uint l);
parameter. The
QDataStreamTQDataStream result and the data read are returned as a
tuple.
QDataStream &writeBytesTQDataStream &writeBytes(const char *s, uint len);
QDataStream &writeRawBytesTQDataStream &writeRawBytes(const char *s, uint len);
QDateTQDateThe Python
@@ -3026,12 +3026,12 @@ CLASS="SECT2"
CLASS="SECT2"
>QDateTimeTQDateTime
QDateTimeTQDateTime is fully implemented, including the Python
QTimeTQTime
QTimeTQTime is fully implemented, including the Python
QDesktopWidget (Qt v3+)TQDesktopWidget (Qt v3+)
QDesktopWidgetTQDesktopWidget is fully implemented.
QDialogTQDialog
QObject.deleteLater()TQObject.deleteLater() or other techniques.
QDirTQDir
QDirTQDir is fully implemented, including the Python
QFileInfoTQFileInfo instances is used instead.
QDockArea (Qt v3+)TQDockArea (Qt v3+)
bool hasDockWindow const(QDockWindow *w, int *index = 0);
(TQDockWindow *w, int *index = 0);
w parameter and returns the index of the
-QDockWIndow or -1 if the QDockArea does not contain the QDockWindow.
QDragObjectTQDragObject
QDragObjectTQDragObject is fully implemented.
QImageDragTQImageDrag
QImageDragTQImageDrag is fully implemented.
QStoredDragTQStoredDrag
QStoredDragTQStoredDrag is fully implemented.
QTextDragTQTextDrag
QTextDragTQTextDrag is fully implemented.
QDropSiteTQDropSite
QDropSiteTQDropSite is fully implemented.
QEventTQEvent
QEventTQEvent is fully implemented.
Instances of QEventTQEvents are automatically converted to the
correct sub-class.
QChildEventTQChildEvent
QChildEventTQChildEvent is fully implemented.
QCloseEventTQCloseEvent
QCloseEventTQCloseEvent is fully implemented.
QCustomEventTQCustomEvent
QCustomEventTQCustomEvent is fully implemented. Any Python object can be
passed as the event data and its reference count is increased.
QDragEnterEventTQDragEnterEventQDragEnterEventTQDragEnterEvent is fully implemented.
QDragLeaveEventTQDragLeaveEvent
QDragLeaveEventTQDragLeaveEvent is fully implemented.
QDragMoveEventTQDragMoveEvent
QDragMoveEventTQDragMoveEvent is fully implemented.
QDropEventTQDropEvent
QDropEventTQDropEvent is fully implemented.
QFocusEventTQFocusEvent
QFocusEventTQFocusEvent is fully implemented.
QHideEventTQHideEvent
QHideEventTQHideEvent is fully implemented.
QKeyEventTQKeyEvent
QKeyEventTQKeyEvent is fully implemented.
QMouseEventTQMouseEvent
QMouseEventTQMouseEvent is fully implemented.
QMoveEventTQMoveEvent
QMoveEventTQMoveEvent is fully implemented.
QPaintEventTQPaintEvent
QPaintEventTQPaintEvent is fully implemented.
QResizeEventTQResizeEvent
QResizeEventTQResizeEvent is fully implemented.
QShowEventTQShowEvent
QShowEventTQShowEvent is fully implemented.
QTimerEventTQTimerEvent
QTimerEventTQTimerEvent is fully implemented.
QEventLoop (Qt v3.1+)TQEventLoop (Qt v3.1+)
QFileTQFile
QFileDialogTQFileDialog
QFileDialogTQFileDialog is fully implemented.
QFileIconProviderTQFileIconProvider
QFileIconProviderTQFileIconProvider is fully implemented.
QFilePreviewTQFilePreview
QFilePreviewTQFilePreview is fully implemented. However it cannot be
used from Python in the same way as it is used from C++ because PyQt does not
support multiple inheritance involving more than one wrapped class. A trick
@@ -3962,19 +3962,19 @@ WIDTH="100%"
>
class FilePreview(QFilePreview):
+>class FilePreview(TQFilePreview):
pass
-class Preview(QLabel):
+class Preview(TQLabel):
def __init__(self, parent=None):
- QLabel.__init__(self, parent)
+ TQLabel.__init__(self, parent)
self.preview = FilePreview()
self.preview.previewUrl = self.previewUrl | Note that QFilePreview cannot be instantiated directly because it is abstract.
+>Note that TQFilePreview cannot be instantiated directly because it is abstract.
Thanks to Hans-Peter Jansen for this trick.
QFileInfoTQFileInfo
QFileInfoTQFileInfo is fully implemented.
QFontTQFont
QFontTQFont is fully implemented, including the Python
QFontDatabase (Qt v2.1+)TQFontDatabase (Qt v2.1+)
QFontDatabaseTQFontDatabase is fully implemented.
static QFont getFont(bool *ok, const QFont &def, QWidget *parent = 0, const char *name = 0);
static TQFont getFont(bool *ok, const TQFont &def, TQWidget *parent = 0, const char *name = 0);
parameters and returns a tuple containing the
QFontTQFont result and the okstatic QFont getFont(bool *ok, QWidget *parent = 0, const char *name = 0);
static TQFont getFont(bool *ok, TQWidget *parent = 0, const char *name = 0);
parameters
and returns a tuple containing the QFontTQFont result and the
QFontInfoTQFontInfo
QFontInfoTQFontInfo is fully implemented.
QFontMetricsTQFontMetrics
QRect boundingRect(int x, int y, int w, int h, int flags, const QString &str, int len = -1, int tabstops = 0, int *tabarray = 0);
TQRect boundingRect(int x, int y, int w, int h, int flags, const TQString &str, int len = -1, int tabstops = 0, int *tabarray = 0);
QSize size(int flags, const QString &str, int len = -1, int tabstops = 0, int *tabarray = 0);
TQSize size(int flags, const TQString &str, int len = -1, int tabstops = 0, int *tabarray = 0);
QFrameTQFrame
QFrameTQFrame is fully implemented.
QGroupBoxTQGroupBox
QGroupBoxTQGroupBox is fully implemented.
QHeaderTQHeader
QHeaderTQHeader is fully implemented.
QIconSetTQIconSet
QIconSetTQIconSet is fully implemented.
QIconView (Qt v2.1+)TQIconView (Qt v2.1+)
QIconViewItem *makeRowLayout(QIconViewItem *begin, int &y);
TQIconViewItem *makeRowLayout(TQIconViewItem *begin, int &y);
QIconViewItem (Qt v2.1+)TQIconViewItem (Qt v2.1+)
QIconViewItemTQIconViewItem is fully implemented.
QImageTQImage
The Python QImageTQImage(const char *xpm[]);
QImageTQImage(uchar *data, int w, int h, int depth, QRgb *colorTable, int numColors, Endian bitOrder);QImage convertDepthWithPaletteTQImage convertDepthWithPalette(int, QRgb *p, int pc, int cf = 0);QImageIOTQImageIOQImageTextKeyLangTQImageTextKeyLang
QImageTextKeyLangTQImageTextKeyLang is fully implemented.
static QString getText(const QString &caption, const QString &label, const QString &text = QString::null, bool *ok = 0, QWidget *parent = 0, const char *name = 0);
static TQString getText(const TQString &caption, const TQString &label, const TQString &text = TQString::null, bool *ok = 0, TQWidget *parent = 0, const char *name = 0);
is not passed and the returned value is a tuple of
the QStringTQString result and the okstatic QString getText(const QString &caption, const QString &label, QLineEdit::EchoModeecho, const QString &text = QString::null, bool *ok = 0, QWidget *parent = 0, const char *name = 0);
static TQString getText(const TQString &caption, const TQString &label, TQLineEdit::EchoModeecho, const TQString &text = TQString::null, bool *ok = 0, TQWidget *parent = 0, const char *name = 0);
is not passed and the returned value is a tuple of
the QStringTQString result and the okstatic QString getText(const QString &caption, const QString &label, QLineEdit::EchoModeecho = QLineEdit::Normal, const QString &text = QString::null, bool *ok = 0, QWidget *parent = 0, const char *name = 0);
static TQString getText(const TQString &caption, const TQString &label, TQLineEdit::EchoModeecho = TQLineEdit::Normal, const TQString &text = TQString::null, bool *ok = 0, TQWidget *parent = 0, const char *name = 0);
is not passed and the returned value is a tuple of
the QStringTQString result and the okstatic int getInteger(const QString &caption, const QString &label, int num = 0, int from = -2147483647, int to = 2147483647, int step = 1, bool *ok = 0, QWidget *parent = 0, const char *name = 0);
(const TQString &caption, const TQString &label, int num = 0, int from = -2147483647, int to = 2147483647, int step = 1, bool *ok = 0, TQWidget *parent = 0, const char *name = 0);
static double getDouble(const QString &caption, const QString &label, double num = 0, double from = -2147483647, double to = 2147483647, int step = 1, bool *ok = 0, QWidget *parent = 0, const char *name = 0);
(const TQString &caption, const TQString &label, double num = 0, double from = -2147483647, double to = 2147483647, int step = 1, bool *ok = 0, TQWidget *parent = 0, const char *name = 0);
static QString getItem(const QString &caption, const QString &label, const QStringList &list, int current = 0, bool editable = TRUE, bool *ok = 0, QWidget *parent = 0, const char *name = 0);
static TQString getItem(const TQString &caption, const TQString &label, const TQStringList &list, int current = 0, bool editable = TRUE, bool *ok = 0, TQWidget *parent = 0, const char *name = 0);
is not passed and the returned value is a tuple of
the QStringTQString result and the okvoid scrollBarMetrics(const QTabBar *sb, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
(const TQTabBar *sb, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
QIODeviceTQIODevice
QIODeviceTQIODevice is fully implemented.
QKeySequence (Qt v3+)TQKeySequence (Qt v3+)
QKeySequenceTQKeySequence is fully implemented including the operators
!=, QString()TQString() and
int(). A QStringTQString instance or a Python
integer may be used whenever a QKeySequenceTQKeySequence can be used.
QLabelTQLabel
QLabelTQLabel is fully implemented.
QLayoutTQLayout
QLayoutTQLayout is fully implemented.
QBoxLayoutTQBoxLayout
QBoxLayoutTQBoxLayout is fully implemented.
QGridLayoutTQGridLayout
bool findWidget(QWidget *w, int *row, int *col);
(TQWidget *w, int *row, int *col);
QHBoxLayoutTQHBoxLayout
QHBoxLayoutTQHBoxLayout is fully implemented.
QLayoutIterator (Qt v2+)TQLayoutIterator (Qt v2+)
QLayoutItem *nextTQLayoutItem *next();
This is a wrapper around the QLayoutIteratorTQLayoutIterator
QSpacerItem (Qt v2+)TQSpacerItem (Qt v2+)
QSpacerItemTQSpacerItem is fully implemented.
QVBoxLayoutTQVBoxLayout
QVBoxLayoutTQVBoxLayout is fully implemented.
QLCDNumberTQLCDNumber
QLCDNumberTQLCDNumber is fully implemented.
QLineEditTQLineEdit
int characterAt(int xpos, QChar *chr);
(int xpos, TQChar *chr);
QListBoxTQListBox
QListBoxItemTQListBoxItem
QListBoxItemTQListBoxItem is fully implemented.
QListBoxPixmapTQListBoxPixmap
QListBoxPixmapTQListBoxPixmap is fully implemented.
QListBoxTextTQListBoxText
QListBoxTextTQListBoxText is fully implemented.
QListViewTQListView
QListViewTQListView is fully implemented.
Note that to remove a child QListViewItemTQListViewItem you must first
call QListViewItemTQListViewItem
QListViewItemTQListViewItem is fully implemented.
Note that to remove a child QListViewItemTQListViewItem you must first
call QCheckListItemTQCheckListItem
QCheckListItemTQCheckListItem is fully implemented.
QLocale (Qt v3.3+)TQLocale (Qt v3.3+)
QMainWindowTQMainWindow
QTextStream &operator<<(QTextStream &, const QMainWindow &);
TQTextStream &operator<<(TQTextStream &, const TQMainWindow &);
QTextStream &operator>>(QTextStream &, QMainWindow &);
TQTextStream &operator>>(TQTextStream &, TQMainWindow &);
bool getLocation(QToolBar *tb, ToolBarDock &dock, int &index, bool &nl, int &extraOffset);
(TQToolBar *tb, ToolBarDock &dock, int &index, bool &nl, int &extraOffset);
QList<QToolBar> toolBarsQList<TQToolBar> toolBars(ToolBarDock dock);
This returns a list of QToolBarTQToolBar instances. (Qt v2.1.0+)
QMemArray<type> (Qt v3+)TQMemArray<type> (Qt v3+)
Types based on the QMemArrayTQMemArray template are automatically
converted to and from Python lists of the type.
QMenuBarTQMenuBarQMenuBarTQMenuBar is fully implemented.
QMenuDataTQMenuData
QMenuItem *findItem(int id, QMenuData **parent);
TQMenuItem *findItem(int id, TQMenuData **parent);
QCustomMenuItem (Qt v2.1+)TQCustomMenuItem (Qt v2.1+)
QCustomMenuItemTQCustomMenuItem is fully implemented.
QMenuItemTQMenuItem
QMenuItemTQMenuItem is an internal Qt class.
QMessageBoxTQMessageBox
QMessageBoxTQMessageBox is fully implemented.
QMetaObjectTQMetaObject
QMetaPropertyTQMetaProperty
QMetaPropertyTQMetaProperty is fully implemented.
QMotifPlusStyle (Qt v2.2+)TQMotifPlusStyle (Qt v2.2+)
void scrollBarMetrics(const QScrollBar *sb, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
(const TQScrollBar *sb, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
QMotifStyle (Qt v2+)TQMotifStyle (Qt v2+)
void scrollBarMetrics(const QTabBar *sb, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
(const TQTabBar *sb, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
void tabbarMetrics(const QTabBar *t, int &hframe, int &vframe, int &overlap);
(const TQTabBar *t, int &hframe, int &vframe, int &overlap);
QMovieTQMovie
QMovie(QDataSource *src, int bufsize = 1024);
TQMovie(TQDataSource *src, int bufsize = 1024);
QMultiLineEditTQMultiLineEdit
QObjectTQObject
bool disconnect(const QObject *receiver, const char *member = 0);
(const TQObject *receiver, const char *member = 0);
bool disconnect(const char *signal = 0, const QObject *receiver = 0, const char *member = 0);
(const char *signal = 0, const TQObject *receiver = 0, const char *member = 0);
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member);
(const TQObject *sender, const char *signal, const TQObject *receiver, const char *member);
QObjectCleanupHandler (Qt v3+)TQObjectCleanupHandler (Qt v3+)
QObjectCleanupHandlerTQObjectCleanupHandler is fully implemented.
QObjectListTQObjectList
This class isn't implemented. Whenever a QObjectListTQObjectList is the
return type of a function or the type of an argument, a Python list of
QObjectTQObject instances is used instead.
QPaintDeviceMetricsTQPaintDeviceMetrics
QPaintDeviceMetricsTQPaintDeviceMetrics is fully implemented.
QPaintDeviceTQPaintDevice
virtual bool cmd(int, QPainter *, QPDevCmdParam *);
(int, TQPainter *, QPDevCmdParam *);
QPainterTQPainter
QRect boundingRectTQRect boundingRect(int x, int y, int w, int h, int flags, const char *str, int len = -1, char **intern = 0);
QRect boundingRect(const QRect&, int flags, const char *str, int len = -1, char **intern = 0);
TQRect boundingRect(const TQRect&, int flags, const char *str, int len = -1, char **intern = 0);
void drawText(int x, int y, int w, int h, int flags, const char *str, int len = -1, QRect *br = 0, char **intern = 0);
(int x, int y, int w, int h, int flags, const char *str, int len = -1, TQRect *br = 0, char **intern = 0);
void drawText(const QRect&, int flags, const char *str, int len = -1, QRect *br = 0, char **intern = 0);
(const TQRect&, int flags, const char *str, int len = -1, TQRect *br = 0, char **intern = 0);
QPaletteTQPalette
QPaletteTQPalette is fully implemented, including the Python
QPixmapTQPixmapQPixmapTQPixmap(const char *xpm[]);
QPixmapCache (Qt v3+)TQPixmapCache (Qt v3+)
QPixmapCacheTQPixmapCache is fully implemented.
QPenTQPen
QPenTQPen is fully implemented, including the Python
QPictureTQPictureQPlatinumStyle (Qt v2+)TQPlatinumStyle (Qt v2+)
void scrollBarMetrics(const QTabBar *sb, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
(const TQTabBar *sb, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
QPointTQPoint
The Python
@@ -6680,7 +6680,7 @@ CLASS="SECT2"
CLASS="SECT2"
>QPointArrayTQPointArray
QPointArrayTQPointArray(int nPoints, const QCOORD *points);
QPopupMenuTQPopupMenu
int exec(const QPoint &pos, int indexAtPoint = 0);
(const TQPoint &pos, int indexAtPoint = 0);
QPrintDialog (X11)TQPrintDialog (X11)
QPrintDialogTQPrintDialog is fully implemented.
QPrinterTQPrinter
QPrinterTQPrinter is fully implemented.
QProgressBarTQProgressBar
QProgressBarTQProgressBar is fully implemented.
QProgressDialogTQProgressDialog
QProgressDialogTQProgressDialog is fully implemented.
value.
QPtrList<type> (Qt v3+)TQPtrList<type> (Qt v3+)
Types based on the QPtrListTQPtrList template are automatically
converted to and from Python lists of the type.
QPushButtonTQPushButtonQPushButtonTQPushButton is fully implemented.
QRadioButtonTQRadioButton
QRadioButtonTQRadioButton is fully implemented.
QRangeControlTQRangeControl
QRangeControlTQRangeControl is fully implemented.
QRectTQRect
The Python
@@ -7094,7 +7094,7 @@ CLASS="SECT2"
CLASS="SECT2"
>QRegExpTQRegExp
The Python int match(const QString &str, int index = 0, int *len = 0);
(const TQString &str, int index = 0, int *len = 0);
QRegionTQRegion
The Python
@@ -7232,7 +7232,7 @@ NAME="AEN2719"
>QArray<QRect> rectsQArray<TQRect> rects();
void setRects(QRect *rects, int num);(TQRect *rects, int num);
QScrollBarTQScrollBar
QScrollBarTQScrollBar is fully implemented.
QScrollViewTQScrollView
QSettings (Qt v3+)TQSettings (Qt v3+)
bool readBoolEntry(const QString &key, bool def = 0, bool *ok = 0);
(const TQString &key, bool def = 0, bool *ok = 0);
double readDoubleEntry(const QString &key, double def = 0, bool *ok = 0);
(const TQString &key, double def = 0, bool *ok = 0);
QString readEntry(const QString &key, const QString &def = QString::null, bool *ok = 0);
TQString readEntry(const TQString &key, const TQString &def = TQString::null, bool *ok = 0);
is not passed and the returned value is a tuple of
the QStringTQString result and the okQStringList readListEntry(const QString &key, bool *ok = 0);
TQStringList readListEntry(const TQString &key, bool *ok = 0);
is not passed and the returned value is a tuple of
the QStringListTQStringList result and the okQStringList readListEntry(const QString &key, const QChar &separator, bool *ok = 0);
TQStringList readListEntry(const TQString &key, const TQChar &separator, bool *ok = 0);
is not passed and the returned value is a tuple of
the QStringListTQStringList result and the okint readNumEntry(const QString &key, int def = 0, bool *ok = 0);
(const TQString &key, int def = 0, bool *ok = 0);
bool writeEntry(const QString &key, bool value);
(const TQString &key, bool value);
QSGIStyle (Qt v2.2+)TQSGIStyle (Qt v2.2+)
void scrollBarMetrics(const QScrollBar *sb, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
(const TQScrollBar *sb, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
QSignalMapperTQSignalMapper
QSignalMapperTQSignalMapper is fully implemented.
QSizeTQSize
The Python
@@ -7715,12 +7715,12 @@ CLASS="SECT2"
CLASS="SECT2"
>QSizeGrip (Qt v2+)TQSizeGrip (Qt v2+)
QSizeGripTQSizeGrip is fully implemented.
QSliderTQSlider
QSliderTQSlider is fully implemented.
QSocketNotifierTQSocketNotifier
QSocketNotifierTQSocketNotifier is fully implemented.
QSpinBoxTQSpinBox
QSplitterTQSplitter
QStatusBarTQStatusBar
QStatusBarTQStatusBar is fully implemented.
QChar (Qt v2+)TQChar (Qt v2+)
QStringTQString
A Python string object (or Unicode object) can be used whenever a
QStringTQString can be used. A QStringTQString can be
converted to a Python string object using the Python QCharRef atTQCharRef at(uint i);
QChar constref constTQChar constref const(uint i);
QChar &refTQChar &ref(uint i);
QString &setUnicodeCodesTQString &setUnicodeCodes(const ushort *unicode_as_shorts, uint len);
QString &sprintfTQString &sprintf(const char *format, ...);QStringList (Qt v2+)TQStringList (Qt v2+)The Python Iterator append(const QString &x);
(const TQString &x);
Iterator prepend(const QString &x);
(const TQString &x);
QStrListTQStrList
This class isn't implemented. Whenever a QStrListTQStrList is the
return type of a function or the type of an argument, a Python list of strings
is used instead.
QStyle (Qt v2+)TQStyle (Qt v2+)virtual void scrollBarMetrics(const QScrollBar *b, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
(const TQScrollBar *b, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
virtual void tabbarMetrics(const QTabBar *t, int &hframe, int &vframe, int &overlap);
(const TQTabBar *t, int &hframe, int &vframe, int &overlap);
QStyleOption (Qt v3+)TQStyleOption (Qt v3+)
QStyleOptionTQStyleOption is fully implemented.
QTabTQTab
QTabTQTab is fully implemented.
QTabBarTQTabBar
QList<QTab> tabListQList<TQTab> tabList();
This returns a list of QTabTQTab instances.
QTabDialogTQTabDialog
QTabDialogTQTabDialog is fully implemented.
QTextCodec (Qt v2+)TQTextCodec (Qt v2+)
virtual QCString fromUnicode(const QString &uc, int &lenInOut);
virtual TQCString fromUnicode(const TQString &uc, int &lenInOut);
The returned value is a tuple of the QCStringTQCString result and the
updated QTextDecoder (Qt v2+)TQTextDecoder (Qt v2+)
QTextDecoderTQTextDecoder is fully implemented.
QTextEncoder (Qt v2+)TQTextEncoder (Qt v2+)
virtual QCString fromUnicode = 0(const QString &uc, int &lenInOut);
virtual TQCString fromUnicode = 0(const TQString &uc, int &lenInOut);
The returned value is a tuple of the QCStringTQCString result and the
updated QTextEdit (Qt v3+)TQTextEdit (Qt v3+)int charAt(const QPoint &pos, int *para = 0);
(const TQPoint &pos, int *para = 0);
virtual bool find(const QString &expr, bool cs, bool wo, bool forward = TRUE, int *para = 0, int *index = 0);
(const TQString &expr, bool cs, bool wo, bool forward = TRUE, int *para = 0, int *index = 0);
QTextStreamTQTextStream
QTextStreamTQTextStream(FILE *fp, int mode);
QTextStream &readRawBytesTQTextStream &readRawBytes(char *buf, uint len);QTextStream &writeRawBytesTQTextStream &writeRawBytes(const char *buf, uint len);QTextIStream (Qt v2+)TQTextIStream (Qt v2+)QTextIStreamTQTextIStream(FILE *fp, int mode);
QTextOStream (Qt v2+)TQTextOStream (Qt v2+)QTextOStreamTQTextOStream(FILE *fp, int mode);
QTextView (Qt v2+)TQTextView (Qt v2+)QTextViewTQTextView is fully implemented.
QTimerTQTimer
QTimerTQTimer is fully implemented.
QToolBarTQToolBar
QToolBarTQToolBar is fully implemented.
QToolButtonTQToolButton
QToolButtonTQToolButton is fully implemented.
QToolTipTQToolTip
QToolTipTQToolTip is fully implemented.
QToolTipGroupTQToolTipGroup
QToolTipGroupTQToolTipGroup is fully implemented.
QUrl (Qt v2.1+)TQUrl (Qt v2.1+)
QUrlTQUrl is fully implemented, including the
QString()TQString(), ==QUrlInfo (Qt v2.1+)TQUrlInfo (Qt v2.1+)
QUrlInfoTQUrlInfo is fully implemented.
QUrlOperator (Qt v2.1+)TQUrlOperator (Qt v2.1+)
QValidatorTQValidator
virtual State validate(QString& input, int& pos);
(TQString& input, int& pos);
QDoubleValidatorTQDoubleValidator
State validate(QString& input, int& pos);
(TQString& input, int& pos);
QIntValidatorTQIntValidator
State validate(QString& input, int& pos);
(TQString& input, int& pos);
QRegExpValidator (Qt v3+)TQRegExpValidator (Qt v3+)
virtual State validate(QString& input, int& pos);
(TQString& input, int& pos);
QValueList<type> (Qt v2+)TQValueList<type> (Qt v2+)
Types based on the QValueListTQValueList template are automatically
converted to and from Python lists of the type.
QVariant (Qt v2.1+)TQVariant (Qt v2.1+)
QVariantTQVariant(const char *val);
QVariant(const QBitArray &val);
TQVariant(const TQBitArray &val);
QVariant(const QValueList<QVariant> &val);
TQVariant(const TQValueList<TQVariant> &val);
QVariant(const QMap<QString,QVariant> &val);
TQVariant(const TQMap<TQString,TQVariant> &val);
QBitArray &asBitArrayTQBitArray &asBitArray();
QValueList<QVariant> &asListTQValueList<TQVariant> &asList();QMap<QString,QVariant> &asMapTQMap<TQString,TQVariant> &asMap();QValueListConstIterator<QVariant>listBegin constTQValueListConstIterator<TQVariant>listBegin const();QValueListConstIterator<QVariant>listEnd constTQValueListConstIterator<TQVariant>listEnd const();QMapConstIterator<QString,QVariant>mapBegin constTQMapConstIterator<TQString,TQVariant>mapBegin const();QMapConstIterator<QString,QVariant>mapEnd constTQMapConstIterator<TQString,TQVariant>mapEnd const();QMapConstIterator<QString,QVariant>mapFind const(const QString &key);TQMapConstIterator<TQString,TQVariant>mapFind const(const TQString &key);
QValueListConstIterator<QString>stringListBegin constTQValueListConstIterator<TQString>stringListBegin const();
QValueListConstIterator<QString>stringListEnd constTQValueListConstIterator<TQString>stringListEnd const();const QBitArray toBitArray constconst TQBitArray toBitArray const();const QValueList<QVariant>toList constconst TQValueList<TQVariant>toList const();const QMap<QString,QVariant>toMap constconst TQMap<TQString,TQVariant>toMap const();QVBox (Qt v2+)TQVBox (Qt v2+)QVBoxTQVBox is fully implemented.
QWhatsThisTQWhatsThis
QWhatsThisTQWhatsThis is fully implemented.
QWidgetTQWidget
QFocusData *focusDataTQFocusData *focusData();
QWidgetListTQWidgetList
This class isn't implemented. Whenever a QWidgetListTQWidgetList is the
return type of a function or the type of an argument, a Python list of
instances is used instead.
QWidgetStackTQWidgetStack
QWidgetStackTQWidgetStack is fully implemented.
QWindowsStyle (Qt v2+)TQWindowsStyle (Qt v2+)
void scrollBarMetrics(const QTabBar *sb, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
(const TQTabBar *sb, int &sliderMin, int &sliderMax, int &sliderLength, int &buttonDim);
void tabbarMetrics(const QTabBar *t, int &hframe, int &vframe, int &overlap);
(const TQTabBar *t, int &hframe, int &vframe, int &overlap);
QWizard (Qt v2+)TQWizard (Qt v2+)
QWizardTQWizard is fully implemented.
QWMatrixTQWMatrix
The Python QWMatrix invert constTQWMatrix invert const(bool *invertible = 0);
This takes no parameters and returns a tuple of the QWMatrixTQWMatrix
result and the QWorkspace (Qt v2.1+)TQWorkspace (Qt v2.1+)
QWorkspaceTQWorkspace is fully implemented.
unsigned long registerWeakActiveObject(const QString &guid);(const TQString &guid);
QAxObject(IUnknown *iface, QObject *parent = 0, const char *name = 0);
(IUnknown *iface, TQObject *parent = 0, const char *name = 0);
QAxWidget(IUnknown *iface, QWidget *parent = 0, const char *name = 0);
(IUnknown *iface, TQWidget *parent = 0, const char *name = 0);
QCanvas (Qt v2.2+)TQCanvas (Qt v2.2+)
QCanvasTQCanvas is fully implemented.
QCanvasItemList (Qt v2.2+)TQCanvasItemList (Qt v2.2+)
This class isn't implemented. Whenever a QCanvasItemListTQCanvasItemList is
the return type of a function or the type of an argument, a Python list of
QCanvasItemTQCanvasItem instances is used instead.
QCanvasPixmapArray (Qt v2.2+)TQCanvasPixmapArray (Qt v2.2+)
QPixmapArray(QList<QPixmap> pixmaps, QList<QPoint> hotspots);
(QList<TQPixmap> pixmaps, QList<TQPoint> hotspots);
The pixmaps argument is a Python list of QPixmap instances,
+> argument is a Python list of TQPixmap instances,
and the hotspotsQPixmapArray(QValueList<QPixmap> pixmaps, QPointArray hotspots = QPointArray());
(TQValueList<TQPixmap> pixmaps, TQPointArray hotspots = TQPointArray());
The pixmaps argument is a Python list of QPixmap instances.
+> argument is a Python list of TQPixmap instances.
(Qt v3+)
QGLTQGLQGLTQGL is fully implemented.
QGLContextTQGLContext
QGLContextTQGLContext is fully implemented.
QGLFormatTQGLFormat
QGLFormatTQGLFormat is fully implemented.
QGLWidgetTQGLWidget
QGLWidgetTQGLWidget is fully implemented.
QGLColormap (Qt v3.0+)TQGLColormap (Qt v3.0+)
QFtp (Qt v2.2+)TQFtp (Qt v2.2+)
QHostAddress (Qt v2.2+)TQHostAddress (Qt v2.2+)
QHostAddressTQHostAddress(Q_UINT8 *ip6Addr);
QHostAddressTQHostAddress(const Q_IPV6ADDR &ip6Addr);
QHttp (Qt v3+)TQHttp (Qt v3+)
QSocket (Qt v2.2+)TQSocket (Qt v2.2+)
QSocketDevice (Qt v2.2+)TQSocketDevice (Qt v2.2+)
QApplicationTQApplication(int& argc, char **argv, Type type);
virtual QString exec constvirtual TQString exec const();
QString exec constTQString exec const();
QDataBrowser (Qt v3+)TQDataBrowser (Qt v3+)
QSqlCursor (Qt v3+)TQSqlCursor (Qt v3+)
virtual int del(const QString &filter, bool invalidate = TRUE);
(const TQString &filter, bool invalidate = TRUE);
bool exec(const QString &query);
(const TQString &query);
QSqlDatabase (Qt v3+)TQSqlDatabase (Qt v3+)
QSqlQuery exec(const QString &query = QString::null);
TQSqlQuery exec(const TQString &query = TQString::null);
QSqlDriver (Qt v3+)TQSqlDriver (Qt v3+)
QSqlDriverTQSqlDriver is fully implemented.
QSqlPropertyMap (Qt v3+)TQSqlPropertyMap (Qt v3+)
QSqlPropertyMapTQSqlPropertyMap is fully implemented. However, because PyQt
does not allow new properties to be defined, it is not possible to implement
custom editor widgets in Python and add them to a property map. This will
@@ -12038,7 +12038,7 @@ CLASS="SECT2"
CLASS="SECT2"
>QSqlQuery (Qt v3+)TQSqlQuery (Qt v3+)
QMap<QString,QVariant> boundValues constTQMap<TQString,TQVariant> boundValues const();
virtual bool exec(const QString &query);
(const TQString &query);
QSqlRecord (Qt v3+)TQSqlRecord (Qt v3+)
QSqlRecordTQSqlRecord is fully implemented.
QSqlRecordInfo (Qt v3+)TQSqlRecordInfo (Qt v3+)
QSqlRecordInfoTQSqlRecordInfo is implemented as a Python list of
QSqlFieldInfoTQSqlFieldInfo instances.
QWidgetFactory (Qt v3+)TQWidgetFactory (Qt v3+)QWidgetFactoryTQWidgetFactory is fully implemented.
QDomImplementation (Qt v2.2+)TQDomImplementation (Qt v2.2+)QDomImplementationTQDomImplementation is fully implemented.
QDomDocument (Qt v2.2+)TQDomDocument (Qt v2.2+)
bool setContent(const QCString &buffer, bool namespaceProcessing, QString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
(const TQCString &buffer, bool namespaceProcessing, TQString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
bool setContent(const QByteArray &buffer, bool namespaceProcessing, QString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
(const TQByteArray &buffer, bool namespaceProcessing, TQString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
bool setContent(const QString &text, bool namespaceProcessing, QString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
(const TQString &text, bool namespaceProcessing, TQString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
bool setContent(const QIODevice *dev, bool namespaceProcessing, QString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
(const TQIODevice *dev, bool namespaceProcessing, TQString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
bool setContent(const QCString &buffer, QString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
(const TQCString &buffer, TQString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
bool setContent(const QByteArray &buffer, QString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
(const TQByteArray &buffer, TQString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
bool setContent(const QString &text, QString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
(const TQString &text, TQString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
bool setContent(const QIODevice *dev, QString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
(const TQIODevice *dev, TQString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
bool setContent(QXmlInputSource *source, QXmlReader *reader, QString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
(TQXmlInputSource *source, TQXmlReader *reader, TQString *errorMsg = 0, int *errorLine = 0, int *errorColumn = 0);
QDomDocumentFragment (Qt v2.2+)TQDomDocumentFragment (Qt v2.2+)
QDomDocumentFragmentTQDomDocumentFragment is fully implemented.
-#include
-#include
-#include
+#include
+#include
+#include
+#include
#include
#include
#include
#include
#include
-/*#include */
+/*#include */
static const char MagicComment[] = "TRANSLATOR ";
-static QMap needs_Q_OBJECT;
-static QMap lacks_Q_OBJECT;
+static TQMap needs_Q_OBJECT;
+static TQMap lacks_Q_OBJECT;
/*
The first part of this source file is the python tokenizer. We skip
@@ -62,7 +62,7 @@ enum { Tok_Eof, Tok_class, Tok_return, Tok_tr,
The tokenizer maintains the following global variables. The names
should be self-explanatory.
*/
-static QCString yyFileName;
+static TQCString yyFileName;
static int yyCh;
static char yyIdent[128];
static size_t yyIdentLen;
@@ -78,7 +78,7 @@ static int yyCurLineNo;
static FILE *yyInFile;
// the string to read from and current position in the string (otherwise)
-static QString yyInStr;
+static TQString yyInStr;
static int yyInPos;
static int buf;
@@ -225,7 +225,7 @@ static int getToken()
yyCh = getChar();
if ( yyCh == 'x' ) {
- QCString hex = "0";
+ TQCString hex = "0";
yyCh = getChar();
while ( isxdigit(yyCh) ) {
@@ -236,7 +236,7 @@ static int getToken()
if ( yyStringLen < sizeof(yyString) - 1 )
yyString[yyStringLen++] = (char) n;
} else if ( yyCh >= '0' && yyCh < '8' ) {
- QCString oct = "";
+ TQCString oct = "";
do {
oct += (char) yyCh;
@@ -316,7 +316,7 @@ static bool match( int t )
return matches;
}
-static bool matchString( QCString *s )
+static bool matchString( TQCString *s )
{
bool matches = ( yyTok == Tok_String );
*s = "";
@@ -330,10 +330,10 @@ static bool matchString( QCString *s )
static bool matchEncoding( bool *utf8 )
{
if ( yyTok == Tok_Ident ) {
- if ( strcmp(yyIdent, "QApplication") == 0 ) {
+ if ( strcmp(yyIdent, "TQApplication") == 0 ) {
yyTok = getToken();
}
- *utf8 = QString( yyIdent ).endsWith( QString("UTF8") );
+ *utf8 = TQString( yyIdent ).endsWith( TQString("UTF8") );
yyTok = getToken();
return TRUE;
} else {
@@ -344,12 +344,12 @@ static bool matchEncoding( bool *utf8 )
static void parse( MetaTranslator *tor, const char *initialContext,
const char *defaultContext )
{
- QMap qualifiedContexts;
- QCString context;
- QCString text;
- QCString com;
- QCString functionContext = initialContext;
- QCString prefix;
+ TQMap qualifiedContexts;
+ TQCString context;
+ TQCString text;
+ TQCString com;
+ TQCString functionContext = initialContext;
+ TQCString prefix;
bool utf8 = FALSE;
yyTok = getToken();
@@ -380,7 +380,7 @@ static void parse( MetaTranslator *tor, const char *initialContext,
if ( qualifiedContexts.contains(context) )
context = qualifiedContexts[context];
tor->insert( MetaTranslatorMessage(context, text, com,
- QString::null, utf8) );
+ TQString::null, utf8) );
}
}
break;
@@ -400,7 +400,7 @@ static void parse( MetaTranslator *tor, const char *initialContext,
matchEncoding(&utf8) &&
match(Tok_RightParen))) )
tor->insert( MetaTranslatorMessage(context, text, com,
- QString::null, utf8) );
+ TQString::null, utf8) );
}
break;
case Tok_Ident:
@@ -423,7 +423,7 @@ static void parse( MetaTranslator *tor, const char *initialContext,
context = com.left( k );
com.remove( 0, k + 1 );
tor->insert( MetaTranslatorMessage(context, "", com,
- QString::null, FALSE) );
+ TQString::null, FALSE) );
}
}
yyTok = getToken();
diff --git a/python/pyqt/pylupdate3/main.cpp b/python/pyqt/pylupdate3/main.cpp
index 427fed51..bd3d7612 100644
--- a/python/pyqt/pylupdate3/main.cpp
+++ b/python/pyqt/pylupdate3/main.cpp
@@ -29,10 +29,10 @@
**
**********************************************************************/
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
#include
#include
@@ -47,7 +47,7 @@ extern void fetchtr_py( const char *fileName, MetaTranslator *tor,
extern void merge( MetaTranslator *tor, const MetaTranslator *virginTor,
bool verbose );
-typedef QValueList TML;
+typedef TQValueList TML;
static void printUsage()
{
@@ -85,39 +85,39 @@ int main( int argc, char **argv )
}
numProFiles++;
- QFile f( argv[i] );
+ TQFile f( argv[i] );
if ( !f.open(IO_ReadOnly) ) {
qWarning( "pylupdate error: Cannot open project file '%s': %s",
argv[i], strerror(errno) );
return 1;
}
- QTextStream t( &f );
- QString fullText = t.read();
+ TQTextStream t( &f );
+ TQString fullText = t.read();
f.close();
MetaTranslator fetchedTor;
- QString defaultContext = "@default";
- QCString codec;
- QStringList translatorFiles;
- QStringList::Iterator tf;
+ TQString defaultContext = "@default";
+ TQCString codec;
+ TQStringList translatorFiles;
+ TQStringList::Iterator tf;
- QMap tagMap = proFileTagMap( fullText );
- QMap::Iterator it;
+ TQMap tagMap = proFileTagMap( fullText );
+ TQMap::Iterator it;
for ( it = tagMap.begin(); it != tagMap.end(); ++it ) {
- QStringList toks = QStringList::split( QChar(' '), it.data() );
- QStringList::Iterator t;
+ TQStringList toks = TQStringList::split( TQChar(' '), it.data() );
+ TQStringList::Iterator t;
for ( t = toks.begin(); t != toks.end(); ++t ) {
- if ( it.key() == QString("SOURCES") ) {
+ if ( it.key() == TQString("SOURCES") ) {
fetchtr_py( *t, &fetchedTor,
defaultContext, TRUE );
metSomething = TRUE;
- } else if ( it.key() == QString("TRANSLATIONS") ) {
+ } else if ( it.key() == TQString("TRANSLATIONS") ) {
translatorFiles.append( *t );
metSomething = TRUE;
- } else if ( it.key() == QString("CODEC") ) {
+ } else if ( it.key() == TQString("CODEC") ) {
codec = (*t).latin1();
}
}
diff --git a/python/pyqt/pylupdate3/merge.cpp b/python/pyqt/pylupdate3/merge.cpp
index c569c938..6ae9673d 100644
--- a/python/pyqt/pylupdate3/merge.cpp
+++ b/python/pyqt/pylupdate3/merge.cpp
@@ -21,7 +21,7 @@ extern void applyNumberHeuristic( MetaTranslator *tor, bool verbose );
// defined in sametexth.cpp
extern void applySameTextHeuristic( MetaTranslator *tor, bool verbose );
-typedef QValueList TML;
+typedef TQValueList TML;
/*
Merges two MetaTranslator objects into the first one. The first one is a set
@@ -47,7 +47,7 @@ void merge( MetaTranslator *tor, const MetaTranslator *virginTor, bool verbose )
MetaTranslatorMessage m = *it;
// skip context comment
- if ( !QCString((*it).sourceText()).isEmpty() ) {
+ if ( !TQCString((*it).sourceText()).isEmpty() ) {
if ( !virginTor->contains((*it).context(), (*it).sourceText(),
(*it).comment()) ) {
newType = MetaTranslatorMessage::Obsolete;
@@ -86,7 +86,7 @@ void merge( MetaTranslator *tor, const MetaTranslator *virginTor, bool verbose )
if ( !tor->contains((*it).context(), (*it).sourceText(),
(*it).comment()) ) {
tor->insert( *it );
- if ( !QCString((*it).sourceText()).isEmpty() )
+ if ( !TQCString((*it).sourceText()).isEmpty() )
neww++;
}
}
diff --git a/python/pyqt/pylupdate3/metatranslator.cpp b/python/pyqt/pylupdate3/metatranslator.cpp
index c3d06738..24a23f4b 100644
--- a/python/pyqt/pylupdate3/metatranslator.cpp
+++ b/python/pyqt/pylupdate3/metatranslator.cpp
@@ -14,25 +14,25 @@
**
**********************************************************************/
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include "metatranslator.h"
-static bool encodingIsUtf8( const QXmlAttributes& atts )
+static bool encodingIsUtf8( const TQXmlAttributes& atts )
{
for ( int i = 0; i < atts.length(); i++ ) {
// utf8="true" is a pre-3.0 syntax
- if ( atts.qName(i) == QString("utf8") ) {
- return ( atts.value(i) == QString("true") );
- } else if ( atts.qName(i) == QString("encoding") ) {
- return ( atts.value(i) == QString("UTF-8") );
+ if ( atts.qName(i) == TQString("utf8") ) {
+ return ( atts.value(i) == TQString("true") );
+ } else if ( atts.qName(i) == TQString("encoding") ) {
+ return ( atts.value(i) == TQString("UTF-8") );
}
}
return FALSE;
@@ -46,38 +46,38 @@ public:
inMessage( FALSE ), ferrorCount( 0 ), contextIsUtf8( FALSE ),
messageIsUtf8( FALSE ) { }
- virtual bool startElement( const QString& namespaceURI,
- const QString& localName, const QString& qName,
- const QXmlAttributes& atts );
- virtual bool endElement( const QString& namespaceURI,
- const QString& localName, const QString& qName );
- virtual bool characters( const QString& ch );
- virtual bool fatalError( const QXmlParseException& exception );
+ virtual bool startElement( const TQString& namespaceURI,
+ const TQString& localName, const TQString& qName,
+ const TQXmlAttributes& atts );
+ virtual bool endElement( const TQString& namespaceURI,
+ const TQString& localName, const TQString& qName );
+ virtual bool characters( const TQString& ch );
+ virtual bool fatalError( const TQXmlParseException& exception );
private:
MetaTranslator *tor;
MetaTranslatorMessage::Type type;
bool inMessage;
- QString context;
- QString source;
- QString comment;
- QString translation;
+ TQString context;
+ TQString source;
+ TQString comment;
+ TQString translation;
- QString accum;
+ TQString accum;
int ferrorCount;
bool contextIsUtf8;
bool messageIsUtf8;
};
-bool TsHandler::startElement( const QString& /* namespaceURI */,
- const QString& /* localName */,
- const QString& qName,
- const QXmlAttributes& atts )
+bool TsHandler::startElement( const TQString& /* namespaceURI */,
+ const TQString& /* localName */,
+ const TQString& qName,
+ const TQXmlAttributes& atts )
{
- if ( qName == QString("byte") ) {
+ if ( qName == TQString("byte") ) {
for ( int i = 0; i < atts.length(); i++ ) {
- if ( atts.qName(i) == QString("value") ) {
- QString value = atts.value( i );
+ if ( atts.qName(i) == TQString("value") ) {
+ TQString value = atts.value( i );
int base = 10;
if ( value.startsWith("x") ) {
base = 16;
@@ -85,29 +85,29 @@ bool TsHandler::startElement( const QString& /* namespaceURI */,
}
int n = value.toUInt( 0, base );
if ( n != 0 )
- accum += QChar( n );
+ accum += TQChar( n );
}
}
} else {
- if ( qName == QString("context") ) {
+ if ( qName == TQString("context") ) {
context.truncate( 0 );
source.truncate( 0 );
comment.truncate( 0 );
translation.truncate( 0 );
contextIsUtf8 = encodingIsUtf8( atts );
- } else if ( qName == QString("message") ) {
+ } else if ( qName == TQString("message") ) {
inMessage = TRUE;
type = MetaTranslatorMessage::Finished;
source.truncate( 0 );
comment.truncate( 0 );
translation.truncate( 0 );
messageIsUtf8 = encodingIsUtf8( atts );
- } else if ( qName == QString("translation") ) {
+ } else if ( qName == TQString("translation") ) {
for ( int i = 0; i < atts.length(); i++ ) {
- if ( atts.qName(i) == QString("type") ) {
- if ( atts.value(i) == QString("unfinished") )
+ if ( atts.qName(i) == TQString("type") ) {
+ if ( atts.value(i) == TQString("unfinished") )
type = MetaTranslatorMessage::Unfinished;
- else if ( atts.value(i) == QString("obsolete") )
+ else if ( atts.value(i) == TQString("obsolete") )
type = MetaTranslatorMessage::Obsolete;
else
type = MetaTranslatorMessage::Finished;
@@ -119,33 +119,33 @@ bool TsHandler::startElement( const QString& /* namespaceURI */,
return TRUE;
}
-bool TsHandler::endElement( const QString& /* namespaceURI */,
- const QString& /* localName */,
- const QString& qName )
+bool TsHandler::endElement( const TQString& /* namespaceURI */,
+ const TQString& /* localName */,
+ const TQString& qName )
{
- if ( qName == QString("codec") || qName == QString("defaultcodec") ) {
+ if ( qName == TQString("codec") || qName == TQString("defaultcodec") ) {
// "codec" is a pre-3.0 syntax
tor->setCodec( accum );
- } else if ( qName == QString("name") ) {
+ } else if ( qName == TQString("name") ) {
context = accum;
- } else if ( qName == QString("source") ) {
+ } else if ( qName == TQString("source") ) {
source = accum;
- } else if ( qName == QString("comment") ) {
+ } else if ( qName == TQString("comment") ) {
if ( inMessage ) {
comment = accum;
} else {
if ( contextIsUtf8 )
tor->insert( MetaTranslatorMessage(context.utf8(), "",
- accum.utf8(), QString::null, TRUE,
+ accum.utf8(), TQString::null, TRUE,
MetaTranslatorMessage::Unfinished) );
else
tor->insert( MetaTranslatorMessage(context.ascii(), "",
- accum.ascii(), QString::null, FALSE,
+ accum.ascii(), TQString::null, FALSE,
MetaTranslatorMessage::Unfinished) );
}
- } else if ( qName == QString("translation") ) {
+ } else if ( qName == TQString("translation") ) {
translation = accum;
- } else if ( qName == QString("message") ) {
+ } else if ( qName == TQString("message") ) {
if ( messageIsUtf8 )
tor->insert( MetaTranslatorMessage(context.utf8(), source.utf8(),
comment.utf8(), translation,
@@ -159,56 +159,56 @@ bool TsHandler::endElement( const QString& /* namespaceURI */,
return TRUE;
}
-bool TsHandler::characters( const QString& ch )
+bool TsHandler::characters( const TQString& ch )
{
- QString t = ch;
- t.replace( QRegExp(QChar('\r')), "" );
+ TQString t = ch;
+ t.replace( TQRegExp(TQChar('\r')), "" );
accum += t;
return TRUE;
}
-bool TsHandler::fatalError( const QXmlParseException& exception )
+bool TsHandler::fatalError( const TQXmlParseException& exception )
{
if ( ferrorCount++ == 0 ) {
- QString msg;
+ TQString msg;
msg.sprintf( "Parse error at line %d, column %d (%s).",
exception.lineNumber(), exception.columnNumber(),
exception.message().latin1() );
if ( qApp == 0 )
qWarning( "XML error: %s", msg.latin1() );
else
- QMessageBox::information( qApp->mainWidget(),
- QObject::tr("Qt Linguist"), msg );
+ TQMessageBox::information( qApp->mainWidget(),
+ TQObject::tr("Qt Linguist"), msg );
}
return FALSE;
}
-static QString numericEntity( int ch )
+static TQString numericEntity( int ch )
{
- return QString( ch <= 0x20 ? "" : "%1;" )
+ return TQString( ch <= 0x20 ? "" : "%1;" )
.arg( ch, 0, 16 );
}
-static QString protect( const QCString& str )
+static TQString protect( const TQCString& str )
{
- QString result;
+ TQString result;
int len = (int) str.length();
for ( int k = 0; k < len; k++ ) {
switch( str[k] ) {
case '\"':
- result += QString( """ );
+ result += TQString( """ );
break;
case '&':
- result += QString( "&" );
+ result += TQString( "&" );
break;
case '>':
- result += QString( ">" );
+ result += TQString( ">" );
break;
case '<':
- result += QString( "<" );
+ result += TQString( "<" );
break;
case '\'':
- result += QString( "'" );
+ result += TQString( "'" );
break;
default:
if ( (uchar) str[k] < 0x20 && str[k] != '\n' )
@@ -220,19 +220,19 @@ static QString protect( const QCString& str )
return result;
}
-static QString evilBytes( const QCString& str, bool utf8 )
+static TQString evilBytes( const TQCString& str, bool utf8 )
{
if ( utf8 ) {
return protect( str );
} else {
- QString result;
- QCString t = protect( str ).latin1();
+ TQString result;
+ TQCString t = protect( str ).latin1();
int len = (int) t.length();
for ( int k = 0; k < len; k++ ) {
if ( (uchar) t[k] >= 0x7f )
result += numericEntity( (uchar) t[k] );
else
- result += QChar( t[k] );
+ result += TQChar( t[k] );
}
return result;
}
@@ -246,7 +246,7 @@ MetaTranslatorMessage::MetaTranslatorMessage()
MetaTranslatorMessage::MetaTranslatorMessage( const char *context,
const char *sourceText,
const char *comment,
- const QString& translation,
+ const TQString& translation,
bool utf8, Type type )
: QTranslatorMessage( context, sourceText, comment, translation ),
utfeight( FALSE ), ty( type )
@@ -330,23 +330,23 @@ MetaTranslator& MetaTranslator::operator=( const MetaTranslator& tor )
return *this;
}
-bool MetaTranslator::load( const QString& filename )
+bool MetaTranslator::load( const TQString& filename )
{
mm.clear();
- QFile f( filename );
+ TQFile f( filename );
if ( !f.open(IO_ReadOnly) )
return FALSE;
- QTextStream t( &f );
- QXmlInputSource in( t );
- QXmlSimpleReader reader;
+ TQTextStream t( &f );
+ TQXmlInputSource in( t );
+ TQXmlSimpleReader reader;
// don't click on these!
reader.setFeature( "http://xml.org/sax/features/namespaces", FALSE );
reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", TRUE );
reader.setFeature( "http://trolltech.com/xml/features/report-whitespace"
"-only-CharData", FALSE );
- QXmlDefaultHandler *hand = new TsHandler( this );
+ TQXmlDefaultHandler *hand = new TsHandler( this );
reader.setContentHandler( hand );
reader.setErrorHandler( hand );
@@ -360,14 +360,14 @@ bool MetaTranslator::load( const QString& filename )
return ok;
}
-bool MetaTranslator::save( const QString& filename ) const
+bool MetaTranslator::save( const TQString& filename ) const
{
- QFile f( filename );
+ TQFile f( filename );
if ( !f.open(IO_WriteOnly) )
return FALSE;
- QTextStream t( &f );
- t.setCodec( QTextCodec::codecForName("ISO-8859-1") );
+ TQTextStream t( &f );
+ t.setCodec( TQTextCodec::codecForName("ISO-8859-1") );
t << "\n";
if ( codecName != "ISO-8859-1" )
@@ -377,19 +377,19 @@ bool MetaTranslator::save( const QString& filename ) const
TMMInv inv;
TMMInv::Iterator i;
bool contextIsUtf8 = m.key().utf8();
- QCString context = m.key().context();
- QCString comment = "";
+ TQCString context = m.key().context();
+ TQCString comment = "";
do {
- if ( QCString(m.key().sourceText()).isEmpty() ) {
+ if ( TQCString(m.key().sourceText()).isEmpty() ) {
if ( m.key().type() != MetaTranslatorMessage::Obsolete ) {
contextIsUtf8 = m.key().utf8();
- comment = QCString( m.key().comment() );
+ comment = TQCString( m.key().comment() );
}
} else {
inv.insert( *m, m.key() );
}
- } while ( ++m != mm.end() && QCString(m.key().context()) == context );
+ } while ( ++m != mm.end() && TQCString(m.key().context()) == context );
t << "" << evilBytes( (*i).sourceText(),
(*i).utf8() )
<< "\n";
- if ( !QCString((*i).comment()).isEmpty() )
+ if ( !TQCString((*i).comment()).isEmpty() )
t << " " << evilBytes( (*i).comment(),
(*i).utf8() )
<< "\n";
@@ -429,7 +429,7 @@ bool MetaTranslator::save( const QString& filename ) const
return TRUE;
}
-bool MetaTranslator::release( const QString& filename, bool verbose ) const
+bool MetaTranslator::release( const TQString& filename, bool verbose ) const
{
QTranslator tor( 0 );
int finished = 0;
@@ -494,7 +494,7 @@ void MetaTranslator::stripEmptyContexts()
TMM::Iterator m = mm.begin();
while ( m != mm.end() ) {
- if ( QCString(m.key().sourceText()).isEmpty() ) {
+ if ( TQCString(m.key().sourceText()).isEmpty() ) {
TMM::Iterator n = m;
++n;
// the context comment is followed by other messages
@@ -514,22 +514,22 @@ void MetaTranslator::setCodec( const char *name )
const int latin1 = 4;
codecName = name;
- codec = QTextCodec::codecForName( name );
+ codec = TQTextCodec::codecForName( name );
if ( codec == 0 || codec->mibEnum() == latin1 )
codec = 0;
}
-QString MetaTranslator::toUnicode( const char *str, bool utf8 ) const
+TQString MetaTranslator::toUnicode( const char *str, bool utf8 ) const
{
if ( utf8 )
- return QString::fromUtf8( str );
+ return TQString::fromUtf8( str );
else if ( codec == 0 )
- return QString( str );
+ return TQString( str );
else
return codec->toUnicode( str );
}
-QValueList MetaTranslator::messages() const
+TQValueList MetaTranslator::messages() const
{
int n = mm.count();
TMM::ConstIterator *t = new TMM::ConstIterator[n + 1];
@@ -537,7 +537,7 @@ QValueList MetaTranslator::messages() const
for ( m = mm.begin(); m != mm.end(); ++m )
t[*m] = m;
- QValueList val;
+ TQValueList val;
for ( int i = 0; i < n; i++ )
val.append( t[i].key() );
@@ -545,9 +545,9 @@ QValueList MetaTranslator::messages() const
return val;
}
-QValueList MetaTranslator::translatedMessages() const
+TQValueList MetaTranslator::translatedMessages() const
{
- QValueList val;
+ TQValueList val;
TMM::ConstIterator m;
for ( m = mm.begin(); m != mm.end(); ++m ) {
if ( m.key().type() == MetaTranslatorMessage::Finished )
diff --git a/python/pyqt/pylupdate3/metatranslator.h b/python/pyqt/pylupdate3/metatranslator.h
index a071207e..eb2a645d 100644
--- a/python/pyqt/pylupdate3/metatranslator.h
+++ b/python/pyqt/pylupdate3/metatranslator.h
@@ -17,10 +17,10 @@
#ifndef METATRANSLATOR_H
#define METATRANSLATOR_H
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
class QTextCodec;
@@ -32,7 +32,7 @@ public:
MetaTranslatorMessage();
MetaTranslatorMessage( const char *context, const char *sourceText,
const char *comment,
- const QString& translation = QString::null,
+ const TQString& translation = TQString::null,
bool utf8 = FALSE, Type type = Unfinished );
MetaTranslatorMessage( const MetaTranslatorMessage& m );
@@ -66,9 +66,9 @@ public:
MetaTranslator& operator=( const MetaTranslator& tor );
- bool load( const QString& filename );
- bool save( const QString& filename ) const;
- bool release( const QString& filename, bool verbose = FALSE ) const;
+ bool load( const TQString& filename );
+ bool save( const TQString& filename ) const;
+ bool release( const TQString& filename, bool verbose = FALSE ) const;
bool contains( const char *context, const char *sourceText,
const char *comment ) const;
@@ -78,18 +78,18 @@ public:
void stripEmptyContexts();
void setCodec( const char *name );
- QString toUnicode( const char *str, bool utf8 ) const;
+ TQString toUnicode( const char *str, bool utf8 ) const;
- QValueList messages() const;
- QValueList translatedMessages() const;
+ TQValueList messages() const;
+ TQValueList translatedMessages() const;
private:
- typedef QMap TMM;
- typedef QMap TMMInv;
+ typedef TQMap TMM;
+ typedef TQMap TMMInv;
TMM mm;
- QCString codecName;
- QTextCodec *codec;
+ TQCString codecName;
+ TQTextCodec *codec;
};
#endif
diff --git a/python/pyqt/pylupdate3/numberh.cpp b/python/pyqt/pylupdate3/numberh.cpp
index 67048031..2280ba27 100644
--- a/python/pyqt/pylupdate3/numberh.cpp
+++ b/python/pyqt/pylupdate3/numberh.cpp
@@ -14,16 +14,16 @@
**
**********************************************************************/
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
#include
#include
-typedef QMap TMM;
-typedef QValueList TML;
+typedef TQMap TMM;
+typedef TQValueList TML;
static bool isDigitFriendly( int c )
{
@@ -49,9 +49,9 @@ static int numberLength( const char *s )
Returns a version of 'key' where all numbers have been replaced by zeroes. If
there were none, returns "".
*/
-static QCString zeroKey( const char *key )
+static TQCString zeroKey( const char *key )
{
- QCString zeroed( strlen(key) + 1 );
+ TQCString zeroed( strlen(key) + 1 );
char *z = zeroed.data();
int i = 0, j = 0;
int len;
@@ -75,17 +75,17 @@ static QCString zeroKey( const char *key )
return "";
}
-static QString translationAttempt( const QString& oldTranslation,
+static TQString translationAttempt( const TQString& oldTranslation,
const char *oldSource,
const char *newSource )
{
int p = zeroKey( oldSource ).contains( '0' );
int oldSourceLen = qstrlen( oldSource );
- QString attempt;
- QStringList oldNumbers;
- QStringList newNumbers;
- QMemArray met( p );
- QMemArray matchedYet( p );
+ TQString attempt;
+ TQStringList oldNumbers;
+ TQStringList newNumbers;
+ TQMemArray met( p );
+ TQMemArray matchedYet( p );
int i, j;
int k = 0, ell, best;
int m, n;
@@ -103,8 +103,8 @@ static QString translationAttempt( const QString& oldTranslation,
m = numberLength( oldSource + i );
n = numberLength( newSource + j );
if ( m > 0 ) {
- oldNumbers.append( QCString(oldSource + i, m + 1) );
- newNumbers.append( QCString(newSource + j, n + 1) );
+ oldNumbers.append( TQCString(oldSource + i, m + 1) );
+ newNumbers.append( TQCString(newSource + j, n + 1) );
i += m;
j += n;
met[k] = FALSE;
@@ -168,7 +168,7 @@ static QString translationAttempt( const QString& oldTranslation,
*/
for ( k = 0; k < p; k++ ) {
if ( !met[k] )
- attempt += QString( " {" ) + newNumbers[k] + QString( "?}" );
+ attempt += TQString( " {" ) + newNumbers[k] + TQString( "?}" );
}
/*
@@ -180,8 +180,8 @@ static QString translationAttempt( const QString& oldTranslation,
for ( ell = 0; ell < p; ell++ ) {
if ( k != ell && oldNumbers[k] == oldNumbers[ell] &&
newNumbers[k] < newNumbers[ell] )
- attempt += QString( " {" ) + newNumbers[k] + QString( " or " ) +
- newNumbers[ell] + QString( "?}" );
+ attempt += TQString( " {" ) + newNumbers[k] + TQString( " or " ) +
+ newNumbers[ell] + TQString( "?}" );
}
}
return attempt;
diff --git a/python/pyqt/pylupdate3/proparser.cpp b/python/pyqt/pylupdate3/proparser.cpp
index f018b4c3..6010cbeb 100644
--- a/python/pyqt/pylupdate3/proparser.cpp
+++ b/python/pyqt/pylupdate3/proparser.cpp
@@ -14,58 +14,58 @@
**
**********************************************************************/
-#include
-#include
+#include
+#include
#include "proparser.h"
-QMap proFileTagMap( const QString& text )
+TQMap proFileTagMap( const TQString& text )
{
- QString t = text;
+ TQString t = text;
/*
Strip comments, merge lines ending with backslash, add
spaces around '=' and '+=', replace '\n' with ';', and
simplify white spaces.
*/
- t.replace( QRegExp(QString("#[^\n]$")), QString(" ") );
- t.replace( QRegExp(QString("\\\\\\s*\n")), QString(" ") );
- t.replace( QRegExp(QString("=")), QString(" = ") );
- t.replace( QRegExp(QString("\\+ =")), QString(" += ") );
- t.replace( QRegExp(QString("\n")), QString(";") );
+ t.replace( TQRegExp(TQString("#[^\n]$")), TQString(" ") );
+ t.replace( TQRegExp(TQString("\\\\\\s*\n")), TQString(" ") );
+ t.replace( TQRegExp(TQString("=")), TQString(" = ") );
+ t.replace( TQRegExp(TQString("\\+ =")), TQString(" += ") );
+ t.replace( TQRegExp(TQString("\n")), TQString(";") );
t = t.simplifyWhiteSpace();
- QMap tagMap;
+ TQMap tagMap;
- QStringList lines = QStringList::split( QChar(';'), t );
- QStringList::Iterator line;
+ TQStringList lines = TQStringList::split( TQChar(';'), t );
+ TQStringList::Iterator line;
for ( line = lines.begin(); line != lines.end(); ++line ) {
- QStringList toks = QStringList::split( QChar(' '), *line );
+ TQStringList toks = TQStringList::split( TQChar(' '), *line );
if ( toks.count() >= 3 &&
- (toks[1] == QString("=") || toks[1] == QString("+=")) ) {
- QString tag = toks.first();
- int k = tag.findRev( QChar(':') ); // as in 'unix:'
+ (toks[1] == TQString("=") || toks[1] == TQString("+=")) ) {
+ TQString tag = toks.first();
+ int k = tag.findRev( TQChar(':') ); // as in 'unix:'
if ( k != -1 )
tag = tag.mid( k + 1 );
toks.remove( toks.begin() );
- QString action = toks.first();
+ TQString action = toks.first();
toks.remove( toks.begin() );
if ( tagMap.contains(tag) ) {
- if ( action == QString("=") )
- tagMap.replace( tag, toks.join(QChar(' ')) );
+ if ( action == TQString("=") )
+ tagMap.replace( tag, toks.join(TQChar(' ')) );
else
- tagMap[tag] += QChar( ' ' ) + toks.join( QChar(' ') );
+ tagMap[tag] += TQChar( ' ' ) + toks.join( TQChar(' ') );
} else {
- tagMap[tag] = toks.join( QChar(' ') );
+ tagMap[tag] = toks.join( TQChar(' ') );
}
}
}
- QRegExp var( "\\$\\$[a-zA-Z0-9_]+" );
- QMap::Iterator it;
+ TQRegExp var( "\\$\\$[a-zA-Z0-9_]+" );
+ TQMap::Iterator it;
for ( it = tagMap.begin(); it != tagMap.end(); ++it ) {
int i = 0;
diff --git a/python/pyqt/pylupdate3/proparser.h b/python/pyqt/pylupdate3/proparser.h
index 2a66c8ab..7d0df31a 100644
--- a/python/pyqt/pylupdate3/proparser.h
+++ b/python/pyqt/pylupdate3/proparser.h
@@ -17,9 +17,9 @@
#ifndef PROPARSER_H
#define PROPARSER_H
-#include
-#include
+#include
+#include
-QMap proFileTagMap( const QString& text );
+TQMap proFileTagMap( const TQString& text );
#endif
diff --git a/python/pyqt/pylupdate3/sametexth.cpp b/python/pyqt/pylupdate3/sametexth.cpp
index 1ee869f2..c007cfc3 100644
--- a/python/pyqt/pylupdate3/sametexth.cpp
+++ b/python/pyqt/pylupdate3/sametexth.cpp
@@ -14,13 +14,13 @@
**
**********************************************************************/
-#include
-#include
+#include
+#include
#include
-typedef QMap TMM;
-typedef QValueList TML;
+typedef TQMap TMM;
+typedef TQValueList TML;
/*
Augments a MetaTranslator with trivially derived translations.
@@ -45,7 +45,7 @@ void applySameTextHeuristic( MetaTranslator *tor, bool verbose )
if ( (*it).translation().isEmpty() )
untranslated.append( *it );
} else {
- QCString key = (*it).sourceText();
+ TQCString key = (*it).sourceText();
t = translated.find( key );
if ( t != translated.end() ) {
/*
@@ -63,7 +63,7 @@ void applySameTextHeuristic( MetaTranslator *tor, bool verbose )
}
for ( u = untranslated.begin(); u != untranslated.end(); ++u ) {
- QCString key = (*u).sourceText();
+ TQCString key = (*u).sourceText();
t = translated.find( key );
if ( t != translated.end() ) {
MetaTranslatorMessage m( *u );
diff --git a/python/pyqt/pyuic2/domtool.cpp b/python/pyqt/pyuic2/domtool.cpp
index 2b14ee6c..a1ffac47 100644
--- a/python/pyqt/pyuic2/domtool.cpp
+++ b/python/pyqt/pyuic2/domtool.cpp
@@ -21,12 +21,12 @@
#include "domtool.h"
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
/*!
@@ -46,14 +46,14 @@
\sa hasProperty()
*/
-QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const QVariant& defValue )
+TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
- QString prop = n2.firstChild().toText().data();
+ TQString prop = n2.firstChild().toText().data();
if ( prop == name )
return elementToVariant( n2.nextSibling().toElement(), defValue );
}
@@ -67,14 +67,14 @@ QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const
\sa readProperty()
*/
-bool DomTool::hasProperty( const QDomElement& e, const QString& name )
+bool DomTool::hasProperty( const TQDomElement& e, const TQString& name )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
- QString prop = n2.firstChild().toText().data();
+ TQString prop = n2.firstChild().toText().data();
if ( prop == name )
return TRUE;
}
@@ -83,20 +83,20 @@ bool DomTool::hasProperty( const QDomElement& e, const QString& name )
return FALSE;
}
-QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defValue )
+TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue )
{
- QString dummy;
+ TQString dummy;
return elementToVariant( e, defValue, dummy );
}
/*!
Interprets element \a e as variant and returns the result of the interpretation.
*/
-QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defValue, QString &comment )
+TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment )
{
- QVariant v;
+ TQVariant v;
if ( e.tagName() == "rect" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0, w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -109,9 +109,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QRect( x, y, w, h ) );
+ v = TQVariant( TQRect( x, y, w, h ) );
} else if ( e.tagName() == "point" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -120,9 +120,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
y = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QPoint( x, y ) );
+ v = TQVariant( TQPoint( x, y ) );
} else if ( e.tagName() == "size" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
@@ -131,12 +131,12 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QSize( w, h ) );
+ v = TQVariant( TQSize( w, h ) );
} else if ( e.tagName() == "color" ) {
- v = QVariant( readColor( e ) );
+ v = TQVariant( readColor( e ) );
} else if ( e.tagName() == "font" ) {
- QDomElement n3 = e.firstChild().toElement();
- QFont f( defValue.toFont() );
+ TQDomElement n3 = e.firstChild().toElement();
+ TQFont f( defValue.toFont() );
while ( !n3.isNull() ) {
if ( n3.tagName() == "family" )
f.setFamily( n3.firstChild().toText().data() );
@@ -152,43 +152,43 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
f.setStrikeOut( n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
- v = QVariant( f );
+ v = TQVariant( f );
} else if ( e.tagName() == "string" ) {
- v = QVariant( e.firstChild().toText().data() );
- QDomElement n = e;
+ v = TQVariant( e.firstChild().toText().data() );
+ TQDomElement n = e;
n = n.nextSibling().toElement();
if ( n.tagName() == "comment" )
comment = n.firstChild().toText().data();
} else if ( e.tagName() == "cstring" ) {
- v = QVariant( QCString( e.firstChild().toText().data() ) );
+ v = TQVariant( TQCString( e.firstChild().toText().data() ) );
} else if ( e.tagName() == "number" ) {
- v = QVariant( e.firstChild().toText().data().toInt() );
+ v = TQVariant( e.firstChild().toText().data().toInt() );
} else if ( e.tagName() == "bool" ) {
- QString t = e.firstChild().toText().data();
- v = QVariant( t == "true" || t == "1", 0 );
+ TQString t = e.firstChild().toText().data();
+ v = TQVariant( t == "true" || t == "1", 0 );
} else if ( e.tagName() == "pixmap" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "iconset" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "image" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "enum" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "set" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "sizepolicy" ) {
- QDomElement n3 = e.firstChild().toElement();
- QSizePolicy sp;
+ TQDomElement n3 = e.firstChild().toElement();
+ TQSizePolicy sp;
while ( !n3.isNull() ) {
if ( n3.tagName() == "hsizetype" )
- sp.setHorData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "vsizetype" )
- sp.setVerData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
- v = QVariant( sp );
+ v = TQVariant( sp );
} else if ( e.tagName() == "cursor" ) {
- v = QVariant( QCursor( e.firstChild().toText().data().toInt() ) );
+ v = TQVariant( TQCursor( e.firstChild().toText().data().toInt() ) );
}
return v;
@@ -198,9 +198,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
/*! Returns the color which is returned in the dom element \a e.
*/
-QColor DomTool::readColor( const QDomElement &e )
+TQColor DomTool::readColor( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
int r= 0, g = 0, b = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "red" )
@@ -212,7 +212,7 @@ QColor DomTool::readColor( const QDomElement &e )
n = n.nextSibling().toElement();
}
- return QColor( r, g, b );
+ return TQColor( r, g, b );
}
/*!
@@ -222,14 +222,14 @@ QColor DomTool::readColor( const QDomElement &e )
\sa hasAttribute()
*/
-QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue )
+TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "attribute" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
- QString prop = n2.firstChild().toText().data();
+ TQString prop = n2.firstChild().toText().data();
if ( prop == name )
return elementToVariant( n2.nextSibling().toElement(), defValue );
}
@@ -243,14 +243,14 @@ QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, cons
\sa readAttribute()
*/
-bool DomTool::hasAttribute( const QDomElement& e, const QString& name )
+bool DomTool::hasAttribute( const TQDomElement& e, const TQString& name )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "attribute" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
- QString prop = n2.firstChild().toText().data();
+ TQString prop = n2.firstChild().toText().data();
if ( prop == name )
return TRUE;
}
diff --git a/python/pyqt/pyuic2/domtool.h b/python/pyqt/pyuic2/domtool.h
index 7230bce8..9d31897b 100644
--- a/python/pyqt/pyuic2/domtool.h
+++ b/python/pyqt/pyuic2/domtool.h
@@ -19,21 +19,21 @@
#ifndef DOMTOOL_H
#define DOMTOOL_H
-#include
-#include
-#include
+#include
+#include
+#include
class DomTool : public Qt
{
public:
- static QVariant readProperty( const QDomElement& e, const QString& name, const QVariant& defValue );
- static bool hasProperty( const QDomElement& e, const QString& name );
- static QVariant elementToVariant( const QDomElement& e, const QVariant& defValue );
- static QVariant elementToVariant( const QDomElement& e, const QVariant& defValue, QString &comment );
- static QVariant readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue );
- static bool hasAttribute( const QDomElement& e, const QString& name );
- static QColor readColor( const QDomElement &e );
+ static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue );
+ static bool hasProperty( const TQDomElement& e, const TQString& name );
+ static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue );
+ static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment );
+ static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue );
+ static bool hasAttribute( const TQDomElement& e, const TQString& name );
+ static TQColor readColor( const TQDomElement &e );
};
diff --git a/python/pyqt/pyuic2/globaldefs.h b/python/pyqt/pyuic2/globaldefs.h
index 700f7d20..e436e5a6 100644
--- a/python/pyqt/pyuic2/globaldefs.h
+++ b/python/pyqt/pyuic2/globaldefs.h
@@ -21,13 +21,13 @@
#ifndef GLOBALDEFS_H
#define GLOBALDEFS_H
-#include
+#include
#define BOXLAYOUT_DEFAULT_MARGIN 11
#define BOXLAYOUT_DEFAULT_SPACING 6
-static QColor backColor1( 226, 244, 216 );
-static QColor backColor2( 235, 235, 235 );
-static QColor selectedBack( 192, 192, 192 );
+static TQColor backColor1( 226, 244, 216 );
+static TQColor backColor2( 235, 235, 235 );
+static TQColor selectedBack( 192, 192, 192 );
#endif
diff --git a/python/pyqt/pyuic2/uic.cpp b/python/pyqt/pyuic2/uic.cpp
index 19fb0794..93c67f6b 100644
--- a/python/pyqt/pyuic2/uic.cpp
+++ b/python/pyqt/pyuic2/uic.cpp
@@ -18,31 +18,31 @@
**********************************************************************/
#include "uic.h"
-#include
-#include
-#include
+#include
+#include
+#include
#include
#include
-#include
-#include
-#include
+#include
+#include
+#include
#include
#include
#include
-#include
+#include
#include
-static QString mkBool( bool b )
+static TQString mkBool( bool b )
{
return b? "1" : "0";
}
-static QString mkBool( const QString& s )
+static TQString mkBool( const TQString& s )
{
return mkBool( s == "true" || s == "1" );
}
-static bool toBool( const QString& s )
+static bool toBool( const TQString& s )
{
return s == "true" || s.toInt() != 0;
}
@@ -50,13 +50,13 @@ static bool toBool( const QString& s )
// fixString is only used in conjunction with tr(). We need to write out the
// string in utf8 and make sure it's converted from utf8 when created.
-static QString fixString( const QString &str )
+static TQString fixString( const TQString &str )
{
- QString s( str );
- s.replace( QRegExp( "\\\\" ), "\\\\" );
- s.replace( QRegExp( "\"" ), "\\\"" );
- s.replace( QRegExp( "\n" ), "\\n\"\n\"" );
- s.replace( QRegExp( "\r" ), "\\r" );
+ TQString s( str );
+ s.replace( TQRegExp( "\\\\" ), "\\\\" );
+ s.replace( TQRegExp( "\"" ), "\\\"" );
+ s.replace( TQRegExp( "\n" ), "\\n\"\n\"" );
+ s.replace( TQRegExp( "\r" ), "\\r" );
bool onlyAscii = TRUE;
unsigned int i;
@@ -69,13 +69,13 @@ static QString fixString( const QString &str )
if ( onlyAscii )
s = "\"" + s + "\"";
else
- s = "QString.fromUtf8(\"" + s + "\")";
+ s = "TQString.fromUtf8(\"" + s + "\")";
return s;
}
-static QString mkStdSet( const QString& prop )
+static TQString mkStdSet( const TQString& prop )
{
- return QString( "set" ) + prop[0].upper() + prop.mid(1);
+ return TQString( "set" ) + prop[0].upper() + prop.mid(1);
}
@@ -86,9 +86,9 @@ static QString mkStdSet( const QString& prop )
The class Uic encapsulates the user interface compiler (uic).
*/
-static QString className;
+static TQString className;
-Uic::Uic( QTextStream &outStream, QDomDocument doc, const QString &trm )
+Uic::Uic( TQTextStream &outStream, TQDomDocument doc, const TQString &trm )
: out( outStream ), trmacro( trm )
{
item_used = cg_used = pal_used = 0;
@@ -101,7 +101,7 @@ Uic::Uic( QTextStream &outStream, QDomDocument doc, const QString &trm )
nameOfClass = getClassName( doc.firstChild().toElement() );
- QDomElement firstWidget = doc.firstChild().firstChild().toElement();
+ TQDomElement firstWidget = doc.firstChild().firstChild().toElement();
while ( firstWidget.tagName() != "widget" )
firstWidget = firstWidget.nextSibling().toElement();
@@ -117,13 +117,13 @@ Uic::Uic( QTextStream &outStream, QDomDocument doc, const QString &trm )
/*! Extracts a class name from \a e
*/
-QString Uic::getClassName( const QDomElement& e )
+TQString Uic::getClassName( const TQDomElement& e )
{
- QDomElement n;
- QString cn;
+ TQDomElement n;
+ TQString cn;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "class" ) {
- QString s = n.firstChild().toText().data();
+ TQString s = n.firstChild().toText().data();
int i;
while ( ( i = s.find(' ' )) != -1 )
s[i] = '_';
@@ -138,35 +138,35 @@ QString Uic::getClassName( const QDomElement& e )
/*! Extracts an object name from \a e. It's stored in the 'name'
property.
*/
-QString Uic::getObjectName( const QDomElement& e )
+TQString Uic::getObjectName( const TQDomElement& e )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" && n2.firstChild().toText().data() == "name" ) {
return n2.nextSibling().toElement().firstChild().toText().data();
}
}
}
- return QString::null;
+ return TQString::null;
}
/*! Extracts an layout name from \a e. It's stored in the 'name'
property of the preceeding sibling (the first child of a QLayoutWidget).
*/
-QString Uic::getLayoutName( const QDomElement& e )
+TQString Uic::getLayoutName( const TQDomElement& e )
{
- QDomElement p = e.parentNode().toElement();
- QString tail = QString::null;
+ TQDomElement p = e.parentNode().toElement();
+ TQString tail = TQString::null;
if (getClassName(p) != "QLayoutWidget")
tail = "Layout";
- QDomElement n;
+ TQDomElement n;
for ( n = p.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" && n2.firstChild().toText().data() == "name" ) {
return n2.nextSibling().toElement().firstChild().toText().data() + tail;
}
@@ -175,7 +175,7 @@ QString Uic::getLayoutName( const QDomElement& e )
return e.tagName();
}
-QByteArray unzipXPM( QString data, ulong& length )
+TQByteArray unzipXPM( TQString data, ulong& length )
{
char *ba = new char[ data.length() / 2 ];
for ( int i = 0; i < (int)data.length() / 2; ++i ) {
@@ -195,7 +195,7 @@ QByteArray unzipXPM( QString data, ulong& length )
}
if ( length < data.length() * 5 )
length = data.length() * 5;
- QByteArray baunzip( length );
+ TQByteArray baunzip( length );
::uncompress( (uchar*) baunzip.data(), &length, (uchar*) ba, data.length()/2 );
return baunzip;
}
@@ -206,16 +206,16 @@ QByteArray unzipXPM( QString data, ulong& length )
\sa createFormDecl(), createObjectImpl()
*/
-void Uic::createFormImpl( const QDomElement &e )
+void Uic::createFormImpl( const TQDomElement &e )
{
- QStringList::Iterator it;
- QDomElement n;
- QDomNodeList nl;
+ TQStringList::Iterator it;
+ TQDomElement n;
+ TQDomNodeList nl;
int i;
- QString objClass = getClassName( e );
+ TQString objClass = getClassName( e );
if ( objClass.isEmpty() )
return;
- QString objName = getObjectName( e );
+ TQString objName = getObjectName( e );
// Handle custom widgets.
for (n = e; !n.isNull(); n = n.nextSibling().toElement())
@@ -223,14 +223,14 @@ void Uic::createFormImpl( const QDomElement &e )
if (n.tagName() != "customwidgets")
continue;
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
while (!n2.isNull())
{
if (n2.tagName() == "customwidget")
{
- QDomElement n3 = n2.firstChild().toElement();
- QString cname, header;
+ TQDomElement n3 = n2.firstChild().toElement();
+ TQString cname, header;
while (!n3.isNull())
{
@@ -261,27 +261,27 @@ void Uic::createFormImpl( const QDomElement &e )
}
// find out what images are required
- QStringList requiredImages;
+ TQStringList requiredImages;
nl = e.elementsByTagName( "pixmap" );
for ( int j = 0; j < (int) nl.length(); j++ ) {
requiredImages += nl.item(j).firstChild().toText().data();
}
- QStringList images;
- QStringList xpmImages;
+ TQStringList images;
+ TQStringList xpmImages;
if ( pixmapLoaderFunction.isEmpty() ) {
// create images
for ( n = e; !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "images" ) {
nl = n.elementsByTagName( "image" );
for ( i = 0; i < (int) nl.length(); i++ ) {
- QDomElement tmp = nl.item(i).firstChild().toElement();
- QString img = registerObject( tmp.firstChild().toText().data() );
+ TQDomElement tmp = nl.item(i).firstChild().toElement();
+ TQString img = registerObject( tmp.firstChild().toText().data() );
if ( !requiredImages.contains( img ) )
continue;
tmp = tmp.nextSibling().toElement();
- QString format = tmp.attribute("format", "PNG" );
- QString data = tmp.firstChild().toText().data();
+ TQString format = tmp.attribute("format", "PNG" );
+ TQString data = tmp.firstChild().toText().data();
out << endl;
out << endl;
@@ -289,7 +289,7 @@ void Uic::createFormImpl( const QDomElement &e )
if ( format == "XPM.GZ" ) {
xpmImages += img;
ulong length = tmp.attribute("length").toULong();
- QByteArray baunzip = unzipXPM( data, length );
+ TQByteArray baunzip = unzipXPM( data, length );
int a = 0;
out << indent << img << "_data = [" << endl;
while ( baunzip[a] != '\"' )
@@ -316,11 +316,11 @@ void Uic::createFormImpl( const QDomElement &e )
out << indent << "'";
int a ;
for ( a = 0; a < (int) (data.length()/2)-1; a++ ) {
- out << "\\x" << QString(data[2*a]) << QString(data[2*a+1]);
+ out << "\\x" << TQString(data[2*a]) << TQString(data[2*a+1]);
if ( a % 12 == 11 )
out << "' \\" << endl << indent << "'";
}
- out << "\\x" << QString(data[2*a]) << QString(data[2*a+1]) << "'" << endl;
+ out << "\\x" << TQString(data[2*a]) << TQString(data[2*a+1]) << "'" << endl;
popIndent();
}
}
@@ -339,11 +339,11 @@ void Uic::createFormImpl( const QDomElement &e )
out << indent << "class " << nameOfClass << "(" << objClass << "):" << endl;
pushIndent();
- if ( objClass == "QDialog" || objClass == "QWizard" ) {
+ if ( objClass == "TQDialog" || objClass == "TQWizard" ) {
out << indent << "def __init__(self,parent = None,name = None,modal = 0,fl = 0):" << endl;
pushIndent();
out << indent << objClass << ".__init__(self,parent,name,modal,fl)" << endl;
- } else if ( objClass == "QWidget" ) { // standard QWidget
+ } else if ( objClass == "TQWidget" ) { // standard QWidget
out << indent << "def __init__(self,parent = None,name = None,fl = 0):" << endl;
pushIndent();
out << indent << objClass << ".__init__(self,parent,name,fl)" << endl;
@@ -357,9 +357,9 @@ void Uic::createFormImpl( const QDomElement &e )
// create pixmaps for all images
if ( !images.isEmpty() ) {
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = images.begin(); it != images.end(); ++it ) {
- out << indent << (*it) << " = QPixmap()" << endl;
+ out << indent << (*it) << " = TQPixmap()" << endl;
out << indent << (*it) << ".loadFromData(" << (*it) << "_data,'PNG')" << endl;
}
@@ -368,7 +368,7 @@ void Uic::createFormImpl( const QDomElement &e )
// create pixmaps for all images
if ( !xpmImages.isEmpty() ) {
for ( it = xpmImages.begin(); it != xpmImages.end(); ++it ) {
- out << indent << (*it) << " = QPixmap(" << (*it) << "_data)" << endl;
+ out << indent << (*it) << " = TQPixmap(" << (*it) << "_data)" << endl;
}
out << endl;
@@ -379,11 +379,11 @@ void Uic::createFormImpl( const QDomElement &e )
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
bool stdset = toBool( n.attribute( "stdset" ) );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
- QString prop = n2.firstChild().toText().data();
- QString value = setObjectProperty( objClass, QString::null, prop, n2.nextSibling().toElement(), stdset );
+ TQString prop = n2.firstChild().toText().data();
+ TQString value = setObjectProperty( objClass, TQString::null, prop, n2.nextSibling().toElement(), stdset );
if ( value.isEmpty() )
continue;
@@ -396,7 +396,7 @@ void Uic::createFormImpl( const QDomElement &e )
out << indent;
if ( prop == "geometry" && n2.nextSibling().toElement().tagName() == "rect") {
- QDomElement n3 = n2.nextSibling().toElement().firstChild().toElement();
+ TQDomElement n3 = n2.nextSibling().toElement().firstChild().toElement();
int w = 0, h = 0;
while ( !n3.isNull() ) {
@@ -412,7 +412,7 @@ void Uic::createFormImpl( const QDomElement &e )
if ( stdset )
out << "self." << mkStdSet(prop) << "(" << value << ")" << endl;
else
- out << "self.setProperty('" << prop << "',QVariant(" << value << "))" << endl;
+ out << "self.setProperty('" << prop << "',TQVariant(" << value << "))" << endl;
}
if (prop == "name") {
@@ -426,13 +426,13 @@ void Uic::createFormImpl( const QDomElement &e )
// create all children, some forms have special requirements
- if ( objClass == "QWizard" ) {
+ if ( objClass == "TQWizard" ) {
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( tags.contains( n.tagName() ) ) {
- QString page = createObjectImpl( n, objClass, "self" );
- QString label = DomTool::readAttribute( n, "title", "" ).toString();
+ TQString page = createObjectImpl( n, objClass, "self" );
+ TQString label = DomTool::readAttribute( n, "title", "" ).toString();
out << indent << "self.addPage(" << page << ","<< trmacro << "(" << fixString( label ) << "))" << endl;
- QVariant def( FALSE, 0 );
+ TQVariant def( FALSE, 0 );
if ( DomTool::hasAttribute( n, "backEnabled" ) )
out << indent << "self.setBackEnabled(" << page << "," << mkBool( DomTool::readAttribute( n, "backEnabled", def).toBool() ) << ")" << endl;
if ( DomTool::hasAttribute( n, "nextEnabled" ) )
@@ -454,11 +454,11 @@ void Uic::createFormImpl( const QDomElement &e )
// Get the list of any user defined slots.
- QStringList userSlots;
+ TQStringList userSlots;
for ( n = e; !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "connections" ) {
- for ( QDomElement n2 = n.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
+ for ( TQDomElement n2 = n.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
if ( n2.tagName() == "slot" ) {
userSlots += n2.firstChild().toText().data();
}
@@ -472,8 +472,8 @@ void Uic::createFormImpl( const QDomElement &e )
out << endl;
nl = n.elementsByTagName( "connection" );
for ( i = 0; i < (int) nl.length(); i++ ) {
- QString sender, receiver, signal, slot;
- for ( QDomElement n2 = nl.item(i).firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
+ TQString sender, receiver, signal, slot;
+ for ( TQDomElement n2 = nl.item(i).firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) {
if ( n2.tagName() == "sender" )
sender = n2.firstChild().toText().data();
else if ( n2.tagName() == "receiver" )
@@ -499,20 +499,20 @@ void Uic::createFormImpl( const QDomElement &e )
else
receiver = "self." + receiver;
- // Note that we never use the SLOT() macro in case we have
+ // Note that we never use the TQT_SLOT() macro in case we have
// custom widgets implemented in Python.
out << indent << "self.connect(" << sender
- << ",SIGNAL('" << signal << "'),self."
+ << ",TQT_SIGNAL('" << signal << "'),self."
<< slot.left(slot.find('(')) << ")" << endl;
}
} else if ( n.tagName() == "tabstops" ) {
// setup tab order
out << endl;
- QString lastName;
- QDomElement n2 = n.firstChild().toElement();
+ TQString lastName;
+ TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "tabstop" ) {
- QString name = n2.firstChild().toText().data();
+ TQString name = n2.firstChild().toText().data();
name = registeredName( name );
if ( !lastName.isEmpty() )
out << indent << "self.setTabOrder(self." << lastName << ",self." << name << ")" << endl;
@@ -526,7 +526,7 @@ void Uic::createFormImpl( const QDomElement &e )
// buddies
bool firstBuddy = TRUE;
- for ( QValueList::Iterator buddy = buddies.begin(); buddy != buddies.end(); ++buddy ) {
+ for ( TQValueList::Iterator buddy = buddies.begin(); buddy != buddies.end(); ++buddy ) {
if ( isObjectRegistered( (*buddy).buddy ) ) {
if ( firstBuddy ) {
out << endl;
@@ -555,7 +555,7 @@ void Uic::createFormImpl( const QDomElement &e )
pushIndent();
out << indent << "ret = " << objClass << ".event(self,ev)" << endl;
out << endl;
- out << indent << "if ev.type() == QEvent.ApplicationFontChange:" << endl;
+ out << indent << "if ev.type() == TQEvent.ApplicationFontChange:" << endl;
pushIndent();
for ( i = 0; i < (int) nl.length(); i++ ) {
@@ -583,7 +583,7 @@ void Uic::createFormImpl( const QDomElement &e )
// to remove the types - too complicated for the moment, so we just
// count them and give them names based on their position.
- QString args = (*it).mid(astart + 1,(*it).find(')') - astart - 1).stripWhiteSpace();
+ TQString args = (*it).mid(astart + 1,(*it).find(')') - astart - 1).stripWhiteSpace();
if (!args.isEmpty()) {
int nrargs = args.contains(',') + 1;
@@ -611,11 +611,11 @@ void Uic::createFormImpl( const QDomElement &e )
\sa createObjectDecl()
*/
-QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass, const QString& parent, const QString& layout )
+TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout )
{
- QDomElement n;
- QString objClass, objName, fullObjName;
+ TQDomElement n;
+ TQString objClass, objName, fullObjName;
if ( layouts.contains( e.tagName() ) )
return createLayoutImpl( e, parentClass, parent, layout );
@@ -625,7 +625,7 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
return objName;
objName = getObjectName( e );
- QString definedName = objName;
+ TQString definedName = objName;
bool isTmpObject = objName.isEmpty() || objClass == "QLayoutWidget";
if ( isTmpObject ) {
if ( objClass[0] == 'Q' )
@@ -636,17 +636,17 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
bool isLine = objClass == "Line";
if ( isLine )
- objClass = "QFrame";
+ objClass = "TQFrame";
out << endl;
if ( objClass == "QLayoutWidget" ) {
if ( layout.isEmpty() ) {
// register the object and unify its name
objName = registerObject( objName );
- out << indent << objName << " = QWidget(" << parent << ",'" << definedName << "')" << endl;
+ out << indent << objName << " = TQWidget(" << parent << ",'" << definedName << "')" << endl;
} else {
// the layout widget is not necessary, hide it by creating its child in the parent
- QString result;
+ TQString result;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if (tags.contains( n.tagName() ) )
result = createObjectImpl( n, parentClass, parent, layout );
@@ -671,11 +671,11 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
bool stdset = toBool( n.attribute( "stdset" ) );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
- QString prop = n2.firstChild().toText().data();
- QString value = setObjectProperty( objClass, objName, prop, n2.nextSibling().toElement(), stdset );
+ TQString prop = n2.firstChild().toText().data();
+ TQString value = setObjectProperty( objClass, objName, prop, n2.nextSibling().toElement(), stdset );
if ( value.isEmpty() )
continue;
@@ -688,12 +688,12 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
if ( isLine && prop == "orientation" ) {
prop = "frameStyle";
if ( value.right(10) == "Horizontal" )
- value = "QFrame.HLine | QFrame.Sunken";
+ value = "TQFrame.HLine | TQFrame.Sunken";
else
- value = "QFrame.VLine | QFrame.Sunken";
+ value = "TQFrame.VLine | TQFrame.Sunken";
}
if ( prop == "buttonGroupId" ) {
- if ( parentClass == "QButtonGroup" )
+ if ( parentClass == "TQButtonGroup" )
out << indent << parent << ".insert(" << fullObjName << "," << value << ")" << endl;
continue;
}
@@ -703,31 +703,31 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
if ( stdset )
out << indent << fullObjName << "." << mkStdSet(prop) << "(" << value << ")" << endl;
else
- out << indent << fullObjName << ".setProperty('" << prop << "',QVariant(" << value << "))" << endl;
+ out << indent << fullObjName << ".setProperty('" << prop << "',TQVariant(" << value << "))" << endl;
}
}
} else if ( n.tagName() == "item" ) {
if ( objClass.mid(1) == "ListBox" ) {
- QString s = createListBoxItemImpl( n, fullObjName );
+ TQString s = createListBoxItemImpl( n, fullObjName );
if ( !s.isEmpty() )
out << indent << s << endl;
} else if ( objClass.mid(1) == "ComboBox" ) {
- QString s = createListBoxItemImpl( n, fullObjName );
+ TQString s = createListBoxItemImpl( n, fullObjName );
if ( !s.isEmpty() )
out << indent << s << endl;
} else if ( objClass.mid(1) == "IconView" ) {
- QString s = createIconViewItemImpl( n, fullObjName );
+ TQString s = createIconViewItemImpl( n, fullObjName );
if ( !s.isEmpty() )
out << indent << s << endl;
} else if ( objClass.mid(1) == "ListView" ) {
- QString s = createListViewItemImpl( n, fullObjName, QString::null );
+ TQString s = createListViewItemImpl( n, fullObjName, TQString::null );
if ( !s.isEmpty() )
out << s << endl;
}
} else if ( n.tagName() == "column" ) {
if ( objClass.mid(1) == "ListView" ) {
- QString s = createListViewColumnImpl( n, fullObjName );
+ TQString s = createListViewColumnImpl( n, fullObjName );
if ( !s.isEmpty() )
out << s;
}
@@ -736,11 +736,11 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
// create all children, some widgets have special requirements
- if ( objClass == "QTabWidget" ) {
+ if ( objClass == "TQTabWidget" ) {
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( tags.contains( n.tagName() ) ) {
- QString page = createObjectImpl( n, objClass, fullObjName );
- QString label = DomTool::readAttribute( n, "title", "" ).toString();
+ TQString page = createObjectImpl( n, objClass, fullObjName );
+ TQString label = DomTool::readAttribute( n, "title", "" ).toString();
out << indent << fullObjName << ".insertTab(" << page << "," << trmacro << "(" << fixString( label ) << "))" << endl;
}
}
@@ -758,17 +758,17 @@ QString Uic::createObjectImpl( const QDomElement &e, const QString& parentClass,
Creates implementation of an listbox item tag.
*/
-QString Uic::createListBoxItemImpl( const QDomElement &e, const QString &parent )
+TQString Uic::createListBoxItemImpl( const TQDomElement &e, const TQString &parent )
{
- QDomElement n = e.firstChild().toElement();
- QString txt;
- QString pix;
+ TQDomElement n = e.firstChild().toElement();
+ TQString txt;
+ TQString pix;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
- QString attrib = n2.firstChild().toText().data();
- QVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), QVariant() );
+ TQString attrib = n2.firstChild().toText().data();
+ TQVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), TQVariant() );
if ( attrib == "text" )
txt = v.toString();
else if ( attrib == "pixmap" ) {
@@ -792,17 +792,17 @@ QString Uic::createListBoxItemImpl( const QDomElement &e, const QString &parent
Creates implementation of an iconview item tag.
*/
-QString Uic::createIconViewItemImpl( const QDomElement &e, const QString &parent )
+TQString Uic::createIconViewItemImpl( const TQDomElement &e, const TQString &parent )
{
- QDomElement n = e.firstChild().toElement();
- QString txt;
- QString pix;
+ TQDomElement n = e.firstChild().toElement();
+ TQString txt;
+ TQString pix;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
- QString attrib = n2.firstChild().toText().data();
- QVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), QVariant() );
+ TQString attrib = n2.firstChild().toText().data();
+ TQVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), TQVariant() );
if ( attrib == "text" )
txt = v.toString();
else if ( attrib == "pixmap" ) {
@@ -818,8 +818,8 @@ QString Uic::createIconViewItemImpl( const QDomElement &e, const QString &parent
}
if ( pix.isEmpty() )
- return "QIconViewItem(" + parent + "," + trmacro + "(" + fixString( txt ) + "))";
- return "QIconViewItem(" + parent + "," + trmacro + "(" + fixString( txt ) + ")," + pix + ")";
+ return "TQIconViewItem(" + parent + "," + trmacro + "(" + fixString( txt ) + "))";
+ return "TQIconViewItem(" + parent + "," + trmacro + "(" + fixString( txt ) + ")," + pix + ")";
}
@@ -827,15 +827,15 @@ QString Uic::createIconViewItemImpl( const QDomElement &e, const QString &parent
Creates implementation of an listview item tag.
*/
-QString Uic::createListViewItemImpl( const QDomElement &e, const QString &parent,
- const QString &parentItem )
+TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &parent,
+ const TQString &parentItem )
{
- QString s;
+ TQString s;
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
bool hasChildren = e.elementsByTagName( "item" ).count() > 0;
- QString item;
+ TQString item;
if ( hasChildren ) {
item = registerObject( "item" );
@@ -850,22 +850,22 @@ QString Uic::createListViewItemImpl( const QDomElement &e, const QString &parent
}
if ( !parentItem.isEmpty() )
- s += "QListViewItem(" + parentItem + "," + lastItem + ")\n";
+ s += "TQListViewItem(" + parentItem + "," + lastItem + ")\n";
else
- s += "QListViewItem(" + parent + "," + lastItem + ")\n";
+ s += "TQListViewItem(" + parent + "," + lastItem + ")\n";
- QStringList textes;
- QStringList pixmaps;
+ TQStringList textes;
+ TQStringList pixmaps;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
- QString attrib = n2.firstChild().toText().data();
- QVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), QVariant() );
+ TQString attrib = n2.firstChild().toText().data();
+ TQVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), TQVariant() );
if ( attrib == "text" )
textes << v.toString();
else if ( attrib == "pixmap" ) {
- QString pix = v.toString();
+ TQString pix = v.toString();
if ( !pix.isEmpty() && !pixmapLoaderFunction.isEmpty() ) {
pix.prepend( pixmapLoaderFunction + "( " );
pix.append( " )" );
@@ -882,9 +882,9 @@ QString Uic::createListViewItemImpl( const QDomElement &e, const QString &parent
for ( int i = 0; i < (int)textes.count(); ++i ) {
if ( !textes[ i ].isEmpty() )
- s += indent + item + ".setText(" + QString::number( i ) + "," + trmacro + "(" + fixString( textes[ i ] ) + "))\n";
+ s += indent + item + ".setText(" + TQString::number( i ) + "," + trmacro + "(" + fixString( textes[ i ] ) + "))\n";
if ( !pixmaps[ i ].isEmpty() )
- s += indent + item + ".setPixmap(" + QString::number( i ) + "," + pixmaps[ i ] + ")\n";
+ s += indent + item + ".setPixmap(" + TQString::number( i ) + "," + pixmaps[ i ] + ")\n";
}
lastItem = item;
@@ -895,18 +895,18 @@ QString Uic::createListViewItemImpl( const QDomElement &e, const QString &parent
Creates implementation of an listview column tag.
*/
-QString Uic::createListViewColumnImpl( const QDomElement &e, const QString &parent )
+TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &parent )
{
- QDomElement n = e.firstChild().toElement();
- QString txt;
- QString pix;
+ TQDomElement n = e.firstChild().toElement();
+ TQString txt;
+ TQString pix;
bool clickable = FALSE, resizeable = FALSE;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
- QString attrib = n2.firstChild().toText().data();
- QVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), QVariant() );
+ TQString attrib = n2.firstChild().toText().data();
+ TQVariant v = DomTool::elementToVariant( n2.nextSibling().toElement(), TQVariant() );
if ( attrib == "text" )
txt = v.toString();
else if ( attrib == "pixmap" ) {
@@ -924,7 +924,7 @@ QString Uic::createListViewColumnImpl( const QDomElement &e, const QString &pare
n = n.nextSibling().toElement();
}
- QString s;
+ TQString s;
s = indent + parent + ".addColumn(" + trmacro + "(" + fixString( txt ) + "))\n";
if ( !pix.isEmpty() )
s += indent + parent + ".header().setLabel(" + parent + ".header().count() - 1," + pix + "," + trmacro + "(" + fixString( txt ) + "))\n";
@@ -939,17 +939,17 @@ QString Uic::createListViewColumnImpl( const QDomElement &e, const QString &pare
/*!
Creates the implementation of a layout tag. Called from createObjectImpl().
*/
-QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass, const QString& parent, const QString& layout )
+TQString Uic::createLayoutImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout )
{
- QDomElement n;
- QString objClass, objName;
+ TQDomElement n;
+ TQString objClass, objName;
objClass = e.tagName();
- QString qlayout = "QVBoxLayout";
+ TQString qlayout = "TQVBoxLayout";
if ( objClass == "hbox" )
- qlayout = "QHBoxLayout";
+ qlayout = "TQHBoxLayout";
else if ( objClass == "grid" )
- qlayout = "QGridLayout";
+ qlayout = "TQGridLayout";
bool isGrid = e.tagName() == "grid" ;
objName = registerObject( getLayoutName( e ) );
@@ -957,7 +957,7 @@ QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass,
int margin = DomTool::readProperty( e, "margin", BOXLAYOUT_DEFAULT_MARGIN ).toInt();
int spacing = DomTool::readProperty( e, "spacing", BOXLAYOUT_DEFAULT_SPACING ).toInt();
- if ( (parentClass == "QGroupBox" || parentClass == "QButtonGroup") && layout.isEmpty() ) {
+ if ( (parentClass == "TQGroupBox" || parentClass == "TQButtonGroup") && layout.isEmpty() ) {
// special case for group box
out << indent << parent << ".setColumnLayout(0,Qt.Vertical)" << endl;
out << indent << parent << ".layout().setSpacing(0)" << endl;
@@ -977,10 +977,10 @@ QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass,
if ( !isGrid ) {
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "spacer" ) {
- QString child = createSpacerImpl( n, parentClass, parent, objName );
+ TQString child = createSpacerImpl( n, parentClass, parent, objName );
out << indent << objName << ".addItem(" << child << ")" << endl;
} else if ( tags.contains( n.tagName() ) ) {
- QString child = createObjectImpl( n, parentClass, parent, objName );
+ TQString child = createObjectImpl( n, parentClass, parent, objName );
if ( isLayout( child ) )
out << indent << objName << ".addLayout(" << child << ")" << endl;
else
@@ -989,7 +989,7 @@ QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass,
}
} else {
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
- QDomElement ae = n;
+ TQDomElement ae = n;
int row = ae.attribute( "row" ).toInt();
int col = ae.attribute( "column" ).toInt();
int rowspan = ae.attribute( "rowspan" ).toInt();
@@ -999,7 +999,7 @@ QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass,
if ( colspan < 1 )
colspan = 1;
if ( n.tagName() == "spacer" ) {
- QString child = createSpacerImpl( n, parentClass, parent, objName );
+ TQString child = createSpacerImpl( n, parentClass, parent, objName );
if ( rowspan * colspan != 1 )
out << indent << objName << ".addMultiCell(" << child << ","
<< row << "," << row + rowspan - 1 << "," << col << ","
@@ -1008,9 +1008,9 @@ QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass,
out << indent << objName << ".addItem(" << child << ","
<< row << "," << col << ")" << endl;
} else if ( tags.contains( n.tagName() ) ) {
- QString child = createObjectImpl( n, parentClass, parent, objName );
+ TQString child = createObjectImpl( n, parentClass, parent, objName );
out << endl;
- QString o = "Widget";
+ TQString o = "Widget";
if ( isLayout( child ) )
o = "Layout";
if ( rowspan * colspan != 1 )
@@ -1028,31 +1028,31 @@ QString Uic::createLayoutImpl( const QDomElement &e, const QString& parentClass,
-QString Uic::createSpacerImpl( const QDomElement &e, const QString& /*parentClass*/, const QString& /*parent*/, const QString& /*layout*/)
+TQString Uic::createSpacerImpl( const TQDomElement &e, const TQString& /*parentClass*/, const TQString& /*parent*/, const TQString& /*layout*/)
{
- QDomElement n;
- QString objClass, objName;
+ TQDomElement n;
+ TQString objClass, objName;
objClass = e.tagName();
objName = registerObject( "spacer" );
- QSize size = DomTool::readProperty( e, "sizeHint", QSize(0,0) ).toSize();
- QString sizeType = DomTool::readProperty( e, "sizeType", "Expanding" ).toString();
+ TQSize size = DomTool::readProperty( e, "sizeHint", TQSize(0,0) ).toSize();
+ TQString sizeType = DomTool::readProperty( e, "sizeType", "Expanding" ).toString();
bool isVspacer = DomTool::readProperty( e, "orientation", "Horizontal" ) == "Vertical";
if ( sizeType != "Expanding" && sizeType != "MinimumExpanding" &&
DomTool::hasProperty( e, "geometry" ) ) { // compatibility Qt 2.2
- QRect geom = DomTool::readProperty( e, "geometry", QRect(0,0,0,0) ).toRect();
+ TQRect geom = DomTool::readProperty( e, "geometry", TQRect(0,0,0,0) ).toRect();
size = geom.size();
}
if ( isVspacer )
- out << indent << objName << " = QSpacerItem("
+ out << indent << objName << " = TQSpacerItem("
<< size.width() << "," << size.height()
- << ",QSizePolicy.Minimum,QSizePolicy." << sizeType << ")" << endl;
+ << ",TQSizePolicy.Minimum,TQSizePolicy." << sizeType << ")" << endl;
else
- out << indent << objName << " = QSpacerItem("
+ out << indent << objName << " = TQSpacerItem("
<< size.width() << "," << size.height()
- << ",QSizePolicy." << sizeType << ",QSizePolicy.Minimum)" << endl;
+ << ",TQSizePolicy." << sizeType << ",TQSizePolicy.Minimum)" << endl;
return objName;
}
@@ -1067,27 +1067,27 @@ QString Uic::createSpacerImpl( const QDomElement &e, const QString& /*parentClas
application font or palette change handlers in createFormImpl().
*/
-void Uic::createExclusiveProperty( const QDomElement & e, const QString& exclusiveProp )
+void Uic::createExclusiveProperty( const TQDomElement & e, const TQString& exclusiveProp )
{
- QDomElement n;
- QString objClass = getClassName( e );
+ TQDomElement n;
+ TQString objClass = getClassName( e );
if ( objClass.isEmpty() )
return;
- QString objName = getObjectName( e );
+ TQString objName = getObjectName( e );
if ( objClass.isEmpty() )
return;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
bool stdset = toBool( n.attribute( "stdset" ) );
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == "name" ) {
- QString prop = n2.firstChild().toText().data();
+ TQString prop = n2.firstChild().toText().data();
if ( prop != exclusiveProp )
continue;
- QString value = setObjectProperty( objClass, objName, prop, n2.nextSibling().toElement(), stdset );
+ TQString value = setObjectProperty( objClass, objName, prop, n2.nextSibling().toElement(), stdset );
if ( value.isEmpty() )
continue;
- out << indent << objName << ".setProperty('" << prop << "',QVariant(" << value << "))" << endl;
+ out << indent << objName << ".setProperty('" << prop << "',TQVariant(" << value << "))" << endl;
}
}
}
@@ -1105,11 +1105,11 @@ const char* const ColorRole[] = {
/*!
Attention: this function has to be in sync with Resource::setWidgetProperty(). If you change one, change both.
*/
-QString Uic::setObjectProperty( const QString& objClass, const QString& obj, const QString &prop, const QDomElement &e, bool stdset )
+TQString Uic::setObjectProperty( const TQString& objClass, const TQString& obj, const TQString &prop, const TQDomElement &e, bool stdset )
{
- QString v;
+ TQString v;
if ( e.tagName() == "rect" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0, w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -1122,11 +1122,11 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = "QRect(%1,%2,%3,%4)";
+ v = "TQRect(%1,%2,%3,%4)";
v = v.arg(x).arg(y).arg(w).arg(h);
} else if ( e.tagName() == "point" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -1135,10 +1135,10 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
y = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = "QPoint(%1,%2)";
+ v = "TQPoint(%1,%2)";
v = v.arg(x).arg(y);
} else if ( e.tagName() == "size" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
@@ -1147,10 +1147,10 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = "QSize(%1,%2)";
+ v = "TQSize(%1,%2)";
v = v.arg(w).arg(h);
} else if ( e.tagName() == "color" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int r= 0, g = 0, b = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "red" )
@@ -1161,16 +1161,16 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
b = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = "QColor(%1,%2,%3)";
+ v = "TQColor(%1,%2,%3)";
v = v.arg(r).arg(g).arg(b);
} else if ( e.tagName() == "font" ) {
- QDomElement n3 = e.firstChild().toElement();
- QString fontname = "f";
+ TQDomElement n3 = e.firstChild().toElement();
+ TQString fontname = "f";
if ( !obj.isEmpty() ) {
fontname = obj + "_font";
- out << indent << fontname << " = QFont(self." << obj << ".font())" << endl;
+ out << indent << fontname << " = TQFont(self." << obj << ".font())" << endl;
} else {
- out << indent << fontname << " = QFont(self.font())" << endl;
+ out << indent << fontname << " = TQFont(self.font())" << endl;
}
while ( !n3.isNull() ) {
if ( n3.tagName() == "family" )
@@ -1199,14 +1199,14 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
} else if ( e.tagName() == "string" ) {
if ( prop == "toolTip" ) {
if ( !obj.isEmpty() )
- out << indent << "QToolTip.add(self." << obj << "," + trmacro + "(" << fixString( e.firstChild().toText().data() ) << "))" << endl;
+ out << indent << "TQToolTip.add(self." << obj << "," + trmacro + "(" << fixString( e.firstChild().toText().data() ) << "))" << endl;
else
- out << indent << "QToolTip.add(self," + trmacro + "(" << fixString( e.firstChild().toText().data() ) << "))" << endl;
+ out << indent << "TQToolTip.add(self," + trmacro + "(" << fixString( e.firstChild().toText().data() ) << "))" << endl;
} else if ( prop == "whatsThis" ) {
if ( !obj.isEmpty() )
- out << indent << "QWhatsThis.add(self." << obj << "," << trmacro << "(" << fixString( e.firstChild().toText().data() ) << "))" << endl;
+ out << indent << "TQWhatsThis.add(self." << obj << "," << trmacro << "(" << fixString( e.firstChild().toText().data() ) << "))" << endl;
else
- out << indent << "QWhatsThis.add(self," << trmacro << "(" << fixString( e.firstChild().toText().data() ) << "))" << endl;
+ out << indent << "TQWhatsThis.add(self," << trmacro << "(" << fixString( e.firstChild().toText().data() ) << "))" << endl;
} else {
v = trmacro + "(%1)";
v = v.arg( fixString( e.firstChild().toText().data() ) );
@@ -1230,51 +1230,51 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
v.append( " )" );
}
} else if ( e.tagName() == "iconset" ) {
- v = "QIconSet(%1)";
+ v = "TQIconSet(%1)";
v = v.arg( e.firstChild().toText().data() );
} else if ( e.tagName() == "image" ) {
v = e.firstChild().toText().data() + ".convertToImage()";
} else if ( e.tagName() == "enum" ) {
v = "%1.%2";
- QString oc = objClass;
- QString ev = e.firstChild().toText().data();
- if ( oc == "QListView" && ev == "Manual" ) // #### workaround, rename QListView::Manual of WithMode enum in 3.0
- oc = "QScrollView";
+ TQString oc = objClass;
+ TQString ev = e.firstChild().toText().data();
+ if ( oc == "TQListView" && ev == "Manual" ) // #### workaround, rename TQListView::Manual of WithMode enum in 3.0
+ oc = "TQScrollView";
v = v.arg( oc ).arg( ev );
} else if ( e.tagName() == "set" ) {
- QString keys( e.firstChild().toText().data() );
- QStringList lst = QStringList::split( '|', keys );
+ TQString keys( e.firstChild().toText().data() );
+ TQStringList lst = TQStringList::split( '|', keys );
v = "";
- for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
v += objClass + "." + *it;
if ( it != lst.fromLast() )
v += " | ";
}
} else if ( e.tagName() == "sizepolicy" ) {
- QDomElement n3 = e.firstChild().toElement();
- QSizePolicy sp;
+ TQDomElement n3 = e.firstChild().toElement();
+ TQSizePolicy sp;
while ( !n3.isNull() ) {
if ( n3.tagName() == "hsizetype" )
- sp.setHorData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "vsizetype" )
- sp.setVerData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
- QString tmp;
+ TQString tmp;
if ( !obj.isEmpty() )
tmp = "self." + obj;
else
tmp = "self";
- v = "QSizePolicy(%1,%2," + tmp + ".sizePolicy().hasHeightForWidth())";
+ v = "TQSizePolicy(%1,%2," + tmp + ".sizePolicy().hasHeightForWidth())";
v = v.arg( (int)sp.horData() ).arg( (int)sp.verData() );
} else if ( e.tagName() == "palette" ) {
- QPalette pal;
+ TQPalette pal;
bool no_pixmaps = e.elementsByTagName( "pixmap" ).count() == 0;
- QDomElement n;
+ TQDomElement n;
if ( no_pixmaps ) {
n = e.firstChild().toElement();
while ( !n.isNull() ) {
- QColorGroup cg;
+ TQColorGroup cg;
if ( n.tagName() == "active" ) {
cg = loadColorGroup( n );
pal.setActive( cg );
@@ -1288,19 +1288,19 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
n = n.nextSibling().toElement();
}
}
- if ( no_pixmaps && pal == QPalette( pal.active().button(), pal.active().background() ) ) {
- v = "QPalette(QColor(%1,%2,%3),QColor(%1,%2,%3))";
+ if ( no_pixmaps && pal == TQPalette( pal.active().button(), pal.active().background() ) ) {
+ v = "TQPalette(TQColor(%1,%2,%3),TQColor(%1,%2,%3))";
v = v.arg( pal.active().button().red() ).arg( pal.active().button().green() ).arg( pal.active().button().blue() );
v = v.arg( pal.active().background().red() ).arg( pal.active().background().green() ).arg( pal.active().background().blue() );
} else {
- QString palette = "pal";
+ TQString palette = "pal";
if ( !pal_used ) {
- out << indent << palette << " = QPalette()" << endl;
+ out << indent << palette << " = TQPalette()" << endl;
pal_used = TRUE;
}
- QString cg = "cg";
+ TQString cg = "cg";
if ( !cg_used ) {
- out << indent << cg << " = QColorGroup()" << endl;
+ out << indent << cg << " = TQColorGroup()" << endl;
cg_used = TRUE;
}
n = e.firstChild().toElement();
@@ -1323,7 +1323,7 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
v = palette;
}
} else if ( e.tagName() == "cursor" ) {
- v = "QCursor(%1)";
+ v = "TQCursor(%1)";
v = v.arg( e.firstChild().toText().data() );
}
return v;
@@ -1334,33 +1334,33 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
/*!
Creates a colorgroup with name \a name from the color group \a cg
*/
-void Uic::createColorGroupImpl( const QString& name, const QDomElement& e )
+void Uic::createColorGroupImpl( const TQString& name, const TQDomElement& e )
{
- QColorGroup cg;
+ TQColorGroup cg;
int r = -1;
- QDomElement n = e.firstChild().toElement();
- QString color;
+ TQDomElement n = e.firstChild().toElement();
+ TQString color;
while ( !n.isNull() ) {
if ( n.tagName() == "color" ) {
r++;
- QColor col = DomTool::readColor( n );
- color = "QColor(%1,%2,%3)";
+ TQColor col = DomTool::readColor( n );
+ color = "TQColor(%1,%2,%3)";
color = color.arg( col.red() ).arg( col.green() ).arg( col.blue() );
if ( col == white )
color = "Qt.white";
else if ( col == black )
color = "Qt.black";
if ( n.nextSibling().toElement().tagName() != "pixmap" ) {
- out << indent << name << ".setColor(QColorGroup." << ColorRole[r] << "," << color << ")" << endl;
+ out << indent << name << ".setColor(TQColorGroup." << ColorRole[r] << "," << color << ")" << endl;
}
} else if ( n.tagName() == "pixmap" ) {
- QString pixmap = n.firstChild().toText().data();
+ TQString pixmap = n.firstChild().toText().data();
if ( !pixmapLoaderFunction.isEmpty() ) {
pixmap.prepend( pixmapLoaderFunction + "(" );
pixmap.append( ")" );
}
- out << indent << name << ".setBrush(QColorGroup."
- << ColorRole[r] << ",QBrush(" << color << "," << pixmap << "))" << endl;
+ out << indent << name << ".setBrush(TQColorGroup."
+ << ColorRole[r] << ",TQBrush(" << color << "," << pixmap << "))" << endl;
}
n = n.nextSibling().toElement();
}
@@ -1370,16 +1370,16 @@ void Uic::createColorGroupImpl( const QString& name, const QDomElement& e )
Auxiliary function to load a color group. The colorgroup must not
contain pixmaps.
*/
-QColorGroup Uic::loadColorGroup( const QDomElement &e )
+TQColorGroup Uic::loadColorGroup( const TQDomElement &e )
{
- QColorGroup cg;
+ TQColorGroup cg;
int r = -1;
- QDomElement n = e.firstChild().toElement();
- QColor col;
+ TQDomElement n = e.firstChild().toElement();
+ TQColor col;
while ( !n.isNull() ) {
if ( n.tagName() == "color" ) {
r++;
- cg.setColor( (QColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) );
+ cg.setColor( (TQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) );
}
n = n.nextSibling().toElement();
}
@@ -1396,7 +1396,7 @@ QColorGroup Uic::loadColorGroup( const QDomElement &e )
\sa registeredName(), isObjectRegistered()
*/
-QString Uic::registerObject( const QString& name )
+TQString Uic::registerObject( const TQString& name )
{
if ( objectNames.isEmpty() ) {
// some temporary variables we need
@@ -1406,7 +1406,7 @@ QString Uic::registerObject( const QString& name )
objectNames += "pal";
}
- QString result = name;
+ TQString result = name;
int i;
while ( ( i = result.find(' ' )) != -1 ) {
result[i] = '_';
@@ -1414,10 +1414,10 @@ QString Uic::registerObject( const QString& name )
if ( objectNames.contains( result ) ) {
int i = 2;
- while ( objectNames.contains( result + "_" + QString::number(i) ) )
+ while ( objectNames.contains( result + "_" + TQString::number(i) ) )
i++;
result += "_";
- result += QString::number(i);
+ result += TQString::number(i);
}
objectNames += result;
objectMapper.insert( name, result );
@@ -1430,7 +1430,7 @@ QString Uic::registerObject( const QString& name )
\sa registerObject(), isObjectRegistered()
*/
-QString Uic::registeredName( const QString& name )
+TQString Uic::registeredName( const TQString& name )
{
if ( !objectMapper.contains( name ) )
return name;
@@ -1440,24 +1440,24 @@ QString Uic::registeredName( const QString& name )
/*!
Returns whether the object \a name was registered yet or not.
*/
-bool Uic::isObjectRegistered( const QString& name )
+bool Uic::isObjectRegistered( const TQString& name )
{
return objectMapper.contains( name );
}
/*!
- Unifies the entries in stringlist \a list. Should really be a QStringList feature.
+ Unifies the entries in stringlist \a list. Should really be a TQStringList feature.
*/
-QStringList Uic::unique( const QStringList& list )
+TQStringList Uic::unique( const TQStringList& list )
{
- QStringList result;
+ TQStringList result;
if (list.isEmpty() )
return result;
- QStringList l = list;
+ TQStringList l = list;
l.sort();
result += l.first();
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
if ( *it != result.last() )
result += *it;
}
@@ -1469,7 +1469,7 @@ QStringList Uic::unique( const QStringList& list )
/*!
Creates an instance of class \a objClass, with parent \a parent and name \a objName
*/
-QString Uic::createObjectInstance( const QString& objClass, const QString& parent, const QString& objName )
+TQString Uic::createObjectInstance( const TQString& objClass, const TQString& parent, const TQString& objName )
{
if ( objClass.mid(1) == "ComboBox" ) {
@@ -1478,7 +1478,7 @@ QString Uic::createObjectInstance( const QString& objClass, const QString& paren
return objClass + "(" + parent + ",'" + objName + "')";
}
-bool Uic::isLayout( const QString& name ) const
+bool Uic::isLayout( const TQString& name ) const
{
return layoutObjects.contains( name );
}
@@ -1487,22 +1487,22 @@ bool Uic::isLayout( const QString& name ) const
#if defined(BLACKADDER)
#include "ba.h"
-int BA::compilePython(const QString &fileName,const QString &outputFile,
- const QString &trmacro,bool execCode)
+int BA::compilePython(const TQString &fileName,const TQString &outputFile,
+ const TQString &trmacro,bool execCode)
{
#else
int main( int argc, char * argv[] )
{
const char *error = 0;
- QString fileName;
- QString outputFile;
- QString trmacro;
+ TQString fileName;
+ TQString outputFile;
+ TQString trmacro;
bool execCode = FALSE;
for ( int n = 1; n < argc && error == 0; n++ ) {
- QCString arg = argv[n];
+ TQCString arg = argv[n];
if ( arg[0] == '-' ) { // option
- QCString opt = &arg[1];
+ TQCString opt = &arg[1];
if ( opt[0] == 'o' ) { // output redirection
if ( opt[1] == '\0' ) {
if ( !(n < argc-1) ) {
@@ -1550,11 +1550,11 @@ int main( int argc, char * argv[] )
}
#endif
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) )
qFatal( "pyuic: Could not open file '%s' ", (const char *)fileName );
- QFile fileOut;
+ TQFile fileOut;
if (!outputFile.isEmpty()) {
fileOut.setName( outputFile );
if (!fileOut.open( IO_WriteOnly ) )
@@ -1562,16 +1562,16 @@ int main( int argc, char * argv[] )
} else {
fileOut.open( IO_WriteOnly, stdout );
}
- QTextStream out( &fileOut );
- out.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream out( &fileOut );
+ out.setEncoding( TQTextStream::UnicodeUTF8 );
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &file ) )
qFatal( "pyuic: Failed to parse %s\n", (const char *)fileName );
out << "# Form implementation generated from reading ui file '" << fileName << "'" << endl;
out << "#" << endl;
- out << "# Created: " << QDateTime::currentDateTime().toString() << endl;
+ out << "# Created: " << TQDateTime::currentDateTime().toString() << endl;
out << "# by: The Python User Interface Compiler (pyuic) " << PYQT_VERSION << endl;
out << "#" << endl;
out << "# WARNING! All changes made in this file will be lost!" << endl;
@@ -1583,14 +1583,14 @@ int main( int argc, char * argv[] )
out << "from qt import *" << endl;
- Uic( out, doc, trmacro.isEmpty() ? QString("self.tr") : trmacro );
+ Uic( out, doc, trmacro.isEmpty() ? TQString("self.tr") : trmacro );
if (execCode) {
out << endl;
out << endl;
out << "if __name__ == '__main__':" << endl;
- out << " a = QApplication(sys.argv)" << endl;
- out << " QObject.connect(a,SIGNAL('lastWindowClosed()'),a,SLOT('quit()'))" << endl;
+ out << " a = TQApplication(sys.argv)" << endl;
+ out << " TQObject.connect(a,TQT_SIGNAL('lastWindowClosed()'),a,TQT_SLOT('quit()'))" << endl;
out << " w = " << className << "()" << endl;
out << " a.setMainWidget(w)" << endl;
out << " w.show()" << endl;
diff --git a/python/pyqt/pyuic2/uic.h b/python/pyqt/pyuic2/uic.h
index 6c7befc4..50e1d7a3 100644
--- a/python/pyqt/pyuic2/uic.h
+++ b/python/pyqt/pyuic2/uic.h
@@ -19,13 +19,13 @@
#ifndef UIC_H
#define UIC_H
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#define PYQT_VERSION "3.17.2"
@@ -34,33 +34,33 @@
class Uic : public Qt
{
public:
- Uic( QTextStream& out, QDomDocument doc, const QString &trm );
-
- void createFormImpl( const QDomElement &e );
-
- QString createObjectImpl( const QDomElement &e, const QString& parentClass, const QString& parent, const QString& layout = QString::null );
- QString createLayoutImpl( const QDomElement &e, const QString& parentClass, const QString& parent, const QString& layout = QString::null );
- QString createObjectInstance( const QString& objClass, const QString& parent, const QString& objName );
- QString createSpacerImpl( const QDomElement &e, const QString& parentClass, const QString& parent, const QString& layout = QString::null );
- void createExclusiveProperty( const QDomElement & e, const QString& exclusiveProp );
- QString createListBoxItemImpl( const QDomElement &e, const QString &parent );
- QString createIconViewItemImpl( const QDomElement &e, const QString &parent );
- QString createListViewColumnImpl( const QDomElement &e, const QString &parent );
- QString createListViewItemImpl( const QDomElement &e, const QString &parent,
- const QString &parentItem );
- void createColorGroupImpl( const QString& cg, const QDomElement& e );
- QColorGroup loadColorGroup( const QDomElement &e );
-
- QString getClassName( const QDomElement& e );
- QString getObjectName( const QDomElement& e );
- QString getLayoutName( const QDomElement& e );
-
- QString setObjectProperty( const QString& objClass, const QString& obj, const QString &prop, const QDomElement &e, bool stdset );
-
- QString registerObject( const QString& name );
- QString registeredName( const QString& name );
- bool isObjectRegistered( const QString& name );
- QStringList unique( const QStringList& );
+ Uic( TQTextStream& out, TQDomDocument doc, const TQString &trm );
+
+ void createFormImpl( const TQDomElement &e );
+
+ TQString createObjectImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout = TQString::null );
+ TQString createLayoutImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout = TQString::null );
+ TQString createObjectInstance( const TQString& objClass, const TQString& parent, const TQString& objName );
+ TQString createSpacerImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout = TQString::null );
+ void createExclusiveProperty( const TQDomElement & e, const TQString& exclusiveProp );
+ TQString createListBoxItemImpl( const TQDomElement &e, const TQString &parent );
+ TQString createIconViewItemImpl( const TQDomElement &e, const TQString &parent );
+ TQString createListViewColumnImpl( const TQDomElement &e, const TQString &parent );
+ TQString createListViewItemImpl( const TQDomElement &e, const TQString &parent,
+ const TQString &parentItem );
+ void createColorGroupImpl( const TQString& cg, const TQDomElement& e );
+ TQColorGroup loadColorGroup( const TQDomElement &e );
+
+ TQString getClassName( const TQDomElement& e );
+ TQString getObjectName( const TQDomElement& e );
+ TQString getLayoutName( const TQDomElement& e );
+
+ TQString setObjectProperty( const TQString& objClass, const TQString& obj, const TQString &prop, const TQDomElement &e, bool stdset );
+
+ TQString registerObject( const TQString& name );
+ TQString registeredName( const TQString& name );
+ bool isObjectRegistered( const TQString& name );
+ TQStringList unique( const TQStringList& );
private:
void pushIndent()
@@ -90,44 +90,44 @@ private:
nrindents = 0;
}
- QString indent, newindent;
+ TQString indent, newindent;
int nrindents;
- QTextStream& out;
- QStringList objectNames;
- QMap objectMapper;
- QStringList tags;
- QStringList layouts;
- QString formName;
- QString lastItem;
- QString trmacro;
+ TQTextStream& out;
+ TQStringList objectNames;
+ TQMap objectMapper;
+ TQStringList tags;
+ TQStringList layouts;
+ TQString formName;
+ TQString lastItem;
+ TQString trmacro;
struct Buddy
{
- Buddy( const QString& k, const QString& b )
+ Buddy( const TQString& k, const TQString& b )
: key( k ), buddy( b ) {}
Buddy(){}; // for valuelist
- QString key;
- QString buddy;
+ TQString key;
+ TQString buddy;
bool operator==( const Buddy& other ) const
{ return (key == other.key); }
};
struct CustomInclude
{
- QString header;
- QString location;
+ TQString header;
+ TQString location;
};
- QValueList buddies;
+ TQValueList buddies;
- QStringList layoutObjects;
- bool isLayout( const QString& name ) const;
+ TQStringList layoutObjects;
+ bool isLayout( const TQString& name ) const;
uint item_used : 1;
uint cg_used : 1;
uint pal_used : 1;
- QString pixmapLoaderFunction;
- QString nameOfClass;
+ TQString pixmapLoaderFunction;
+ TQString nameOfClass;
};
#endif
diff --git a/python/pyqt/pyuic2/widgetdatabase.cpp b/python/pyqt/pyuic2/widgetdatabase.cpp
index 0733fcef..ced269f3 100644
--- a/python/pyqt/pyuic2/widgetdatabase.cpp
+++ b/python/pyqt/pyuic2/widgetdatabase.cpp
@@ -18,7 +18,7 @@
**
**********************************************************************/
-#include // HP-UX compiler needs this here
+#include // HP-UX compiler needs this here
#include "widgetdatabase.h"
@@ -30,22 +30,22 @@
//#include "../integration/kdevelop/kdewidgets.h"
#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
-#include
+#include
const int dbsize = 300;
const int dbcustom = 200;
const int dbdictsize = 211;
static WidgetDatabaseRecord* db[ dbsize ];
-static QDict *className2Id = 0;
+static TQDict *className2Id = 0;
static int dbcount = 0;
static int dbcustomcount = 200;
-static QStrList *wGroups;
-static QStrList *invisibleGroups;
+static TQStrList *wGroups;
+static TQStrList *invisibleGroups;
static bool whatsThisLoaded = FALSE;
@@ -99,14 +99,14 @@ void WidgetDatabase::setupDataBase()
invisibleGroups = new QStrList;
invisibleGroups->append( "Forms" );
invisibleGroups->append( "Temp" );
- className2Id = new QDict( dbdictsize );
+ className2Id = new TQDict( dbdictsize );
className2Id->setAutoDelete( TRUE );
WidgetDatabaseRecord *r = 0;
r = new WidgetDatabaseRecord;
r->iconSet = "pushbutton.xpm";
- r->name = "QPushButton";
+ r->name = "TQPushButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Push Button";
@@ -114,7 +114,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "toolbutton.xpm";
- r->name = "QToolButton";
+ r->name = "TQToolButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Tool Button";
@@ -122,7 +122,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "radiobutton.xpm";
- r->name = "QRadioButton";
+ r->name = "TQRadioButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Radio Button";
@@ -130,7 +130,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "checkbox.xpm";
- r->name = "QCheckBox";
+ r->name = "TQCheckBox";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Check Box";
@@ -140,7 +140,7 @@ void WidgetDatabase::setupDataBase()
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "groupbox.xpm";
- r->name = "QGroupBox";
+ r->name = "TQGroupBox";
r->group = widgetGroup( "Containers" );
r->toolTip = "Group Box";
r->isContainer = TRUE;
@@ -149,7 +149,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "buttongroup.xpm";
- r->name = "QButtonGroup";
+ r->name = "TQButtonGroup";
r->group = widgetGroup( "Containers" );
r->toolTip = "Button Group";
r->isContainer = TRUE;
@@ -158,7 +158,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "frame.xpm";
- r->name = "QFrame";
+ r->name = "TQFrame";
r->group = widgetGroup( "Containers" );
r->toolTip = "Frame";
r->isContainer = TRUE;
@@ -167,7 +167,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "tabwidget.xpm";
- r->name = "QTabWidget";
+ r->name = "TQTabWidget";
r->group = widgetGroup( "Containers" );
r->toolTip = "Tabwidget";
r->isContainer = TRUE;
@@ -177,7 +177,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "listbox.xpm";
- r->name = "QListBox";
+ r->name = "TQListBox";
r->group = widgetGroup( "Views" );
r->toolTip = "List Box";
@@ -185,7 +185,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "listview.xpm";
- r->name = "QListView";
+ r->name = "TQListView";
r->group = widgetGroup( "Views" );
r->toolTip = "List View";
@@ -194,7 +194,7 @@ void WidgetDatabase::setupDataBase()
#if defined(QT_MODULE_ICONVIEW) || defined(UIC)
r = new WidgetDatabaseRecord;
r->iconSet = "iconview.xpm";
- r->name = "QIconView";
+ r->name = "TQIconView";
r->group = widgetGroup( "Views" );
r->toolTip = "Icon View";
@@ -204,7 +204,7 @@ void WidgetDatabase::setupDataBase()
#if defined(QT_MODULE_TABLE)
r = new WidgetDatabaseRecord;
r->iconSet = "table.xpm";
- r->name = "QTable";
+ r->name = "TQTable";
r->group = widgetGroup( "Views" );
r->toolTip = "Table";
@@ -214,7 +214,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "lineedit.xpm";
- r->name = "QLineEdit";
+ r->name = "TQLineEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Line Edit";
@@ -222,7 +222,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "spinbox.xpm";
- r->name = "QSpinBox";
+ r->name = "TQSpinBox";
r->group = widgetGroup( "Input" );
r->toolTip = "Spin Box";
@@ -230,7 +230,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "multilineedit.xpm";
- r->name = "QMultiLineEdit";
+ r->name = "TQMultiLineEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Multi Line Edit";
@@ -238,7 +238,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "combobox.xpm";
- r->name = "QComboBox";
+ r->name = "TQComboBox";
r->group = widgetGroup( "Input" );
r->toolTip = "Combo Box";
@@ -246,7 +246,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "slider.xpm";
- r->name = "QSlider";
+ r->name = "TQSlider";
r->group = widgetGroup( "Input" );
r->toolTip = "Slider";
@@ -254,7 +254,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "dial.xpm";
- r->name = "QDial";
+ r->name = "TQDial";
r->group = widgetGroup( "Input" );
r->toolTip = "Dial";
@@ -262,7 +262,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "label.xpm";
- r->name = "QLabel";
+ r->name = "TQLabel";
r->group = widgetGroup( "Temp" );
r->toolTip = "Label";
@@ -288,7 +288,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "lcdnumber.xpm";
- r->name = "QLCDNumber";
+ r->name = "TQLCDNumber";
r->group = widgetGroup( "Display" );
r->toolTip = "LCD Number";
@@ -299,14 +299,14 @@ void WidgetDatabase::setupDataBase()
r->name = "Line";
r->group = widgetGroup( "Display" );
r->toolTip = "Line";
- r->includeFile = "qframe.h";
+ r->includeFile = "tqframe.h";
r->whatsThis = "The Line widget provides horizontal and vertical lines.";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "progress.xpm";
- r->name = "QProgressBar";
+ r->name = "TQProgressBar";
r->group = widgetGroup( "Display" );
r->toolTip = "Progress Bar";
@@ -314,7 +314,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "textview.xpm";
- r->name = "QTextView";
+ r->name = "TQTextView";
r->group = widgetGroup( "Display" );
r->toolTip = "Text View";
@@ -322,7 +322,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "textbrowser.xpm";
- r->name = "QTextBrowser";
+ r->name = "TQTextBrowser";
r->group = widgetGroup( "Display" );
r->toolTip = "Text Browser";
@@ -338,21 +338,21 @@ void WidgetDatabase::setupDataBase()
append( r );
r = new WidgetDatabaseRecord;
- r->name = "QWidget";
+ r->name = "TQWidget";
r->isContainer = FALSE;
r->group = widgetGroup( "Forms" );
append( r );
r = new WidgetDatabaseRecord;
- r->name = "QDialog";
+ r->name = "TQDialog";
r->group = widgetGroup( "Forms" );
r->isContainer = FALSE;
append( r );
r = new WidgetDatabaseRecord;
- r->name = "QWizard";
+ r->name = "TQWizard";
r->group = widgetGroup( "Forms" );
r->isContainer = TRUE;
@@ -424,32 +424,32 @@ int WidgetDatabase::startCustom()
id.
*/
-QIconSet WidgetDatabase::iconSet( int id )
+TQIconSet WidgetDatabase::iconSet( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QIconSet();
+ return TQIconSet();
#if defined(DESIGNER)
if ( !r->icon )
- r->icon = new QIconSet( PixmapChooser::loadPixmap( r->iconSet, PixmapChooser::Small ),
+ r->icon = new TQIconSet( PixmapChooser::loadPixmap( r->iconSet, PixmapChooser::Small ),
PixmapChooser::loadPixmap( r->iconSet, PixmapChooser::Large ) );
return *r->icon;
#endif
- return QIconSet();
+ return TQIconSet();
}
/*!
Returns the classname of the widget which is registered as \a id.
*/
-QString WidgetDatabase::className( int id )
+TQString WidgetDatabase::className( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->name;
}
@@ -457,12 +457,12 @@ QString WidgetDatabase::className( int id )
Returns the group to which the widget registered as \a id belongs.
*/
-QString WidgetDatabase::group( int id )
+TQString WidgetDatabase::group( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->group;
}
@@ -470,12 +470,12 @@ QString WidgetDatabase::group( int id )
id.
*/
-QString WidgetDatabase::toolTip( int id )
+TQString WidgetDatabase::toolTip( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->toolTip;
}
@@ -483,12 +483,12 @@ QString WidgetDatabase::toolTip( int id )
as \a id.
*/
-QString WidgetDatabase::whatsThis( int id )
+TQString WidgetDatabase::whatsThis( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->whatsThis;
}
@@ -496,12 +496,12 @@ QString WidgetDatabase::whatsThis( int id )
Returns the include file if the widget which is registered as \a id.
*/
-QString WidgetDatabase::includeFile( int id )
+TQString WidgetDatabase::includeFile( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
if ( r->includeFile.isNull() )
return r->name.lower() + ".h";
return r->includeFile;
@@ -520,10 +520,10 @@ bool WidgetDatabase::isContainer( int id )
return r->isContainer;
}
-QString WidgetDatabase::createWidgetName( int id )
+TQString WidgetDatabase::createWidgetName( int id )
{
setupDataBase();
- QString n = className( id );
+ TQString n = className( id );
if ( n == "QLayoutWidget" )
n = "Layout";
if ( n[ 0 ] == 'Q' )
@@ -531,13 +531,13 @@ QString WidgetDatabase::createWidgetName( int id )
WidgetDatabaseRecord *r = at( id );
if ( !r )
return n;
- n += QString::number( ++r->nameCounter );
+ n += TQString::number( ++r->nameCounter );
return n;
}
/*! Returns the id for \a name or -1 if \a name is unknown.
*/
-int WidgetDatabase::idFromClassName( const QString &name )
+int WidgetDatabase::idFromClassName( const TQString &name )
{
setupDataBase();
if ( name.isEmpty() )
@@ -576,19 +576,19 @@ void WidgetDatabase::append( WidgetDatabaseRecord *r )
insert( dbcount++, r );
}
-QString WidgetDatabase::widgetGroup( const QString &g )
+TQString WidgetDatabase::widgetGroup( const TQString &g )
{
if ( wGroups->find( g ) == -1 )
wGroups->append( g );
return g;
}
-QString WidgetDatabase::widgetGroup( int i )
+TQString WidgetDatabase::widgetGroup( int i )
{
setupDataBase();
if ( i >= 0 && i < (int)wGroups->count() )
return wGroups->at( i );
- return QString::null;
+ return TQString::null;
}
int WidgetDatabase::numWidgetGroups()
@@ -597,7 +597,7 @@ int WidgetDatabase::numWidgetGroups()
return wGroups->count();
}
-bool WidgetDatabase::isGroupVisible( const QString &g )
+bool WidgetDatabase::isGroupVisible( const TQString &g )
{
setupDataBase();
return invisibleGroups->find( g ) == -1;
@@ -621,16 +621,16 @@ bool WidgetDatabase::isWhatsThisLoaded()
return whatsThisLoaded;
}
-void WidgetDatabase::loadWhatsThis( const QString &docPath )
+void WidgetDatabase::loadWhatsThis( const TQString &docPath )
{
- QString whatsthisFile = docPath + "/whatsthis";
- QFile f( whatsthisFile );
+ TQString whatsthisFile = docPath + "/whatsthis";
+ TQFile f( whatsthisFile );
if ( !f.open( IO_ReadOnly ) )
return;
- QTextStream ts( &f );
+ TQTextStream ts( &f );
while ( !ts.atEnd() ) {
- QString s = ts.readLine();
- QStringList l = QStringList::split( " | ", s );
+ TQString s = ts.readLine();
+ TQStringList l = TQStringList::split( " | ", s );
int id = idFromClassName( l[ 1 ] );
WidgetDatabaseRecord *r = at( id );
if ( r )
diff --git a/python/pyqt/pyuic2/widgetdatabase.h b/python/pyqt/pyuic2/widgetdatabase.h
index a28cd5fb..dd327d7a 100644
--- a/python/pyqt/pyuic2/widgetdatabase.h
+++ b/python/pyqt/pyuic2/widgetdatabase.h
@@ -21,17 +21,17 @@
#ifndef WIDGETDATABASE_H
#define WIDGETDATABASE_H
-#include
-#include
-#include
+#include
+#include
+#include
struct WidgetDatabaseRecord
{
WidgetDatabaseRecord();
~WidgetDatabaseRecord();
- QString iconSet, name, group, toolTip, whatsThis, includeFile;
+ TQString iconSet, name, group, toolTip, whatsThis, includeFile;
uint isContainer : 1;
- QIconSet *icon;
+ TQIconSet *icon;
int nameCounter;
};
@@ -44,31 +44,31 @@ public:
static int count();
static int startCustom();
- static QIconSet iconSet( int id );
- static QString className( int id );
- static QString group( int id );
- static QString toolTip( int id );
- static QString whatsThis( int id );
- static QString includeFile( int id );
+ static TQIconSet iconSet( int id );
+ static TQString className( int id );
+ static TQString group( int id );
+ static TQString toolTip( int id );
+ static TQString whatsThis( int id );
+ static TQString includeFile( int id );
static bool isContainer( int id );
- static int idFromClassName( const QString &name );
- static QString createWidgetName( int id );
+ static int idFromClassName( const TQString &name );
+ static TQString createWidgetName( int id );
static WidgetDatabaseRecord *at( int index );
static void insert( int index, WidgetDatabaseRecord *r );
static void append( WidgetDatabaseRecord *r );
- static QString widgetGroup( const QString &g );
- static QString widgetGroup( int i );
+ static TQString widgetGroup( const TQString &g );
+ static TQString widgetGroup( int i );
static int numWidgetGroups();
- static bool isGroupVisible( const QString &g );
+ static bool isGroupVisible( const TQString &g );
static int addCustomWidget( WidgetDatabaseRecord *r );
static bool isCustomWidget( int id );
static bool isWhatsThisLoaded();
- static void loadWhatsThis( const QString &docPath );
+ static void loadWhatsThis( const TQString &docPath );
};
diff --git a/python/pyqt/pyuic3/domtool.cpp b/python/pyqt/pyuic3/domtool.cpp
index b3514a06..d083aaae 100644
--- a/python/pyqt/pyuic3/domtool.cpp
+++ b/python/pyqt/pyuic3/domtool.cpp
@@ -20,14 +20,14 @@
#include "domtool.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
/*!
\class DomTool domtool.h
@@ -45,9 +45,9 @@
\sa hasProperty()
*/
-QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const QVariant& defValue, QString& comment )
+TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
if ( n.attribute( "name" ) != name )
@@ -62,9 +62,9 @@ QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const
/*!
\overload
*/
-QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const QVariant& defValue )
+TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue )
{
- QString comment;
+ TQString comment;
return readProperty( e, name, defValue, comment );
}
@@ -73,9 +73,9 @@ QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const
\sa readProperty()
*/
-bool DomTool::hasProperty( const QDomElement& e, const QString& name )
+bool DomTool::hasProperty( const TQDomElement& e, const TQString& name )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
if ( n.attribute( "name" ) != name )
@@ -86,13 +86,13 @@ bool DomTool::hasProperty( const QDomElement& e, const QString& name )
return FALSE;
}
-QStringList DomTool::propertiesOfType( const QDomElement& e, const QString& type )
+TQStringList DomTool::propertiesOfType( const TQDomElement& e, const TQString& type )
{
- QStringList result;
- QDomElement n;
+ TQStringList result;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "property" ) {
- QDomElement n2 = n.firstChild().toElement();
+ TQDomElement n2 = n.firstChild().toElement();
if ( n2.tagName() == type )
result += n.attribute( "name" );
}
@@ -101,20 +101,20 @@ QStringList DomTool::propertiesOfType( const QDomElement& e, const QString& type
}
-QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defValue )
+TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue )
{
- QString dummy;
+ TQString dummy;
return elementToVariant( e, defValue, dummy );
}
/*!
Interprets element \a e as variant and returns the result of the interpretation.
*/
-QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defValue, QString &comment )
+TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment )
{
- QVariant v;
+ TQVariant v;
if ( e.tagName() == "rect" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0, w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -127,9 +127,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QRect( x, y, w, h ) );
+ v = TQVariant( TQRect( x, y, w, h ) );
} else if ( e.tagName() == "point" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int x = 0, y = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "x" )
@@ -138,9 +138,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
y = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QPoint( x, y ) );
+ v = TQVariant( TQPoint( x, y ) );
} else if ( e.tagName() == "size" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int w = 0, h = 0;
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
@@ -149,12 +149,12 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
h = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QSize( w, h ) );
+ v = TQVariant( TQSize( w, h ) );
} else if ( e.tagName() == "color" ) {
- v = QVariant( readColor( e ) );
+ v = TQVariant( readColor( e ) );
} else if ( e.tagName() == "font" ) {
- QDomElement n3 = e.firstChild().toElement();
- QFont f( defValue.toFont() );
+ TQDomElement n3 = e.firstChild().toElement();
+ TQFont f( defValue.toFont() );
while ( !n3.isNull() ) {
if ( n3.tagName() == "family" )
f.setFamily( n3.firstChild().toText().data() );
@@ -170,58 +170,58 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
f.setStrikeOut( n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
- v = QVariant( f );
+ v = TQVariant( f );
} else if ( e.tagName() == "string" ) {
- v = QVariant( e.firstChild().toText().data() );
- QDomElement n = e;
+ v = TQVariant( e.firstChild().toText().data() );
+ TQDomElement n = e;
n = n.nextSibling().toElement();
if ( n.tagName() == "comment" )
comment = n.firstChild().toText().data();
} else if ( e.tagName() == "cstring" ) {
- v = QVariant( QCString( e.firstChild().toText().data() ) );
+ v = TQVariant( TQCString( e.firstChild().toText().data() ) );
} else if ( e.tagName() == "number" ) {
bool ok = TRUE;
- v = QVariant( e.firstChild().toText().data().toInt( &ok ) );
+ v = TQVariant( e.firstChild().toText().data().toInt( &ok ) );
if ( !ok )
- v = QVariant( e.firstChild().toText().data().toDouble() );
+ v = TQVariant( e.firstChild().toText().data().toDouble() );
} else if ( e.tagName() == "bool" ) {
- QString t = e.firstChild().toText().data();
- v = QVariant( t == "true" || t == "1", 0 );
+ TQString t = e.firstChild().toText().data();
+ v = TQVariant( t == "true" || t == "1", 0 );
} else if ( e.tagName() == "pixmap" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "iconset" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "image" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "enum" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "set" ) {
- v = QVariant( e.firstChild().toText().data() );
+ v = TQVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "sizepolicy" ) {
- QDomElement n3 = e.firstChild().toElement();
- QSizePolicy sp;
+ TQDomElement n3 = e.firstChild().toElement();
+ TQSizePolicy sp;
while ( !n3.isNull() ) {
if ( n3.tagName() == "hsizetype" )
- sp.setHorData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "vsizetype" )
- sp.setVerData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
+ sp.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "horstretch" )
sp.setHorStretch( n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "verstretch" )
sp.setVerStretch( n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
- v = QVariant( sp );
+ v = TQVariant( sp );
} else if ( e.tagName() == "cursor" ) {
- v = QVariant( QCursor( e.firstChild().toText().data().toInt() ) );
+ v = TQVariant( TQCursor( e.firstChild().toText().data().toInt() ) );
} else if ( e.tagName() == "stringlist" ) {
- QStringList lst;
- QDomElement n;
+ TQStringList lst;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
lst << n.firstChild().toText().data();
- v = QVariant( lst );
+ v = TQVariant( lst );
} else if ( e.tagName() == "date" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int y, m, d;
y = m = d = 0;
while ( !n3.isNull() ) {
@@ -233,9 +233,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
d = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QDate( y, m, d ) );
+ v = TQVariant( TQDate( y, m, d ) );
} else if ( e.tagName() == "time" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int h, m, s;
h = m = s = 0;
while ( !n3.isNull() ) {
@@ -247,9 +247,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
s = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QTime( h, m, s ) );
+ v = TQVariant( TQTime( h, m, s ) );
} else if ( e.tagName() == "datetime" ) {
- QDomElement n3 = e.firstChild().toElement();
+ TQDomElement n3 = e.firstChild().toElement();
int h, mi, s, y, mo, d ;
h = mi = s = y = mo = d = 0;
while ( !n3.isNull() ) {
@@ -267,7 +267,7 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
d = n3.firstChild().toText().data().toInt();
n3 = n3.nextSibling().toElement();
}
- v = QVariant( QDateTime( QDate( y, mo, d ), QTime( h, mi, s ) ) );
+ v = TQVariant( TQDateTime( TQDate( y, mo, d ), TQTime( h, mi, s ) ) );
}
return v;
}
@@ -276,9 +276,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
/*! Returns the color which is returned in the dom element \a e.
*/
-QColor DomTool::readColor( const QDomElement &e )
+TQColor DomTool::readColor( const TQDomElement &e )
{
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
int r= 0, g = 0, b = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "red" )
@@ -290,7 +290,7 @@ QColor DomTool::readColor( const QDomElement &e )
n = n.nextSibling().toElement();
}
- return QColor( r, g, b );
+ return TQColor( r, g, b );
}
/*!
@@ -300,9 +300,9 @@ QColor DomTool::readColor( const QDomElement &e )
\sa hasAttribute()
*/
-QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue, QString& comment )
+TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "attribute" ) {
if ( n.attribute( "name" ) != name )
@@ -316,9 +316,9 @@ QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, cons
/*!
\overload
*/
-QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue )
+TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue )
{
- QString comment;
+ TQString comment;
return readAttribute( e, name, defValue, comment );
}
@@ -327,9 +327,9 @@ QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, cons
\sa readAttribute()
*/
-bool DomTool::hasAttribute( const QDomElement& e, const QString& name )
+bool DomTool::hasAttribute( const TQDomElement& e, const TQString& name )
{
- QDomElement n;
+ TQDomElement n;
for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "attribute" ) {
if ( n.attribute( "name" ) != name )
@@ -340,7 +340,7 @@ bool DomTool::hasAttribute( const QDomElement& e, const QString& name )
return FALSE;
}
-static bool toBool( const QString& s )
+static bool toBool( const TQString& s )
{
return s == "true" || s.toInt() != 0;
}
@@ -348,11 +348,11 @@ static bool toBool( const QString& s )
/*!
Convert Qt 2.x format to Qt 3.0 format if necessary
*/
-void DomTool::fixDocument( QDomDocument& doc )
+void DomTool::fixDocument( TQDomDocument& doc )
{
- QDomElement e;
- QDomNode n;
- QDomNodeList nl;
+ TQDomElement e;
+ TQDomNode n;
+ TQDomNodeList nl;
int i = 0;
e = doc.firstChild().toElement();
@@ -368,8 +368,8 @@ void DomTool::fixDocument( QDomDocument& doc )
// in 3.0, we need to fix a spelling error
if ( e.hasAttribute("version") && e.attribute("version").toDouble() == 3.0 ) {
for ( i = 0; i < (int) nl.length(); i++ ) {
- QDomElement el = nl.item(i).toElement();
- QString s = el.attribute( "name" );
+ TQDomElement el = nl.item(i).toElement();
+ TQString s = el.attribute( "name" );
if ( s == "resizeable" ) {
el.removeAttribute( "name" );
el.setAttribute( "name", "resizable" );
@@ -385,8 +385,8 @@ void DomTool::fixDocument( QDomDocument& doc )
e.setAttribute("stdsetdef", 1 );
for ( i = 0; i < (int) nl.length(); i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "name" ) {
name = n2.firstChild().toText().data();
if ( name == "resizeable" )
@@ -410,8 +410,8 @@ void DomTool::fixDocument( QDomDocument& doc )
nl = doc.elementsByTagName( "attribute" );
for ( i = 0; i < (int) nl.length(); i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "name" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "name", name );
@@ -422,8 +422,8 @@ void DomTool::fixDocument( QDomDocument& doc )
nl = doc.elementsByTagName( "image" );
for ( i = 0; i < (int) nl.length(); i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "name" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "name", name );
@@ -434,8 +434,8 @@ void DomTool::fixDocument( QDomDocument& doc )
nl = doc.elementsByTagName( "widget" );
for ( i = 0; i < (int) nl.length(); i++ ) {
e = nl.item(i).toElement();
- QString name;
- QDomElement n2 = e.firstChild().toElement();
+ TQString name;
+ TQDomElement n2 = e.firstChild().toElement();
if ( n2.tagName() == "class" ) {
name = n2.firstChild().toText().data();
e.setAttribute( "class", name );
diff --git a/python/pyqt/pyuic3/domtool.h b/python/pyqt/pyuic3/domtool.h
index 25b795d3..a75e3d3f 100644
--- a/python/pyqt/pyuic3/domtool.h
+++ b/python/pyqt/pyuic3/domtool.h
@@ -21,8 +21,8 @@
#ifndef DOMTOOL_H
#define DOMTOOL_H
-#include
-#include
+#include
+#include
class QDomElement;
class QDomDocument;
@@ -30,17 +30,17 @@ class QDomDocument;
class DomTool : public Qt
{
public:
- static QVariant readProperty( const QDomElement& e, const QString& name, const QVariant& defValue );
- static QVariant readProperty( const QDomElement& e, const QString& name, const QVariant& defValue, QString& comment );
- static bool hasProperty( const QDomElement& e, const QString& name );
- static QStringList propertiesOfType( const QDomElement& e, const QString& type );
- static QVariant elementToVariant( const QDomElement& e, const QVariant& defValue );
- static QVariant elementToVariant( const QDomElement& e, const QVariant& defValue, QString &comment );
- static QVariant readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue );
- static QVariant readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue, QString& comment );
- static bool hasAttribute( const QDomElement& e, const QString& name );
- static QColor readColor( const QDomElement &e );
- static void fixDocument( QDomDocument& );
+ static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue );
+ static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment );
+ static bool hasProperty( const TQDomElement& e, const TQString& name );
+ static TQStringList propertiesOfType( const TQDomElement& e, const TQString& type );
+ static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue );
+ static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment );
+ static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue );
+ static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue, TQString& comment );
+ static bool hasAttribute( const TQDomElement& e, const TQString& name );
+ static TQColor readColor( const TQDomElement &e );
+ static void fixDocument( TQDomDocument& );
};
diff --git a/python/pyqt/pyuic3/embed.cpp b/python/pyqt/pyuic3/embed.cpp
index 04f6494c..da1c1d5c 100644
--- a/python/pyqt/pyuic3/embed.cpp
+++ b/python/pyqt/pyuic3/embed.cpp
@@ -21,11 +21,11 @@
**********************************************************************/
#include "uic.h"
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
#include
#include
@@ -42,17 +42,17 @@ struct EmbedImage
int width, height, depth;
int numColors;
QRgb* colorTable;
- QString name;
- QString cname;
+ TQString name;
+ TQString cname;
bool alpha;
#ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION
ulong compressed;
#endif
};
-static QString convertToCIdentifier( const char *s )
+static TQString convertToCIdentifier( const char *s )
{
- QString r = s;
+ TQString r = s;
int len = r.length();
if ( len > 0 && !isalpha( (char)r[0].latin1() ) )
r[0] = '_';
@@ -64,16 +64,16 @@ static QString convertToCIdentifier( const char *s )
}
-static ulong embedData( QTextStream& out, const uchar* input, int nbytes )
+static ulong embedData( TQTextStream& out, const uchar* input, int nbytes )
{
#ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION
- QByteArray bazip( qCompress( input, nbytes ) );
+ TQByteArray bazip( qCompress( input, nbytes ) );
uint len = bazip.size();
#else
uint len = (uint)nbytes;
#endif
static const char hexdigits[] = "0123456789abcdef";
- QString s;
+ TQString s;
for ( uint i=0; i list_image;
+ TQPtrList list_image;
list_image.setAutoDelete( TRUE );
int image_count = 0;
for ( it = images.begin(); it != images.end(); ++it ) {
- QImage img;
+ TQImage img;
if ( !img.load( *it ) ) {
fprintf( stderr, "pyuic: cannot load image file %s\n", (*it).latin1() );
continue;
@@ -161,14 +161,14 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
e->colorTable = new QRgb[e->numColors];
e->alpha = img.hasAlphaBuffer();
memcpy(e->colorTable, img.colorTable(), e->numColors*sizeof(QRgb));
- QFileInfo fi( *it );
+ TQFileInfo fi( *it );
e->name = fi.fileName();
- e->cname = QString("image_%1").arg( image_count++);
+ e->cname = TQString("image_%1").arg( image_count++);
list_image.append( e );
out << "# " << *it << "\n";
- QString s;
+ TQString s;
if ( e->depth == 1 )
- img = img.convertBitOrder(QImage::BigEndian);
+ img = img.convertBitOrder(TQImage::BigEndian);
out << s.sprintf( "%s_data =",
(const char *)e->cname );
#ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION
@@ -230,7 +230,7 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
// Keep the data object alive until we have a deep copy of the image.
out << indent << "data = qUncompress(data).data()\n";
#endif
- out << indent << "img = QImage(data,w,h,depth,colTab,nrCol,QImage.BigEndian).copy()\n";
+ out << indent << "img = TQImage(data,w,h,depth,colTab,nrCol,TQImage.BigEndian).copy()\n";
out << "\n";
out << indent << "if alpha:\n";
++indent;
@@ -241,21 +241,21 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
--indent;
--indent;
out << endl;
- out << indent << "return QImage()\n";
+ out << indent << "return TQImage()\n";
--indent;
out << "\n";
out << "\n";
- out << indent << "class MimeSourceFactory_" << cProject << "(QMimeSourceFactory):\n";
+ out << indent << "class MimeSourceFactory_" << cProject << "(TQMimeSourceFactory):\n";
++indent;
out << indent << "def __init__(self):\n";
++indent;
- out << indent << "QMimeSourceFactory.__init__(self)\n";
+ out << indent << "TQMimeSourceFactory.__init__(self)\n";
out << "\n";
--indent;
out << indent << "def data(self,abs_name):\n";
++indent;
- out << indent << "d = QMimeSourceFactory.data(self,abs_name)\n";
+ out << indent << "d = TQMimeSourceFactory.data(self,abs_name)\n";
out << indent << "if d or abs_name.isNull():\n";
++indent;
out << indent << "return d\n";
@@ -267,7 +267,7 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
out << indent << "self.setImage(abs_name,img)\n";
--indent;
out << "\n";
- out << indent << "return QMimeSourceFactory.data(self,abs_name)\n";
+ out << indent << "return TQMimeSourceFactory.data(self,abs_name)\n";
--indent;
--indent;
out << "\n";
@@ -283,7 +283,7 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
out << indent << "if factory is None:\n";
++indent;
out << indent << "factory = MimeSourceFactory_" << cProject << "()\n";
- out << indent << "QMimeSourceFactory.defaultFactory().addFactory(factory)\n";
+ out << indent << "TQMimeSourceFactory.defaultFactory().addFactory(factory)\n";
--indent;
--indent;
out << "\n";
@@ -295,7 +295,7 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
out << "\n";
out << indent << "if factory is not None:\n";
++indent;
- out << indent << "QMimeSourceFactory.defaultFactory().removeFactory(factory)\n";
+ out << indent << "TQMimeSourceFactory.defaultFactory().removeFactory(factory)\n";
out << indent << "factory = None\n";
--indent;
--indent;
diff --git a/python/pyqt/pyuic3/form.cpp b/python/pyqt/pyuic3/form.cpp
index aedb4ac2..ca68db39 100644
--- a/python/pyqt/pyuic3/form.cpp
+++ b/python/pyqt/pyuic3/form.cpp
@@ -23,10 +23,10 @@
#include "parser.h"
#include "widgetdatabase.h"
#include "domtool.h"
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
#define NO_STATIC_COLORS
#include
@@ -34,7 +34,7 @@
#include