@@ -77,45 +77,11 @@ namespace literal
7777 static const QLatin1String rotation (" rotation" );
7878 static const QLatin1String size (" size" );
7979 static const QLatin1String tags (" tags" );
80-
81- // object properties
82- // boolean operations
83- static const QLatin1String UndefinedSymbol (" .UndefinedSymbol" );
84- static const QLatin1String AreaTooSmall (" .AreaTooSmall" );
85- static const QLatin1String LineTooShort (" .LineTooShort" );
86- // comparisons
87- static const QLatin1String PaperArea (" .PaperArea" );
88- static const QLatin1String RealArea (" .RealArea" );
89- static const QLatin1String PaperLength (" .PaperLength" );
90- static const QLatin1String RealLength (" .RealLength" );
9180}
9281
9382
9483namespace OpenOrienteering {
9584
96- static const std::vector<QLatin1String> object_properties = {literal::UndefinedSymbol, literal::AreaTooSmall, literal::LineTooShort,
97- literal::PaperArea, literal::RealArea, literal::PaperLength, literal::RealLength};
98-
99- bool Object::isObjectProperty (const QString& property)
100- {
101- return std::find (object_properties.begin (), object_properties.end (), property) != object_properties.end ();
102- }
103-
104- bool Object::isBooleanObjectProperty (const QString& property)
105- {
106- return std::find (object_properties.begin (), object_properties.begin () + 3 , property) != object_properties.begin () + 3 ;
107- }
108-
109- bool Object::isComparisonObjectProperty (const QString& property)
110- {
111- return std::find (object_properties.begin () + 3 , object_properties.end (), property) != object_properties.end ();
112- }
113-
114- const std::vector<QLatin1String>& Object::getObjectProperties ()
115- {
116- return object_properties;
117- }
118-
11985// ### Object implementation ###
12086
12187Object::Object (Object::Type type, const Symbol* symbol)
@@ -789,17 +755,6 @@ void Object::includeControlPointsRect(QRectF& rect) const
789755}
790756
791757
792- QVariant Object::getObjectProperty (const QString& property) const
793- {
794- if (property == literal::UndefinedSymbol)
795- {
796- if (map && symbol)
797- return QVariant (map->findSymbolIndex (symbol) < 0 );
798- }
799-
800- return QVariant ();
801- }
802-
803758
804759// ### PathPart ###
805760
@@ -3265,32 +3220,6 @@ bool PathObject::isLineTooShort() const
32653220}
32663221
32673222
3268- // override
3269- QVariant PathObject::getObjectProperty (const QString& property) const
3270- {
3271- if (property == literal::AreaTooSmall)
3272- return QVariant (isAreaTooSmall ());
3273-
3274- if (property == literal::LineTooShort)
3275- return QVariant (isLineTooShort ());
3276-
3277- if (property == literal::PaperArea)
3278- return QVariant (calculatePaperArea ());
3279-
3280- if (property == literal::RealArea)
3281- return QVariant (calculateRealArea ());
3282-
3283- if (property == literal::PaperLength)
3284- return QVariant (getPaperLength ());
3285-
3286- if (property == literal::RealLength)
3287- return QVariant (getRealLength ());
3288-
3289- return Object::getObjectProperty (property); // pass to base class function
3290- }
3291-
3292-
3293-
32943223// ### PointObject ###
32953224
32963225PointObject::PointObject (const Symbol* symbol)
0 commit comments