diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:11 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:11 -0600 |
commit | 94844816550ad672ccfcdc25659c625546239998 (patch) | |
tree | e35fc60fd736c645d59f6408af032774ad8023d3 /kexi/formeditor/widgetpropertyset.cpp | |
parent | 2a811c38c74c03648ecf857e566c44483cbad706 (diff) | |
download | koffice-94844816550ad672ccfcdc25659c625546239998.tar.gz koffice-94844816550ad672ccfcdc25659c625546239998.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kexi/formeditor/widgetpropertyset.cpp')
-rw-r--r-- | kexi/formeditor/widgetpropertyset.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/kexi/formeditor/widgetpropertyset.cpp b/kexi/formeditor/widgetpropertyset.cpp index d06a5c2e..b76d326a 100644 --- a/kexi/formeditor/widgetpropertyset.cpp +++ b/kexi/formeditor/widgetpropertyset.cpp @@ -24,7 +24,7 @@ #include <tqmetaobject.h> #include <tqvariant.h> #include <tqevent.h> -#include <tqlayout.h> +#include <layout.h> #include <tqapplication.h> #include <tqeventloop.h> @@ -253,7 +253,7 @@ WidgetPropertySet::addWidget(TQWidget *w) //second widget, update metainfo d->set["this:className"].setValue("special:multiple"); d->set["this:classString"].setValue( - i18n("Multiple Widgets") + TQString(" (%1)").tqarg(d->widgets.count()) ); + i18n("Multiple Widgets") + TQString(" (%1)").arg(d->widgets.count()) ); d->set["this:iconName"].setValue("multiple_obj"); //name doesn't make sense for now d->set["name"].setValue(""); @@ -287,7 +287,7 @@ WidgetPropertySet::createPropertiesForWidget(TQWidget *w) return; } - TQStrList pList = w->tqmetaObject()->propertyNames(true); + TQStrList pList = w->metaObject()->propertyNames(true); TQStrListIterator it(pList); // add subproperties if available @@ -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()->findProperty(*it, true), true); + : w->metaObject()->property( w->metaObject()->findProperty(*it, true), true); if (!meta) continue; const char* propertyName = meta->name(); @@ -328,7 +328,7 @@ WidgetPropertySet::createPropertiesForWidget(TQWidget *w) const bool oldValueExists = modifiedPropertiesIt!=modifiedProperties->constEnd(); if(meta->isEnumType()) { - if(qstrcmp(propertyName, "tqalignment") == 0) { + if(qstrcmp(propertyName, "alignment") == 0) { createAlignProperty(meta, w, subwidget); continue; } @@ -393,7 +393,7 @@ WidgetPropertySet::createPropertiesForWidget(TQWidget *w) /*! let's forget it for now, until we have new complete events editor if (m_manager->lib()->advancedPropertiesVisible()) { // add the signals property - TQStrList strlist = w->tqmetaObject()->signalNames(true); + TQStrList strlist = w->metaObject()->signalNames(true); TQStrListIterator strIt(strlist); TQStringList list; for(; strIt.current() != 0; ++strIt) @@ -403,7 +403,7 @@ WidgetPropertySet::createPropertiesForWidget(TQWidget *w) )); }*/ - if(KFormDesigner::FormManager::self()->activeForm() && tree->container()) // we are a container -> tqlayout property + if(KFormDesigner::FormManager::self()->activeForm() && tree->container()) // we are a container -> layout property createLayoutProperty(tree); } @@ -507,7 +507,7 @@ WidgetPropertySet::slotPropertyChanged(KoProperty::Set& set, KoProperty::Propert saveAlignProperty(property); return; } - else if((property == "tqlayout") || (property == "layoutMargin") || (property == "layoutSpacing")) { + else if((property == "layout") || (property == "layoutMargin") || (property == "layoutSpacing")) { saveLayoutProperty(property, value); return; } @@ -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()->findProperty(it.key(), true) && subwidget->property(it.key())!=it.data()) { + if (-1 != subwidget->metaObject()->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())); @@ -678,7 +678,7 @@ WidgetPropertySet::isNameValid(const TQString &name) KMessageBox::sorry(KFormDesigner::FormManager::self()->activeForm()->widget(), i18n("Could not rename widget \"%1\" to \"%2\" because " "\"%3\" is not a valid name (identifier) for a widget.\n") - .tqarg(w->name()).tqarg(name).tqarg(name)); + .arg(w->name()).arg(name).arg(name)); d->slotPropertyChangedEnabled = false; d->set["name"].resetValue(); d->slotPropertyChangedEnabled = true; @@ -689,7 +689,7 @@ WidgetPropertySet::isNameValid(const TQString &name) KMessageBox::sorry( KFormDesigner::FormManager::self()->activeForm()->widget(), i18n("Could not rename widget \"%1\" to \"%2\" " "because a widget with the name \"%3\" already exists.\n") - .tqarg(w->name()).tqarg(name).tqarg(name)); + .arg(w->name()).arg(name).arg(name)); d->slotPropertyChangedEnabled = false; d->set["name"].resetValue(); d->slotPropertyChangedEnabled = true; @@ -740,7 +740,7 @@ WidgetPropertySet::eventFilter(TQObject *o, TQEvent *ev) if(d->set["geometry"].value() == o->property("geometry")) // to avoid infinite recursion return false; - d->set["geometry"] = TQT_TQWIDGET(o)->tqgeometry(); + d->set["geometry"] = TQT_TQWIDGET(o)->geometry(); } } else if(d->widgets.count() > 1 && ev->type() == TQEvent::Move) // the widget is being moved, we update the property @@ -775,8 +775,8 @@ WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *wid TQStringList list; TQString value; - const int tqalignment = subwidget->property("tqalignment").toInt(); - const TQStringList keys( TQStringList::fromStrList( meta->valueToKeys(tqalignment) ) ); + const int alignment = subwidget->property("alignment").toInt(); + const TQStringList keys( TQStringList::fromStrList( meta->valueToKeys(alignment) ) ); TQStrList *enumKeys = new TQStrList(meta->enumKeys()); const TQStringList possibleValues( TQStringList::fromStrList(*enumKeys) ); @@ -786,7 +786,7 @@ WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *wid bool isTopLevel = KFormDesigner::FormManager::self()->isTopLevel(widget); if(possibleValues.find("AlignHCenter")!=possibleValues.constEnd()) { - // Create the horizontal tqalignment property + // Create the horizontal alignment property if(keys.find("AlignHCenter")!=keys.constEnd() || keys.find("AlignCenter")!=keys.constEnd()) value = "AlignHCenter"; else if(keys.find("AlignRight")!=keys.constEnd()) @@ -812,7 +812,7 @@ WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *wid if(possibleValues.find("AlignTop")!=possibleValues.constEnd()) { - // Create the ver tqalignment property + // Create the ver alignment property if(keys.find("AlignTop")!=keys.constEnd()) value = "AlignTop"; else if(keys.find("AlignBottom")!=keys.constEnd()) @@ -837,7 +837,7 @@ WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *wid ) { // Create the wordbreak property KoProperty::Property *p = new KoProperty::Property("wordbreak", - TQVariant(tqalignment & TQt::WordBreak, 3), i18n("Word Break"), i18n("Word Break") ); + TQVariant(alignment & TQt::WordBreak, 3), i18n("Word Break"), i18n("Word Break") ); d->set.addProperty(p); updatePropertyValue(tree, "wordbreak"); if (!KFormDesigner::FormManager::self()->activeForm()->library()->isPropertyVisible( @@ -865,9 +865,9 @@ WidgetPropertySet::saveAlignProperty(const TQString &property) WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>( (TQWidget*)d->widgets.first() ); TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : (TQWidget*)d->widgets.first(); - int count = subwidget->tqmetaObject()->findProperty("tqalignment", true); - const TQMetaProperty *meta = subwidget->tqmetaObject()->property(count, true); - subwidget->setProperty("tqalignment", meta->keysToValue(list)); + int count = subwidget->metaObject()->findProperty("alignment", true); + const TQMetaProperty *meta = subwidget->metaObject()->property(count, true); + subwidget->setProperty("alignment", meta->keysToValue(list)); ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup( d->widgets.first()->name() ); @@ -877,11 +877,11 @@ WidgetPropertySet::saveAlignProperty(const TQString &property) if(d->isUndoing) return; - if(d->lastCommand && d->lastCommand->property() == "tqalignment") + if(d->lastCommand && d->lastCommand->property() == "alignment") d->lastCommand->setValue(meta->keysToValue(list)); else { d->lastCommand = new PropertyCommand(this, d->widgets.first()->name(), - subwidget->property("tqalignment"), meta->keysToValue(list), "tqalignment"); + subwidget->property("alignment"), meta->keysToValue(list), "alignment"); KFormDesigner::FormManager::self()->activeForm()->addCommand(d->lastCommand, false); } } @@ -895,7 +895,7 @@ WidgetPropertySet::createLayoutProperty(ObjectTreeItem *item) if (!container || !KFormDesigner::FormManager::self()->activeForm() || !KFormDesigner::FormManager::self()->activeForm()->objectTree() || !container->widget()) return; - // special containers have no 'tqlayout' property, as it should not be changed + // special containers have no 'layout' property, as it should not be changed TQCString className = container->widget()->className(); if((className == "HBox") || (className == "VBox") || (className == "Grid")) return; @@ -905,12 +905,12 @@ WidgetPropertySet::createLayoutProperty(ObjectTreeItem *item) list << "NoLayout" << "HBox" << "VBox" << "Grid" << "HFlow" << "VFlow"; - KoProperty::Property *p = new KoProperty::Property("tqlayout", createValueList(0, list), value, + KoProperty::Property *p = new KoProperty::Property("layout", createValueList(0, list), value, i18n("Container's Layout"), i18n("Container's Layout")); p->setVisible( container->form()->library()->advancedPropertiesVisible() ); d->set.addProperty(p); - updatePropertyValue(item, "tqlayout"); + updatePropertyValue(item, "layout"); p = new KoProperty::Property("layoutMargin", container->layoutMargin(), i18n("Layout Margin"), i18n("Layout Margin")); d->set.addProperty(p); @@ -938,14 +938,14 @@ WidgetPropertySet::saveLayoutProperty(const TQString &prop, const TQVariant &val return; container = item->container(); - if(prop == "tqlayout") { + if(prop == "layout") { Container::LayoutType type = Container::stringToLayoutType(value.toString()); - if(d->lastCommand && d->lastCommand->property() == "tqlayout" && !d->isUndoing) + if(d->lastCommand && d->lastCommand->property() == "layout" && !d->isUndoing) d->lastCommand->setValue(value); else if(!d->isUndoing) { d->lastCommand = new LayoutPropertyCommand(this, d->widgets.first()->name(), - d->set["tqlayout"].oldValue(), value); + d->set["layout"].oldValue(), value); KFormDesigner::FormManager::self()->activeForm()->addCommand(d->lastCommand, false); } @@ -959,13 +959,13 @@ WidgetPropertySet::saveLayoutProperty(const TQString &prop, const TQVariant &val return; } - if(prop == "layoutMargin" && container->tqlayout()) { + if(prop == "layoutMargin" && container->layout()) { container->setLayoutMargin(value.toInt()); - container->tqlayout()->setMargin(value.toInt()); + container->layout()->setMargin(value.toInt()); } - else if(prop == "layoutSpacing" && container->tqlayout()) { + else if(prop == "layoutSpacing" && container->layout()) { container->setLayoutSpacing(value.toInt()); - container->tqlayout()->setSpacing(value.toInt()); + container->layout()->setSpacing(value.toInt()); } ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup(d->widgets.first()->name()); @@ -1000,8 +1000,8 @@ WidgetPropertySet::initPropertiesDescription() d->propCaption["enabled"] = i18n("Enabled"); d->propCaption["geometry"] = i18n("Geometry"); d->propCaption["sizePolicy"] = i18n("Size Policy"); - d->propCaption["tqminimumSize"] = i18n("Minimum Size"); - d->propCaption["tqmaximumSize"] = i18n("Maximum Size"); + d->propCaption["minimumSize"] = i18n("Minimum Size"); + d->propCaption["maximumSize"] = i18n("Maximum Size"); d->propCaption["font"] = i18n("Font"); d->propCaption["cursor"] = i18n("Cursor"); d->propCaption["paletteForegroundColor"] = i18n("Foreground Color"); |