Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Improved conversion of MapInfo line symbols
Many MapInfo line symbols don't translate well into OGR styles, so in order to improve the quality of the conversion this commit introduces a new QgsMapInfoSymbolConverter class which contains utility functions for converting MapInfo symbols by ID to their QGIS equivalent. Implemented for line symbols only for now.
- Loading branch information
1 parent
f9014ad
commit 1a4d7b0
Showing
12 changed files
with
1,292 additions
and
0 deletions.
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
python/core/auto_generated/symbology/qgsmapinfosymbolconverter.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/symbology/qgsmapinfosymbolconverter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsMapInfoSymbolConversionContext | ||
{ | ||
%Docstring(signature="appended") | ||
Context for a MapInfo symbol conversion operation. | ||
|
||
.. warning:: | ||
|
||
This is private API only, and may change in future QGIS versions | ||
|
||
.. versionadded:: 3.20 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsmapinfosymbolconverter.h" | ||
%End | ||
public: | ||
|
||
void pushWarning( const QString &warning ); | ||
%Docstring | ||
Pushes a ``warning`` message generated during the conversion. | ||
%End | ||
|
||
QStringList warnings() const; | ||
%Docstring | ||
Returns a list of warning messages generated during the conversion. | ||
%End | ||
|
||
void clearWarnings(); | ||
%Docstring | ||
Clears the list of warning messages. | ||
%End | ||
|
||
}; | ||
|
||
class QgsMapInfoSymbolConverter | ||
{ | ||
%Docstring(signature="appended") | ||
Handles conversion of MapInfo symbols to QGIS symbology. | ||
|
||
.. versionadded:: 3.20 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsmapinfosymbolconverter.h" | ||
%End | ||
public: | ||
|
||
static QgsLineSymbol *convertLineSymbol( int identifier, QgsMapInfoSymbolConversionContext &context, const QColor &foreColor, double size, QgsUnitTypes::RenderUnit sizeUnit, bool interleaved = false ) /Factory/; | ||
%Docstring | ||
Converts the MapInfo line symbol with the specified ``identifier`` to a :py:class:`QgsLineSymbol`. | ||
|
||
The caller takes ownership of the returned symbol. | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/symbology/qgsmapinfosymbolconverter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.