Replace _OBJECT_NAME_STRING defines with actual strings. This relates to the merging of tqtinterface with tqt3.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 3055550710)
bug/94/open-html
Michele Calgaro 1 year ago
parent eec76c7b52
commit c56e9aa280
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -119,7 +119,7 @@ TQString FeedIconManager::iconLocation(const KURL & url) const
kapp->dcopClient()->call("kded", "favicons", "iconForURL(KURL)", data,
replyType, reply);
if (replyType == TQSTRING_OBJECT_NAME_STRING) {
if (replyType == "TQString") {
TQDataStream replyStream(reply, IO_ReadOnly);
TQString result;
replyStream >> result;

@ -227,22 +227,22 @@ void FieldWidget::clearFields()
{
FieldRecordList::ConstIterator fieldIt;
for ( fieldIt = mFieldList.begin(); fieldIt != mFieldList.end(); ++fieldIt ) {
if ( (*fieldIt).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) {
if ( (*fieldIt).mWidget->isA( "TQLineEdit" ) ) {
TQLineEdit *wdg = static_cast<TQLineEdit*>( (*fieldIt).mWidget );
wdg->setText( TQString() );
} else if ( (*fieldIt).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
} else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( (*fieldIt).mWidget );
wdg->setValue( 0 );
} else if ( (*fieldIt).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
} else if ( (*fieldIt).mWidget->isA( "TQCheckBox" ) ) {
TQCheckBox *wdg = static_cast<TQCheckBox*>( (*fieldIt).mWidget );
wdg->setChecked( true );
} else if ( (*fieldIt).mWidget->isA( TQDATEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*fieldIt).mWidget->isA( "TQDateEdit" ) ) {
TQDateEdit *wdg = static_cast<TQDateEdit*>( (*fieldIt).mWidget );
wdg->setDate( TQDate::currentDate() );
} else if ( (*fieldIt).mWidget->isA( TQTIMEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*fieldIt).mWidget->isA( "TQTimeEdit" ) ) {
TQTimeEdit *wdg = static_cast<TQTimeEdit*>( (*fieldIt).mWidget );
wdg->setTime( TQTime::currentTime() );
} else if ( (*fieldIt).mWidget->isA( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*fieldIt).mWidget->isA( "TQDateTimeEdit" ) ) {
TQDateTimeEdit *wdg = static_cast<TQDateTimeEdit*>( (*fieldIt).mWidget );
wdg->setDateTime( TQDateTime::currentDateTime() );
}
@ -265,22 +265,22 @@ void FieldWidget::loadContact( TDEABC::Addressee *addr )
FieldRecordList::ConstIterator fieldIt;
for ( fieldIt = mFieldList.begin(); fieldIt != mFieldList.end(); ++fieldIt ) {
if ( (*fieldIt).mIdentifier == name ) {
if ( (*fieldIt).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) {
if ( (*fieldIt).mWidget->isA( "TQLineEdit" ) ) {
TQLineEdit *wdg = static_cast<TQLineEdit*>( (*fieldIt).mWidget );
wdg->setText( value );
} else if ( (*fieldIt).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
} else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( (*fieldIt).mWidget );
wdg->setValue( value.toInt() );
} else if ( (*fieldIt).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
} else if ( (*fieldIt).mWidget->isA( "TQCheckBox" ) ) {
TQCheckBox *wdg = static_cast<TQCheckBox*>( (*fieldIt).mWidget );
wdg->setChecked( value == "true" || value == "1" );
} else if ( (*fieldIt).mWidget->isA( TQDATEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*fieldIt).mWidget->isA( "TQDateEdit" ) ) {
TQDateEdit *wdg = static_cast<TQDateEdit*>( (*fieldIt).mWidget );
wdg->setDate( TQDate::fromString( value, Qt::ISODate ) );
} else if ( (*fieldIt).mWidget->isA( TQTIMEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*fieldIt).mWidget->isA( "TQTimeEdit" ) ) {
TQTimeEdit *wdg = static_cast<TQTimeEdit*>( (*fieldIt).mWidget );
wdg->setTime( TQTime::fromString( value, Qt::ISODate ) );
} else if ( (*fieldIt).mWidget->isA( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*fieldIt).mWidget->isA( "TQDateTimeEdit" ) ) {
TQDateTimeEdit *wdg = static_cast<TQDateTimeEdit*>( (*fieldIt).mWidget );
wdg->setDateTime( TQDateTime::fromString( value, Qt::ISODate ) );
}
@ -294,22 +294,22 @@ void FieldWidget::setReadOnly( bool readOnly )
FieldRecordList::ConstIterator it;
for ( it = mFieldList.begin(); it != mFieldList.end(); ++it ) {
TQString value;
if ( (*it).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) {
if ( (*it).mWidget->isA( "TQLineEdit" ) ) {
TQLineEdit *wdg = static_cast<TQLineEdit*>( (*it).mWidget );
wdg->setReadOnly(readOnly);
} else if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQSpinBox" ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
} else if ( (*it).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQCheckBox" ) ) {
TQCheckBox *wdg = static_cast<TQCheckBox*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
} else if ( (*it).mWidget->isA( TQDATEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQDateEdit" ) ) {
TQDateEdit *wdg = static_cast<TQDateEdit*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
} else if ( (*it).mWidget->isA( TQTIMEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQTimeEdit" ) ) {
TQTimeEdit *wdg = static_cast<TQTimeEdit*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
} else if ( (*it).mWidget->isA( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQDateTimeEdit" ) ) {
TQDateTimeEdit *wdg = static_cast<TQDateTimeEdit*>( (*it).mWidget );
wdg->setEnabled( !readOnly );
}
@ -321,22 +321,22 @@ void FieldWidget::storeContact( TDEABC::Addressee *addr )
FieldRecordList::ConstIterator it;
for ( it = mFieldList.begin(); it != mFieldList.end(); ++it ) {
TQString value;
if ( (*it).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) {
if ( (*it).mWidget->isA( "TQLineEdit" ) ) {
TQLineEdit *wdg = static_cast<TQLineEdit*>( (*it).mWidget );
value = wdg->text();
} else if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQSpinBox" ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( (*it).mWidget );
value = TQString::number( wdg->value() );
} else if ( (*it).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQCheckBox" ) ) {
TQCheckBox *wdg = static_cast<TQCheckBox*>( (*it).mWidget );
value = ( wdg->isChecked() ? "true" : "false" );
} else if ( (*it).mWidget->isA( TQDATEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQDateEdit" ) ) {
TQDateEdit *wdg = static_cast<TQDateEdit*>( (*it).mWidget );
value = wdg->date().toString( Qt::ISODate );
} else if ( (*it).mWidget->isA( TQTIMEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQTimeEdit" ) ) {
TQTimeEdit *wdg = static_cast<TQTimeEdit*>( (*it).mWidget );
value = wdg->time().toString( Qt::ISODate );
} else if ( (*it).mWidget->isA( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQDateTimeEdit" ) ) {
TQDateTimeEdit *wdg = static_cast<TQDateTimeEdit*>( (*it).mWidget );
value = wdg->dateTime().toString( Qt::ISODate );
}
@ -523,17 +523,17 @@ TQStringList CustomFieldsWidget::marshallFields( bool global ) const
retval.append( (*it).mTitle );
TQString type = "text";
if ( (*it).mWidget->isA( TQSPINBOX_OBJECT_NAME_STRING ) ) {
if ( (*it).mWidget->isA( "TQSpinBox" ) ) {
type = "integer";
} else if ( (*it).mWidget->isA( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQCheckBox" ) ) {
type = "boolean";
} else if ( (*it).mWidget->isA( TQDATEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQDateEdit" ) ) {
type = "date";
} else if ( (*it).mWidget->isA( TQTIMEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQTimeEdit" ) ) {
type = "time";
} else if ( (*it).mWidget->isA( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQDateTimeEdit" ) ) {
type = "datetime";
} else if ( (*it).mWidget->isA( TQLINEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( (*it).mWidget->isA( "TQLineEdit" ) ) {
type = "text";
}

@ -944,7 +944,7 @@ TQString KAMail::getMailBody(TQ_UINT32 serialNumber)
arg << (int)0;
TQString body;
if (kapp->dcopClient()->call("kmail", "KMailIface", "getDecodedBodyPart(TQ_UINT32,int)", data, replyType, replyData)
&& replyType == TQSTRING_OBJECT_NAME_STRING)
&& replyType == "TQString")
{
TQDataStream reply_stream(replyData, IO_ReadOnly);
reply_stream >> body;

@ -56,7 +56,7 @@ void Label::setBuddy(TQWidget* bud)
{
while (w->focusProxy())
w = TQT_TQWIDGET(w->focusProxy());
if (!w->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING))
if (!w->inherits("TQRadioButton"))
w = 0;
}
if (!w)

@ -56,7 +56,7 @@ void SpinBox::init()
// Find the spin widgets which are part of the spin boxes, in order to
// handle their shift-button presses.
TQObjectList* spinwidgets = queryList(TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true);
TQObjectList* spinwidgets = queryList("TQSpinWidget", 0, false, true);
TQSpinWidget* spin = (TQSpinWidget*)spinwidgets->getFirst();
if (spin)
spin->installEventFilter(this); // handle shift-button presses

@ -291,7 +291,7 @@ void SpinBox2::getMetrics() const
wGap = 0;
// Make style-specific adjustments for a better appearance
if (style().inherits(TQMOTIFPLUSSTYLE_OBJECT_NAME_STRING))
if (style().inherits("TQMotifPlusStyle"))
{
xSpinbox = 0; // show the edit control left border
wGap = 2; // leave a space to the right of the left-hand pair of spin buttons
@ -403,7 +403,7 @@ SpinMirror::SpinMirror(SpinBox* spinbox, TQFrame* spinFrame, TQWidget* parent, c
// Find the spin widget which is part of the spin box, in order to
// pass on its shift-button presses.
TQObjectList* spinwidgets = spinbox->queryList(TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true);
TQObjectList* spinwidgets = spinbox->queryList("TQSpinWidget", 0, false, true);
mSpinWidget = (SpinBox*)spinwidgets->getFirst();
delete spinwidgets;
}

@ -3213,7 +3213,7 @@ KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,TQCanvas* canvas, TQWi
myMyContentsHeight = 0;
_showItemAddPopupMenu = false;
TQObject *scrollViewTimer = child( "scrollview scrollbar timer", TQTIMER_OBJECT_NAME_STRING, false );
TQObject *scrollViewTimer = child( "scrollview scrollbar timer", "TQTimer", false );
Q_ASSERT( scrollViewTimer );
if ( scrollViewTimer ) {
disconnect( scrollViewTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateScrollBars() ) );

@ -1754,7 +1754,7 @@ bool KMFolderTree::eventFilter( TQObject *o, TQEvent *e )
{
if ( e->type() == TQEvent::MouseButtonPress &&
TQT_TQMOUSEEVENT(e)->button() == Qt::RightButton &&
o->isA(TQHEADER_OBJECT_NAME_STRING) )
o->isA("TQHeader") )
{
mPopup->popup( TQT_TQMOUSEEVENT(e)->globalPos() );
return true;

@ -236,7 +236,7 @@ bool KMHeaders::eventFilter ( TQObject *o, TQEvent *e )
{
if ( e->type() == TQEvent::MouseButtonPress &&
TQT_TQMOUSEEVENT(e)->button() == Qt::RightButton &&
o->isA(TQHEADER_OBJECT_NAME_STRING) )
o->isA("TQHeader") )
{
// if we currently only show one of either sender/receiver column
// modify the popup text in the way, that it displays the text of the other of the two

@ -37,7 +37,7 @@ public:
// createObject needs to be reimplemented by every KMobileDevice driver
TQObject *createObject( TQObject *parent=0, const char *name=0,
const char *classname=TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args=TQStringList() );
const char *classname="TQObject", const TQStringList &args=TQStringList() );
// connect, disconnect and current status
bool connectDevice(TQWidget *parent);

@ -36,7 +36,7 @@ public:
// createObject needs to be reimplemented by every KMobileDevice driver
TQObject *createObject( TQObject *parent=0, const char *name=0,
const char *classname=TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args=TQStringList() );
const char *classname="TQObject", const TQStringList &args=TQStringList() );
// connect, disconnect and current status
bool connectDevice(TQWidget *parent);

@ -549,7 +549,7 @@ bool KNHeaderView::eventFilter(TQObject *o, TQEvent *e)
// right click on header
if ( e->type() == TQEvent::MouseButtonPress &&
TQT_TQMOUSEEVENT(e)->button() == Qt::RightButton &&
o->isA(TQHEADER_OBJECT_NAME_STRING) )
o->isA("TQHeader") )
{
mPopup->popup( TQT_TQMOUSEEVENT(e)->globalPos() );
return true;

@ -430,7 +430,7 @@ bool KNCollectionView::eventFilter(TQObject *o, TQEvent *e)
// header popup menu
if ( e->type() == TQEvent::MouseButtonPress &&
TQT_TQMOUSEEVENT(e)->button() == Qt::RightButton &&
o->isA(TQHEADER_OBJECT_NAME_STRING) )
o->isA("TQHeader") )
{
mPopup->popup( TQT_TQMOUSEEVENT(e)->globalPos() );
return true;

@ -437,7 +437,7 @@ void KNComposer::slotUndo()
if (fw->inherits("KEdit"))
((TQMultiLineEdit*)fw)->undo();
else if (fw->inherits(TQLINEEDIT_OBJECT_NAME_STRING))
else if (fw->inherits("TQLineEdit"))
((TQLineEdit*)fw)->undo();
}
@ -448,7 +448,7 @@ void KNComposer::slotRedo()
if (fw->inherits("KEdit"))
((TQMultiLineEdit*)fw)->redo();
else if (fw->inherits(TQLINEEDIT_OBJECT_NAME_STRING))
else if (fw->inherits("TQLineEdit"))
((TQLineEdit*)fw)->redo();
}
@ -459,7 +459,7 @@ void KNComposer::slotCut()
if (fw->inherits("KEdit"))
((TQMultiLineEdit*)fw)->cut();
else if (fw->inherits(TQLINEEDIT_OBJECT_NAME_STRING))
else if (fw->inherits("TQLineEdit"))
((TQLineEdit*)fw)->cut();
else kdDebug(5003) << "wrong focus widget" << endl;
}
@ -471,7 +471,7 @@ void KNComposer::slotCopy()
if (fw->inherits("KEdit"))
((TQMultiLineEdit*)fw)->copy();
else if (fw->inherits(TQLINEEDIT_OBJECT_NAME_STRING))
else if (fw->inherits("TQLineEdit"))
((TQLineEdit*)fw)->copy();
else kdDebug(5003) << "wrong focus widget" << endl;
@ -485,7 +485,7 @@ void KNComposer::slotPaste()
if (fw->inherits("KEdit"))
((TQMultiLineEdit*)fw)->paste();
else if (fw->inherits(TQLINEEDIT_OBJECT_NAME_STRING))
else if (fw->inherits("TQLineEdit"))
((TQLineEdit*)fw)->paste();
else kdDebug(5003) << "wrong focus widget" << endl;
}
@ -495,9 +495,9 @@ void KNComposer::slotSelectAll()
TQWidget* fw = focusWidget();
if (!fw) return;
if (fw->inherits(TQLINEEDIT_OBJECT_NAME_STRING))
if (fw->inherits("TQLineEdit"))
((TQLineEdit*)fw)->selectAll();
else if (fw->inherits(TQMULTILINEEDIT_OBJECT_NAME_STRING))
else if (fw->inherits("TQMultiLineEdit"))
((TQMultiLineEdit*)fw)->selectAll();
}

@ -37,7 +37,7 @@ static TQString escapeEnum( const TQString &str )
Converter::Converter()
{
mTQObject = KODE::Class( TQOBJECT_OBJECT_NAME_STRING );
mTQObject = KODE::Class( "TQObject" );
}
void Converter::setWSDL( const WSDL &wsdl )
@ -249,7 +249,7 @@ void Converter::createSimpleTypeSerializer( const Schema::SimpleType *type )
escapedEnums.append( escapeEnum( enums[ i ] ) );
// marshal value
KODE::Function marshalValue( "marshalValue", TQSTRING_OBJECT_NAME_STRING );
KODE::Function marshalValue( "marshalValue", "TQString" );
marshalValue.setStatic( true );
marshalValue.addArgument( "const " + typeName + "* value" );
code += "switch ( value->type() ) {";
@ -315,7 +315,7 @@ void Converter::createSimpleTypeSerializer( const Schema::SimpleType *type )
demarshalCode.unindent();
demarshalCode += "}";
KODE::Function marshalValue( "marshalValue", TQSTRING_OBJECT_NAME_STRING );
KODE::Function marshalValue( "marshalValue", "TQString" );
marshalValue.setStatic( true );
marshalValue.addArgument( "const " + typeName + "* value" );
marshalValue.setBody( "return Serializer::marshalValue( value->value() );" );
@ -839,7 +839,7 @@ void Converter::createUtilClasses()
of typing and is easier to maintain at the end ;)
*/
TypeEntry types[] = {
{ TQSTRING_OBJECT_NAME_STRING, "xsd:string", "*value", "str" },
{ "TQString", "xsd:string", "*value", "str" },
{ "bool", "xsd:boolean", "(*value ? \"true\" : \"false\")", "(str.lower() == \"true\" ? true : false)" },
{ "float", "xsd:TODO", "TQString::number( *value )", "str.toFloat()" },
{ "int", "xsd:int", "TQString::number( *value )", "str.toInt()" },
@ -848,7 +848,7 @@ void Converter::createUtilClasses()
{ "char", "xsd:byte", "TQString( TQChar( *value ) )", "str[ 0 ].latin1()" },
{ "unsigned char", "xsd:unsignedByte", "TQString( TQChar( *value ) )", "str[ 0 ].latin1()" },
{ "short", "xsd:short", "TQString::number( *value )", "str.toShort()" },
{ TQBYTEARRAY_OBJECT_NAME_STRING, "xsd:base64Binary", "TQString::fromUtf8( KCodecs::base64Encode( *value ) )", "KCodecs::base64Decode( str.utf8() )" },
{ "TQByteArray", "xsd:base64Binary", "TQString::fromUtf8( KCodecs::base64Encode( *value ) )", "KCodecs::base64Decode( str.utf8() )" },
{ "TQDateTime", "xsd:dateTime", "value->toString( TQt::ISODate )", "TQDateTime::fromString( str, TQt::ISODate )" },
{ "TQDate", "xsd:date", "value->toString( TQt::ISODate )", "TQDate::fromString( str, TQt::ISODate )" }
};
@ -859,7 +859,7 @@ void Converter::createUtilClasses()
TypeEntry entry = types[ i ];
marshal = KODE::Function( "marshalValue", TQSTRING_OBJECT_NAME_STRING );
marshal = KODE::Function( "marshalValue", "TQString" );
marshal.setStatic( true );
marshal.addArgument( "const " + entry.type + "* value" );
@ -911,10 +911,10 @@ void Converter::createTransportClass()
transport.addInclude( "kdebug.h" );
KODE::MemberVariable url( "url", TQSTRING_OBJECT_NAME_STRING );
KODE::MemberVariable url( "url", "TQString" );
transport.addMemberVariable( url );
KODE::MemberVariable slotDataVar( "data", TQBYTEARRAY_OBJECT_NAME_STRING );
KODE::MemberVariable slotDataVar( "data", "TQByteArray" );
transport.addMemberVariable( slotDataVar );
// ctor

@ -33,21 +33,21 @@ using namespace KWSDL;
TypeMapper::TypeMapper()
{
mMap.insert( "any", TypeInfo( "any", TQSTRING_OBJECT_NAME_STRING, "tqstring.h" ) );
mMap.insert( "anyURI", TypeInfo( "anyUri", TQSTRING_OBJECT_NAME_STRING, "tqstring.h" ) );
mMap.insert( "base64Binary", TypeInfo( "base64Binary", TQBYTEARRAY_OBJECT_NAME_STRING, "tqcstring.h" ) );
mMap.insert( "binary", TypeInfo( "binary", TQBYTEARRAY_OBJECT_NAME_STRING, "tqcstring.h" ) );
mMap.insert( "any", TypeInfo( "any", "TQString", "tqstring.h" ) );
mMap.insert( "anyURI", TypeInfo( "anyUri", "TQString", "tqstring.h" ) );
mMap.insert( "base64Binary", TypeInfo( "base64Binary", "TQByteArray", "tqcstring.h" ) );
mMap.insert( "binary", TypeInfo( "binary", "TQByteArray", "tqcstring.h" ) );
mMap.insert( "boolean", TypeInfo( "boolean", "bool", "" ) );
mMap.insert( "byte", TypeInfo( "byte", "char", "" ) );
mMap.insert( "date", TypeInfo( "date", "TQDate", "tqdatetime.h" ) );
mMap.insert( "dateTime", TypeInfo( "dateTime", "TQDateTime", "tqdatetime.h" ) );
mMap.insert( "decimal", TypeInfo( "decimal", "float", "" ) );
mMap.insert( "double", TypeInfo( "double", "double", "" ) );
mMap.insert( "duration", TypeInfo( "duration", TQSTRING_OBJECT_NAME_STRING, "tqstring.h" ) ); // TODO: add duration class
mMap.insert( "duration", TypeInfo( "duration", "TQString", "tqstring.h" ) ); // TODO: add duration class
mMap.insert( "int", TypeInfo( "int", "int", "" ) );
mMap.insert( "language", TypeInfo( "language", TQSTRING_OBJECT_NAME_STRING, "tqstring.h" ) );
mMap.insert( "language", TypeInfo( "language", "TQString", "tqstring.h" ) );
mMap.insert( "short", TypeInfo( "short", "short", "" ) );
mMap.insert( "string", TypeInfo( "string", TQSTRING_OBJECT_NAME_STRING, "tqstring.h" ) );
mMap.insert( "string", TypeInfo( "string", "TQString", "tqstring.h" ) );
mMap.insert( "unsignedByte", TypeInfo( "unsignedByte", "unsigned char", "" ) );
mMap.insert( "unsignedInt", TypeInfo( "unsignedInt", "unsigned int", "" ) );
}
@ -170,7 +170,7 @@ TQMap<TQString, TQString> TypeMapper::headerDec( const Schema::Element *element
TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() ) {
if ( !it.data().header.isEmpty() ) {
if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING )
if ( it.data().type == "TQByteArray" )
headers.insert( it.data().header, TQString() );
else
headers.insert( it.data().header, it.data().type );
@ -213,7 +213,7 @@ TQMap<TQString, TQString> TypeMapper::headerDec( const Schema::Attribute *attrib
TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() ) {
if ( !it.data().header.isEmpty() ) {
if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING )
if ( it.data().type == "TQByteArray" )
headers.insert( it.data().header, TQString() );
else
headers.insert( it.data().header, it.data().type );
@ -252,7 +252,7 @@ TQMap<TQString, TQString> TypeMapper::headerDec( const TQString &typeName ) cons
TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() ) {
if ( !it.data().header.isEmpty() ) {
if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING )
if ( it.data().type == "TQByteArray" )
headers.insert( it.data().header, TQString() );
else
headers.insert( it.data().header, it.data().type );

@ -95,7 +95,7 @@ void Creator::createProperty( KODE::Class &c, const TQString &type,
void Creator::createElementFunctions( KODE::Class &c, Element *e )
{
if ( e->hasText ) {
createProperty( c, TQSTRING_OBJECT_NAME_STRING, e->name );
createProperty( c, "TQString", e->name );
if ( mXmlParserType == XmlParserCustomExternal ) {
createTextElementParserCustom( c, e );
}
@ -150,7 +150,7 @@ void Creator::createClass( Element *element )
itA != element->attributes.end(); ++itA ) {
Attribute *a = *itA;
createProperty( c, TQSTRING_OBJECT_NAME_STRING, a->name );
createProperty( c, "TQString", a->name );
}
TQValueList<Element *>::ConstIterator itE;
@ -176,7 +176,7 @@ void Creator::createClass( Element *element )
void Creator::createElementWriter( KODE::Class &c, Element *element )
{
KODE::Function writer( "writeElement", TQSTRING_OBJECT_NAME_STRING );
KODE::Function writer( "writeElement", "TQString" );
KODE::Code code;
@ -268,7 +268,7 @@ void Creator::createElementParser( KODE::Class &c, Element *e )
void Creator::createTextElementParserCustom( KODE::Class &, Element *e )
{
KODE::Function parser( "parseElement" + upperFirst( e->name ), TQSTRING_OBJECT_NAME_STRING );
KODE::Function parser( "parseElement" + upperFirst( e->name ), "TQString" );
KODE::Code code;
@ -637,7 +637,7 @@ void Creator::createListTypedefs()
void Creator::createIndenter( KODE::File &file )
{
KODE::Function indenter( "indent", TQSTRING_OBJECT_NAME_STRING );
KODE::Function indenter( "indent", "TQString" );
indenter.addArgument( "int n = 0" );
KODE::Code code;
@ -724,7 +724,7 @@ void Creator::createFileParserCustom( Element *element )
mParserClass.addInclude( "kdebug.h" );
mParserClass.addMemberVariable( KODE::MemberVariable( "mBuffer",
TQSTRING_OBJECT_NAME_STRING ) );
"TQString" ) );
mParserClass.addMemberVariable( KODE::MemberVariable( "mRunning",
"unsigned int" ) );

@ -459,7 +459,7 @@ void MultiAgendaView::updateConfig()
bool MultiAgendaView::eventFilter(TQObject * obj, TQEvent * event)
{
if ( obj->className() == TQCString(TQSPLITTERHANDLE_OBJECT_NAME_STRING) ) {
if ( obj->className() == TQCString("TQSplitterHandle") ) {
// KDE4: not needed anymore, TQSplitter has a moved signal there
if ( (event->type() == TQEvent::MouseMove && TDEGlobalSettings::opaqueResize())
|| event->type() == TQEvent::MouseButtonRelease ) {
@ -542,7 +542,7 @@ void MultiAgendaView::zoomView( const int delta, const TQPoint & pos, const Qt::
// KDE4: not needed, use existing TQSplitter signals instead
void MultiAgendaView::installSplitterEventFilter(TQSplitter * splitter)
{
TQObjectList *objlist = splitter->queryList( TQSPLITTERHANDLE_OBJECT_NAME_STRING );
TQObjectList *objlist = splitter->queryList( "TQSplitterHandle" );
// HACK: when not being visible, the splitter handle is sometimes not found
// for unknown reasons, so trigger an update when we are shown again
if ( objlist->count() == 0 && !isVisible() )

@ -27,12 +27,12 @@
</entry>
</group>
<group name="MyOptions">
<entry type=TQSTRING_OBJECT_NAME_STRING>
<entry type="TQString">
<name>MyString</name>
<label>This is a string</label>
<default>Default String</default>
</entry>
<entry type=TQSTRINGLIST_OBJECT_NAME_STRING>
<entry type="TQStringList">
<name>MyStringList</name>
<default>up,down</default>
</entry>

@ -63,16 +63,16 @@ void DesignerFields::initGUI( const TQString &uiFile )
layout->addWidget( wdg );
TQObjectList *list = wdg->queryList( TQWIDGET_OBJECT_NAME_STRING );
TQObjectList *list = wdg->queryList( "TQWidget" );
TQObjectListIt it( *list );
TQStringList allowedTypes;
allowedTypes << TQLINEEDIT_OBJECT_NAME_STRING
<< TQTEXTEDIT_OBJECT_NAME_STRING
<< TQSPINBOX_OBJECT_NAME_STRING
<< TQCHECKBOX_OBJECT_NAME_STRING
<< TQCOMBOBOX_OBJECT_NAME_STRING
<< TQDATETIMEEDIT_OBJECT_NAME_STRING
allowedTypes << "TQLineEdit"
<< "TQTextEdit"
<< "TQSpinBox"
<< "TQCheckBox"
<< "TQComboBox"
<< "TQDateTimeEdit"
<< "KLineEdit"
<< "KDateTimeWidget"
<< "KDatePicker";
@ -87,19 +87,19 @@ void DesignerFields::initGUI( const TQString &uiFile )
if ( !name.isEmpty() )
mWidgets.insert( name, widget );
if ( it.current()->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) )
if ( it.current()->inherits( "TQLineEdit" ) )
connect( it.current(), TQT_SIGNAL( textChanged( const TQString& ) ),
TQT_SIGNAL( modified() ) );
else if ( it.current()->inherits( TQSPINBOX_OBJECT_NAME_STRING ) )
else if ( it.current()->inherits( "TQSpinBox" ) )
connect( it.current(), TQT_SIGNAL( valueChanged( int ) ),
TQT_SIGNAL( modified() ) );
else if ( it.current()->inherits( TQCHECKBOX_OBJECT_NAME_STRING ) )
else if ( it.current()->inherits( "TQCheckBox" ) )
connect( it.current(), TQT_SIGNAL( toggled( bool ) ),
TQT_SIGNAL( modified() ) );
else if ( it.current()->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) )
else if ( it.current()->inherits( "TQComboBox" ) )
connect( it.current(), TQT_SIGNAL( activated( const TQString& ) ),
TQT_SIGNAL( modified() ) );
else if ( it.current()->inherits( TQDATETIMEEDIT_OBJECT_NAME_STRING ) )
else if ( it.current()->inherits( "TQDateTimeEdit" ) )
connect( it.current(), TQT_SIGNAL( valueChanged( const TQDateTime& ) ),
TQT_SIGNAL( modified() ) );
else if ( it.current()->inherits( "KDateTimeWidget" ) )
@ -108,7 +108,7 @@ void DesignerFields::initGUI( const TQString &uiFile )
else if ( it.current()->inherits( "KDatePicker" ) )
connect( it.current(), TQT_SIGNAL( dateChanged( TQDate ) ),
TQT_SIGNAL( modified() ) );
else if ( it.current()->inherits( TQTEXTEDIT_OBJECT_NAME_STRING ) )
else if ( it.current()->inherits( "TQTextEdit" ) )
connect( it.current(), TQT_SIGNAL( textChanged() ),
TQT_SIGNAL( modified() ) );
@ -143,16 +143,16 @@ void DesignerFields::load( DesignerFields::Storage *storage )
TQMap<TQString, TQWidget *>::ConstIterator widIt;
for ( widIt = mWidgets.begin(); widIt != mWidgets.end(); ++widIt ) {
TQString value;
if ( widIt.data()->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) ) {
if ( widIt.data()->inherits( "TQLineEdit" ) ) {
TQLineEdit *wdg = static_cast<TQLineEdit*>( widIt.data() );
wdg->setText( TQString() );
} else if ( widIt.data()->inherits( TQSPINBOX_OBJECT_NAME_STRING ) ) {
} else if ( widIt.data()->inherits( "TQSpinBox" ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( widIt.data() );
wdg->setValue( wdg->minValue() );
} else if ( widIt.data()->inherits( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
} else if ( widIt.data()->inherits( "TQCheckBox" ) ) {
TQCheckBox *wdg = static_cast<TQCheckBox*>( widIt.data() );
wdg->setChecked( false );
} else if ( widIt.data()->inherits( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( widIt.data()->inherits( "TQDateTimeEdit" ) ) {
TQDateTimeEdit *wdg = static_cast<TQDateTimeEdit*>( widIt.data() );
wdg->setDateTime( TQDateTime::currentDateTime() );
} else if ( widIt.data()->inherits( "KDateTimeWidget" ) ) {
@ -161,10 +161,10 @@ void DesignerFields::load( DesignerFields::Storage *storage )
} else if ( widIt.data()->inherits( "KDatePicker" ) ) {
KDatePicker *wdg = static_cast<KDatePicker*>( widIt.data() );
wdg->setDate( TQDate::currentDate() );
} else if ( widIt.data()->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) {
} else if ( widIt.data()->inherits( "TQComboBox" ) ) {
TQComboBox *wdg = static_cast<TQComboBox*>( widIt.data() );
wdg->setCurrentItem( 0 );
} else if ( widIt.data()->inherits( TQTEXTEDIT_OBJECT_NAME_STRING ) ) {
} else if ( widIt.data()->inherits( "TQTextEdit" ) ) {
TQTextEdit *wdg = static_cast<TQTextEdit*>( widIt.data() );
wdg->setText( TQString() );
}
@ -176,16 +176,16 @@ void DesignerFields::load( DesignerFields::Storage *storage )
TQMap<TQString, TQWidget *>::ConstIterator it = mWidgets.find( *it2 );
if ( it != mWidgets.end() ) {
if ( it.data()->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) ) {
if ( it.data()->inherits( "TQLineEdit" ) ) {
TQLineEdit *wdg = static_cast<TQLineEdit*>( it.data() );
wdg->setText( value );
} else if ( it.data()->inherits( TQSPINBOX_OBJECT_NAME_STRING ) ) {
} else if ( it.data()->inherits( "TQSpinBox" ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( it.data() );
wdg->setValue( value.toInt() );
} else if ( it.data()->inherits( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
} else if ( it.data()->inherits( "TQCheckBox" ) ) {
TQCheckBox *wdg = static_cast<TQCheckBox*>( it.data() );
wdg->setChecked( value == "true" || value == "1" );
} else if ( it.data()->inherits( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( it.data()->inherits( "TQDateTimeEdit" ) ) {
TQDateTimeEdit *wdg = static_cast<TQDateTimeEdit*>( it.data() );
wdg->setDateTime( TQDateTime::fromString( value, Qt::ISODate ) );
} else if ( it.data()->inherits( "KDateTimeWidget" ) ) {
@ -194,10 +194,10 @@ void DesignerFields::load( DesignerFields::Storage *storage )
} else if ( it.data()->inherits( "KDatePicker" ) ) {
KDatePicker *wdg = static_cast<KDatePicker*>( it.data() );
wdg->setDate( TQDate::fromString( value, Qt::ISODate ) );
} else if ( it.data()->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) {
} else if ( it.data()->inherits( "TQComboBox" ) ) {
TQComboBox *wdg = static_cast<TQComboBox*>( it.data() );
wdg->setCurrentText( value );
} else if ( it.data()->inherits( TQTEXTEDIT_OBJECT_NAME_STRING ) ) {
} else if ( it.data()->inherits( "TQTextEdit" ) ) {
TQTextEdit *wdg = static_cast<TQTextEdit*>( it.data() );
wdg->setText( value );
}
@ -210,16 +210,16 @@ void DesignerFields::save( DesignerFields::Storage *storage )
TQMap<TQString, TQWidget*>::Iterator it;
for ( it = mWidgets.begin(); it != mWidgets.end(); ++it ) {
TQString value;
if ( it.data()->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) ) {
if ( it.data()->inherits( "TQLineEdit" ) ) {
TQLineEdit *wdg = static_cast<TQLineEdit*>( it.data() );
value = wdg->text();
} else if ( it.data()->inherits( TQSPINBOX_OBJECT_NAME_STRING ) ) {
} else if ( it.data()->inherits( "TQSpinBox" ) ) {
TQSpinBox *wdg = static_cast<TQSpinBox*>( it.data() );
value = TQString::number( wdg->value() );
} else if ( it.data()->inherits( TQCHECKBOX_OBJECT_NAME_STRING ) ) {
} else if ( it.data()->inherits( "TQCheckBox" ) ) {
TQCheckBox *wdg = static_cast<TQCheckBox*>( it.data() );
value = ( wdg->isChecked() ? "true" : "false" );
} else if ( it.data()->inherits( TQDATETIMEEDIT_OBJECT_NAME_STRING ) ) {
} else if ( it.data()->inherits( "TQDateTimeEdit" ) ) {
TQDateTimeEdit *wdg = static_cast<TQDateTimeEdit*>( it.data() );
value = wdg->dateTime().toString( Qt::ISODate );
} else if ( it.data()->inherits( "KDateTimeWidget" ) ) {
@ -228,10 +228,10 @@ void DesignerFields::save( DesignerFields::Storage *storage )
} else if ( it.data()->inherits( "KDatePicker" ) ) {
KDatePicker *wdg = static_cast<KDatePicker*>( it.data() );
value = wdg->date().toString( Qt::ISODate );
} else if ( it.data()->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) {
} else if ( it.data()->inherits( "TQComboBox" ) ) {
TQComboBox *wdg = static_cast<TQComboBox*>( it.data() );
value = wdg->currentText();
} else if ( it.data()->inherits( TQTEXTEDIT_OBJECT_NAME_STRING ) ) {
} else if ( it.data()->inherits( "TQTextEdit" ) ) {
TQTextEdit *wdg = static_cast<TQTextEdit*>( it.data() );
value = wdg->text();
}

@ -70,16 +70,16 @@ class PageItem : public TQCheckListItem
TQImage img = pm.convertToImage().smoothScale( 300, 300, TQ_ScaleMin );
mPreview = img;
TQObjectList *list = wdg->queryList( TQWIDGET_OBJECT_NAME_STRING );
TQObjectList *list = wdg->queryList( "TQWidget" );
TQObjectListIt it( *list );
TQMap<TQString, TQString> allowedTypes;
allowedTypes.insert( TQLINEEDIT_OBJECT_NAME_STRING, i18n( "Text" ) );
allowedTypes.insert( TQTEXTEDIT_OBJECT_NAME_STRING, i18n( "Text" ) );
allowedTypes.insert( TQSPINBOX_OBJECT_NAME_STRING, i18n( "Numeric Value" ) );
allowedTypes.insert( TQCHECKBOX_OBJECT_NAME_STRING, i18n( "Boolean" ) );
allowedTypes.insert( TQCOMBOBOX_OBJECT_NAME_STRING, i18n( "Selection" ) );
allowedTypes.insert( TQDATETIMEEDIT_OBJECT_NAME_STRING, i18n( "Date & Time" ) );
allowedTypes.insert( "TQLineEdit", i18n( "Text" ) );
allowedTypes.insert( "TQTextEdit", i18n( "Text" ) );
allowedTypes.insert( "TQSpinBox", i18n( "Numeric Value" ) );
allowedTypes.insert( "TQCheckBox", i18n( "Boolean" ) );
allowedTypes.insert( "TQComboBox", i18n( "Selection" ) );
allowedTypes.insert( "TQDateTimeEdit", i18n( "Date & Time" ) );
allowedTypes.insert( "KLineEdit", i18n( "Text" ) );
allowedTypes.insert( "KDateTimeWidget", i18n( "Date & Time" ) );
allowedTypes.insert( "KDatePicker", i18n( "Date" ) );

Loading…
Cancel
Save