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.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp
index c4b0b947..55bb4c0d 100644
--- a/kdevdesigner/designer/widgetfactory.cpp
+++ b/kdevdesigner/designer/widgetfactory.cpp
@@ -218,7 +218,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
int index = 0;
TQRect rect;
for ( ; index < tabBar()->count(); index++ ) {
- if ( tabBar()->tabAt( index )->rect().tqcontains( de->pos() ) ) {
+ if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) {
rect = tabBar()->tabAt( index )->rect();
break;
}
@@ -227,7 +227,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
if ( index == tabBar()->count() -1 ) {
TQRect rect2 = rect;
rect2.setLeft( rect2.left() + rect2.width() / 2 );
- if ( rect2.tqcontains( de->pos() ) )
+ if ( rect2.contains( de->pos() ) )
index++;
}
@@ -255,20 +255,20 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
int newIndex = 0;
for ( ; newIndex < tabBar()->count(); newIndex++ ) {
- if ( tabBar()->tabAt( newIndex )->rect().tqcontains( de->pos() ) )
+ if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) )
break;
}
if ( newIndex == tabBar()->count() -1 ) {
TQRect rect2 = tabBar()->tabAt( newIndex )->rect();
rect2.setLeft( rect2.left() + rect2.width() / 2 );
- if ( rect2.tqcontains( de->pos() ) )
+ if ( rect2.contains( de->pos() ) )
newIndex++;
}
int oldIndex = 0;
for ( ; oldIndex < tabBar()->count(); oldIndex++ ) {
- if ( tabBar()->tabAt( oldIndex )->rect().tqcontains( pressPoint ) )
+ if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) )
break;
}
@@ -329,7 +329,7 @@ void QDesignerWidgetStack::nextPage()
int QDesignerWidgetStack::currentPage() const
{
QDesignerWidgetStack* that = (QDesignerWidgetStack*) this;
- return that->pages.tqfind( visibleWidget() );
+ return that->pages.find( visibleWidget() );
}
void QDesignerWidgetStack::setCurrentPage( int i )
@@ -384,12 +384,12 @@ int QDesignerWidgetStack::insertPage( TQWidget *p, int i )
raiseWidget( p );
TQApplication::sendPostedEvents();
updateButtons();
- return pages.tqfind( p );
+ return pages.find( p );
}
int QDesignerWidgetStack::removePage( TQWidget *p )
{
- int i = pages.tqfind( p );
+ int i = pages.find( p );
pages.remove( p );
removeWidget( p );
setCurrentPage( 0 );
@@ -464,7 +464,7 @@ int QDesignerWizard::pageNum( TQWidget *p )
void QDesignerWizard::addPage( TQWidget *p, const TQString &t )
{
TQWizard::addPage( p, t );
- if ( removedPages.tqfind( p ) )
+ if ( removedPages.find( p ) )
removedPages.remove( p );
}
@@ -477,7 +477,7 @@ void QDesignerWizard::removePage( TQWidget *p )
void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index )
{
TQWizard::insertPage( p, t, index );
- if ( removedPages.tqfind( p ) )
+ if ( removedPages.find( p ) )
removedPages.remove( p );
}
@@ -505,9 +505,9 @@ void WidgetFactory::saveDefaultProperties( TQObject *w, int id )
var = TQVariant( TQPixmap() );
else if ( !var.isValid() && qstrcmp( "iconSet", lst.at( i ) ) == 0 )
var = TQVariant( TQIconSet() );
- propMap.tqreplace( lst.at( i ), var );
+ propMap.replace( lst.at( i ), var );
}
- defaultProperties->tqreplace( id, propMap );
+ defaultProperties->replace( id, propMap );
}
void WidgetFactory::saveChangedProperties( TQObject *w, int id )
@@ -545,9 +545,9 @@ TQWidget *WidgetFactory::create( int id, TQWidget *tqparent, const char *name, b
return 0;
MetaDataBase::addEntry( TQT_TQOBJECT(w) );
- if ( !defaultProperties->tqcontains( id ) )
+ if ( !defaultProperties->contains( id ) )
saveDefaultProperties( TQT_TQOBJECT(w), id );
- if ( !changedProperties->tqcontains( id ) )
+ if ( !changedProperties->contains( id ) )
saveChangedProperties( TQT_TQOBJECT(w), id );
return w;
@@ -1372,13 +1372,13 @@ bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget )
{
TQString className = WidgetDatabase::className( id );
- if ( className.tqcontains( "ListBox" ) )
+ if ( className.contains( "ListBox" ) )
return TRUE;
- if ( className.tqcontains( "ComboBox" ) )
+ if ( className.contains( "ComboBox" ) )
return TRUE;
- if ( className.tqcontains( "ListView" ) )
+ if ( className.contains( "ListView" ) )
return TRUE;
- if ( className.tqcontains( "IconView" ) )
+ if ( className.contains( "IconView" ) )
return TRUE;
if ( className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING )
return TRUE;
@@ -1392,8 +1392,8 @@ bool WidgetFactory::hasItems( int id, TQObject *editorWidget )
{
TQString className = WidgetDatabase::className( id );
- if ( className.tqcontains( "ListBox" ) || className.tqcontains( "ListView" ) ||
- className.tqcontains( "IconView" ) || className.tqcontains( "ComboBox" ) ||
+ if ( className.contains( "ListBox" ) || className.contains( "ListView" ) ||
+ className.contains( "IconView" ) || className.contains( "ComboBox" ) ||
::tqqt_cast<TQTable*>(editorWidget) != 0 )
return TRUE;
@@ -1404,7 +1404,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
{
TQString className = WidgetDatabase::className( id );
- if ( className.tqcontains( "ListBox" ) ) {
+ if ( className.contains( "ListBox" ) ) {
if ( !::tqqt_cast<TQListBox*>(editWidget) )
return;
ListBoxEditor *e = new ListBoxEditor( tqparent, editWidget, fw );
@@ -1413,7 +1413,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
return;
}
- if ( className.tqcontains( "ComboBox" ) ) {
+ if ( className.contains( "ComboBox" ) ) {
if ( !::tqqt_cast<TQComboBox*>(editWidget) )
return;
TQComboBox *cb = (TQComboBox*)editWidget;
@@ -1424,7 +1424,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
return;
}
- if ( className.tqcontains( "ListView" ) ) {
+ if ( className.contains( "ListView" ) ) {
if ( !::tqqt_cast<TQListView*>(editWidget) )
return;
TQListView *lv = (TQListView*)editWidget;
@@ -1434,7 +1434,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget
return;
}
- if ( className.tqcontains( "IconView" ) ) {
+ if ( className.contains( "IconView" ) ) {
if ( !::tqqt_cast<TQIconView*>(editWidget) )
return;
IconViewEditor *e = new IconViewEditor( tqparent, editWidget, fw );
@@ -1463,14 +1463,14 @@ bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName )
{
if ( propName == "name" || propName == "geometry" )
return FALSE;
- TQStringList l = *changedProperties->tqfind( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) );
- return l.tqfindIndex( propName ) == -1;
+ TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) );
+ return l.findIndex( propName ) == -1;
}
bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName )
{
const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->
- tqfindProperty( propName, TRUE ), TRUE );
+ findProperty( propName, TRUE ), TRUE );
if (!p )
return FALSE;
return p->reset( w );
@@ -1491,13 +1491,13 @@ TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName )
return TQVariant( -1 );
}
- return *( *defaultProperties->tqfind( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).tqfind( propName );
+ return *( *defaultProperties->find( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).find( propName );
}
TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName )
{
const TQMetaProperty *p = w->tqmetaObject()->
- property( w->tqmetaObject()->tqfindProperty( propName, TRUE ), TRUE );
+ property( w->tqmetaObject()->findProperty( propName, TRUE ), TRUE );
if ( !p ) {
int v = defaultValue( w, "tqalignment" ).toInt();
if ( propName == "hAlign" ) {
@@ -1536,7 +1536,7 @@ TQWidget *WidgetFactory::createCustomWidget( TQWidget *tqparent, const char *nam
TQVariant WidgetFactory::property( TQObject *w, const char *name )
{
- int id = w->tqmetaObject()->tqfindProperty( name, TRUE );
+ int id = w->tqmetaObject()->findProperty( name, TRUE );
const TQMetaProperty* p = w->tqmetaObject()->property( id, TRUE );
if ( !p || !p->isValid() )
return MetaDataBase::fakeProperty( w, name );