diff options
author | Michele Calgaro <[email protected]> | 2019-06-01 15:22:21 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2019-06-01 15:22:21 +0900 |
commit | 728b7db2846d191399122c440671fd007cdbd0ae (patch) | |
tree | cd5e6f3b5ae67ec464b2c05ce0d41016bd9e30c3 /kexi/formeditor | |
parent | 04a12485219f38e113932e8aa20b6bc12d8fa715 (diff) | |
download | koffice-728b7db2846d191399122c440671fd007cdbd0ae.tar.gz koffice-728b7db2846d191399122c440671fd007cdbd0ae.zip |
Adjusted to use new TQStringVariantMap type.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kexi/formeditor')
-rw-r--r-- | kexi/formeditor/formIO.cpp | 6 | ||||
-rw-r--r-- | kexi/formeditor/objecttree.cpp | 2 | ||||
-rw-r--r-- | kexi/formeditor/objecttree.h | 16 | ||||
-rw-r--r-- | kexi/formeditor/widgetpropertyset.cpp | 8 |
4 files changed, 13 insertions, 19 deletions
diff --git a/kexi/formeditor/formIO.cpp b/kexi/formeditor/formIO.cpp index 657c5ccd..ced41a09 100644 --- a/kexi/formeditor/formIO.cpp +++ b/kexi/formeditor/formIO.cpp @@ -987,9 +987,9 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &do savePropertyElement(tclass, domDoc, "property", "buddy", ((TQLabel*)item->widget())->buddy()->name()); // We save every property in the modifProp list of the ObjectTreeItem - TQVariantMap *map = new TQVariantMap( *(item->modifiedProperties()) ); - TQMap<TQString,TQVariant>::ConstIterator endIt = map->constEnd(); - for(TQMap<TQString,TQVariant>::ConstIterator it = map->constBegin(); it != endIt; ++it) + TQStringVariantMap *map = new TQStringVariantMap( *(item->modifiedProperties()) ); + TQStringVariantMap::ConstIterator endIt = map->constEnd(); + for(TQStringVariantMap::ConstIterator it = map->constBegin(); it != endIt; ++it) { const TQCString name( it.key().latin1() ); if(name == "hAlign" || name == "vAlign" || name == "wordbreak" || name == "alignment") { diff --git a/kexi/formeditor/objecttree.cpp b/kexi/formeditor/objecttree.cpp index fa86e804..a37d2f5b 100644 --- a/kexi/formeditor/objecttree.cpp +++ b/kexi/formeditor/objecttree.cpp @@ -90,7 +90,7 @@ void ObjectTreeItem::addSubproperty(const TQCString &property, const TQVariant& value) { if (!m_subprops) - m_subprops = new TQMap<TQString, TQVariant>(); + m_subprops = new TQStringVariantMap(); if (!m_props.contains(property)) m_subprops->insert( property, value ); } diff --git a/kexi/formeditor/objecttree.h b/kexi/formeditor/objecttree.h index eaa95a0c..32839eab 100644 --- a/kexi/formeditor/objecttree.h +++ b/kexi/formeditor/objecttree.h @@ -50,12 +50,6 @@ typedef TQDict<ObjectTreeItem> ObjectTreeDict; //! @short An iterator for ObjectTreeDict. typedef TQDictIterator<ObjectTreeItem> ObjectTreeDictIterator; -//! @short A TQString -> TQVarinat map. -typedef TQMap<TQString, TQVariant> TQVariantMap; - -//! @short A const iterator for TQVariantMap. -typedef TQMapConstIterator<TQString, TQVariant> TQVariantMapConstIterator; - /*! @short An item representing a widget Holds the properties of a widget (classname, name, parent, children ..). @@ -74,9 +68,9 @@ class KFORMEDITOR_EXPORT ObjectTreeItem ObjectTreeItem* parent() const { return m_parent; } ObjectTreeList* children() { return &m_children; } - /*! \return a TQMap<TQString, TQVariant> of all modified properties for this widget. + /*! \return a TQStringVariantMap of all modified properties for this widget. The TQVariant is the old value (ie first value) of the property whose name is the TQString. */ - const TQVariantMap* modifiedProperties() const { return &m_props;} + const TQStringVariantMap* modifiedProperties() const { return &m_props;} //! \return the widget's Container, or 0 if the widget is not a Container. Container* container() const { return m_container;} @@ -103,7 +97,7 @@ class KFORMEDITOR_EXPORT ObjectTreeItem /*! \return subproperties for this item, added by addSubproperty() or 0 is there are no subproperties. */ - TQMap<TQString, TQVariant>* subproperties() const { return m_subprops; } + TQStringVariantMap* subproperties() const { return m_subprops; } void setPixmapName(const TQCString &property, const TQString &name); TQString pixmapName(const TQCString &property); @@ -123,8 +117,8 @@ class KFORMEDITOR_EXPORT ObjectTreeItem TQString m_name; ObjectTreeList m_children; TQGuardedPtr<Container> m_container; - TQMap<TQString, TQVariant> m_props; - TQMap<TQString, TQVariant> *m_subprops; + TQStringVariantMap m_props; + TQStringVariantMap *m_subprops; TQString m_unknownProps; TQMap<TQCString, TQString> m_pixmapNames; ObjectTreeItem* m_parent; diff --git a/kexi/formeditor/widgetpropertyset.cpp b/kexi/formeditor/widgetpropertyset.cpp index 64c61112..20182689 100644 --- a/kexi/formeditor/widgetpropertyset.cpp +++ b/kexi/formeditor/widgetpropertyset.cpp @@ -275,8 +275,8 @@ WidgetPropertySet::createPropertiesForWidget(TQWidget *w) if(!tree) return; - const TQVariantMap* modifiedProperties = tree->modifiedProperties(); - TQVariantMapConstIterator modifiedPropertiesIt; + const TQStringVariantMap* modifiedProperties = tree->modifiedProperties(); + TQStringVariantMapConstIterator modifiedPropertiesIt; bool isTopLevel = KFormDesigner::FormManager::self()->isTopLevel(w); // int count = 0; KoProperty::Property *newProp = 0; @@ -416,7 +416,7 @@ WidgetPropertySet::updatePropertyValue(ObjectTreeItem *tree, const char *propert KoProperty::Property p( d->set[propertyName] ); //! \todo what about set properties, and lists properties - TQMap<TQString, TQVariant>::ConstIterator it( tree->modifiedProperties()->find(propertyName) ); + TQStringVariantMap::ConstIterator it( tree->modifiedProperties()->find(propertyName) ); if (it != tree->modifiedProperties()->constEnd()) { blockSignals(true); if(meta && meta->isEnumType()) { @@ -1081,7 +1081,7 @@ WidgetPropertySet::valueCaption(const TQCString &name) KoProperty::Property::ListData* WidgetPropertySet::createValueList(WidgetInfo *winfo, const TQStringList &list) { -// TQMap <TQString, TQVariant> map; +// TQStringVariantMap map; TQStringList names; TQStringList::ConstIterator endIt = list.end(); for(TQStringList::ConstIterator it = list.begin(); it != endIt; ++it) { |