diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | b6edfe41c9395f2e20784cbf0e630af6426950a3 (patch) | |
tree | 56ed9b871d4296e6c15949c24e16420be1b28697 /kexi/formeditor | |
parent | ef39e8e4178a8f98cf5f154916ba0f03e4855206 (diff) | |
download | koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.tar.gz koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/formeditor')
-rw-r--r-- | kexi/formeditor/commands.cpp | 2 | ||||
-rw-r--r-- | kexi/formeditor/container.cpp | 8 | ||||
-rw-r--r-- | kexi/formeditor/factories/containerfactory.cpp | 2 | ||||
-rw-r--r-- | kexi/formeditor/factories/stdwidgetfactory.cpp | 2 | ||||
-rw-r--r-- | kexi/formeditor/form.cpp | 6 | ||||
-rw-r--r-- | kexi/formeditor/formIO.cpp | 22 | ||||
-rw-r--r-- | kexi/formeditor/formmanager.cpp | 12 | ||||
-rw-r--r-- | kexi/formeditor/objecttree.cpp | 6 | ||||
-rw-r--r-- | kexi/formeditor/objecttreeview.cpp | 2 | ||||
-rw-r--r-- | kexi/formeditor/scripting/scriptIO.h | 2 | ||||
-rw-r--r-- | kexi/formeditor/utils.cpp | 2 | ||||
-rw-r--r-- | kexi/formeditor/widgetfactory.cpp | 12 | ||||
-rw-r--r-- | kexi/formeditor/widgetlibrary.cpp | 32 | ||||
-rw-r--r-- | kexi/formeditor/widgetpropertyset.cpp | 60 | ||||
-rw-r--r-- | kexi/formeditor/widgetpropertyset.h | 2 | ||||
-rw-r--r-- | kexi/formeditor/widgetwithsubpropertiesinterface.cpp | 12 |
16 files changed, 92 insertions, 92 deletions
diff --git a/kexi/formeditor/commands.cpp b/kexi/formeditor/commands.cpp index c08e44e6..c2319069 100644 --- a/kexi/formeditor/commands.cpp +++ b/kexi/formeditor/commands.cpp @@ -127,7 +127,7 @@ PropertyCommand::unexecute() WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(widg); TQWidget *subWidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : widg; - if (-1!=subWidget->tqmetaObject()->tqfindProperty( m_property, true )) + if (-1!=subWidget->tqmetaObject()->findProperty( m_property, true )) subWidget->setProperty(m_property, it.data()); } diff --git a/kexi/formeditor/container.cpp b/kexi/formeditor/container.cpp index a9942d1c..2b6d5eb7 100644 --- a/kexi/formeditor/container.cpp +++ b/kexi/formeditor/container.cpp @@ -174,7 +174,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) if(((mev->state() == ControlButton) || (mev->state() == ShiftButton)) && (!FormManager::self()->isInserting())) // multiple selection mode { - if(m_form->selectedWidgets()->tqfindRef(m_moving) != -1) // widget is already selected + if(m_form->selectedWidgets()->findRef(m_moving) != -1) // widget is already selected { if(m_form->selectedWidgets()->count() > 1) // we remove it from selection unSelectWidget(m_moving); @@ -191,7 +191,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) } else if((m_form->selectedWidgets()->count() > 1))//&& (!m_form->manager()->isInserting())) // more than one widget selected { - if(m_form->selectedWidgets()->tqfindRef(m_moving) == -1) // widget is not selected, it becomes the only selected widget + if(m_form->selectedWidgets()->findRef(m_moving) == -1) // widget is not selected, it becomes the only selected widget setSelectedWidget(m_moving, false, (mev->button() == Qt::RightButton)); // If the widget is already selected, we do nothing (to ease widget moving, etc.) } @@ -353,7 +353,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) // try to find the widget which was clicked last and should be edited if(m_form->selectedWidgets()->count() == 1) w = m_form->selectedWidgets()->first(); - else if(m_form->selectedWidgets()->tqfindRef(m_moving) != -1) + else if(m_form->selectedWidgets()->findRef(m_moving) != -1) w = m_moving; else w = m_form->selectedWidgets()->last(); @@ -411,7 +411,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) ObjectTreeList *list = item->tqparent()->tqchildren(); if(list->count() == 1) return true; - int index = list->tqfindRef(item); + int index = list->findRef(item); if(kev->key() == Key_BackTab){ if(index == 0) // go back to the last item diff --git a/kexi/formeditor/factories/containerfactory.cpp b/kexi/formeditor/factories/containerfactory.cpp index 15011e50..ff7a2562 100644 --- a/kexi/formeditor/factories/containerfactory.cpp +++ b/kexi/formeditor/factories/containerfactory.cpp @@ -625,7 +625,7 @@ ContainerFactory::previewWidget(const TQCString &classname, TQWidget *widget, KF { TQWidgetStack *stack = ((TQWidgetStack*)widget); KFormDesigner::ObjectTreeItem *tree = container->form()->objectTree()->lookup(widget->name()); - if(!tree->modifiedProperties()->tqcontains("frameShape")) + if(!tree->modifiedProperties()->contains("frameShape")) stack->setFrameStyle(TQFrame::NoFrame); } else if(classname == "HBox") diff --git a/kexi/formeditor/factories/stdwidgetfactory.cpp b/kexi/formeditor/factories/stdwidgetfactory.cpp index 08621283..32c557b3 100644 --- a/kexi/formeditor/factories/stdwidgetfactory.cpp +++ b/kexi/formeditor/factories/stdwidgetfactory.cpp @@ -972,7 +972,7 @@ StdWidgetFactory::setPropertyOptions( KFormDesigner::WidgetPropertySet& buf, con Q_UNUSED( info ); Q_UNUSED( w ); - if (buf.tqcontains("indent")) { + if (buf.contains("indent")) { buf["indent"].setOption("min", -1); buf["indent"].setOption("minValueText", i18n("default indent value", "default")); } diff --git a/kexi/formeditor/form.cpp b/kexi/formeditor/form.cpp index 6acf139c..e8b25c84 100644 --- a/kexi/formeditor/form.cpp +++ b/kexi/formeditor/form.cpp @@ -176,7 +176,7 @@ Form::commonParentContainer(WidgetList *wlist) // Creates a list of all widget parents for(TQWidget *w = wlist->first(); w; w = wlist->next()) { - if(list->tqfindRef(w->parentWidget()) == -1) + if(list->findRef(w->parentWidget()) == -1) list->append(w->parentWidget()); } @@ -465,14 +465,14 @@ Form::addWidgetToTabStops(ObjectTreeItem *it) // For composed widgets, we check if one of the child can have focus for(TQObjectListIterator chIt(clo); chIt.current(); ++chIt) { if(chIt.current()->isWidgetType()) {//TQ_TabFocus flag will be checked later! - if(d->tabstops.tqfindRef(it) == -1) { + if(d->tabstops.findRef(it) == -1) { d->tabstops.append(it); return; } } } } - else if(d->tabstops.tqfindRef(it) == -1) // not yet in the list + else if(d->tabstops.findRef(it) == -1) // not yet in the list d->tabstops.append(it); } diff --git a/kexi/formeditor/formIO.cpp b/kexi/formeditor/formIO.cpp index dbfdc10a..639b4a83 100644 --- a/kexi/formeditor/formIO.cpp +++ b/kexi/formeditor/formIO.cpp @@ -324,7 +324,7 @@ FormIO::loadFormFromDom(Form *form, TQWidget *container, TQDomDocument &inBuf) } //update format version information uint ver = 1; //the default - if (form->headerProperties()->tqcontains("version")) { + if (form->headerProperties()->contains("version")) { bool ok; uint v = (*form->headerProperties())["version"].toUInt(&ok); if (ok) @@ -369,7 +369,7 @@ FormIO::loadFormFromDom(Form *form, TQWidget *container, TQDomDocument &inBuf) kdDebug() << "FormIO::loadFormFromDom ERROR : no ObjectTreeItem " << endl; continue; } - const int index = form->tabStops()->tqfindRef(item); + const int index = form->tabStops()->findRef(item); /* Compute a real destination index: "a number of not found items so far". */ const int realIndex = i - itemsNotFound; if((index != -1) && (index != realIndex)) // the widget is not in the same place, so we move it @@ -406,10 +406,10 @@ FormIO::savePropertyValue(TQDomElement &parentNode, TQDomDocument &tqparent, con WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(w); TQWidget *subwidget = w; bool addSubwidgetFlag = false; - int propertyId = w->tqmetaObject()->tqfindProperty(name, true); + int propertyId = w->tqmetaObject()->findProperty(name, true); if (propertyId == -1 && subpropIface && subpropIface->subwidget()) { // try property from subwidget subwidget = subpropIface->subwidget(); - propertyId = subpropIface->subwidget()->tqmetaObject()->tqfindProperty(name, true); + propertyId = subpropIface->subwidget()->tqmetaObject()->findProperty(name, true); addSubwidgetFlag = true; } if(propertyId == -1) @@ -865,7 +865,7 @@ FormIO::readPropertyValue(TQDomNode node, TQObject *obj, const TQString &name) } else if(type == "pixmap") { - if(m_savePixmapsInline || !m_currentForm || !m_currentItem || !m_currentForm->pixmapCollection()->tqcontains(text)) + if(m_savePixmapsInline || !m_currentForm || !m_currentItem || !m_currentForm->pixmapCollection()->contains(text)) return loadImage(tag.ownerDocument(), text); else { @@ -880,7 +880,7 @@ FormIO::readPropertyValue(TQDomNode node, TQObject *obj, const TQString &name) { WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(obj); TQObject *subobject = (subpropIface && subpropIface->subwidget()) ? TQT_TQOBJECT(subpropIface->subwidget()) : obj; - const int count = subobject->tqmetaObject()->tqfindProperty(name.latin1(), true); + const int count = subobject->tqmetaObject()->findProperty(name.latin1(), true); const TQMetaProperty *meta = count!=-1 ? subobject->tqmetaObject()->property(count, true) : 0; if (meta) { @@ -1025,9 +1025,9 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &tqparent, TQDomDocument & { tqlayout = domDoc.createElement("temp"); savePropertyValue(tqlayout, domDoc, "name", "unnamed", item->widget()); - if(item->modifiedProperties()->tqcontains("layoutMargin")) + if(item->modifiedProperties()->contains("layoutMargin")) savePropertyElement(tqlayout, domDoc, "property", "margin", item->container()->layoutMargin()); - if(item->modifiedProperties()->tqcontains("layoutSpacing")) + if(item->modifiedProperties()->contains("layoutSpacing")) savePropertyElement(tqlayout, domDoc, "property", "spacing", item->container()->layoutSpacing()); tclass.appendChild(tqlayout); } @@ -1261,7 +1261,7 @@ FormIO::loadWidget(Container *container, const TQDomElement &el, TQWidget *tqpar = dynamic_cast<KFormDesigner::WidgetWithSubpropertiesInterface*>(w); TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : w; for(TQValueList<TQCString>::ConstIterator it = list.constBegin(); it != endIt; ++it) { - if(subwidget->tqmetaObject()->tqfindProperty(*it, true) != -1) + if(subwidget->tqmetaObject()->findProperty(*it, true) != -1) item->addModifiedProperty(*it, subwidget->property(*it)); } @@ -1376,7 +1376,7 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const TQDomEl } } // If the object doesn't have this property, we let the Factory handle it (maybe a special property) - else if(subwidget->tqmetaObject()->tqfindProperty(name.latin1(), true) == -1) + else if(subwidget->tqmetaObject()->findProperty(name.latin1(), true) == -1) { if(w->className() == TQString::tqfromLatin1("CustomWidget")) item->storeUnknownProperty(node); @@ -1611,7 +1611,7 @@ FormIO::loadImage(TQDomDocument domDoc, const TQString& name) ba[2] = ( len & 0x0000ff00 ) >> 8; ba[3] = ( len & 0x000000ff ); TQByteArray baunzip = tqUncompress(ba, baSize); - pix.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.tqfind('.')).latin1() ); + pix.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.find('.')).latin1() ); } else pix.loadFromData( (const uchar*)ba+lengthOffset, baSize-lengthOffset, format.latin1() ); diff --git a/kexi/formeditor/formmanager.cpp b/kexi/formeditor/formmanager.cpp index 4004fcd4..66948abb 100644 --- a/kexi/formeditor/formmanager.cpp +++ b/kexi/formeditor/formmanager.cpp @@ -328,7 +328,7 @@ FormManager::stopInsert() TQT_TQWIDGET(o)->unsetCursor(); #if 0 if( ((TQWidget*)o)->ownCursor()) { - TQMap<TQObject*,TQCursor>::ConstIterator curIt( form->d->cursors.tqfind(o) ); + TQMap<TQObject*,TQCursor>::ConstIterator curIt( form->d->cursors.find(o) ); if (curIt!=form->d->cursors.constEnd()) TQT_TQWIDGET(o)->setCursor( *curIt ); // ((TQWidget*)o)->setCursor( (*(form->d->cursors))[o->name()] ) ; @@ -437,7 +437,7 @@ FormManager::stopCreatingConnection() { TQWidget *w = (TQWidget*)o; if( w->ownCursor()) { - TQMap<TQObject*,TQCursor>::ConstIterator curIt( form->d->cursors.tqfind(o) ); + TQMap<TQObject*,TQCursor>::ConstIterator curIt( form->d->cursors.find(o) ); if (curIt!=form->d->cursors.constEnd()) TQT_TQWIDGET(o)->setCursor( *curIt ); } @@ -595,7 +595,7 @@ FormManager::deleteForm(Form *form) { if (!form) return; - if(m_forms.tqfind(form) == -1) + if(m_forms.find(form) == -1) m_preview.remove(form); else m_forms.remove(form); @@ -898,7 +898,7 @@ FormManager::createContextMenu(TQWidget *w, Container *container, bool popupAtCu separatorNeeded = true; // We create the buddy menu - if(!multiple && w->inherits(TQLABEL_OBJECT_NAME_STRING) && ((TQLabel*)w)->text().tqcontains("&") && (((TQLabel*)w)->textFormat() != RichText)) + if(!multiple && w->inherits(TQLABEL_OBJECT_NAME_STRING) && ((TQLabel*)w)->text().contains("&") && (((TQLabel*)w)->textFormat() != RichText)) { if (separatorNeeded) m_popup->insertSeparator(); @@ -1103,7 +1103,7 @@ FormManager::createLayout(int layoutType) if(list->count() == 1) { ObjectTreeItem *item = m_active->objectTree()->lookup(list->first()->name()); - if(!item || !item->container() || !m_propSet->tqcontains("tqlayout")) + if(!item || !item->container() || !m_propSet->contains("tqlayout")) return; (*m_propSet)["tqlayout"] = Container::layoutTypeToString(layoutType); return; @@ -1493,7 +1493,7 @@ FormManager::emitWidgetSelected( KFormDesigner::Form* form, bool multiple ) WidgetList *wlist = form->selectedWidgets(); bool fontEnabled = false; for (WidgetListIterator it(*wlist); it.current(); ++it) { - if (-1 != it.current()->tqmetaObject()->tqfindProperty("font", true)) { + if (-1 != it.current()->tqmetaObject()->findProperty("font", true)) { fontEnabled = true; break; } diff --git a/kexi/formeditor/objecttree.cpp b/kexi/formeditor/objecttree.cpp index f9dad43a..a00fbcbb 100644 --- a/kexi/formeditor/objecttree.cpp +++ b/kexi/formeditor/objecttree.cpp @@ -80,7 +80,7 @@ ObjectTreeItem::addModifiedProperty(const TQCString &property, const TQVariant & if(property == "name") return; - if(!m_props.tqcontains(property)) { + if(!m_props.contains(property)) { m_props.insert(property, oldValue); kdDebug() << "ObjectTree::adModProperty(): Added this property in the list: " << property << " oldValue: " << oldValue << endl; } @@ -91,7 +91,7 @@ ObjectTreeItem::addSubproperty(const TQCString &property, const TQVariant& value { if (!m_subprops) m_subprops = new TQMap<TQString, TQVariant>(); - if (!m_props.tqcontains(property)) + if (!m_props.contains(property)) m_subprops->insert( property, value ); } @@ -113,7 +113,7 @@ ObjectTreeItem::setPixmapName(const TQCString &property, const TQString &name) TQString ObjectTreeItem::pixmapName(const TQCString &property) { - if(m_pixmapNames.tqcontains(property)) + if(m_pixmapNames.contains(property)) return m_pixmapNames[property]; return TQString(); } diff --git a/kexi/formeditor/objecttreeview.cpp b/kexi/formeditor/objecttreeview.cpp index 4f258446..e6802d81 100644 --- a/kexi/formeditor/objecttreeview.cpp +++ b/kexi/formeditor/objecttreeview.cpp @@ -280,7 +280,7 @@ ObjectTreeView::slotSelectionChanged() { ObjectTreeViewItem *it = static_cast<ObjectTreeViewItem*>(item); TQWidget *w = it->objectTree()->widget(); - if(w && (m_form->selectedWidgets()->tqfindRef(w) == -1)) + if(w && (m_form->selectedWidgets()->findRef(w) == -1)) m_form->setSelectedWidget(w, true, true); } if (hadFocus) diff --git a/kexi/formeditor/scripting/scriptIO.h b/kexi/formeditor/scripting/scriptIO.h index 9261d75c..f384fade 100644 --- a/kexi/formeditor/scripting/scriptIO.h +++ b/kexi/formeditor/scripting/scriptIO.h @@ -41,7 +41,7 @@ class ScriptIO public: /*! Save the evnts of a form. Creates an \<events\> tag, and then one \<event\> tag for each event. - Each event tqcontains \<sender\> and \<receiver\> tags, with attributes depending on event type. */ + Each event contains \<sender\> and \<receiver\> tags, with attributes depending on event type. */ static bool saveFormEvents(TQDomNode &parentNode, FormScript *script); /*! Reads the \<events\> tag (\a parentNode), then creates and fills a FormScript object linked to this \a form. The new FormScript object is then added to ScriptManager list.*/ diff --git a/kexi/formeditor/utils.cpp b/kexi/formeditor/utils.cpp index f80c2c27..6ce4bcae 100644 --- a/kexi/formeditor/utils.cpp +++ b/kexi/formeditor/utils.cpp @@ -88,7 +88,7 @@ void KFormDesigner::setRecursiveCursor(TQWidget *w, Form *form) { ObjectTreeItem *tree = form->objectTree()->lookup(w->name()); - if(tree && ((tree->modifiedProperties()->tqcontains("cursor")) || !tree->tqchildren()->isEmpty()) + if(tree && ((tree->modifiedProperties()->contains("cursor")) || !tree->tqchildren()->isEmpty()) && !w->inherits(TQLINEEDIT_OBJECT_NAME_STRING) && !w->inherits(TQTEXTEDIT_OBJECT_NAME_STRING) ) //fix weird behaviour return; // if the user has set a cursor for this widget or this is a container, don't change it diff --git a/kexi/formeditor/widgetfactory.cpp b/kexi/formeditor/widgetfactory.cpp index f26661ab..3e0458b9 100644 --- a/kexi/formeditor/widgetfactory.cpp +++ b/kexi/formeditor/widgetfactory.cpp @@ -100,7 +100,7 @@ void WidgetInfo::addAlternateClassName(const TQCString& alternateName, bool over bool WidgetInfo::isOverriddenClassName(const TQCString& alternateName) const { - return m_overriddenAlternateNames && (m_overriddenAlternateNames->tqfind(alternateName) != 0); + return m_overriddenAlternateNames && (m_overriddenAlternateNames->find(alternateName) != 0); } void WidgetInfo::setAutoSyncForProperty(const char *propertyName, tristate flag) @@ -121,7 +121,7 @@ void WidgetInfo::setAutoSyncForProperty(const char *propertyName, tristate flag) tristate WidgetInfo::autoSyncForProperty(const char *propertyName) const { - char* flag = m_propertiesWithDisabledAutoSync ? m_propertiesWithDisabledAutoSync->tqfind(propertyName) : 0; + char* flag = m_propertiesWithDisabledAutoSync ? m_propertiesWithDisabledAutoSync->find(propertyName) : 0; if (!flag) return cancelled; return flag==(char*)1 ? true : false; @@ -134,12 +134,12 @@ void WidgetInfo::setCustomTypeForProperty(const char *propertyName, int type) if (!m_customTypesForProperty) { m_customTypesForProperty = new TQMap<TQCString,int>(); } - m_customTypesForProperty->tqreplace(propertyName, type); + m_customTypesForProperty->replace(propertyName, type); } int WidgetInfo::customTypeForProperty(const char *propertyName) const { - if (!m_customTypesForProperty || !m_customTypesForProperty->tqcontains(propertyName)) + if (!m_customTypesForProperty || !m_customTypesForProperty->contains(propertyName)) return KoProperty::Auto; return (*m_customTypesForProperty)[propertyName]; } @@ -253,7 +253,7 @@ WidgetFactory::createEditor(const TQCString &classname, const TQString &text, //copy properties if available WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(w); TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : w; - if (-1!=m_editor->tqmetaObject()->tqfindProperty("margin", true) && -1!=subwidget->tqmetaObject()->tqfindProperty("margin", true)) + if (-1!=m_editor->tqmetaObject()->findProperty("margin", true) && -1!=subwidget->tqmetaObject()->findProperty("margin", true)) m_editor->setProperty("margin", subwidget->property("margin")); //#endif //js m_handles = new ResizeHandleSet(w, container->form(), true); @@ -520,7 +520,7 @@ WidgetFactory::changeProperty(const char *name, const TQVariant &value, Form *fo else { WidgetPropertySet *set = KFormDesigner::FormManager::self()->propertySet(); - if(set->tqcontains(name)) + if(set->contains(name)) (*set)[name] = value; } } diff --git a/kexi/formeditor/widgetlibrary.cpp b/kexi/formeditor/widgetlibrary.cpp index ac663f8b..3d8607ba 100644 --- a/kexi/formeditor/widgetlibrary.cpp +++ b/kexi/formeditor/widgetlibrary.cpp @@ -173,20 +173,20 @@ WidgetLibrary::loadFactoryWidgets(WidgetFactory *f) // TQStringList l = TQStringList::split("|", w->alternateClassName()); TQValueList<TQCString>::ConstIterator endIt = l.constEnd(); for(TQValueList<TQCString>::ConstIterator it = l.constBegin(); it != endIt; ++it) { - WidgetInfo *widgetForClass = d->widgets.tqfind( *it ); + WidgetInfo *widgetForClass = d->widgets.find( *it ); if (!widgetForClass || (widgetForClass && !widgetForClass->isOverriddenClassName(*it))) { //insert a widgetinfo, if: //1) this class has no alternate class assigned yet, or //2) this class has alternate class assigned but without 'override' flag - d->widgets.tqreplace( *it, w); + d->widgets.replace( *it, w); } -/* WidgetInfo *widgetForClass = d->alternateWidgets.tqfind(*it); +/* WidgetInfo *widgetForClass = d->alternateWidgets.find(*it); if (!widgetForClass || (widgetForClass && !widgetForClass->isOverriddenClassName(*it))) { //insert a widgetinfo, if: //1) this class has no alternate class assigned yet, or //2) this class has alternate class assigned but without 'override' flag - d->alternateWidgets.tqreplace(*it, w); + d->alternateWidgets.replace(*it, w); }*/ } } @@ -249,7 +249,7 @@ WidgetLibrary::loadFactories() //collect information about classes to be hidden if (f->m_hiddenClasses) { for (TQAsciiDictIterator<char> it2(*f->m_hiddenClasses); it2.current(); ++it2) { - d->hiddenClasses.tqreplace( it2.currentKey(), (char*)1 ); + d->hiddenClasses.replace( it2.currentKey(), (char*)1 ); } } } @@ -453,7 +453,7 @@ TQString WidgetLibrary::displayName(const TQCString &classname) { loadFactories(); - WidgetInfo *wi = d->widgets.tqfind(classname); + WidgetInfo *wi = d->widgets.find(classname); if(wi) return wi->name(); @@ -465,7 +465,7 @@ WidgetLibrary::savingName(const TQCString &classname) { loadFactories(); TQString s; - WidgetInfo *wi = d->widgets.tqfind(classname); + WidgetInfo *wi = d->widgets.find(classname); if(wi && !wi->savingName().isEmpty()) return wi->savingName(); @@ -476,7 +476,7 @@ TQString WidgetLibrary::namePrefix(const TQCString &classname) { loadFactories(); - WidgetInfo *wi = d->widgets.tqfind(classname); + WidgetInfo *wi = d->widgets.find(classname); if(wi) return wi->namePrefix(); @@ -501,7 +501,7 @@ TQCString WidgetLibrary::classNameForAlternate(const TQCString &classname) { loadFactories(); - if(d->widgets.tqfind(classname)) + if(d->widgets.find(classname)) return classname; WidgetInfo *wi = d->widgets[classname]; @@ -517,7 +517,7 @@ TQString WidgetLibrary::includeFileName(const TQCString &classname) { loadFactories(); - WidgetInfo *wi = d->widgets.tqfind(classname); + WidgetInfo *wi = d->widgets.find(classname); if(wi) return wi->includeFileName(); @@ -528,7 +528,7 @@ TQString WidgetLibrary::iconName(const TQCString &classname) { loadFactories(); - WidgetInfo *wi = d->widgets.tqfind(classname); + WidgetInfo *wi = d->widgets.find(classname); if(wi) return wi->pixmap(); @@ -539,7 +539,7 @@ bool WidgetLibrary::saveSpecialProperty(const TQCString &classname, const TQString &name, const TQVariant &value, TQWidget *w, TQDomElement &parentNode, TQDomDocument &tqparent) { loadFactories(); - WidgetInfo *wi = d->widgets.tqfind(classname); + WidgetInfo *wi = d->widgets.find(classname); if (!wi) return false; @@ -555,7 +555,7 @@ bool WidgetLibrary::readSpecialProperty(const TQCString &classname, TQDomElement &node, TQWidget *w, ObjectTreeItem *item) { loadFactories(); - WidgetInfo *wi = d->widgets.tqfind(classname); + WidgetInfo *wi = d->widgets.find(classname); if (!wi) return false; if (wi->factory()->readSpecialProperty(classname, node, w, item)) @@ -587,7 +587,7 @@ WidgetLibrary::isPropertyVisible(const TQCString &classname, TQWidget *w, } loadFactories(); - WidgetInfo *wi = d->widgets.tqfind(classname); + WidgetInfo *wi = d->widgets.find(classname); if (!wi) return false; if (!d->showAdvancedProperties && d->advancedProperties[ property ]) { @@ -613,7 +613,7 @@ TQValueList<TQCString> WidgetLibrary::autoSaveProperties(const TQCString &classname) { loadFactories(); - WidgetInfo *wi = d->widgets.tqfind(classname); + WidgetInfo *wi = d->widgets.find(classname); if(!wi) return TQValueList<TQCString>(); TQValueList<TQCString> lst; @@ -628,7 +628,7 @@ WidgetInfo* WidgetLibrary::widgetInfoForClassName(const char* classname) { loadFactories(); - return d->widgets.tqfind(classname); + return d->widgets.find(classname); } WidgetFactory* diff --git a/kexi/formeditor/widgetpropertyset.cpp b/kexi/formeditor/widgetpropertyset.cpp index 55bd4c60..bd150e45 100644 --- a/kexi/formeditor/widgetpropertyset.cpp +++ b/kexi/formeditor/widgetpropertyset.cpp @@ -126,9 +126,9 @@ WidgetPropertySet::property(const TQCString &name) } bool -WidgetPropertySet::tqcontains(const TQCString &property) +WidgetPropertySet::contains(const TQCString &property) { - return d->set.tqcontains(property); + return d->set.contains(property); } KoProperty::Set* @@ -195,7 +195,7 @@ WidgetPropertySet::setSelectedWidget(TQWidget *w, bool add, bool forceReload, bo } // don't add a widget twice - if(!forceReload && d->widgets.tqcontains(TQGuardedPtr<TQWidget>(w))) { + if(!forceReload && d->widgets.contains(TQGuardedPtr<TQWidget>(w))) { kdWarning() << "WidgetPropertySet::setSelectedWidget() Widget is already selected" << endl; return; } @@ -309,7 +309,7 @@ WidgetPropertySet::createPropertiesForWidget(TQWidget *w) const TQMetaProperty *subMeta = // special case - subproperty subpropIface ? subpropIface->findMetaSubproperty(it.current()) : 0; const TQMetaProperty *meta = subMeta ? subMeta - : w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty(*it, true), true); + : w->tqmetaObject()->property( w->tqmetaObject()->findProperty(*it, true), true); if (!meta) continue; const char* propertyName = meta->name(); @@ -317,14 +317,14 @@ WidgetPropertySet::createPropertiesForWidget(TQWidget *w) WidgetInfo *subwinfo = form->library()->widgetInfoForClassName(subwidget->className()); // kdDebug() << "$$$ " << subwidget->className() << endl; - if(subwinfo && meta->designable(subwidget) && !d->set.tqcontains(propertyName)) { + if(subwinfo && meta->designable(subwidget) && !d->set.contains(propertyName)) { //! \todo add another list for property description TQString desc( d->propCaption[meta->name()] ); //! \todo change i18n if (desc.isEmpty()) //try to get property description from factory desc = form->library()->propertyDescForName(subwinfo, propertyName); - modifiedPropertiesIt = modifiedProperties->tqfind(propertyName); + modifiedPropertiesIt = modifiedProperties->find(propertyName); const bool oldValueExists = modifiedPropertiesIt!=modifiedProperties->constEnd(); if(meta->isEnumType()) { @@ -411,12 +411,12 @@ void WidgetPropertySet::updatePropertyValue(ObjectTreeItem *tree, const char *property, const TQMetaProperty *meta) { const char *propertyName = meta ? meta->name() : property; - if (!d->set.tqcontains(propertyName)) + if (!d->set.contains(propertyName)) return; KoProperty::Property p( d->set[propertyName] ); //! \todo what about set properties, and lists properties - TQMap<TQString, TQVariant>::ConstIterator it( tree->modifiedProperties()->tqfind(propertyName) ); + TQMap<TQString, TQVariant>::ConstIterator it( tree->modifiedProperties()->find(propertyName) ); if (it != tree->modifiedProperties()->constEnd()) { blockSignals(true); if(meta && meta->isEnumType()) { @@ -485,7 +485,7 @@ WidgetPropertySet::slotPropertyChanged(KoProperty::Set& set, KoProperty::Propert return; TQCString property = p.name(); - if (0==property.tqfind("this:")) + if (0==property.find("this:")) return; //starts with magical prefix: it's a "meta" prop. TQVariant value = p.value(); @@ -608,7 +608,7 @@ WidgetPropertySet::createPropertyCommandsInDesignMode(TQWidget* widget, // CommandGroup *group = new CommandGroup(commandName); for(TQMap<TQCString, TQVariant>::ConstIterator it = propValues.constBegin(); it != endIt; ++it) { - if (!d->set.tqcontains(it.key())) { + if (!d->set.contains(it.key())) { kdWarning() << "WidgetPropertySet::createPropertyCommandsInDesignMode(): \"" <<it.key()<<"\" property not found"<<endl; continue; } @@ -621,7 +621,7 @@ WidgetPropertySet::createPropertyCommandsInDesignMode(TQWidget* widget, else { WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(widget); TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : widget; - if (-1 != subwidget->tqmetaObject()->tqfindProperty(it.key(), true) && subwidget->property(it.key())!=it.data()) { + if (-1 != subwidget->tqmetaObject()->findProperty(it.key(), true) && subwidget->property(it.key())!=it.data()) { ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup(widget->name()); if (tree) tree->addModifiedProperty(it.key(), subwidget->property(it.key())); @@ -711,15 +711,15 @@ WidgetPropertySet::slotPropertyReset(KoProperty::Set& set, KoProperty::Property& // for(TQWidget *w = d->widgets.first(); w; w = d->widgets.next()) { foreach(TQGuardedWidgetList::ConstIterator, it, d->widgets) { ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup((*it)->name()); - if(tree->modifiedProperties()->tqcontains(property.name())) - (*it)->setProperty(property.name(), tree->modifiedProperties()->tqfind(property.name()).data()); + if(tree->modifiedProperties()->contains(property.name())) + (*it)->setProperty(property.name(), tree->modifiedProperties()->find(property.name()).data()); } } void WidgetPropertySet::slotWidgetDestroyed() { -// if(d->widgets.tqcontains(TQGuardedPtr<const TQWidget>( dynamic_cast<const TQWidget*>(sender()) ))) { +// if(d->widgets.contains(TQGuardedPtr<const TQWidget>( dynamic_cast<const TQWidget*>(sender()) ))) { //only clear this set if it contains the destroyed widget foreach(TQGuardedWidgetList::ConstIterator, it, d->widgets) { if (dynamic_cast<const TQWidget*>(sender()) == *it) { @@ -735,7 +735,7 @@ WidgetPropertySet::eventFilter(TQObject *o, TQEvent *ev) if(d->widgets.count() > 0 && o == d->widgets.first() && d->widgets.count() < 2) { if((ev->type() == TQEvent::Resize) || (ev->type() == TQEvent::Move)) { - if(!d->set.tqcontains("geometry")) + if(!d->set.contains("geometry")) return false; if(d->set["geometry"].value() == o->property("geometry")) // to avoid infinite recursion return false; @@ -785,15 +785,15 @@ WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *wid ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup(widget->name()); bool isTopLevel = KFormDesigner::FormManager::self()->isTopLevel(widget); - if(possibleValues.tqfind("AlignHCenter")!=possibleValues.constEnd()) { + if(possibleValues.find("AlignHCenter")!=possibleValues.constEnd()) { // Create the horizontal tqalignment property - if(keys.tqfind("AlignHCenter")!=keys.constEnd() || keys.tqfind("AlignCenter")!=keys.constEnd()) + if(keys.find("AlignHCenter")!=keys.constEnd() || keys.find("AlignCenter")!=keys.constEnd()) value = "AlignHCenter"; - else if(keys.tqfind("AlignRight")!=keys.constEnd()) + else if(keys.find("AlignRight")!=keys.constEnd()) value = "AlignRight"; - else if(keys.tqfind("AlignLeft")!=keys.constEnd()) + else if(keys.find("AlignLeft")!=keys.constEnd()) value = "AlignLeft"; - else if(keys.tqfind("AlignJustify")!=keys.constEnd()) + else if(keys.find("AlignJustify")!=keys.constEnd()) value = "AlignJustify"; else value = "AlignAuto"; @@ -810,12 +810,12 @@ WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *wid list.clear(); } - if(possibleValues.tqfind("AlignTop")!=possibleValues.constEnd()) + if(possibleValues.find("AlignTop")!=possibleValues.constEnd()) { // Create the ver tqalignment property - if(keys.tqfind("AlignTop")!=keys.constEnd()) + if(keys.find("AlignTop")!=keys.constEnd()) value = "AlignTop"; - else if(keys.tqfind("AlignBottom")!=keys.constEnd()) + else if(keys.find("AlignBottom")!=keys.constEnd()) value = "AlignBottom"; else value = "AlignVCenter"; @@ -831,7 +831,7 @@ WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *wid updatePropertyValue(tree, "vAlign"); } - if(possibleValues.tqfind("WordBreak")!=possibleValues.constEnd() + if(possibleValues.find("WordBreak")!=possibleValues.constEnd() // && isPropertyVisible("wordbreak", false, subwidget->className()) // && !subWidget->inherits(TQLINEEDIT_OBJECT_NAME_STRING) /* TQLineEdit doesn't support 'word break' is this generic enough?*/ ) { @@ -855,17 +855,17 @@ WidgetPropertySet::saveAlignProperty(const TQString &property) return; TQStrList list; - if( d->set.tqcontains("hAlign") ) + if( d->set.contains("hAlign") ) list.append( d->set["hAlign"].value().toCString() ); - if( d->set.tqcontains("vAlign") ) + if( d->set.contains("vAlign") ) list.append( d->set["vAlign"].value().toCString() ); - if( d->set.tqcontains("wordbreak") && d->set["wordbreak"].value().toBool() ) + if( d->set.contains("wordbreak") && d->set["wordbreak"].value().toBool() ) list.append("WordBreak"); WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>( (TQWidget*)d->widgets.first() ); TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : (TQWidget*)d->widgets.first(); - int count = subwidget->tqmetaObject()->tqfindProperty("tqalignment", true); + int count = subwidget->tqmetaObject()->findProperty("tqalignment", true); const TQMetaProperty *meta = subwidget->tqmetaObject()->property(count, true); subwidget->setProperty("tqalignment", meta->keysToValue(list)); @@ -1106,14 +1106,14 @@ WidgetPropertySet::createValueList(WidgetInfo *winfo, const TQStringList &list) void WidgetPropertySet::addPropertyCaption(const TQCString &property, const TQString &caption) { - if(!d->propCaption.tqcontains(property)) + if(!d->propCaption.contains(property)) d->propCaption[property] = caption; } void WidgetPropertySet::addValueCaption(const TQCString &value, const TQString &caption) { - if(!d->propValCaption.tqcontains(value)) + if(!d->propValCaption.contains(value)) d->propValCaption[value] = caption; } diff --git a/kexi/formeditor/widgetpropertyset.h b/kexi/formeditor/widgetpropertyset.h index d330e4ed..cc403ef0 100644 --- a/kexi/formeditor/widgetpropertyset.h +++ b/kexi/formeditor/widgetpropertyset.h @@ -53,7 +53,7 @@ class KFORMEDITOR_EXPORT WidgetPropertySet : public TQObject KoProperty::Property& property(const TQCString &name); - bool tqcontains(const TQCString &property); + bool contains(const TQCString &property); /*! i18n function used by factories to add new property caption. Should be called on Factory creation. */ diff --git a/kexi/formeditor/widgetwithsubpropertiesinterface.cpp b/kexi/formeditor/widgetwithsubpropertiesinterface.cpp index 83904aa7..0bbb958c 100644 --- a/kexi/formeditor/widgetwithsubpropertiesinterface.cpp +++ b/kexi/formeditor/widgetwithsubpropertiesinterface.cpp @@ -45,8 +45,8 @@ void WidgetWithSubpropertiesInterface::setSubwidget(TQWidget *widget) const int numProperties = tqmetaObject->numProperties(); for (int i = 0; i < numProperties; i++) { const char *propertyName = tqmetaObject->property( i )->name(); - if (dynamic_cast<TQObject*>(this)->tqmetaObject()->tqfindProperty( propertyName, true )==-1 - && !addedSubproperies.tqfind( propertyName ) ) + if (dynamic_cast<TQObject*>(this)->tqmetaObject()->findProperty( propertyName, true )==-1 + && !addedSubproperies.find( propertyName ) ) { m_subproperies.append( propertyName ); addedSubproperies.insert( propertyName, (char*)1 ); @@ -70,10 +70,10 @@ TQValueList<TQCString> WidgetWithSubpropertiesInterface::subproperies() const const TQMetaProperty *WidgetWithSubpropertiesInterface::findMetaSubproperty(const char * name) const { - if (!m_subwidget || m_subproperies.tqfind(name) == m_subproperies.constEnd()) { + if (!m_subwidget || m_subproperies.find(name) == m_subproperies.constEnd()) { return 0; } - const int index = m_subwidget->tqmetaObject()->tqfindProperty( name, true ); + const int index = m_subwidget->tqmetaObject()->findProperty( name, true ); if (index==-1) return 0; return m_subwidget->tqmetaObject()->property( index, true ); @@ -81,7 +81,7 @@ const TQMetaProperty *WidgetWithSubpropertiesInterface::findMetaSubproperty(cons TQVariant WidgetWithSubpropertiesInterface::subproperty( const char * name, bool &ok ) const { - if (!m_subwidget || m_subproperies.tqfind(name) == m_subproperies.constEnd()) { + if (!m_subwidget || m_subproperies.find(name) == m_subproperies.constEnd()) { ok = false; return TQVariant(); } @@ -91,7 +91,7 @@ TQVariant WidgetWithSubpropertiesInterface::subproperty( const char * name, bool bool WidgetWithSubpropertiesInterface::setSubproperty( const char * name, const TQVariant & value ) { - if (!m_subwidget || m_subproperies.tqfind(name) == m_subproperies.end()) { + if (!m_subwidget || m_subproperies.find(name) == m_subproperies.end()) { return false; } return m_subwidget->setProperty( name, value ); |