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>
pull/79/head
Michele Calgaro 1 year ago
parent 0e1649599e
commit 3055550710
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, kapp->dcopClient()->call("kded", "favicons", "iconForURL(KURL)", data,
replyType, reply); replyType, reply);
if (replyType == TQSTRING_OBJECT_NAME_STRING) { if (replyType == "TQString") {
TQDataStream replyStream(reply, IO_ReadOnly); TQDataStream replyStream(reply, IO_ReadOnly);
TQString result; TQString result;
replyStream >> result; replyStream >> result;

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

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

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

@ -56,7 +56,7 @@ void SpinBox::init()
// Find the spin widgets which are part of the spin boxes, in order to // Find the spin widgets which are part of the spin boxes, in order to
// handle their shift-button presses. // 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(); TQSpinWidget* spin = (TQSpinWidget*)spinwidgets->getFirst();
if (spin) if (spin)
spin->installEventFilter(this); // handle shift-button presses spin->installEventFilter(this); // handle shift-button presses

@ -291,7 +291,7 @@ void SpinBox2::getMetrics() const
wGap = 0; wGap = 0;
// Make style-specific adjustments for a better appearance // 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 xSpinbox = 0; // show the edit control left border
wGap = 2; // leave a space to the right of the left-hand pair of spin buttons 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 // Find the spin widget which is part of the spin box, in order to
// pass on its shift-button presses. // 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(); mSpinWidget = (SpinBox*)spinwidgets->getFirst();
delete spinwidgets; delete spinwidgets;
} }

