diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
commit | a2277b6bc715464e83882b90c2a058139b8a6b54 (patch) | |
tree | ab09b14014f59b4d8e2ddd12226aa0b22e4dfc5d /kregexpeditor/KWidgetStreamer | |
parent | d3f79e04b34bd1f70a458b81b28fc8799498c8dc (diff) | |
download | tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.tar.gz tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.zip |
TQt4 port kdeutils
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kregexpeditor/KWidgetStreamer')
-rw-r--r-- | kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp | 112 | ||||
-rw-r--r-- | kregexpeditor/KWidgetStreamer/kwidgetstreamer.h | 2 |
2 files changed, 57 insertions, 57 deletions
diff --git a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp index 113e3d1..31d7b5c 100644 --- a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp +++ b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp @@ -24,7 +24,7 @@ void KWidgetStreamer::toStream(const TQObject* from, TQDataStream& stream ) { if ( from->inherits("KMultiFormListBox") ) { - // Hmm, we'll trust Qt that this dynamic_cast won't fail! + // Hmm, we'll trust TQt that this dynamic_cast won't fail! dynamic_cast<const KMultiFormListBox*>(from)->toStream( stream ); } @@ -34,7 +34,7 @@ void KWidgetStreamer::toStream(const TQObject* from, TQDataStream& stream ) void KWidgetStreamer::fromStream( TQDataStream& stream, TQObject* to ) { if ( to->inherits("KMultiFormListBox") ) { - // Hmm, we'll trust Qt that this dynamic_cast won't fail! + // Hmm, we'll trust TQt that this dynamic_cast won't fail! dynamic_cast<KMultiFormListBox*>(to)->fromStream( stream ); } @@ -44,15 +44,15 @@ void KWidgetStreamer::fromStream( TQDataStream& stream, TQObject* to ) void KWidgetStreamer::propertyToStream( const TQObject* from, TQDataStream& stream ) { - // Only handle widgets. Alternatives to widgets are layouts, validators, timers, etc. + // Only handle widgets. Alternatives to widgets are tqlayouts, validators, timers, etc. if ( ! from->inherits(TQWIDGET_OBJECT_NAME_STRING) ) return; - // Serializing all the children (if any). - const TQObjectList* children = from->children(); - if ( children ) { - stream << children->count(); - for ( TQObjectListIt it = TQObjectListIt(*children); *it; ++it ) { + // Serializing all the tqchildren (if any). + const TQObjectList tqchildren = from->childrenListObject(); + if ( !tqchildren.isEmpty() ) { + stream << tqchildren.count(); + for ( TQObjectListIt it = TQObjectListIt(tqchildren); *it; ++it ) { toStream( *it, stream ); } } @@ -79,18 +79,18 @@ void KWidgetStreamer::propertyToStream( const TQObject* from, TQDataStream& stre void KWidgetStreamer::propertyFromStream( TQDataStream& stream, TQObject* to ) { - // Only handle widgets. Alternatives to widgets are layouts, validators, timers, etc. + // Only handle widgets. Alternatives to widgets are tqlayouts, validators, timers, etc. if ( ! to->inherits(TQWIDGET_OBJECT_NAME_STRING) ) return; - // Stream in all the children (if any) - const TQObjectList* children = to->children(); + // Stream in all the tqchildren (if any) + const TQObjectList tqchildren = to->childrenListObject(); unsigned int count; stream >> count; - if ( children ) { - Q_ASSERT( count == children->count() ); - for ( TQObjectListIt it = TQObjectListIt(*children); *it; ++it ) + if ( !tqchildren.isEmpty() ) { + Q_ASSERT( count == tqchildren.count() ); + for ( TQObjectListIt it = TQObjectListIt(tqchildren); *it; ++it ) fromStream( stream, *it ); } else { @@ -115,63 +115,63 @@ KWidgetStreamer::KWidgetStreamer () { TQStringList l; - // QCheckBox + // TQCheckBox l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("checked") << TQString::fromLatin1("tristate"); - _map.insert(TQString::fromLatin1(TQCHECKBOX_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("checked") << TQString::tqfromLatin1("tristate"); + _map.insert(TQString::tqfromLatin1(TQCHECKBOX_OBJECT_NAME_STRING), l); - // QComboBox + // TQComboBox l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("editable") << TQString::fromLatin1("currentItem") - << TQString::fromLatin1("maxCount") << TQString::fromLatin1("insertionPolicy") - << TQString::fromLatin1("autoCompletion"); - _map.insert(TQString::fromLatin1(TQCOMBOBOX_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("editable") << TQString::tqfromLatin1("currentItem") + << TQString::tqfromLatin1("maxCount") << TQString::tqfromLatin1("insertionPolicy") + << TQString::tqfromLatin1("autoCompletion"); + _map.insert(TQString::tqfromLatin1(TQCOMBOBOX_OBJECT_NAME_STRING), l); - // QDial + // TQDial l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("tracking") << TQString::fromLatin1("wrapping") - << TQString::fromLatin1("value"); - _map.insert(TQString::fromLatin1(TQDIAL_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("tracking") << TQString::tqfromLatin1("wrapping") + << TQString::tqfromLatin1("value"); + _map.insert(TQString::tqfromLatin1(TQDIAL_OBJECT_NAME_STRING), l); - // QLCDNumber + // TQLCDNumber l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("numDigits") << TQString::fromLatin1("mode") - << TQString::fromLatin1("segmentStyle") << TQString::fromLatin1("value"); - _map.insert(TQString::fromLatin1(TQLCDNUMBER_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("numDigits") << TQString::tqfromLatin1("mode") + << TQString::tqfromLatin1("segmentStyle") << TQString::tqfromLatin1("value"); + _map.insert(TQString::tqfromLatin1(TQLCDNUMBER_OBJECT_NAME_STRING), l); - // QLineEdit + // TQLineEdit l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("text") << TQString::fromLatin1("maxLength") - << TQString::fromLatin1("echoMode") << TQString::fromLatin1("alignment"); - _map.insert(TQString::fromLatin1(TQLINEEDIT_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("text") << TQString::tqfromLatin1("maxLength") + << TQString::tqfromLatin1("echoMode") << TQString::tqfromLatin1("tqalignment"); + _map.insert(TQString::tqfromLatin1(TQLINEEDIT_OBJECT_NAME_STRING), l); - // QMultiLineEdit + // TQMultiLineEdit l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("text") - << TQString::fromLatin1("alignment"); - _map.insert(TQString::fromLatin1(TQTEXTEDIT_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("text") + << TQString::tqfromLatin1("tqalignment"); + _map.insert(TQString::tqfromLatin1(TQTEXTEDIT_OBJECT_NAME_STRING), l); - // QRadioButton + // TQRadioButton l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("checked"); - _map.insert(TQString::fromLatin1(TQRADIOBUTTON_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("checked"); + _map.insert(TQString::tqfromLatin1(TQRADIOBUTTON_OBJECT_NAME_STRING), l); - // QSlider + // TQSlider l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("value"); - _map.insert(TQString::fromLatin1(TQSLIDER_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("value"); + _map.insert(TQString::tqfromLatin1(TQSLIDER_OBJECT_NAME_STRING), l); - // QSpinBox + // TQSpinBox l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("value"); - _map.insert(TQString::fromLatin1(TQSPINBOX_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("value"); + _map.insert(TQString::tqfromLatin1(TQSPINBOX_OBJECT_NAME_STRING), l); } diff --git a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.h b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.h index 6ac3349..d04382f 100644 --- a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.h +++ b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.h @@ -37,7 +37,7 @@ <pre> KWidgetStreamer streamer; KWidgetStreamer::PropertyMap& map = streamer.propertyMap(); - KWidgetStreamer::PropertyList& list = *map.find("TQLCDNumber"); + KWidgetStreamer::PropertyList& list = *map.tqfind(TQLCDNUMBER_OBJECT_NAME_STRING); list.remove("numDigits"); </pre> **/ |