diff options
Diffstat (limited to 'lib/koproperty')
-rw-r--r-- | lib/koproperty/editor.cpp | 4 | ||||
-rw-r--r-- | lib/koproperty/editoritem.cpp | 2 | ||||
-rw-r--r-- | lib/koproperty/editors/combobox.cpp | 6 | ||||
-rw-r--r-- | lib/koproperty/editors/pixmapedit.cpp | 2 | ||||
-rw-r--r-- | lib/koproperty/editors/spinbox.cpp | 2 | ||||
-rw-r--r-- | lib/koproperty/factory.cpp | 14 | ||||
-rw-r--r-- | lib/koproperty/property.cpp | 6 | ||||
-rw-r--r-- | lib/koproperty/set.cpp | 22 | ||||
-rw-r--r-- | lib/koproperty/set.h | 6 |
9 files changed, 32 insertions, 32 deletions
diff --git a/lib/koproperty/editor.cpp b/lib/koproperty/editor.cpp index 3c0a0940..f15cab20 100644 --- a/lib/koproperty/editor.cpp +++ b/lib/koproperty/editor.cpp @@ -250,7 +250,7 @@ Editor::fill() void Editor::addItem(const TQCString &name, EditorItem *tqparent) { - if(!d->set || !d->set->tqcontains(name)) + if(!d->set || !d->set->contains(name)) return; Property *property = &(d->set->property(name)); @@ -950,7 +950,7 @@ Editor::handleKeyPress(TQKeyEvent* ev) else if( (s==Qt::NoButton) && (k==Key_Home) ) { if (d->currentWidget && d->currentWidget->hasFocus()) return false; - //tqfind 1st visible + //find 1st visible item = firstChild(); while (item && (!item->isSelectable() || !item->isVisible())) item = item->itemBelow(); diff --git a/lib/koproperty/editoritem.cpp b/lib/koproperty/editoritem.cpp index ca6fe6c7..1c0e1b72 100644 --- a/lib/koproperty/editoritem.cpp +++ b/lib/koproperty/editoritem.cpp @@ -239,7 +239,7 @@ void GroupContainer::setContents( TQWidget* contents ) bool GroupContainer::event( TQEvent * e ) { if (e->type()==TQEvent::MouseButtonPress) { TQMouseEvent* me = TQT_TQMOUSEEVENT(e); - if (me->button() == Qt::LeftButton && d->contents && TQT_TQRECT_OBJECT(d->groupWidget->rect()).tqcontains(me->pos())) { + if (me->button() == Qt::LeftButton && d->contents && TQT_TQRECT_OBJECT(d->groupWidget->rect()).contains(me->pos())) { d->groupWidget->setOpen(!d->groupWidget->isOpen()); if (d->groupWidget->isOpen()) d->contents->show(); diff --git a/lib/koproperty/editors/combobox.cpp b/lib/koproperty/editors/combobox.cpp index f1206f2d..661aa1e0 100644 --- a/lib/koproperty/editors/combobox.cpp +++ b/lib/koproperty/editors/combobox.cpp @@ -71,7 +71,7 @@ ComboBox::value() const if (idx<0 || idx>=(int)property()->listData()->keys.count()) return TQVariant(); return TQVariant( property()->listData()->keys[idx] ); -// if(property()->listData() && property()->listData()->tqcontains(m_edit->currentText())) +// if(property()->listData() && property()->listData()->contains(m_edit->currentText())) // return (*(property()->valueList()))[m_edit->currentText()]; // return TQVariant(); } @@ -85,7 +85,7 @@ ComboBox::setValue(const TQVariant &value, bool emitChange) } if (!m_setValueEnabled) return; - int idx = property()->listData()->keys.tqfindIndex( value ); + int idx = property()->listData()->keys.findIndex( value ); if (idx>=0 && idx<m_edit->count()) { m_edit->setCurrentItem(idx); } @@ -120,7 +120,7 @@ ComboBox::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, cons { TQString txt; if (property()->listData()) { - const int idx = property()->listData()->keys.tqfindIndex( value ); + const int idx = property()->listData()->keys.findIndex( value ); if (idx>=0) txt = property()->listData()->names[ idx ]; } diff --git a/lib/koproperty/editors/pixmapedit.cpp b/lib/koproperty/editors/pixmapedit.cpp index 95cdbb9d..edc19c80 100644 --- a/lib/koproperty/editors/pixmapedit.cpp +++ b/lib/koproperty/editors/pixmapedit.cpp @@ -104,7 +104,7 @@ PixmapEdit::setValue(const TQVariant &value, bool emitChange) } else { TQImage img(m_pixmap.convertToImage()); - if (!TQRect(TQPoint(0,0), m_edit->size()*3).tqcontains(m_pixmap.rect())) { + if (!TQRect(TQPoint(0,0), m_edit->size()*3).contains(m_pixmap.rect())) { img = img.smoothScale(m_edit->size()*3, TQ_ScaleMin); m_previewPixmap.convertFromImage(img);//preview pixmap is a bit larger } diff --git a/lib/koproperty/editors/spinbox.cpp b/lib/koproperty/editors/spinbox.cpp index c72a060d..8ae4e30a 100644 --- a/lib/koproperty/editors/spinbox.cpp +++ b/lib/koproperty/editors/spinbox.cpp @@ -291,7 +291,7 @@ DoubleEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, co } } if (valueText.isEmpty()) - valueText = TQString(value.toString()).tqreplace('.', KGlobal::locale()->decimalSymbol()); + valueText = TQString(value.toString()).replace('.', KGlobal::locale()->decimalSymbol()); Widget::drawViewer(p, cg, r, valueText); // p->eraseRect(r); diff --git a/lib/koproperty/factory.cpp b/lib/koproperty/factory.cpp index a042ca28..864d4895 100644 --- a/lib/koproperty/factory.cpp +++ b/lib/koproperty/factory.cpp @@ -104,10 +104,10 @@ FactoryManager::registerFactoryForEditor(int editorType, CustomPropertyFactory * { if(!widgetFactory) return; - if(d->registeredWidgets.tqfind(editorType)) + if(d->registeredWidgets.find(editorType)) kopropertywarn << "FactoryManager::registerFactoryForEditor(): " "Overriding already registered custom widget type \"" << editorType << "\"" << endl; - d->registeredWidgets.tqreplace(editorType, widgetFactory); + d->registeredWidgets.replace(editorType, widgetFactory); } void @@ -121,7 +121,7 @@ FactoryManager::registerFactoryForEditors(const TQValueList<int> &editorTypes, C CustomPropertyFactory * FactoryManager::factoryForEditorType(int type) { - return d->registeredWidgets.tqfind(type); + return d->registeredWidgets.find(type); } Widget* @@ -132,7 +132,7 @@ FactoryManager::createWidgetForProperty(Property *property) const int type = property->type(); - CustomPropertyFactory *factory = d->registeredWidgets.tqfind(type); + CustomPropertyFactory *factory = d->registeredWidgets.find(type); if (factory) return factory->createCustomWidget(property); @@ -224,11 +224,11 @@ FactoryManager::registerFactoryForProperty(int propertyType, CustomPropertyFacto { if(!factory) return; - if(d->registeredCustomProperties.tqfind(propertyType)) + if(d->registeredCustomProperties.find(propertyType)) kopropertywarn << "FactoryManager::registerFactoryForProperty(): " "Overriding already registered custom property type \"" << propertyType << "\"" << endl; - d->registeredCustomProperties.tqreplace(propertyType, factory); + d->registeredCustomProperties.replace(propertyType, factory); } void @@ -244,7 +244,7 @@ CustomProperty* FactoryManager::createCustomProperty(Property *tqparent) { const int type = tqparent->type(); - CustomPropertyFactory *factory = d->registeredWidgets.tqfind(type); + CustomPropertyFactory *factory = d->registeredWidgets.find(type); if (factory) return factory->createCustomProperty(tqparent); diff --git a/lib/koproperty/property.cpp b/lib/koproperty/property.cpp index 87d12a6d..0add7b91 100644 --- a/lib/koproperty/property.cpp +++ b/lib/koproperty/property.cpp @@ -529,7 +529,7 @@ Property::setOption(const char* name, const TQVariant& val) TQVariant Property::option(const char* name) const { - if (d->options.tqcontains(name)) + if (d->options.contains(name)) return d->options[name]; return TQVariant(); } @@ -685,7 +685,7 @@ Property::addSet(Set *set) } if ((Set*)d->set==set) return; - TQGuardedPtr<Set> *pset = d->sets ? d->sets->tqfind(set) : 0; + TQGuardedPtr<Set> *pset = d->sets ? d->sets->find(set) : 0; if (pset && (Set*)*pset == set) return; if (!d->sets) { @@ -693,7 +693,7 @@ Property::addSet(Set *set) d->sets->setAutoDelete(true); } - d->sets->tqreplace(set, new TQGuardedPtr<Set>( set )); + d->sets->replace(set, new TQGuardedPtr<Set>( set )); // TQValueList<Set*>::iterator it = tqFind( d->sets.begin(), d->sets.end(), set); // if(it == d->sets.end()) // not in our list diff --git a/lib/koproperty/set.cpp b/lib/koproperty/set.cpp index 3193a50f..d508fc0a 100644 --- a/lib/koproperty/set.cpp +++ b/lib/koproperty/set.cpp @@ -73,7 +73,7 @@ class SetPrivate inline KoProperty::Property& property(const TQCString &name) const { - KoProperty::Property *p = dict.tqfind(name); + KoProperty::Property *p = dict.find(name); if (p) return *p; Set_nonConstNull.setName(0); //to ensure returned property is null @@ -178,7 +178,7 @@ Set::addPropertyInternal(Property *property, TQCString group, bool updateSorting return; } - Property *p = d->dict.tqfind(property->name()); + Property *p = d->dict.find(property->name()); if(p) { p->addRelatedProperty(property); } @@ -218,7 +218,7 @@ Set::removeProperty(const TQCString &name) if(name.isNull()) return; - Property *p = d->dict.tqfind(name); + Property *p = d->dict.find(name); removeProperty(p); } @@ -255,10 +255,10 @@ Set::addToGroup(const TQCString &group, Property *property) return; //do not add the same property to the group twice - if(d->groupForProperty.tqcontains(property) && (d->groupForProperty[property] == group)) + if(d->groupForProperty.contains(property) && (d->groupForProperty[property] == group)) return; - if(!d->propertiesOfGroup.tqcontains(group)) { // group doesn't exist + if(!d->propertiesOfGroup.contains(group)) { // group doesn't exist TQValueList<TQCString> l; l.append(property->name()); d->propertiesOfGroup.insert(group, l); @@ -280,7 +280,7 @@ Set::removeFromGroup(Property *property) if (d->propertiesOfGroup[group].isEmpty()) { //remove group as well d->propertiesOfGroup.remove(group); - TQValueListIterator<TQCString> it = d->groupNames.tqfind(group); + TQValueListIterator<TQCString> it = d->groupNames.find(group); if (it != d->groupNames.end()) { d->groupNames.remove(it); } @@ -309,7 +309,7 @@ Set::setGroupDescription(const TQCString &group, const TQString& desc) TQString Set::groupDescription(const TQCString &group) const { - if(d->groupDescriptions.tqcontains(group)) + if(d->groupDescriptions.contains(group)) return d->groupDescriptions[group]; return group; } @@ -353,9 +353,9 @@ Set::setReadOnly(bool readOnly) } bool -Set::tqcontains(const TQCString &name) const +Set::contains(const TQCString &name) const { - return d->dict.tqfind(name); + return d->dict.find(name); } Property& @@ -497,7 +497,7 @@ void Buffer::intersectedChanged(KoProperty::Set& set, KoProperty::Property& prop { Q_UNUSED(set); TQCString propertyName = prop.name(); - if ( !tqcontains( propertyName ) ) + if ( !contains( propertyName ) ) return; const TQValueList<Property*> *props = prop.related(); @@ -511,7 +511,7 @@ void Buffer::intersectedReset(KoProperty::Set& set, KoProperty::Property& prop) { Q_UNUSED(set); TQCString propertyName = prop.name(); - if ( !tqcontains( propertyName ) ) + if ( !contains( propertyName ) ) return; const TQValueList<Property*> *props = prop.related(); diff --git a/lib/koproperty/set.h b/lib/koproperty/set.h index 567bcdad..9004c2c4 100644 --- a/lib/koproperty/set.h +++ b/lib/koproperty/set.h @@ -107,7 +107,7 @@ class KOPROPERTY_EXPORT Set : public TQObject void setReadOnly(bool readOnly); /*! \return true if the set contains property names \a name. */ - bool tqcontains(const TQCString &name) const; + bool contains(const TQCString &name) const; /*! \return property named with \a name. If no such property is found, null property (Property::null) is returned. */ @@ -116,12 +116,12 @@ class KOPROPERTY_EXPORT Set : public TQObject /*! Accesses a property by it's name. Property reference is returned, so all property modifications are allowed. If there is no such property, null property is returned, - so it's good practice to use tqcontains() is you're unsure if the property exists. + so it's good practice to use contains() is you're unsure if the property exists. For example, to set a value of a property, use: /code Set set; ... - if (!set.tqcontains("myProperty")) { + if (!set.contains("myProperty")) { dosomething; } set["myProperty"].setValue("My Value"); |