summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/widgetfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/widgetfactory.cpp')
-rw-r--r--kdevdesigner/designer/widgetfactory.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp
index e31f5d82..e1f11546 100644
--- a/kdevdesigner/designer/widgetfactory.cpp
+++ b/kdevdesigner/designer/widgetfactory.cpp
@@ -296,11 +296,11 @@ QDesignerWidgetStack::QDesignerWidgetStack( TQWidget *parent, const char *name )
prev = new TQToolButton( TQt::LeftArrow, this, "designer_wizardstack_button" );
prev->setAutoRaise( TRUE );
prev->setAutoRepeat( TRUE );
- prev->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) );
+ prev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) );
next = new TQToolButton( TQt::RightArrow, this, "designer_wizardstack_button" );
next->setAutoRaise( TRUE );
next->setAutoRepeat( TRUE );
- next->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) );
+ next->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) );
connect( prev, TQT_SIGNAL( clicked() ), this, TQT_SLOT( prevPage() ) );
connect( next, TQT_SIGNAL( clicked() ), this, TQT_SLOT( nextPage() ) );
updateButtons();
@@ -498,7 +498,7 @@ TQMap< int, TQStringList > *changedProperties = 0;
void WidgetFactory::saveDefaultProperties( TQObject *w, int id )
{
TQMap< TQString, TQVariant> propMap;
- TQStrList lst = w->tqmetaObject()->propertyNames( TRUE );
+ TQStrList lst = w->metaObject()->propertyNames( TRUE );
for ( uint i = 0; i < lst.count(); ++i ) {
TQVariant var = w->property( lst.at( i ) );
if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 )
@@ -653,7 +653,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay
}
}
}
- l->tqsetAlignment( align );
+ l->setAlignment( align );
MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
}
@@ -690,7 +690,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
TQPushButton *b = 0;
if ( init ) {
b = new QDesignerPushButton( parent, name );
- b->setText( TQString::tqfromLatin1( name ) );
+ b->setText( TQString::fromLatin1( name ) );
} else {
b = new QDesignerPushButton( parent, name );
}
@@ -714,24 +714,24 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
} else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) {
if ( init ) {
QDesignerCheckBox *cb = new QDesignerCheckBox( parent, name );
- cb->setText( TQString::tqfromLatin1( name ) );
+ cb->setText( TQString::fromLatin1( name ) );
return cb;
}
return new QDesignerCheckBox( parent, name );
} else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) {
if ( init ) {
QDesignerRadioButton *rb = new QDesignerRadioButton( parent, name );
- rb->setText( TQString::tqfromLatin1( name ) );
+ rb->setText( TQString::fromLatin1( name ) );
return rb;
}
return new QDesignerRadioButton( parent, name );
} else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) {
if ( init )
- return new TQGroupBox( TQString::tqfromLatin1( name ), parent, name );
+ return new TQGroupBox( TQString::fromLatin1( name ), parent, name );
return new TQGroupBox( parent, name );
} else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) {
if ( init )
- return new TQButtonGroup( TQString::tqfromLatin1( name ), parent, name );
+ return new TQButtonGroup( TQString::fromLatin1( name ), parent, name );
return new TQButtonGroup( parent, name );
} else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) {
#if !defined(TQT_NO_ICONVIEW)
@@ -789,7 +789,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" ) {
QDesignerLabel *l = new QDesignerLabel( parent, name );
if ( init ) {
- l->setText( TQString::tqfromLatin1( name ) );
+ l->setText( TQString::fromLatin1( name ) );
MetaDataBase::addEntry( TQT_TQOBJECT(l) );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "text", TRUE );
}
@@ -1469,7 +1469,7 @@ bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName )
bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName )
{
- const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->
+ const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->
findProperty( propName, TRUE ), TRUE );
if (!p )
return FALSE;
@@ -1482,7 +1482,7 @@ TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName )
int v = defaultValue( w, "tqalignment" ).toInt();
return TQVariant( ( v & WordBreak ) == WordBreak, 0 );
} else if ( propName == "toolTip" || propName == "whatsThis" ) {
- return TQVariant( TQString::tqfromLatin1( "" ) );
+ return TQVariant( TQString::fromLatin1( "" ) );
} else if ( w->inherits( "CustomWidget" ) ) {
return TQVariant();
} else if ( propName == "frameworkCode" ) {
@@ -1496,8 +1496,8 @@ TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName )
TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName )
{
- const TQMetaProperty *p = w->tqmetaObject()->
- property( w->tqmetaObject()->findProperty( propName, TRUE ), TRUE );
+ const TQMetaProperty *p = w->metaObject()->
+ property( w->metaObject()->findProperty( propName, TRUE ), TRUE );
if ( !p ) {
int v = defaultValue( w, "tqalignment" ).toInt();
if ( propName == "hAlign" ) {
@@ -1536,8 +1536,8 @@ TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name,
TQVariant WidgetFactory::property( TQObject *w, const char *name )
{
- int id = w->tqmetaObject()->findProperty( name, TRUE );
- const TQMetaProperty* p = w->tqmetaObject()->property( id, TRUE );
+ int id = w->metaObject()->findProperty( name, TRUE );
+ const TQMetaProperty* p = w->metaObject()->property( id, TRUE );
if ( !p || !p->isValid() )
return MetaDataBase::fakeProperty( w, name );
return w->property( name );
@@ -1549,7 +1549,7 @@ void QDesignerLabel::updateBuddy()
if ( myBuddy.isEmpty() )
return;
- TQObjectList *l = tqtopLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, FALSE, TRUE );
+ TQObjectList *l = topLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, FALSE, TRUE );
if ( !l || !l->first() ) {
delete l;
return;
@@ -1607,7 +1607,7 @@ bool TQLayoutWidget::event( TQEvent *e )
void TQLayoutWidget::updateSizePolicy()
{
if ( childrenListObject().isEmpty() || childrenListObject().count() == 0 ) {
- sp = TQWidget::tqsizePolicy();
+ sp = TQWidget::sizePolicy();
return;
}
@@ -1652,13 +1652,13 @@ void TQLayoutWidget::updateSizePolicy()
continue;
TQWidget *w = (TQWidget*)o;
- if ( !w->tqsizePolicy().mayGrowHorizontally() )
+ if ( !w->sizePolicy().mayGrowHorizontally() )
ht &= ~TQSizePolicy::Minimum;
- if ( !w->tqsizePolicy().mayShrinkHorizontally() )
+ if ( !w->sizePolicy().mayShrinkHorizontally() )
ht &= ~TQSizePolicy::Maximum;
- if ( w->tqsizePolicy().mayGrowVertically() )
+ if ( w->sizePolicy().mayGrowVertically() )
vt |= TQSizePolicy::Minimum;
- if ( w->tqsizePolicy().mayShrinkVertically() )
+ if ( w->sizePolicy().mayShrinkVertically() )
vt |= TQSizePolicy::Maximum;
}
} else if ( ::tqqt_cast<TQHBoxLayout*>(tqlayout()) ) {
@@ -1673,13 +1673,13 @@ void TQLayoutWidget::updateSizePolicy()
continue;
TQWidget *w = (TQWidget*)o;
- if ( w->tqsizePolicy().mayGrowHorizontally() )
+ if ( w->sizePolicy().mayGrowHorizontally() )
ht |= TQSizePolicy::Minimum;
- if ( w->tqsizePolicy().mayShrinkHorizontally() )
+ if ( w->sizePolicy().mayShrinkHorizontally() )
ht |= TQSizePolicy::Maximum;
- if ( !w->tqsizePolicy().mayGrowVertically() )
+ if ( !w->sizePolicy().mayGrowVertically() )
vt &= ~TQSizePolicy::Minimum;
- if ( !w->tqsizePolicy().mayShrinkVertically() )
+ if ( !w->sizePolicy().mayShrinkVertically() )
vt &= ~TQSizePolicy::Maximum;
}
} else if ( ::tqqt_cast<TQGridLayout*>(tqlayout()) ) {
@@ -1698,24 +1698,24 @@ void TQLayoutWidget::updateSizePolicy()
continue;
TQWidget *w = (TQWidget*)o;
- if ( w->tqsizePolicy().mayGrowHorizontally() )
+ if ( w->sizePolicy().mayGrowHorizontally() )
ht |= TQSizePolicy::Minimum;
- if ( w->tqsizePolicy().mayShrinkHorizontally() )
+ if ( w->sizePolicy().mayShrinkHorizontally() )
ht |= TQSizePolicy::Maximum;
- if ( w->tqsizePolicy().mayGrowVertically() )
+ if ( w->sizePolicy().mayGrowVertically() )
vt |= TQSizePolicy::Minimum;
- if ( w->tqsizePolicy().mayShrinkVertically() )
+ if ( w->sizePolicy().mayShrinkVertically() )
vt |= TQSizePolicy::Maximum;
}
}
#ifdef USE_QT4
- if ( tqlayout()->expandingDirections() & TQSizePolicy::Horizontally )
+ if ( tqlayout()->expanding() & TQSizePolicy::Horizontally )
#else // USE_QT4
if ( tqlayout()->expanding() & TQSizePolicy::Horizontally )
#endif // USE_QT4
ht = TQSizePolicy::Expanding;
#ifdef USE_QT4
- if ( tqlayout()->expandingDirections() & TQSizePolicy::Vertically )
+ if ( tqlayout()->expanding() & TQSizePolicy::Vertically )
#else // USE_QT4
if ( tqlayout()->expanding() & TQSizePolicy::Vertically )
#endif // USE_QT4
@@ -1734,8 +1734,8 @@ void CustomWidget::paintEvent( TQPaintEvent *e )
( (FormWindow*)parentWidget() )->paintGrid( this, e );
} else {
TQPainter p( this );
- p.fillRect( rect(), tqcolorGroup().dark() );
- p.setPen( tqcolorGroup().light() );
+ p.fillRect( rect(), colorGroup().dark() );
+ p.setPen( colorGroup().light() );
p.drawText( 2, 2, width() - 4, height() - 4, TQt::AlignAuto | TQt::AlignTop, cusw->className );
p.drawPixmap( ( width() - cusw->pixmap->width() ) / 2,
( height() - cusw->pixmap->height() ) / 2,