summaryrefslogtreecommitdiffstats
path: root/kexi/formeditor/widgetpropertyset.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/formeditor/widgetpropertyset.cpp')
-rw-r--r--kexi/formeditor/widgetpropertyset.cpp60
1 files changed, 30 insertions, 30 deletions
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;
}