@ -3213,7 +3213,7 @@ KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,TQCanvas* canvas, TQWi
myMyContentsHeight = 0; myMyContentsHeight = 0;
_showItemAddPopupMenu = false; _showItemAddPopupMenu = false;
TQObject *scrollViewTimer = child( "scrollview scrollbar timer", TQTIMER_OBJECT_NAME_STRING, false ); TQObject *scrollViewTimer = child( "scrollview scrollbar timer", "TQTimer", false );
Q_ASSERT( scrollViewTimer ); Q_ASSERT( scrollViewTimer );
if ( scrollViewTimer ) { if ( scrollViewTimer ) {
disconnect( scrollViewTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateScrollBars() ) ); 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 && if ( e->type() == TQEvent::MouseButtonPress &&
TQT_TQMOUSEEVENT(e)->button() == Qt::RightButton && TQT_TQMOUSEEVENT(e)->button() == Qt::RightButton &&
o->isA(TQHEADER_OBJECT_NAME_STRING) ) o->isA("TQHeader") )
{ {
mPopup->popup( TQT_TQMOUSEEVENT(e)->globalPos() ); mPopup->popup( TQT_TQMOUSEEVENT(e)->globalPos() );
return true; return true;

@ -236,7 +236,7 @@ bool KMHeaders::eventFilter ( TQObject *o, TQEvent *e )
{ {
if ( e->type() == TQEvent::MouseButtonPress && if ( e->type() == TQEvent::MouseButtonPress &&
TQT_TQMOUSEEVENT(e)->button() == Qt::RightButton && 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 // 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 // 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 // createObject needs to be reimplemented by every KMobileDevice driver
TQObject *createObject( TQObject *parent=0, const char *name=0, 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 // connect, disconnect and current status
bool connectDevice(TQWidget *parent); bool connectDevice(TQWidget *parent);

@ -36,7 +36,7 @@ public:
// createObject needs to be reimplemented by every KMobileDevice driver // createObject needs to be reimplemented by every KMobileDevice driver
TQObject *createObject( TQObject *parent=0, const char *name=0, 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 // connect, disconnect and current status
bool connectDevice(TQWidget *parent); bool connectDevice(TQWidget *parent);

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

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

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

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

@ -33,21 +33,21 @@ using namespace KWSDL;
TypeMapper::TypeMapper() TypeMapper::TypeMapper()
{ {
mMap.insert( "any", TypeInfo( "any", TQSTRING_OBJECT_NAME_STRING, "tqstring.h" ) ); mMap.insert( "any", TypeInfo( "any", "TQString", "tqstring.h" ) );
mMap.insert( "anyURI", TypeInfo( "anyUri", TQSTRING_OBJECT_NAME_STRING, "tqstring.h" ) ); mMap.insert( "anyURI", TypeInfo( "anyUri", "TQString", "tqstring.h" ) );
mMap.insert( "base64Binary", TypeInfo( "base64Binary", TQBYTEARRAY_OBJECT_NAME_STRING, "tqcstring.h" ) ); mMap.insert( "base64Binary", TypeInfo( "base64Binary", "TQByteArray", "tqcstring.h" ) );
mMap.insert( "binary", TypeInfo( "binary", TQBYTEARRAY_OBJECT_NAME_STRING, "tqcstring.h" ) ); mMap.insert( "binary", TypeInfo( "binary", "TQByteArray", "tqcstring.h" ) );
mMap.insert( "boolean", TypeInfo( "boolean", "bool", "" ) ); mMap.insert( "boolean", TypeInfo( "boolean", "bool", "" ) );
mMap.insert( "byte", TypeInfo( "byte", "char", "" ) ); mMap.insert( "byte", TypeInfo( "byte", "char", "" ) );
mMap.insert( "date", TypeInfo( "date", "TQDate", "tqdatetime.h" ) ); mMap.insert( "date", TypeInfo( "date", "TQDate", "tqdatetime.h" ) );
mMap.insert( "dateTime", TypeInfo( "dateTime", "TQDateTime", "tqdatetime.h" ) ); mMap.insert( "dateTime", TypeInfo( "dateTime", "TQDateTime", "tqdatetime.h" ) );
mMap.insert( "decimal", TypeInfo( "decimal", "float", "" ) ); mMap.insert( "decimal", TypeInfo( "decimal", "float", "" ) );
mMap.insert( "double", TypeInfo( "double", "double", "" ) ); 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( "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( "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( "unsignedByte", TypeInfo( "unsignedByte", "unsigned char", "" ) );
mMap.insert( "unsignedInt", TypeInfo( "unsignedInt", "unsigned int", "" ) ); 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 ); TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() ) { if ( it != mMap.end() ) {
if ( !it.data().header.isEmpty() ) { if ( !it.data().header.isEmpty() ) {
if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING ) if ( it.data().type == "TQByteArray" )
headers.insert( it.data().header, TQString() ); headers.insert( it.data().header, TQString() );
else else
headers.insert( it.data().header, it.data().type ); 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 ); TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() ) { if ( it != mMap.end() ) {
if ( !it.data().header.isEmpty() ) { if ( !it.data().header.isEmpty() ) {
if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING ) if ( it.data().type == "TQByteArray" )
headers.insert( it.data().header, TQString() ); headers.insert( it.data().header, TQString() );
else else
headers.insert( it.data().header, it.data().type ); 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 ); TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() ) { if ( it != mMap.end() ) {
if ( !it.data().header.isEmpty() ) { if ( !it.data().header.isEmpty() ) {
if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING ) if ( it.data().type == "TQByteArray" )
headers.insert( it.data().header, TQString() ); headers.insert( it.data().header, TQString() );
else else
headers.insert( it.data().header, it.data().type ); 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 ) void Creator::createElementFunctions( KODE::Class &c, Element *e )
{ {
if ( e->hasText ) { if ( e->hasText ) {
createProperty( c, TQSTRING_OBJECT_NAME_STRING, e->name ); createProperty( c, "TQString", e->name );
if ( mXmlParserType == XmlParserCustomExternal ) { if ( mXmlParserType == XmlParserCustomExternal ) {
createTextElementParserCustom( c, e ); createTextElementParserCustom( c, e );
} }
@ -150,7 +150,7 @@ void Creator::createClass( Element *element )
itA != element->attributes.end(); ++itA ) { itA != element->attributes.end(); ++itA ) {
Attribute *a = *itA; Attribute *a = *itA;
createProperty( c, TQSTRING_OBJECT_NAME_STRING, a->name ); createProperty( c, "TQString", a->name );
} }
TQValueList<Element *>::ConstIterator itE; TQValueList<Element *>::ConstIterator itE;
@ -176,7 +176,7 @@ void Creator::createClass( Element *element )
void Creator::createElementWriter( KODE::Class &c, 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; KODE::Code code;
@ -268,7 +268,7 @@ void Creator::createElementParser( KODE::Class &c, Element *e )
void Creator::createTextElementParserCustom( KODE::Class &, 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; KODE::Code code;
@ -637,7 +637,7 @@ void Creator::createListTypedefs()
void Creator::createIndenter( KODE::File &file ) void Creator::createIndenter( KODE::File &file )
{ {
KODE::Function indenter( "indent", TQSTRING_OBJECT_NAME_STRING ); KODE::Function indenter( "indent", "TQString" );
indenter.addArgument( "int n = 0" ); indenter.addArgument( "int n = 0" );
KODE::Code code; KODE::Code code;
@ -724,7 +724,7 @@ void Creator::createFileParserCustom( Element *element )
mParserClass.addInclude( "kdebug.h" ); mParserClass.addInclude( "kdebug.h" );
mParserClass.addMemberVariable( KODE::MemberVariable( "mBuffer", mParserClass.addMemberVariable( KODE::MemberVariable( "mBuffer",
TQSTRING_OBJECT_NAME_STRING ) ); "TQString" ) );
mParserClass.addMemberVariable( KODE::MemberVariable( "mRunning", mParserClass.addMemberVariable( KODE::MemberVariable( "mRunning",
"unsigned int" ) ); "unsigned int" ) );

@ -459,7 +459,7 @@ void MultiAgendaView::updateConfig()
bool MultiAgendaView::eventFilter(TQObject * obj, TQEvent * event) 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 // KDE4: not needed anymore, TQSplitter has a moved signal there
if ( (event->type() == TQEvent::MouseMove && TDEGlobalSettings::opaqueResize()) if ( (event->type() == TQEvent::MouseMove && TDEGlobalSettings::opaqueResize())
|| event->type() == TQEvent::MouseButtonRelease ) { || 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 // KDE4: not needed, use existing TQSplitter signals instead
void MultiAgendaView::installSplitterEventFilter(TQSplitter * splitter) 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 // HACK: when not being visible, the splitter handle is sometimes not found
// for unknown reasons, so trigger an update when we are shown again // for unknown reasons, so trigger an update when we are shown again
if ( objlist->count() == 0 && !isVisible() ) if ( objlist->count() == 0 && !isVisible() )

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

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

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

Loading…
Cancel
Save