mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
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.
21 lines
522 B
Plaintext
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 );
|
|
};
|