QGIS/python/core/qgsxmlutils.sip
Nyall Dawson f6f5010131 Move QGis::UnitType to QgsUnitTypes::DistanceUnit
This change consolidates more unit handling and conversion into
QgsUnitTypes.

Additionally, UnknownUnit was renamed to UnknownDistanceUnit.
All methods which accepted QGis::UnitType parameters have been
updated to take QgsUnitTypes::DistanceUnit instead.

ALso remove the unit handling methods toLiteral, fromLiteral, tr,
fromTr, and fromUnitToUnitFactor from QGis. Their corresponding
counterparts in QgsUnitTypes should be used instead.
2016-07-25 14:47:16 +10:00

21 lines
522 B
Plaintext

/**
* Assorted helper methods for reading and writing chunks of XML
*/
class QgsXmlUtils
{
%TypeHeaderCode
#include <qgsxmlutils.h>
%End
public:
/* reading */
static QgsUnitTypes::DistanceUnit readMapUnits( const QDomElement& element );
static QgsRectangle readRectangle( const QDomElement& element );
/* writing */
static QDomElement writeMapUnits( QgsUnitTypes::DistanceUnit units, QDomDocument& doc );
static QDomElement writeRectangle( const QgsRectangle& rect, QDomDocument& doc );
};