diff options
Diffstat (limited to 'lib/koproperty/customproperty.cpp')
-rw-r--r-- | lib/koproperty/customproperty.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/lib/koproperty/customproperty.cpp b/lib/koproperty/customproperty.cpp index f2c17808..c5a33ef6 100644 --- a/lib/koproperty/customproperty.cpp +++ b/lib/koproperty/customproperty.cpp @@ -30,8 +30,8 @@ using namespace KoProperty; -CustomProperty::CustomProperty(Property *tqparent) - : m_property(tqparent) +CustomProperty::CustomProperty(Property *parent) + : m_property(parent) { } @@ -80,15 +80,15 @@ SizeCustomProperty::setValue(const TQVariant &value, bool rememberOldValue) if(!m_property) return; - if(m_property->tqparent()) { - TQSize s = m_property->tqparent()->value().toSize(); + if(m_property->parent()) { + TQSize s = m_property->parent()->value().toSize(); if(m_property->type() == Size_Height) s.setHeight(value.toInt()); else if(m_property->type() == Size_Width) s.setWidth(value.toInt()); - m_property->tqparent()->setValue(s, true, false); + m_property->parent()->setValue(s, true, false); } else{ TQSize s = value.toSize(); @@ -100,13 +100,13 @@ SizeCustomProperty::setValue(const TQVariant &value, bool rememberOldValue) TQVariant SizeCustomProperty::value() const { - if(!m_property || !m_property->tqparent()) + if(!m_property || !m_property->parent()) return TQVariant(); if(m_property->type() == Size_Height) - return m_property->tqparent()->value().toSize().height(); + return m_property->parent()->value().toSize().height(); else if(m_property->type() == Size_Width) - return m_property->tqparent()->value().toSize().width(); + return m_property->parent()->value().toSize().width(); return TQVariant(); } @@ -146,15 +146,15 @@ PointCustomProperty::setValue(const TQVariant &value, bool rememberOldValue) if(!m_property) return; - if(m_property->tqparent()) { - TQPoint p = m_property->tqparent()->value().toPoint(); + if(m_property->parent()) { + TQPoint p = m_property->parent()->value().toPoint(); if(m_property->type() == Point_X) p.setX(value.toInt()); else if(m_property->type() == Point_Y) p.setY(value.toInt()); - m_property->tqparent()->setValue(p, true, false); + m_property->parent()->setValue(p, true, false); } else { TQPoint p = value.toPoint(); @@ -166,13 +166,13 @@ PointCustomProperty::setValue(const TQVariant &value, bool rememberOldValue) TQVariant PointCustomProperty::value() const { - if(!m_property || !m_property->tqparent()) + if(!m_property || !m_property->parent()) return TQVariant(); if(m_property->type() == Point_X) - return m_property->tqparent()->value().toPoint().x(); + return m_property->parent()->value().toPoint().x(); else if(m_property->type() == Point_Y) - return m_property->tqparent()->value().toPoint().y(); + return m_property->parent()->value().toPoint().y(); return TQVariant(); } @@ -214,8 +214,8 @@ RectCustomProperty::setValue(const TQVariant &value, bool rememberOldValue) if(!m_property) return; - if(m_property->tqparent()) { - TQRect r = m_property->tqparent()->value().toRect(); + if(m_property->parent()) { + TQRect r = m_property->parent()->value().toRect(); if(m_property->type() == Rect_X) { //changing x component of Rect shouldn't change width @@ -234,7 +234,7 @@ RectCustomProperty::setValue(const TQVariant &value, bool rememberOldValue) else if(m_property->type() == Rect_Height) r.setHeight(value.toInt()); - m_property->tqparent()->setValue(r, true, false); + m_property->parent()->setValue(r, true, false); } else { TQRect r = value.toRect(); @@ -248,17 +248,17 @@ RectCustomProperty::setValue(const TQVariant &value, bool rememberOldValue) TQVariant RectCustomProperty::value() const { - if(!m_property || !m_property->tqparent()) + if(!m_property || !m_property->parent()) return TQVariant(); if(m_property->type() == Rect_X) - return m_property->tqparent()->value().toRect().x(); + return m_property->parent()->value().toRect().x(); else if(m_property->type() == Rect_Y) - return m_property->tqparent()->value().toRect().y(); + return m_property->parent()->value().toRect().y(); else if(m_property->type() == Rect_Width) - return m_property->tqparent()->value().toRect().width(); + return m_property->parent()->value().toRect().width(); else if(m_property->type() == Rect_Height) - return m_property->tqparent()->value().toRect().height(); + return m_property->parent()->value().toRect().height(); return TQVariant(); } @@ -334,8 +334,8 @@ SizePolicyCustomProperty::setValue(const TQVariant &value, bool rememberOldValue if(!m_property) return; - if(m_property->tqparent()) { - TQSizePolicy v = m_property->tqparent()->value().toSizePolicy(); + if(m_property->parent()) { + TQSizePolicy v = m_property->parent()->value().toSizePolicy(); if(m_property->type() == SizePolicy_HorData) v.setHorData(TQSizePolicy::SizeType(value.toInt())); @@ -346,7 +346,7 @@ SizePolicyCustomProperty::setValue(const TQVariant &value, bool rememberOldValue else if(m_property->type() == SizePolicy_VerStretch) v.setVerStretch(value.toInt()); - m_property->tqparent()->setValue(v, true, false); + m_property->parent()->setValue(v, true, false); } else { TQSizePolicy v = value.toSizePolicy(); @@ -360,17 +360,17 @@ SizePolicyCustomProperty::setValue(const TQVariant &value, bool rememberOldValue TQVariant SizePolicyCustomProperty::value() const { - if(!m_property || !m_property->tqparent()) + if(!m_property || !m_property->parent()) return TQVariant(); if(m_property->type() == SizePolicy_HorData) - return m_property->tqparent()->value().toSizePolicy().horData(); + return m_property->parent()->value().toSizePolicy().horData(); else if(m_property->type() == SizePolicy_VerData) - return m_property->tqparent()->value().toSizePolicy().verData(); + return m_property->parent()->value().toSizePolicy().verData(); else if(m_property->type() == SizePolicy_HorStretch) - return m_property->tqparent()->value().toSizePolicy().horStretch(); + return m_property->parent()->value().toSizePolicy().horStretch(); else if(m_property->type() == SizePolicy_VerStretch) - return m_property->tqparent()->value().toSizePolicy().verStretch(); + return m_property->parent()->value().toSizePolicy().verStretch(); return TQVariant(); } |