summaryrefslogtreecommitdiffstats
path: root/lib/widgets/propeditor
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-06-01 15:56:13 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-06-01 15:56:13 +0900
commitb1e66b339befa7bdf222f7bb80a431236a3ff689 (patch)
tree3ae72987233dbeddeb7fe370ee36dbe36077663c /lib/widgets/propeditor
parent5fcb1d91b4f52ab609864968a7320eb276f6c068 (diff)
downloadtdevelop-b1e66b339befa7bdf222f7bb80a431236a3ff689.tar.gz
tdevelop-b1e66b339befa7bdf222f7bb80a431236a3ff689.zip
Adjusted to use new TQStringVariantMap type.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'lib/widgets/propeditor')
-rw-r--r--lib/widgets/propeditor/childproperty.cpp2
-rw-r--r--lib/widgets/propeditor/childproperty.h2
-rw-r--r--lib/widgets/propeditor/multiproperty.cpp14
-rw-r--r--lib/widgets/propeditor/multiproperty.h2
-rw-r--r--lib/widgets/propeditor/pcombobox.cpp12
-rw-r--r--lib/widgets/propeditor/pcombobox.h8
-rw-r--r--lib/widgets/propeditor/pcursoredit.cpp2
-rw-r--r--lib/widgets/propeditor/pcursoredit.h2
-rw-r--r--lib/widgets/propeditor/property.cpp4
-rw-r--r--lib/widgets/propeditor/property.h8
-rw-r--r--lib/widgets/propeditor/propertyeditor.cpp2
-rw-r--r--lib/widgets/propeditor/propertymachinefactory.cpp6
-rw-r--r--lib/widgets/propeditor/propertywidget.cpp2
-rw-r--r--lib/widgets/propeditor/propertywidget.h2
-rw-r--r--lib/widgets/propeditor/psizepolicyedit.cpp4
-rw-r--r--lib/widgets/propeditor/psizepolicyedit.h4
16 files changed, 38 insertions, 38 deletions
diff --git a/lib/widgets/propeditor/childproperty.cpp b/lib/widgets/propeditor/childproperty.cpp
index beebad5a..3f4ea5c4 100644
--- a/lib/widgets/propeditor/childproperty.cpp
+++ b/lib/widgets/propeditor/childproperty.cpp
@@ -35,7 +35,7 @@ ChildProperty::ChildProperty(MultiProperty *parent, int type, ChildPropertyType
}
ChildProperty::ChildProperty(MultiProperty *parent, const TQString & name, ChildPropertyType childType,
- const TQMap<TQString, TQVariant> &v_valueList, const TQString &description,
+ const TQStringVariantMap &v_valueList, const TQString &description,
const TQVariant &value, bool save, bool readOnly)
:Property(name, v_valueList, description, value, save, readOnly), m_parent(parent), m_childType(childType)
{
diff --git a/lib/widgets/propeditor/childproperty.h b/lib/widgets/propeditor/childproperty.h
index 6e247fd3..d2e5e706 100644
--- a/lib/widgets/propeditor/childproperty.h
+++ b/lib/widgets/propeditor/childproperty.h
@@ -65,7 +65,7 @@ public:
bool save = true, bool readOnly = false);
/**Constructs property with @ref ValueFromList type.*/
ChildProperty(MultiProperty *parent, const TQString &name, ChildPropertyType childType,
- const TQMap<TQString, TQVariant> &v_valueList, const TQString &description,
+ const TQStringVariantMap &v_valueList, const TQString &description,
const TQVariant &value = TQVariant(), bool save = true, bool readOnly = false);
/**@return the value of the property.*/
diff --git a/lib/widgets/propeditor/multiproperty.cpp b/lib/widgets/propeditor/multiproperty.cpp
index eae14e98..7f8b1935 100644
--- a/lib/widgets/propeditor/multiproperty.cpp
+++ b/lib/widgets/propeditor/multiproperty.cpp
@@ -129,11 +129,11 @@ bool MultiProperty::visible() const
return v;
}
-TQMap<TQString, TQVariant> MultiProperty::valueList() const
+TQStringVariantMap MultiProperty::valueList() const
{
if (list.count() >= 1)
return list.getFirst()->valueList;
- return TQMap<TQString, TQVariant>();
+ return TQStringVariantMap();
}
void MultiProperty::setDescription(const TQString &description)
@@ -176,7 +176,7 @@ void MultiProperty::setValue(const TQVariant &value, bool emitChange)
}
}
-void MultiProperty::setValueList(const TQMap<TQString, TQVariant> &valueList)
+void MultiProperty::setValueList(const TQStringVariantMap &valueList)
{
Property *property;
for (property = list.first(); property; property = list.next())
@@ -232,8 +232,8 @@ TQVariant MultiProperty::findValueDescription() const
TQVariant val = value();
if (type() != Property::ValueFromList)
return val;
- TQMap<TQString, TQVariant> vl = valueList();
- for (TQMap<TQString, TQVariant>::const_iterator it = vl.begin(); it != vl.end(); ++ it)
+ TQStringVariantMap vl = valueList();
+ for (TQStringVariantMap::const_iterator it = vl.begin(); it != vl.end(); ++ it)
{
if (it.data() == val)
return it.key();
@@ -245,8 +245,8 @@ TQVariant MultiProperty::findValueDescription(TQVariant val) const
{
if (type() != Property::ValueFromList)
return val;
- TQMap<TQString, TQVariant> vl = valueList();
- for (TQMap<TQString, TQVariant>::const_iterator it = vl.begin(); it != vl.end(); ++ it)
+ TQStringVariantMap vl = valueList();
+ for (TQStringVariantMap::const_iterator it = vl.begin(); it != vl.end(); ++ it)
{
if (it.data() == val)
return it.key();
diff --git a/lib/widgets/propeditor/multiproperty.h b/lib/widgets/propeditor/multiproperty.h
index 49410a04..61c04e7d 100644
--- a/lib/widgets/propeditor/multiproperty.h
+++ b/lib/widgets/propeditor/multiproperty.h
@@ -84,7 +84,7 @@ public:
/**Returns the visibility attribute of a %property.*/
bool visible() const;
/**The string-to-value correspondence list of the %property.*/
- TQMap<TQString, TQVariant> valueList() const;
+ TQStringVariantMap valueList() const;
/**Sets the value of a %property.*/
void setValue(const TQVariant& value);
diff --git a/lib/widgets/propeditor/pcombobox.cpp b/lib/widgets/propeditor/pcombobox.cpp
index 7f0d242e..a0749744 100644
--- a/lib/widgets/propeditor/pcombobox.cpp
+++ b/lib/widgets/propeditor/pcombobox.cpp
@@ -24,13 +24,13 @@
namespace PropertyLib{
-PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *parent, const char *name)
+PComboBox::PComboBox(MultiProperty *property, const TQStringVariantMap &list, TQWidget *parent, const char *name)
:PropertyWidget(property, parent, name), m_valueList(list)
{
init(false);
}
-PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *parent, const char *name)
+PComboBox::PComboBox(MultiProperty *property, const TQStringVariantMap &list, bool rw, TQWidget *parent, const char *name)
:PropertyWidget(property, parent, name), m_valueList(list)
{
init(rw);
@@ -50,7 +50,7 @@ void PComboBox::init(bool rw)
void PComboBox::fillBox()
{
- for (TQMap<TQString, TQVariant>::const_iterator it = m_valueList.begin(); it != m_valueList.end(); it++)
+ for (TQStringVariantMap::const_iterator it = m_valueList.begin(); it != m_valueList.end(); it++)
{
m_edit->insertItem(it.key());
}
@@ -58,7 +58,7 @@ void PComboBox::fillBox()
TQVariant PComboBox::value() const
{
- TQMap<TQString, TQVariant>::const_iterator it = m_valueList.find(m_edit->currentText());
+ TQStringVariantMap::const_iterator it = m_valueList.find(m_edit->currentText());
if (it == m_valueList.end())
return TQVariant("");
return TQVariant(it.data());
@@ -83,7 +83,7 @@ void PComboBox::updateProperty(int /*val*/)
TQString PComboBox::findDescription(const TQVariant &value)
{
- for (TQMap<TQString, TQVariant>::const_iterator it = m_valueList.begin(); it != m_valueList.end(); ++ it)
+ for (TQStringVariantMap::const_iterator it = m_valueList.begin(); it != m_valueList.end(); ++ it)
{
if (it.data() == value)
return it.key();
@@ -91,7 +91,7 @@ TQString PComboBox::findDescription(const TQVariant &value)
return "";
}
-void PComboBox::setValueList(const TQMap<TQString, TQVariant> &valueList)
+void PComboBox::setValueList(const TQStringVariantMap &valueList)
{
m_valueList = valueList;
m_edit->clear();
diff --git a/lib/widgets/propeditor/pcombobox.h b/lib/widgets/propeditor/pcombobox.h
index 98937eaa..c9da1ad9 100644
--- a/lib/widgets/propeditor/pcombobox.h
+++ b/lib/widgets/propeditor/pcombobox.h
@@ -38,9 +38,9 @@ class PComboBox: public PropertyWidget{
public:
/**This constructor is used for read-only selection combo. It provides a value from valueList*/
- PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *parent = 0, const char *name = 0);
+ PComboBox(MultiProperty *property, const TQStringVariantMap &list, TQWidget *parent = 0, const char *name = 0);
/**This constructor is used for read-write selection combo. It provides a value from valueList*/
- PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *parent = 0, const char *name = 0);
+ PComboBox(MultiProperty *property, const TQStringVariantMap &list, bool rw, TQWidget *parent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
@@ -50,7 +50,7 @@ public:
/**Sets the list of possible values shown in the editor widget. This method
does not emit propertyChanged signal. Reimplemented because combobox is used
to display possible values from valueList.*/
- virtual void setValueList(const TQMap<TQString, TQVariant> &valueList);
+ virtual void setValueList(const TQStringVariantMap &valueList);
protected:
TQString findDescription(const TQVariant &value);
@@ -63,7 +63,7 @@ private:
void init(bool rw = false);
/** map<description, value>*/
- TQMap<TQString, TQVariant> m_valueList;
+ TQStringVariantMap m_valueList;
TQComboBox *m_edit;
};
diff --git a/lib/widgets/propeditor/pcursoredit.cpp b/lib/widgets/propeditor/pcursoredit.cpp
index 85aefd5e..43cba71c 100644
--- a/lib/widgets/propeditor/pcursoredit.cpp
+++ b/lib/widgets/propeditor/pcursoredit.cpp
@@ -23,7 +23,7 @@
namespace PropertyLib{
-PCursorEdit::PCursorEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues,
+PCursorEdit::PCursorEdit(MultiProperty* property, const TQStringVariantMap &spValues,
TQWidget* parent, const char* name)
:PComboBox(property, spValues, parent, name)
{
diff --git a/lib/widgets/propeditor/pcursoredit.h b/lib/widgets/propeditor/pcursoredit.h
index 1d3925ae..5ff9fbf3 100644
--- a/lib/widgets/propeditor/pcursoredit.h
+++ b/lib/widgets/propeditor/pcursoredit.h
@@ -32,7 +32,7 @@ class PCursorEdit: public PComboBox
Q_OBJECT
public:
- PCursorEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues,
+ PCursorEdit(MultiProperty* property, const TQStringVariantMap &spValues,
TQWidget* parent = 0, const char* name = 0);
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/property.cpp b/lib/widgets/propeditor/property.cpp
index d219b8c3..4a8f2db3 100644
--- a/lib/widgets/propeditor/property.cpp
+++ b/lib/widgets/propeditor/property.cpp
@@ -29,7 +29,7 @@ Property::Property(int type, const TQString &name, const TQString &description,
{
}
-Property::Property(const TQString &name, const TQMap<TQString, TQVariant> &v_valueList,
+Property::Property(const TQString &name, const TQStringVariantMap &v_valueList,
const TQString &description, const TQVariant &value, bool save, bool readOnly):
valueList(v_valueList), m_type(ValueFromList), m_name(name),
m_description(description), m_value(value), m_save(save), m_readOnly(readOnly),
@@ -98,7 +98,7 @@ void Property::setDescription(const TQString &description)
m_description = description;
}
-void Property::setValueList(const TQMap<TQString, TQVariant> &v_valueList)
+void Property::setValueList(const TQStringVariantMap &v_valueList)
{
valueList = v_valueList;
}
diff --git a/lib/widgets/propeditor/property.h b/lib/widgets/propeditor/property.h
index a94ea4cb..0e89c8cf 100644
--- a/lib/widgets/propeditor/property.h
+++ b/lib/widgets/propeditor/property.h
@@ -66,7 +66,7 @@ public:
enum PropertyType {
//standard supported TQVariant types
Invalid = TQVariant::Invalid /**<invalid property type*/,
- Map = TQVariant::Map /**<TQMap<TQString, TQVariant>*/,
+ Map = TQVariant::Map /**<TQStringVariantMap*/,
List = TQVariant::List /**<TQValueList<TQVariant>*/,
String = TQVariant::String /**<string*/,
StringList = TQVariant::StringList /**<string list*/,
@@ -120,7 +120,7 @@ public:
Property(int type, const TQString &name, const TQString &description,
const TQVariant &value = TQVariant(), bool save = true, bool readOnly = false);
/**Constructs property with @ref ValueFromList type.*/
- Property(const TQString &name, const TQMap<TQString, TQVariant> &v_valueList,
+ Property(const TQString &name, const TQStringVariantMap &v_valueList,
const TQString &description, const TQVariant &value = TQVariant(), bool save = true, bool readOnly = false);
virtual ~Property();
@@ -144,9 +144,9 @@ public:
virtual void setDescription(const TQString &description);
/**Sets the string-to-value correspondence list of the property.
This is used to create comboboxes-like property editors.*/
- virtual void setValueList(const TQMap<TQString, TQVariant> &list);
+ virtual void setValueList(const TQStringVariantMap &list);
/**The string-to-value correspondence list of the property.*/
- TQMap<TQString, TQVariant> valueList;
+ TQStringVariantMap valueList;
/**Tells if the property can be saved to a stream, xml, etc.
There is a possibility to use "GUI" properties that aren't
diff --git a/lib/widgets/propeditor/propertyeditor.cpp b/lib/widgets/propeditor/propertyeditor.cpp
index 780b2821..987bb31b 100644
--- a/lib/widgets/propeditor/propertyeditor.cpp
+++ b/lib/widgets/propeditor/propertyeditor.cpp
@@ -441,7 +441,7 @@ Machine *PropertyEditor::machine(MultiProperty *property)
{
// int type = property->type();
TQString name = property->name();
- TQMap<TQString, TQVariant> values = property->valueList();
+ TQStringVariantMap values = property->valueList();
if (m_registeredForType[name] == 0)
{
m_registeredForType[name] = PropertyMachineFactory::getInstance()->machineForProperty(property);
diff --git a/lib/widgets/propeditor/propertymachinefactory.cpp b/lib/widgets/propeditor/propertymachinefactory.cpp
index 389fc38f..0d92beee 100644
--- a/lib/widgets/propeditor/propertymachinefactory.cpp
+++ b/lib/widgets/propeditor/propertymachinefactory.cpp
@@ -74,7 +74,7 @@ Machine *PropertyMachineFactory::machineForProperty(MultiProperty *property)
{
int type = property->type();
TQString propertyName = property->name();
- TQMap<TQString, TQVariant> valueList = property->valueList();
+ TQStringVariantMap valueList = property->valueList();
if (m_registeredForType.contains(propertyName))
return (*m_registeredForType[propertyName])();
@@ -143,7 +143,7 @@ Machine *PropertyMachineFactory::machineForProperty(MultiProperty *property)
}
case Property::SizePolicy:
{
- TQMap<TQString, TQVariant> spValues;
+ TQStringVariantMap spValues;
spValues[i18n("Fixed")] = TQSizePolicy::Fixed;
spValues[i18n("Minimum")] = TQSizePolicy::Minimum;
spValues[i18n("Maximum")] = TQSizePolicy::Maximum;
@@ -161,7 +161,7 @@ Machine *PropertyMachineFactory::machineForProperty(MultiProperty *property)
}
case Property::Cursor:
{
- TQMap<TQString, TQVariant> spValues;
+ TQStringVariantMap spValues;
spValues[i18n("Arrow")] = TQt::ArrowCursor;
spValues[i18n("Up Arrow")] = TQt::UpArrowCursor;
spValues[i18n("Cross")] = TQt::CrossCursor;
diff --git a/lib/widgets/propeditor/propertywidget.cpp b/lib/widgets/propeditor/propertywidget.cpp
index 38a99c9c..1ec91a0d 100644
--- a/lib/widgets/propeditor/propertywidget.cpp
+++ b/lib/widgets/propeditor/propertywidget.cpp
@@ -46,7 +46,7 @@ void PropertyWidget::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRe
p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toString());
}
-void PropertyWidget::setValueList(const TQMap<TQString, TQVariant> &// valueList
+void PropertyWidget::setValueList(const TQStringVariantMap &// valueList
)
{
//this does nothing
diff --git a/lib/widgets/propeditor/propertywidget.h b/lib/widgets/propeditor/propertywidget.h
index f1cec5bc..5071190b 100644
--- a/lib/widgets/propeditor/propertywidget.h
+++ b/lib/widgets/propeditor/propertywidget.h
@@ -65,7 +65,7 @@ public:
virtual void setProperty(MultiProperty *property);
/**Sets the list of possible values shown in the editor widget. This method
does not emit propertyChanged signal.*/
- virtual void setValueList(const TQMap<TQString, TQVariant> &valueList);
+ virtual void setValueList(const TQStringVariantMap &valueList);
/**Function to draw a property viewer when the editor isn't shown.*/
virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
diff --git a/lib/widgets/propeditor/psizepolicyedit.cpp b/lib/widgets/propeditor/psizepolicyedit.cpp
index 99983457..95ff54f7 100644
--- a/lib/widgets/propeditor/psizepolicyedit.cpp
+++ b/lib/widgets/propeditor/psizepolicyedit.cpp
@@ -26,7 +26,7 @@
namespace PropertyLib{
-PSizePolicyEdit::PSizePolicyEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, TQWidget* parent, const char* name)
+PSizePolicyEdit::PSizePolicyEdit(MultiProperty* property, const TQStringVariantMap &spValues, TQWidget* parent, const char* name)
:PropertyWidget(property, parent, name), m_spValues(spValues)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
@@ -62,7 +62,7 @@ void PSizePolicyEdit::setValue(const TQVariant& value, bool emitChange)
TQString PSizePolicyEdit::findValueDescription(TQVariant val) const
{
// tqWarning("PSizePolicyEdit::findValueDescription : %d", val.toInt());
- for (TQMap<TQString, TQVariant>::const_iterator it = m_spValues.begin(); it != m_spValues.end(); ++ it)
+ for (TQStringVariantMap::const_iterator it = m_spValues.begin(); it != m_spValues.end(); ++ it)
{
if (it.data() == val)
return it.key();
diff --git a/lib/widgets/propeditor/psizepolicyedit.h b/lib/widgets/propeditor/psizepolicyedit.h
index 58b661f6..45ad5414 100644
--- a/lib/widgets/propeditor/psizepolicyedit.h
+++ b/lib/widgets/propeditor/psizepolicyedit.h
@@ -36,7 +36,7 @@ class PSizePolicyEdit : public PropertyWidget
Q_OBJECT
public:
- PSizePolicyEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, TQWidget* parent=0, const char* name=0);
+ PSizePolicyEdit(MultiProperty* property, const TQStringVariantMap &spValues, TQWidget* parent=0, const char* name=0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
@@ -47,7 +47,7 @@ public:
private:
KLineEdit *m_edit;
TQVariant m_value;
- TQMap<TQString, TQVariant> m_spValues;
+ TQStringVariantMap m_spValues;
};
}