mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
sipify batch
* QgsBearingUtils * QgsBrowserModel * QgsColorScheme, QgsColorSchemeRegistry * QgsContextHelp * QgsCoordinateReferenceSystem * QgsCoordinateTransform * QgsFeedback
This commit is contained in:
parent
6e7b753ceb
commit
10d34ece02
@ -2,13 +2,6 @@ core/conversions.sip
|
|||||||
core/qgsexception.sip
|
core/qgsexception.sip
|
||||||
core/qgis.sip
|
core/qgis.sip
|
||||||
core/qgsapplication.sip
|
core/qgsapplication.sip
|
||||||
core/qgsbearingutils.sip
|
|
||||||
core/qgsbrowsermodel.sip
|
|
||||||
core/qgscolorscheme.sip
|
|
||||||
core/qgscolorschemeregistry.sip
|
|
||||||
core/qgscontexthelp.sip
|
|
||||||
core/qgscoordinatereferencesystem.sip
|
|
||||||
core/qgscoordinatetransform.sip
|
|
||||||
core/qgscredentials.sip
|
core/qgscredentials.sip
|
||||||
core/qgscrscache.sip
|
core/qgscrscache.sip
|
||||||
core/qgsdataitem.sip
|
core/qgsdataitem.sip
|
||||||
@ -28,7 +21,6 @@ core/qgsexpressioncontextgenerator.sip
|
|||||||
core/qgsfeaturefilterprovider.sip
|
core/qgsfeaturefilterprovider.sip
|
||||||
core/qgsfeatureiterator.sip
|
core/qgsfeatureiterator.sip
|
||||||
core/qgsfeaturerequest.sip
|
core/qgsfeaturerequest.sip
|
||||||
core/qgsfeedback.sip
|
|
||||||
core/qgsfield.sip
|
core/qgsfield.sip
|
||||||
core/qgsfieldconstraints.sip
|
core/qgsfieldconstraints.sip
|
||||||
core/qgsfields.sip
|
core/qgsfields.sip
|
||||||
|
@ -1,21 +1,42 @@
|
|||||||
/**
|
/************************************************************************
|
||||||
* \class QgsBearingUtils
|
* This file has been generated automatically from *
|
||||||
* \ingroup core
|
* *
|
||||||
* Utilities for calculating bearings and directions.
|
* src/core/qgsbearingutils.h *
|
||||||
* \note Added in version 2.18
|
* *
|
||||||
*/
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QgsBearingUtils
|
class QgsBearingUtils
|
||||||
{
|
{
|
||||||
|
%Docstring
|
||||||
|
Utilities for calculating bearings and directions.
|
||||||
|
.. versionadded:: 2.18
|
||||||
|
%End
|
||||||
|
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgsbearingutils.h>
|
#include "qgsbearingutils.h"
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
static double bearingTrueNorth( const QgsCoordinateReferenceSystem &crs,
|
||||||
* Returns the direction to true north from a specified point and for a specified
|
const QgsPoint &point );
|
||||||
* coordinate reference system. The returned value is in degrees clockwise from
|
%Docstring
|
||||||
* vertical. An exception will be thrown if the bearing could not be calculated.
|
Returns the direction to true north from a specified point and for a specified
|
||||||
*/
|
coordinate reference system. The returned value is in degrees clockwise from
|
||||||
static double bearingTrueNorth( const QgsCoordinateReferenceSystem& crs,
|
vertical. An exception will be thrown if the bearing could not be calculated.
|
||||||
const QgsPoint& point );
|
:rtype: float
|
||||||
|
%End
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* This file has been generated automatically from *
|
||||||
|
* *
|
||||||
|
* src/core/qgsbearingutils.h *
|
||||||
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
@ -1,121 +1,191 @@
|
|||||||
|
/************************************************************************
|
||||||
|
* This file has been generated automatically from *
|
||||||
|
* *
|
||||||
|
* src/core/qgsbrowsermodel.h *
|
||||||
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QgsBrowserModel : QAbstractItemModel
|
class QgsBrowserModel : QAbstractItemModel
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
|
||||||
#include <qgsbrowsermodel.h>
|
|
||||||
%End
|
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsbrowsermodel.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
explicit QgsBrowserModel( QObject *parent = 0 );
|
explicit QgsBrowserModel( QObject *parent = 0 );
|
||||||
~QgsBrowserModel();
|
~QgsBrowserModel();
|
||||||
|
|
||||||
enum ItemDataRole
|
enum ItemDataRole
|
||||||
{
|
{
|
||||||
PathRole, /*!< Item path used to access path in the tree, see QgsDataItem::mPath */
|
PathRole
|
||||||
CommentRole, /*!< Item comment */
|
CommentRole
|
||||||
};
|
};
|
||||||
// implemented methods from QAbstractItemModel for read-only access
|
|
||||||
|
|
||||||
/** Used by other components to obtain information about each item provided by the model.
|
|
||||||
In many models, the combination of flags should include Qt::ItemIsEnabled and Qt::ItemIsSelectable. */
|
|
||||||
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
|
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
|
||||||
|
%Docstring
|
||||||
|
Used by other components to obtain information about each item provided by the model.
|
||||||
|
In many models, the combination of flags should include Qt.ItemIsEnabled and Qt.ItemIsSelectable. *
|
||||||
|
:rtype: Qt.ItemFlags
|
||||||
|
%End
|
||||||
|
|
||||||
/** Used to supply item data to views and delegates. Generally, models only need to supply data
|
|
||||||
for Qt::DisplayRole and any application-specific user roles, but it is also good practice
|
|
||||||
to provide data for Qt::ToolTipRole, Qt::AccessibleTextRole, and Qt::AccessibleDescriptionRole.
|
|
||||||
See the Qt::ItemDataRole enum documentation for information about the types associated with each role. */
|
|
||||||
virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const;
|
virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const;
|
||||||
|
%Docstring
|
||||||
|
Used to supply item data to views and delegates. Generally, models only need to supply data
|
||||||
|
for Qt.DisplayRole and any application-specific user roles, but it is also good practice
|
||||||
|
to provide data for Qt.ToolTipRole, Qt.AccessibleTextRole, and Qt.AccessibleDescriptionRole.
|
||||||
|
See the Qt.ItemDataRole enum documentation for information about the types associated with each role. *
|
||||||
|
:rtype: QVariant
|
||||||
|
%End
|
||||||
|
|
||||||
/** Provides views with information to show in their headers. The information is only retrieved
|
|
||||||
by views that can display header information. */
|
|
||||||
virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
|
virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
|
||||||
|
%Docstring
|
||||||
|
Provides views with information to show in their headers. The information is only retrieved
|
||||||
|
by views that can display header information. *
|
||||||
|
:rtype: QVariant
|
||||||
|
%End
|
||||||
|
|
||||||
/** Provides the number of rows of data exposed by the model. */
|
|
||||||
virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;
|
virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;
|
||||||
|
%Docstring
|
||||||
|
Provides the number of rows of data exposed by the model.
|
||||||
|
:rtype: int
|
||||||
|
%End
|
||||||
|
|
||||||
/** Provides the number of columns of data exposed by the model. List models do not provide this function
|
|
||||||
because it is already implemented in QAbstractListModel. */
|
|
||||||
virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;
|
virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;
|
||||||
|
%Docstring
|
||||||
|
Provides the number of columns of data exposed by the model. List models do not provide this function
|
||||||
|
because it is already implemented in QAbstractListModel. *
|
||||||
|
:rtype: int
|
||||||
|
%End
|
||||||
|
|
||||||
/** Returns the index of the item in the model specified by the given row, column and parent index. */
|
virtual QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const;
|
||||||
virtual QModelIndex index( int row, int column, const QModelIndex & parent = QModelIndex() ) const;
|
%Docstring
|
||||||
|
Returns the index of the item in the model specified by the given row, column and parent index.
|
||||||
|
:rtype: QModelIndex
|
||||||
|
%End
|
||||||
|
|
||||||
QModelIndex findItem( QgsDataItem *item, QgsDataItem *parent = 0 ) const;
|
QModelIndex findItem( QgsDataItem *item, QgsDataItem *parent = 0 ) const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: QModelIndex
|
||||||
|
%End
|
||||||
|
|
||||||
/** Returns the parent of the model item with the given index.
|
|
||||||
* If the item has no parent, an invalid QModelIndex is returned.
|
|
||||||
*/
|
|
||||||
virtual QModelIndex parent( const QModelIndex &index ) const;
|
virtual QModelIndex parent( const QModelIndex &index ) const;
|
||||||
|
%Docstring
|
||||||
|
Returns the parent of the model item with the given index.
|
||||||
|
If the item has no parent, an invalid QModelIndex is returned.
|
||||||
|
:rtype: QModelIndex
|
||||||
|
%End
|
||||||
|
|
||||||
/** Returns a list of mime that can describe model indexes */
|
|
||||||
virtual QStringList mimeTypes() const;
|
virtual QStringList mimeTypes() const;
|
||||||
|
%Docstring
|
||||||
|
Returns a list of mime that can describe model indexes
|
||||||
|
:rtype: list of str
|
||||||
|
%End
|
||||||
|
|
||||||
/** Returns an object that contains serialized items of data corresponding to the list of indexes specified */
|
virtual QMimeData *mimeData( const QModelIndexList &indexes ) const;
|
||||||
virtual QMimeData * mimeData( const QModelIndexList &indexes ) const;
|
%Docstring
|
||||||
|
Returns an object that contains serialized items of data corresponding to the list of indexes specified
|
||||||
|
:rtype: QMimeData
|
||||||
|
%End
|
||||||
|
|
||||||
/** Handles the data supplied by a drag and drop operation that ended with the given action */
|
virtual bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent );
|
||||||
virtual bool dropMimeData( const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent );
|
%Docstring
|
||||||
|
Handles the data supplied by a drag and drop operation that ended with the given action
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
QgsDataItem *dataItem( const QModelIndex &idx ) const;
|
QgsDataItem *dataItem( const QModelIndex &idx ) const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: QgsDataItem
|
||||||
|
%End
|
||||||
|
|
||||||
bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
|
virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
|
||||||
|
|
||||||
//! Refresh item specified by path
|
|
||||||
void refresh( const QString& path );
|
|
||||||
|
|
||||||
//! Refresh item children
|
void refresh( const QString &path );
|
||||||
|
%Docstring
|
||||||
|
Refresh item specified by path
|
||||||
|
%End
|
||||||
|
|
||||||
void refresh( const QModelIndex &index = QModelIndex() );
|
void refresh( const QModelIndex &index = QModelIndex() );
|
||||||
|
%Docstring
|
||||||
|
Refresh item children
|
||||||
|
%End
|
||||||
|
|
||||||
/** Return index of item with given path. It only searches in currently fetched
|
QModelIndex findPath( const QString &path, Qt::MatchFlag matchFlag = Qt::MatchExactly );
|
||||||
* items, i.e. it does not fetch children.
|
%Docstring
|
||||||
* @param path item path
|
Return index of item with given path. It only searches in currently fetched
|
||||||
* @param matchFlag supported is Qt::MatchExactly and Qt::MatchStartsWith which has reverse meaning, i.e. find
|
items, i.e. it does not fetch children.
|
||||||
* item with the longest match from start with path (to get as close/deep as possible to deleted item).
|
\param path item path
|
||||||
* @return model index, invalid if item not found */
|
\param matchFlag supported is Qt.MatchExactly and Qt.MatchStartsWith which has reverse meaning, i.e. find
|
||||||
QModelIndex findPath( const QString& path, Qt::MatchFlag matchFlag = Qt::MatchExactly );
|
item with the longest match from start with path (to get as close/deep as possible to deleted item).
|
||||||
|
:return: model index, invalid if item not found *
|
||||||
|
:rtype: QModelIndex
|
||||||
|
%End
|
||||||
|
|
||||||
//! @note not available in python bindings
|
|
||||||
// static QModelIndex findPath( QAbstractItemModel *model, const QString& path, Qt::MatchFlag matchFlag = Qt::MatchExactly );
|
|
||||||
|
|
||||||
void connectItem( QgsDataItem *item );
|
void connectItem( QgsDataItem *item );
|
||||||
|
|
||||||
bool canFetchMore( const QModelIndex & parent ) const;
|
virtual bool canFetchMore( const QModelIndex &parent ) const;
|
||||||
void fetchMore( const QModelIndex & parent );
|
|
||||||
|
virtual void fetchMore( const QModelIndex &parent );
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
/** Emitted when item children fetch was finished */
|
void stateChanged( const QModelIndex &index, QgsDataItem::State oldState );
|
||||||
void stateChanged( const QModelIndex & index, QgsDataItem::State oldState );
|
%Docstring
|
||||||
|
Emitted when item children fetch was finished
|
||||||
|
%End
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
//! Reload the whole model
|
|
||||||
void reload();
|
void reload();
|
||||||
|
%Docstring
|
||||||
|
Reload the whole model
|
||||||
|
%End
|
||||||
void beginInsertItems( QgsDataItem *parent, int first, int last );
|
void beginInsertItems( QgsDataItem *parent, int first, int last );
|
||||||
void endInsertItems();
|
void endInsertItems();
|
||||||
void beginRemoveItems( QgsDataItem *parent, int first, int last );
|
void beginRemoveItems( QgsDataItem *parent, int first, int last );
|
||||||
void endRemoveItems();
|
void endRemoveItems();
|
||||||
void itemDataChanged( QgsDataItem * item );
|
void itemDataChanged( QgsDataItem *item );
|
||||||
void itemStateChanged( QgsDataItem * item, QgsDataItem::State oldState );
|
void itemStateChanged( QgsDataItem *item, QgsDataItem::State oldState );
|
||||||
|
|
||||||
/**
|
void addFavoriteDirectory( const QString &directory );
|
||||||
* Adds a directory to the favorites group.
|
%Docstring
|
||||||
* @note added in QGIS 3.0
|
Adds a directory to the favorites group.
|
||||||
* @see removeFavorite()
|
.. versionadded:: 3.0
|
||||||
*/
|
\see removeFavorite()
|
||||||
void addFavoriteDirectory( const QString& directory );
|
%End
|
||||||
|
|
||||||
/**
|
|
||||||
* Removes a favorite directory from its corresponding model index.
|
|
||||||
* @note added in QGIS 3.0
|
|
||||||
* @see addFavoriteDirectory()
|
|
||||||
*/
|
|
||||||
void removeFavorite( const QModelIndex &index );
|
void removeFavorite( const QModelIndex &index );
|
||||||
|
%Docstring
|
||||||
|
Removes a favorite directory from its corresponding model index.
|
||||||
|
.. versionadded:: 3.0
|
||||||
|
\see addFavoriteDirectory()
|
||||||
|
%End
|
||||||
|
|
||||||
void updateProjectHome();
|
void updateProjectHome();
|
||||||
|
|
||||||
/** Hide the given path in the browser model */
|
|
||||||
void hidePath( QgsDataItem *item );
|
void hidePath( QgsDataItem *item );
|
||||||
|
%Docstring
|
||||||
|
Hide the given path in the browser model
|
||||||
|
%End
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! Populates the model
|
|
||||||
void addRootItems();
|
void addRootItems();
|
||||||
|
%Docstring
|
||||||
|
Populates the model
|
||||||
|
%End
|
||||||
void removeRootItems();
|
void removeRootItems();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* This file has been generated automatically from *
|
||||||
|
* *
|
||||||
|
* src/core/qgsbrowsermodel.h *
|
||||||
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
@ -1,115 +1,137 @@
|
|||||||
/** List of colors paired with a friendly display name identifying the color*/
|
/************************************************************************
|
||||||
|
* This file has been generated automatically from *
|
||||||
|
* *
|
||||||
|
* src/core/qgscolorscheme.h *
|
||||||
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef QList< QPair< QColor, QString > > QgsNamedColorList;
|
typedef QList< QPair< QColor, QString > > QgsNamedColorList;
|
||||||
|
|
||||||
/** \ingroup core
|
|
||||||
* \class QgsColorScheme
|
|
||||||
* \brief Abstract base class for color schemes
|
|
||||||
*
|
|
||||||
* A color scheme for display in QgsColorButton. Color schemes return lists
|
|
||||||
* of colors with an optional associated color name. The colors returned
|
|
||||||
* can be generated using an optional base color.
|
|
||||||
* \note Added in version 2.5
|
|
||||||
*/
|
|
||||||
class QgsColorScheme
|
class QgsColorScheme
|
||||||
{
|
{
|
||||||
|
%Docstring
|
||||||
|
Abstract base class for color schemes
|
||||||
|
|
||||||
|
A color scheme for display in QgsColorButton. Color schemes return lists
|
||||||
|
of colors with an optional associated color name. The colors returned
|
||||||
|
can be generated using an optional base color.
|
||||||
|
.. versionadded:: 2.5
|
||||||
|
%End
|
||||||
|
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgscolorscheme.h>
|
#include "qgscolorscheme.h"
|
||||||
%End
|
%End
|
||||||
|
|
||||||
%ConvertToSubClassCode
|
%ConvertToSubClassCode
|
||||||
if (dynamic_cast<QgsUserColorScheme*>(sipCpp) != NULL)
|
if ( dynamic_cast<QgsUserColorScheme *>( sipCpp ) != NULL )
|
||||||
sipType = sipType_QgsUserColorScheme;
|
sipType = sipType_QgsUserColorScheme;
|
||||||
else if (dynamic_cast<QgsRecentColorScheme*>(sipCpp) != NULL)
|
else if ( dynamic_cast<QgsRecentColorScheme *>( sipCpp ) != NULL )
|
||||||
sipType = sipType_QgsRecentColorScheme;
|
sipType = sipType_QgsRecentColorScheme;
|
||||||
else if (dynamic_cast<QgsCustomColorScheme*>(sipCpp) != NULL)
|
else if ( dynamic_cast<QgsCustomColorScheme *>( sipCpp ) != NULL )
|
||||||
sipType = sipType_QgsCustomColorScheme;
|
sipType = sipType_QgsCustomColorScheme;
|
||||||
else if (dynamic_cast<QgsProjectColorScheme*>(sipCpp) != NULL)
|
else if ( dynamic_cast<QgsProjectColorScheme *>( sipCpp ) != NULL )
|
||||||
sipType = sipType_QgsProjectColorScheme;
|
sipType = sipType_QgsProjectColorScheme;
|
||||||
else if (dynamic_cast<QgsGplColorScheme*>(sipCpp) != NULL)
|
else if ( dynamic_cast<QgsGplColorScheme *>( sipCpp ) != NULL )
|
||||||
sipType = sipType_QgsGplColorScheme;
|
sipType = sipType_QgsGplColorScheme;
|
||||||
else
|
else
|
||||||
sipType = sipType_QgsColorScheme;
|
sipType = sipType_QgsColorScheme;
|
||||||
%End
|
%End
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/** Flags for controlling behavior of color scheme
|
|
||||||
*/
|
|
||||||
enum SchemeFlag
|
enum SchemeFlag
|
||||||
{
|
{
|
||||||
ShowInColorDialog, /*!< show scheme in color picker dialog */
|
ShowInColorDialog,
|
||||||
ShowInColorButtonMenu, /*!< show scheme in color button drop down menu */
|
ShowInColorButtonMenu,
|
||||||
ShowInAllContexts /*!< show scheme in all contexts */
|
ShowInAllContexts
|
||||||
};
|
};
|
||||||
typedef QFlags<QgsColorScheme::SchemeFlag> SchemeFlags;
|
typedef QFlags<QgsColorScheme::SchemeFlag> SchemeFlags;
|
||||||
|
|
||||||
|
|
||||||
QgsColorScheme();
|
QgsColorScheme();
|
||||||
|
%Docstring
|
||||||
|
Constructor for QgsColorScheme.
|
||||||
|
%End
|
||||||
|
|
||||||
virtual ~QgsColorScheme();
|
virtual ~QgsColorScheme();
|
||||||
|
|
||||||
/** Gets the name for the color scheme
|
|
||||||
* @returns color scheme name
|
|
||||||
*/
|
|
||||||
virtual QString schemeName() const = 0;
|
virtual QString schemeName() const = 0;
|
||||||
|
%Docstring
|
||||||
|
Gets the name for the color scheme
|
||||||
|
:return: color scheme name
|
||||||
|
:rtype: str
|
||||||
|
%End
|
||||||
|
|
||||||
/** Returns the current flags for the color scheme.
|
|
||||||
* @returns current flags
|
|
||||||
*/
|
|
||||||
virtual SchemeFlags flags() const;
|
virtual SchemeFlags flags() const;
|
||||||
|
%Docstring
|
||||||
|
Returns the current flags for the color scheme.
|
||||||
|
:return: current flags
|
||||||
|
:rtype: SchemeFlags
|
||||||
|
%End
|
||||||
|
|
||||||
/** Gets a list of colors from the scheme. The colors can optionally
|
|
||||||
* be generated using the supplied context and base color.
|
|
||||||
* @param context string specifying an optional context for the returned
|
|
||||||
* colors. For instance, a "recent colors" scheme may filter returned colors
|
|
||||||
* by context so that colors used only in a "composer" context are returned.
|
|
||||||
* @param baseColor base color for the scheme's colors. Some color schemes
|
|
||||||
* may take advantage of this to filter or modify their returned colors
|
|
||||||
* to colors related to the base color.
|
|
||||||
* @returns a list of QPairs of color and color name
|
|
||||||
*/
|
|
||||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||||
const QColor &baseColor = QColor() ) = 0;
|
const QColor &baseColor = QColor() ) = 0;
|
||||||
|
%Docstring
|
||||||
|
Gets a list of colors from the scheme. The colors can optionally
|
||||||
|
be generated using the supplied context and base color.
|
||||||
|
\param context string specifying an optional context for the returned
|
||||||
|
colors. For instance, a "recent colors" scheme may filter returned colors
|
||||||
|
by context so that colors used only in a "composer" context are returned.
|
||||||
|
\param baseColor base color for the scheme's colors. Some color schemes
|
||||||
|
may take advantage of this to filter or modify their returned colors
|
||||||
|
to colors related to the base color.
|
||||||
|
:return: a list of QPairs of color and color name
|
||||||
|
:rtype: QgsNamedColorList
|
||||||
|
%End
|
||||||
|
|
||||||
/** Returns whether the color scheme is editable
|
|
||||||
* @returns true if scheme is editable
|
|
||||||
* @see setColors
|
|
||||||
*/
|
|
||||||
virtual bool isEditable() const;
|
virtual bool isEditable() const;
|
||||||
|
%Docstring
|
||||||
|
Returns whether the color scheme is editable
|
||||||
|
:return: true if scheme is editable
|
||||||
|
\see setColors
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
/** Sets the colors for the scheme. This method is only valid for editable color schemes.
|
|
||||||
* @param colors list of colors for the scheme
|
|
||||||
* @param context to set colors for
|
|
||||||
* @param baseColor base color to set colors for
|
|
||||||
* @returns true if colors were set successfully
|
|
||||||
* @see isEditable
|
|
||||||
*/
|
|
||||||
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||||
|
%Docstring
|
||||||
|
Sets the colors for the scheme. This method is only valid for editable color schemes.
|
||||||
|
\param colors list of colors for the scheme
|
||||||
|
\param context to set colors for
|
||||||
|
\param baseColor base color to set colors for
|
||||||
|
:return: true if colors were set successfully
|
||||||
|
\see isEditable
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
/** Clones a color scheme
|
virtual QgsColorScheme *clone() const = 0 /Factory/;
|
||||||
* @returns copy of color scheme
|
%Docstring
|
||||||
*/
|
Clones a color scheme
|
||||||
virtual QgsColorScheme* clone() const = 0 /Factory/;
|
:return: copy of color scheme
|
||||||
}; // class QgsColorScheme
|
:rtype: QgsColorScheme
|
||||||
|
%End
|
||||||
|
};
|
||||||
|
|
||||||
QFlags<QgsColorScheme::SchemeFlag> operator|(QgsColorScheme::SchemeFlag f1, QFlags<QgsColorScheme::SchemeFlag> f2);
|
QFlags<QgsColorScheme::SchemeFlag> operator|(QgsColorScheme::SchemeFlag f1, QFlags<QgsColorScheme::SchemeFlag> f2);
|
||||||
|
|
||||||
/** \ingroup core
|
|
||||||
* \class QgsGplColorScheme
|
|
||||||
* \brief A color scheme which stores its colors in a gpl palette file.
|
|
||||||
* \note Added in version 2.5
|
|
||||||
*/
|
|
||||||
class QgsGplColorScheme : QgsColorScheme
|
class QgsGplColorScheme : QgsColorScheme
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgscolorscheme.h>
|
A color scheme which stores its colors in a gpl palette file.
|
||||||
|
.. versionadded:: 2.5
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgscolorscheme.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
QgsGplColorScheme();
|
QgsGplColorScheme();
|
||||||
|
|
||||||
virtual ~QgsGplColorScheme();
|
|
||||||
|
|
||||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||||
const QColor &baseColor = QColor() );
|
const QColor &baseColor = QColor() );
|
||||||
|
|
||||||
@ -117,81 +139,84 @@ class QgsGplColorScheme : QgsColorScheme
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/** Returns the file path for the associated gpl palette file
|
|
||||||
* @returns gpl file path
|
|
||||||
*/
|
|
||||||
virtual QString gplFilePath() = 0;
|
virtual QString gplFilePath() = 0;
|
||||||
|
%Docstring
|
||||||
|
Returns the file path for the associated gpl palette file
|
||||||
|
:return: gpl file path
|
||||||
|
:rtype: str
|
||||||
|
%End
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \ingroup core
|
|
||||||
* \class QgsUserColorScheme
|
|
||||||
* \brief A color scheme which stores its colors in a gpl palette file within the "palettes"
|
|
||||||
* subfolder off the user's QGIS settings folder.
|
|
||||||
* \note Added in version 2.5
|
|
||||||
*/
|
|
||||||
class QgsUserColorScheme : QgsGplColorScheme
|
class QgsUserColorScheme : QgsGplColorScheme
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgscolorscheme.h>
|
A color scheme which stores its colors in a gpl palette file within the "palettes"
|
||||||
|
subfolder off the user's QGIS settings folder.
|
||||||
|
.. versionadded:: 2.5
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgscolorscheme.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/** Constructs a new user color scheme, using a specified gpl palette file
|
|
||||||
* @param filename filename of gpl palette file stored in the users "palettes" folder
|
|
||||||
*/
|
|
||||||
QgsUserColorScheme( const QString &filename );
|
QgsUserColorScheme( const QString &filename );
|
||||||
|
%Docstring
|
||||||
virtual ~QgsUserColorScheme();
|
Constructs a new user color scheme, using a specified gpl palette file
|
||||||
|
\param filename filename of gpl palette file stored in the users "palettes" folder
|
||||||
|
%End
|
||||||
|
|
||||||
virtual QString schemeName() const;
|
virtual QString schemeName() const;
|
||||||
|
|
||||||
virtual QgsUserColorScheme* clone() const /Factory/;
|
virtual QgsUserColorScheme *clone() const /Factory/;
|
||||||
|
|
||||||
virtual bool isEditable() const;
|
virtual bool isEditable() const;
|
||||||
|
|
||||||
virtual QgsColorScheme::SchemeFlags flags() const;
|
virtual QgsColorScheme::SchemeFlags flags() const;
|
||||||
|
|
||||||
/** Sets the name for the scheme
|
|
||||||
* @param name new name
|
|
||||||
*/
|
|
||||||
void setName( const QString &name );
|
void setName( const QString &name );
|
||||||
|
%Docstring
|
||||||
|
Sets the name for the scheme
|
||||||
|
\param name new name
|
||||||
|
%End
|
||||||
|
|
||||||
/** Erases the associated gpl palette file from the users "palettes" folder
|
|
||||||
* @returns true if erase was successful
|
|
||||||
*/
|
|
||||||
bool erase();
|
bool erase();
|
||||||
|
%Docstring
|
||||||
|
Erases the associated gpl palette file from the users "palettes" folder
|
||||||
|
:return: true if erase was successful
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
/** Sets whether a this scheme should be shown in color button menus.
|
|
||||||
* @param show set to true to show in color button menus, or false to hide from menus
|
|
||||||
* @note added in QGIS 3.0
|
|
||||||
*/
|
|
||||||
void setShowSchemeInMenu( bool show );
|
void setShowSchemeInMenu( bool show );
|
||||||
|
%Docstring
|
||||||
|
Sets whether a this scheme should be shown in color button menus.
|
||||||
|
\param show set to true to show in color button menus, or false to hide from menus
|
||||||
|
.. versionadded:: 3.0
|
||||||
|
%End
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual QString gplFilePath();
|
virtual QString gplFilePath();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \ingroup core
|
|
||||||
* \class QgsRecentColorScheme
|
|
||||||
* \brief A color scheme which contains the most recently used colors.
|
|
||||||
* \note Added in version 2.5
|
|
||||||
*/
|
|
||||||
class QgsRecentColorScheme : QgsColorScheme
|
class QgsRecentColorScheme : QgsColorScheme
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgscolorscheme.h>
|
A color scheme which contains the most recently used colors.
|
||||||
|
.. versionadded:: 2.5
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgscolorscheme.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
QgsRecentColorScheme();
|
QgsRecentColorScheme();
|
||||||
|
|
||||||
virtual ~QgsRecentColorScheme();
|
|
||||||
|
|
||||||
virtual QString schemeName() const;
|
virtual QString schemeName() const;
|
||||||
|
|
||||||
virtual SchemeFlags flags() const;
|
virtual SchemeFlags flags() const;
|
||||||
@ -199,39 +224,40 @@ class QgsRecentColorScheme : QgsColorScheme
|
|||||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||||
const QColor &baseColor = QColor() );
|
const QColor &baseColor = QColor() );
|
||||||
|
|
||||||
virtual QgsRecentColorScheme* clone() const /Factory/;
|
virtual QgsRecentColorScheme *clone() const /Factory/;
|
||||||
|
|
||||||
/** Adds a color to the list of recent colors.
|
|
||||||
* @param color color to add
|
|
||||||
* @note added in QGIS 2.14
|
|
||||||
* @see lastUsedColor()
|
|
||||||
*/
|
|
||||||
static void addRecentColor( const QColor& color );
|
|
||||||
|
|
||||||
/** Returns the most recently used color.
|
static void addRecentColor( const QColor &color );
|
||||||
* @note added in QGIS 3.0
|
%Docstring
|
||||||
* @see addRecentColor()
|
Adds a color to the list of recent colors.
|
||||||
*/
|
\param color color to add
|
||||||
static QColor lastUsedColor();
|
.. versionadded:: 2.14
|
||||||
};
|
\see lastUsedColor()
|
||||||
|
|
||||||
/** \ingroup core
|
|
||||||
* \class QgsCustomColorScheme
|
|
||||||
* \brief A color scheme which contains custom colors set through QGIS app options dialog.
|
|
||||||
* \note Added in version 2.5
|
|
||||||
*/
|
|
||||||
class QgsCustomColorScheme : QgsColorScheme
|
|
||||||
{
|
|
||||||
%TypeHeaderCode
|
|
||||||
#include <qgscolorscheme.h>
|
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
static QColor lastUsedColor();
|
||||||
|
%Docstring
|
||||||
|
Returns the most recently used color.
|
||||||
|
.. versionadded:: 3.0
|
||||||
|
\see addRecentColor()
|
||||||
|
:rtype: QColor
|
||||||
|
%End
|
||||||
|
};
|
||||||
|
|
||||||
|
class QgsCustomColorScheme : QgsColorScheme
|
||||||
|
{
|
||||||
|
%Docstring
|
||||||
|
A color scheme which contains custom colors set through QGIS app options dialog.
|
||||||
|
.. versionadded:: 2.5
|
||||||
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgscolorscheme.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
QgsCustomColorScheme();
|
QgsCustomColorScheme();
|
||||||
|
|
||||||
virtual ~QgsCustomColorScheme();
|
|
||||||
|
|
||||||
virtual QString schemeName() const;
|
virtual QString schemeName() const;
|
||||||
|
|
||||||
virtual SchemeFlags flags() const;
|
virtual SchemeFlags flags() const;
|
||||||
@ -243,25 +269,24 @@ class QgsCustomColorScheme : QgsColorScheme
|
|||||||
|
|
||||||
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||||
|
|
||||||
virtual QgsCustomColorScheme* clone() const /Factory/;
|
virtual QgsCustomColorScheme *clone() const /Factory/;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \ingroup core
|
|
||||||
* \class QgsProjectColorScheme
|
|
||||||
* \brief A color scheme which contains project specific colors set through project properties dialog.
|
|
||||||
* \note Added in version 2.5
|
|
||||||
*/
|
|
||||||
class QgsProjectColorScheme : QgsColorScheme
|
class QgsProjectColorScheme : QgsColorScheme
|
||||||
{
|
{
|
||||||
|
%Docstring
|
||||||
|
A color scheme which contains project specific colors set through project properties dialog.
|
||||||
|
.. versionadded:: 2.5
|
||||||
|
%End
|
||||||
|
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgscolorscheme.h>
|
#include "qgscolorscheme.h"
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
QgsProjectColorScheme();
|
QgsProjectColorScheme();
|
||||||
|
|
||||||
virtual ~QgsProjectColorScheme();
|
|
||||||
|
|
||||||
virtual QString schemeName() const;
|
virtual QString schemeName() const;
|
||||||
|
|
||||||
virtual SchemeFlags flags() const;
|
virtual SchemeFlags flags() const;
|
||||||
@ -273,5 +298,14 @@ class QgsProjectColorScheme : QgsColorScheme
|
|||||||
|
|
||||||
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||||
|
|
||||||
virtual QgsProjectColorScheme* clone() const /Factory/;
|
virtual QgsProjectColorScheme *clone() const /Factory/;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* This file has been generated automatically from *
|
||||||
|
* *
|
||||||
|
* src/core/qgscolorscheme.h *
|
||||||
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
@ -1,74 +1,102 @@
|
|||||||
|
/************************************************************************
|
||||||
|
* This file has been generated automatically from *
|
||||||
|
* *
|
||||||
|
* src/core/qgscolorschemeregistry.h *
|
||||||
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** \ingroup core
|
|
||||||
* \class QgsColorSchemeRegistry
|
|
||||||
* \brief Registry of color schemes
|
|
||||||
*
|
|
||||||
* A registry of QgsColorScheme color schemes. This class can be created directly, or
|
|
||||||
* accessed via a global instance.
|
|
||||||
* \note Added in version 2.5
|
|
||||||
*/
|
|
||||||
class QgsColorSchemeRegistry
|
class QgsColorSchemeRegistry
|
||||||
{
|
{
|
||||||
|
%Docstring
|
||||||
|
Registry of color schemes
|
||||||
|
|
||||||
|
A registry of QgsColorScheme color schemes. This class can be created directly, or
|
||||||
|
accessed via a QgsApplication.colorSchemeRegistry().
|
||||||
|
.. versionadded:: 2.5
|
||||||
|
%End
|
||||||
|
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgscolorschemeregistry.h>
|
#include "qgscolorschemeregistry.h"
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/** Constructor for an empty color scheme registry
|
|
||||||
*/
|
|
||||||
QgsColorSchemeRegistry();
|
QgsColorSchemeRegistry();
|
||||||
|
%Docstring
|
||||||
|
Constructor for an empty color scheme registry
|
||||||
|
%End
|
||||||
|
|
||||||
virtual ~QgsColorSchemeRegistry();
|
virtual ~QgsColorSchemeRegistry();
|
||||||
|
|
||||||
/** Adds all color schemes from the global instance to this color scheme.
|
|
||||||
* @see addDefaultSchemes
|
|
||||||
* @see addColorScheme
|
|
||||||
*/
|
|
||||||
void populateFromInstance();
|
void populateFromInstance();
|
||||||
|
%Docstring
|
||||||
|
Adds all color schemes from the global instance to this color scheme.
|
||||||
|
\see addDefaultSchemes
|
||||||
|
\see addColorScheme
|
||||||
|
%End
|
||||||
|
|
||||||
/** Adds all default color schemes to this color scheme.
|
|
||||||
* @see populateFromInstance
|
|
||||||
* @see addColorScheme
|
|
||||||
* @see addUserSchemes
|
|
||||||
*/
|
|
||||||
void addDefaultSchemes();
|
void addDefaultSchemes();
|
||||||
|
%Docstring
|
||||||
|
Adds all default color schemes to this color scheme.
|
||||||
|
\see populateFromInstance
|
||||||
|
\see addColorScheme
|
||||||
|
\see addUserSchemes
|
||||||
|
%End
|
||||||
|
|
||||||
/** Creates schemes for all gpl palettes in the user's palettes folder.
|
|
||||||
* @see populateFromInstance
|
|
||||||
* @see addDefaultSchemes
|
|
||||||
* @see addColorScheme
|
|
||||||
*/
|
|
||||||
void addUserSchemes();
|
void addUserSchemes();
|
||||||
|
%Docstring
|
||||||
|
Creates schemes for all gpl palettes in the user's palettes folder.
|
||||||
|
\see populateFromInstance
|
||||||
|
\see addDefaultSchemes
|
||||||
|
\see addColorScheme
|
||||||
|
%End
|
||||||
|
|
||||||
/** Adds a color scheme to the registry. Ownership of the scheme is transferred
|
void addColorScheme( QgsColorScheme *scheme /Transfer/ );
|
||||||
* to the registry.
|
%Docstring
|
||||||
* @param scheme color scheme to add
|
Adds a color scheme to the registry. Ownership of the scheme is transferred
|
||||||
* @see populateFromInstance
|
to the registry.
|
||||||
* @see removeColorScheme
|
\param scheme color scheme to add
|
||||||
*/
|
\see populateFromInstance
|
||||||
void addColorScheme( QgsColorScheme* scheme /Transfer/ );
|
\see removeColorScheme
|
||||||
|
%End
|
||||||
|
|
||||||
/** Removes all matching color schemes from the registry
|
bool removeColorScheme( QgsColorScheme *scheme );
|
||||||
* @param scheme color scheme to remove
|
%Docstring
|
||||||
* @returns true if scheme was found and removed
|
Removes all matching color schemes from the registry
|
||||||
* @see addColorScheme
|
\param scheme color scheme to remove
|
||||||
*/
|
:return: true if scheme was found and removed
|
||||||
bool removeColorScheme( QgsColorScheme* scheme );
|
\see addColorScheme
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
/** Returns all color schemes in the registry
|
|
||||||
* @returns list of color schemes
|
|
||||||
*/
|
|
||||||
QList<QgsColorScheme *> schemes() const;
|
QList<QgsColorScheme *> schemes() const;
|
||||||
|
%Docstring
|
||||||
|
Returns all color schemes in the registry
|
||||||
|
:return: list of color schemes
|
||||||
|
:rtype: list of QgsColorScheme
|
||||||
|
%End
|
||||||
|
|
||||||
/** Returns all color schemes in the registry which have a specified flag set
|
|
||||||
* @param flag flag to match
|
|
||||||
* @returns list of color schemes with flag set
|
|
||||||
*/
|
|
||||||
QList<QgsColorScheme *> schemes( const QgsColorScheme::SchemeFlag flag ) const;
|
QList<QgsColorScheme *> schemes( const QgsColorScheme::SchemeFlag flag ) const;
|
||||||
|
%Docstring
|
||||||
|
Returns all color schemes in the registry which have a specified flag set
|
||||||
|
\param flag flag to match
|
||||||
|
:return: list of color schemes with flag set
|
||||||
|
:rtype: list of QgsColorScheme
|
||||||
|
%End
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Return color schemes of a specific type
|
|
||||||
* @param schemeList destination list for matching schemes
|
|
||||||
* @note not available in python bindings
|
|
||||||
*/
|
|
||||||
// template<class T> void schemes( QList<T*>& schemeList );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* This file has been generated automatically from *
|
||||||
|
* *
|
||||||
|
* src/core/qgscolorschemeregistry.h *
|
||||||
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
@ -1,23 +1,41 @@
|
|||||||
/** \ingroup core
|
/************************************************************************
|
||||||
* Provides a context based help browser for a dialog.
|
* This file has been generated automatically from *
|
||||||
*
|
* *
|
||||||
* The help text is stored in SQLite and accessed by a context identifier
|
* src/core/qgscontexthelp.h *
|
||||||
* unique to each dialog. This is a singleton class which invokes the help
|
* *
|
||||||
* viewer using QProcess and ensures that only one viewer is open.
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
* The viewer will be terminated if open when the main application quits.
|
************************************************************************/
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
class QgsContextHelp : QObject
|
class QgsContextHelp : QObject
|
||||||
{
|
{
|
||||||
|
%Docstring
|
||||||
|
Provides a context based help browser for a dialog.
|
||||||
|
|
||||||
|
The help text is stored in SQLite and accessed by a context identifier
|
||||||
|
unique to each dialog. This is a singleton class which invokes the help
|
||||||
|
viewer using QProcess and ensures that only one viewer is open.
|
||||||
|
The viewer will be terminated if open when the main application quits.
|
||||||
|
%End
|
||||||
|
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgscontexthelp.h>
|
#include "qgscontexthelp.h"
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
static void run( const QString& context );
|
static void run( const QString &context );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! Constructor
|
QgsContextHelp() ;
|
||||||
QgsContextHelp();
|
private:
|
||||||
//! Destructor
|
~QgsContextHelp() ;
|
||||||
~QgsContextHelp();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* This file has been generated automatically from *
|
||||||
|
* *
|
||||||
|
* src/core/qgscontexthelp.h *
|
||||||
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,240 +1,248 @@
|
|||||||
|
/************************************************************************
|
||||||
|
* This file has been generated automatically from *
|
||||||
|
* *
|
||||||
|
* src/core/qgscoordinatetransform.h *
|
||||||
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** \ingroup core
|
|
||||||
* Class for doing transforms between two map coordinate systems.
|
|
||||||
*
|
|
||||||
* This class can convert map coordinates to a different coordinate reference system.
|
|
||||||
* It is normally associated with a map layer and is used to transform between the
|
|
||||||
* layer's coordinate system and the coordinate system of the map canvas, although
|
|
||||||
* it can be used in a more general sense to transform coordinates.
|
|
||||||
*
|
|
||||||
* When used to transform between a layer and the map canvas, all references to source
|
|
||||||
* and destination coordinate systems refer to layer and map canvas respectively. All
|
|
||||||
* operations are from the perspective of the layer. For example, a forward transformation
|
|
||||||
* transforms coordinates from the layer's coordinate system to the map canvas.
|
|
||||||
* \note Since QGIS 3.0 QgsCoordinateReferenceSystem objects are implicitly shared.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class QgsCoordinateTransform
|
class QgsCoordinateTransform
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgscoordinatetransform.h>
|
Class for doing transforms between two map coordinate systems.
|
||||||
|
|
||||||
|
This class can convert map coordinates to a different coordinate reference system.
|
||||||
|
It is normally associated with a map layer and is used to transform between the
|
||||||
|
layer's coordinate system and the coordinate system of the map canvas, although
|
||||||
|
it can be used in a more general sense to transform coordinates.
|
||||||
|
|
||||||
|
When used to transform between a layer and the map canvas, all references to source
|
||||||
|
and destination coordinate systems refer to layer and map canvas respectively. All
|
||||||
|
operations are from the perspective of the layer. For example, a forward transformation
|
||||||
|
transforms coordinates from the layer's coordinate system to the map canvas.
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Since QGIS 3.0 QgsCoordinateReferenceSystem objects are implicitly shared.
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgscoordinatetransform.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Enum used to indicate the direction (forward or inverse) of the transform
|
|
||||||
enum TransformDirection
|
enum TransformDirection
|
||||||
{
|
{
|
||||||
ForwardTransform, /*!< Transform from source to destination CRS. */
|
ForwardTransform,
|
||||||
ReverseTransform /*!< Transform from destination to source CRS. */
|
ReverseTransform
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Default constructor, creates an invalid QgsCoordinateTransform. */
|
|
||||||
QgsCoordinateTransform();
|
QgsCoordinateTransform();
|
||||||
|
%Docstring
|
||||||
|
Default constructor, creates an invalid QgsCoordinateTransform.
|
||||||
|
%End
|
||||||
|
|
||||||
/** Constructs a QgsCoordinateTransform using QgsCoordinateReferenceSystem objects.
|
QgsCoordinateTransform( const QgsCoordinateReferenceSystem &source,
|
||||||
* @param source source CRS, typically of the layer's coordinate system
|
const QgsCoordinateReferenceSystem &destination );
|
||||||
* @param destination CRS, typically of the map canvas coordinate system
|
%Docstring
|
||||||
*/
|
Constructs a QgsCoordinateTransform using QgsCoordinateReferenceSystem objects.
|
||||||
QgsCoordinateTransform( const QgsCoordinateReferenceSystem& source,
|
\param source source CRS, typically of the layer's coordinate system
|
||||||
const QgsCoordinateReferenceSystem& destination );
|
\param destination CRS, typically of the map canvas coordinate system
|
||||||
|
%End
|
||||||
|
|
||||||
|
QgsCoordinateTransform( const QgsCoordinateTransform &o );
|
||||||
|
%Docstring
|
||||||
|
Copy constructor
|
||||||
|
%End
|
||||||
|
|
||||||
|
// QgsCoordinateTransform &operator=( const QgsCoordinateTransform &o );
|
||||||
|
~QgsCoordinateTransform();
|
||||||
|
%Docstring
|
||||||
|
Assignment operator
|
||||||
|
%End
|
||||||
|
|
||||||
/*!
|
|
||||||
* Returns true if the coordinate transform is valid, ie both the source and destination
|
|
||||||
* CRS have been set and are valid.
|
|
||||||
* @note added in QGIS 3.0
|
|
||||||
*/
|
|
||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
|
%Docstring
|
||||||
|
Returns true if the coordinate transform is valid, ie both the source and destination
|
||||||
|
CRS have been set and are valid.
|
||||||
|
.. versionadded:: 3.0
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
/*!
|
void setSourceCrs( const QgsCoordinateReferenceSystem &crs );
|
||||||
* Sets the source coordinate reference system.
|
%Docstring
|
||||||
* @param crs CRS to transform coordinates from
|
Sets the source coordinate reference system.
|
||||||
* @see sourceCrs()
|
\param crs CRS to transform coordinates from
|
||||||
* @see setDestinationCrs()
|
\see sourceCrs()
|
||||||
*/
|
\see setDestinationCrs()
|
||||||
void setSourceCrs( const QgsCoordinateReferenceSystem& crs );
|
%End
|
||||||
|
|
||||||
/*!
|
void setDestinationCrs( const QgsCoordinateReferenceSystem &crs );
|
||||||
* Sets the destination coordinate reference system.
|
%Docstring
|
||||||
* @param crs CRS to transform coordinates to
|
Sets the destination coordinate reference system.
|
||||||
* @see destinationCrs()
|
\param crs CRS to transform coordinates to
|
||||||
* @see setSourceCrs()
|
\see destinationCrs()
|
||||||
*/
|
\see setSourceCrs()
|
||||||
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs );
|
%End
|
||||||
|
|
||||||
/** Returns the source coordinate reference system, which the transform will
|
|
||||||
* transform coordinates from.
|
|
||||||
* @see setSourceCrs()
|
|
||||||
* @see destinationCrs()
|
|
||||||
*/
|
|
||||||
QgsCoordinateReferenceSystem sourceCrs() const;
|
QgsCoordinateReferenceSystem sourceCrs() const;
|
||||||
|
%Docstring
|
||||||
|
Returns the source coordinate reference system, which the transform will
|
||||||
|
transform coordinates from.
|
||||||
|
\see setSourceCrs()
|
||||||
|
\see destinationCrs()
|
||||||
|
:rtype: QgsCoordinateReferenceSystem
|
||||||
|
%End
|
||||||
|
|
||||||
/** Returns the destination coordinate reference system, which the transform will
|
|
||||||
* transform coordinates to.
|
|
||||||
* @see setDestinationCrs()
|
|
||||||
* @see sourceCrs()
|
|
||||||
*/
|
|
||||||
QgsCoordinateReferenceSystem destinationCrs() const;
|
QgsCoordinateReferenceSystem destinationCrs() const;
|
||||||
|
%Docstring
|
||||||
|
Returns the destination coordinate reference system, which the transform will
|
||||||
|
transform coordinates to.
|
||||||
|
\see setDestinationCrs()
|
||||||
|
\see sourceCrs()
|
||||||
|
:rtype: QgsCoordinateReferenceSystem
|
||||||
|
%End
|
||||||
|
|
||||||
/** Transform the point from the source CRS to the destination CRS.
|
QgsPoint transform( const QgsPoint &point, TransformDirection direction = ForwardTransform ) const;
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
%Docstring
|
||||||
* otherwise points are transformed from destination to source CRS.
|
Transform the point from the source CRS to the destination CRS.
|
||||||
* @param point point to transform
|
If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
||||||
* @param direction transform direction (defaults to ForwardTransform)
|
otherwise points are transformed from destination to source CRS.
|
||||||
* @return transformed point
|
\param point point to transform
|
||||||
*/
|
\param direction transform direction (defaults to ForwardTransform)
|
||||||
QgsPoint transform( const QgsPoint& point, TransformDirection direction = ForwardTransform ) const;
|
:return: transformed point
|
||||||
|
:rtype: QgsPoint
|
||||||
|
%End
|
||||||
|
|
||||||
/** Transform the point specified by x,y from the source CRS to the destination CRS.
|
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
|
||||||
* otherwise points are transformed from destination to source CRS.
|
|
||||||
* @param x x coordinate of point to transform
|
|
||||||
* @param y y coordinate of point to transform
|
|
||||||
* @param direction transform direction (defaults to ForwardTransform)
|
|
||||||
* @return transformed point
|
|
||||||
*/
|
|
||||||
QgsPoint transform( const double x, const double y, TransformDirection direction = ForwardTransform ) const;
|
QgsPoint transform( const double x, const double y, TransformDirection direction = ForwardTransform ) const;
|
||||||
|
%Docstring
|
||||||
|
Transform the point specified by x,y from the source CRS to the destination CRS.
|
||||||
|
If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
||||||
|
otherwise points are transformed from destination to source CRS.
|
||||||
|
\param x x coordinate of point to transform
|
||||||
|
\param y y coordinate of point to transform
|
||||||
|
\param direction transform direction (defaults to ForwardTransform)
|
||||||
|
:return: transformed point
|
||||||
|
:rtype: QgsPoint
|
||||||
|
%End
|
||||||
|
|
||||||
/** Transforms a rectangle from the source CRS to the destination CRS.
|
QgsRectangle transformBoundingBox( const QgsRectangle &rectangle, TransformDirection direction = ForwardTransform, const bool handle180Crossover = false ) const;
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
%Docstring
|
||||||
* otherwise points are transformed from destination to source CRS.
|
Transforms a rectangle from the source CRS to the destination CRS.
|
||||||
* This method assumes that the rectangle is a bounding box, and creates a bounding box
|
If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
||||||
* in the projected CRS, such that all points from the source rectangle are within
|
otherwise points are transformed from destination to source CRS.
|
||||||
* the returned rectangle.
|
This method assumes that the rectangle is a bounding box, and creates a bounding box
|
||||||
* @param rectangle rectangle to transform
|
in the projected CRS, such that all points from the source rectangle are within
|
||||||
* @param direction transform direction (defaults to ForwardTransform)
|
the returned rectangle.
|
||||||
* @param handle180Crossover set to true if destination CRS is geographic and handling of extents
|
\param rectangle rectangle to transform
|
||||||
* crossing the 180 degree longitude line is required
|
\param direction transform direction (defaults to ForwardTransform)
|
||||||
* @return rectangle in destination CRS
|
\param handle180Crossover set to true if destination CRS is geographic and handling of extents
|
||||||
*/
|
crossing the 180 degree longitude line is required
|
||||||
QgsRectangle transformBoundingBox( const QgsRectangle& rectangle, TransformDirection direction = ForwardTransform, const bool handle180Crossover = false ) const;
|
:return: rectangle in destination CRS
|
||||||
|
:rtype: QgsRectangle
|
||||||
|
%End
|
||||||
|
|
||||||
/** Transforms an array of x, y and z double coordinates in place, from the source CRS to the destination CRS.
|
void transformInPlace( double &x, double &y, double &z, TransformDirection direction = ForwardTransform ) const;
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
%Docstring
|
||||||
* otherwise points are transformed from destination to source CRS.
|
Transforms an array of x, y and z double coordinates in place, from the source CRS to the destination CRS.
|
||||||
* @param x array of x coordinates of points to transform
|
If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
||||||
* @param y array of y coordinates of points to transform
|
otherwise points are transformed from destination to source CRS.
|
||||||
* @param z array of z coordinates of points to transform. The z coordinates of the points
|
\param x array of x coordinates of points to transform
|
||||||
* must represent height relative to the vertical datum of the source CRS (generally ellipsoidal
|
\param y array of y coordinates of points to transform
|
||||||
* heights) and must be expressed in its vertical units (generally meters)
|
\param z array of z coordinates of points to transform. The z coordinates of the points
|
||||||
* @param direction transform direction (defaults to ForwardTransform)
|
must represent height relative to the vertical datum of the source CRS (generally ellipsoidal
|
||||||
*/
|
heights) and must be expressed in its vertical units (generally meters)
|
||||||
void transformInPlace( double& x, double& y, double &z, TransformDirection direction = ForwardTransform ) const;
|
\param direction transform direction (defaults to ForwardTransform)
|
||||||
|
%End
|
||||||
|
|
||||||
/** Transforms an array of x, y and z float coordinates in place, from the source CRS to the destination CRS.
|
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
|
||||||
* otherwise points are transformed from destination to source CRS.
|
|
||||||
* @param x array of x coordinates of points to transform
|
|
||||||
* @param y array of y coordinates of points to transform
|
|
||||||
* @param z array of z coordinates of points to transform. The z coordinates of the points
|
|
||||||
* must represent height relative to the vertical datum of the source CRS (generally ellipsoidal
|
|
||||||
* heights) and must be expressed in its vertical units (generally meters)
|
|
||||||
* @param direction transform direction (defaults to ForwardTransform)
|
|
||||||
* @note not available in python bindings
|
|
||||||
*/
|
|
||||||
//void transformInPlace( float& x, float& y, double &z, TransformDirection direction = ForwardTransform ) const;
|
|
||||||
|
|
||||||
/** Transforms an array of x, y and z float coordinates in place, from the source CRS to the destination CRS.
|
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
|
||||||
* otherwise points are transformed from destination to source CRS.
|
|
||||||
* @param x array of x coordinates of points to transform
|
|
||||||
* @param y array of y coordinates of points to transform
|
|
||||||
* @param z array of z coordinates of points to transform. The z coordinates of the points
|
|
||||||
* must represent height relative to the vertical datum of the source CRS (generally ellipsoidal
|
|
||||||
* heights) and must be expressed in its vertical units (generally meters)
|
|
||||||
* @param direction transform direction (defaults to ForwardTransform)
|
|
||||||
* @note not available in python bindings
|
|
||||||
*/
|
|
||||||
// void transformInPlace( float& x, float& y, float& z, TransformDirection direction = ForwardTransform ) const;
|
|
||||||
|
|
||||||
/** Transforms a vector of x, y and z float coordinates in place, from the source CRS to the destination CRS.
|
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
|
||||||
* otherwise points are transformed from destination to source CRS.
|
|
||||||
* @param x vector of x coordinates of points to transform
|
|
||||||
* @param y vector of y coordinates of points to transform
|
|
||||||
* @param z vector of z coordinates of points to transform. The z coordinates of the points
|
|
||||||
* must represent height relative to the vertical datum of the source CRS (generally ellipsoidal
|
|
||||||
* heights) and must be expressed in its vertical units (generally meters)
|
|
||||||
* @param direction transform direction (defaults to ForwardTransform)
|
|
||||||
* @note not available in python bindings
|
|
||||||
*/
|
|
||||||
//void transformInPlace( QVector<float>& x, QVector<float>& y, QVector<float>& z,
|
|
||||||
// TransformDirection direction = ForwardTransform ) const;
|
|
||||||
|
|
||||||
/** Transforms a vector of x, y and z double coordinates in place, from the source CRS to the destination CRS.
|
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
|
||||||
* otherwise points are transformed from destination to source CRS.
|
|
||||||
* @param x vector of x coordinates of points to transform
|
|
||||||
* @param y vector of y coordinates of points to transform
|
|
||||||
* @param z vector of z coordinates of points to transform. The z coordinates of the points
|
|
||||||
* must represent height relative to the vertical datum of the source CRS (generally ellipsoidal
|
|
||||||
* heights) and must be expressed in its vertical units (generally meters)
|
|
||||||
* @param direction transform direction (defaults to ForwardTransform)
|
|
||||||
* @note not available in python bindings
|
|
||||||
*/
|
|
||||||
//void transformInPlace( QVector<double>& x, QVector<double>& y, QVector<double>& z,
|
|
||||||
// TransformDirection direction = ForwardTransform ) const;
|
|
||||||
|
|
||||||
/** Transforms a polygon to the destination coordinate system.
|
void transformPolygon( QPolygonF &polygon, TransformDirection direction = ForwardTransform ) const;
|
||||||
* @param polygon polygon to transform (occurs in place)
|
%Docstring
|
||||||
* @param direction transform direction (defaults to forward transformation)
|
Transforms a polygon to the destination coordinate system.
|
||||||
*/
|
\param polygon polygon to transform (occurs in place)
|
||||||
void transformPolygon( QPolygonF& polygon, TransformDirection direction = ForwardTransform ) const;
|
\param direction transform direction (defaults to forward transformation)
|
||||||
|
%End
|
||||||
|
|
||||||
/** Transforms a rectangle to the destination CRS.
|
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
|
||||||
* otherwise points are transformed from destination to source CRS.
|
|
||||||
* @param rectangle rectangle to transform
|
|
||||||
* @param direction transform direction (defaults to ForwardTransform)
|
|
||||||
* @return transformed rectangle
|
|
||||||
*/
|
|
||||||
QgsRectangle transform( const QgsRectangle &rectangle, TransformDirection direction = ForwardTransform ) const;
|
|
||||||
|
|
||||||
/** Transform an array of coordinates to the destination CRS.
|
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
|
||||||
* otherwise points are transformed from destination to source CRS.
|
|
||||||
* @param numPoint number of coordinates in arrays
|
|
||||||
* @param x array of x coordinates to transform
|
|
||||||
* @param y array of y coordinates to transform
|
|
||||||
* @param z array of z coordinates to transform
|
|
||||||
* @param direction transform direction (defaults to ForwardTransform)
|
|
||||||
*/
|
|
||||||
void transformCoords( int numPoint, double *x, double *y, double *z, TransformDirection direction = ForwardTransform ) const;
|
void transformCoords( int numPoint, double *x, double *y, double *z, TransformDirection direction = ForwardTransform ) const;
|
||||||
|
%Docstring
|
||||||
|
Transform an array of coordinates to the destination CRS.
|
||||||
|
If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
||||||
|
otherwise points are transformed from destination to source CRS.
|
||||||
|
\param numPoint number of coordinates in arrays
|
||||||
|
\param x array of x coordinates to transform
|
||||||
|
\param y array of y coordinates to transform
|
||||||
|
\param z array of z coordinates to transform
|
||||||
|
\param direction transform direction (defaults to ForwardTransform)
|
||||||
|
%End
|
||||||
|
|
||||||
/** Returns true if the transform short circuits because the source and destination are equivalent.
|
|
||||||
*/
|
|
||||||
bool isShortCircuited() const;
|
bool isShortCircuited() const;
|
||||||
|
%Docstring
|
||||||
|
Returns true if the transform short circuits because the source and destination are equivalent.
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
|
|
||||||
/** Returns list of datum transformations for the given src and dest CRS
|
|
||||||
* @note not available in python bindings
|
|
||||||
*/
|
|
||||||
// static QList< QList< int > > datumTransformations( const QgsCoordinateReferenceSystem& srcCRS, const QgsCoordinateReferenceSystem& destCRS );
|
|
||||||
static QString datumTransformString( int datumTransform );
|
static QString datumTransformString( int datumTransform );
|
||||||
/** Gets name of source and dest geographical CRS (to show in a tooltip)
|
%Docstring
|
||||||
@return epsgNr epsg code of the transformation (or 0 if not in epsg db)*/
|
:rtype: str
|
||||||
static bool datumTransformCrsInfo( int datumTransform, int& epsgNr, QString& srcProjection, QString& dstProjection, QString &remarks, QString &scope, bool &preferred, bool &deprecated );
|
%End
|
||||||
|
|
||||||
|
static bool datumTransformCrsInfo( int datumTransform, int &epsgNr, QString &srcProjection, QString &dstProjection, QString &remarks, QString &scope, bool &preferred, bool &deprecated );
|
||||||
|
%Docstring
|
||||||
|
Gets name of source and dest geographical CRS (to show in a tooltip)
|
||||||
|
:return: epsgNr epsg code of the transformation (or 0 if not in epsg db)*
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
int sourceDatumTransform() const;
|
int sourceDatumTransform() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: int
|
||||||
|
%End
|
||||||
void setSourceDatumTransform( int dt );
|
void setSourceDatumTransform( int dt );
|
||||||
int destinationDatumTransform() const;
|
int destinationDatumTransform() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: int
|
||||||
|
%End
|
||||||
void setDestinationDatumTransform( int dt );
|
void setDestinationDatumTransform( int dt );
|
||||||
|
|
||||||
//!initialize is used to actually create the Transformer instance
|
|
||||||
void initialize();
|
void initialize();
|
||||||
|
%Docstring
|
||||||
|
initialize is used to actually create the Transformer instance
|
||||||
|
%End
|
||||||
|
|
||||||
/** Restores state from the given Dom node.
|
bool readXml( const QDomNode &node );
|
||||||
* @param node The node from which state will be restored
|
%Docstring
|
||||||
* @return bool True on success, False on failure
|
Restores state from the given Dom node.
|
||||||
* @see writeXml()
|
\param node The node from which state will be restored
|
||||||
*/
|
:return: bool True on success, False on failure
|
||||||
bool readXml( const QDomNode& node );
|
\see writeXml()
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
/** Stores state to the given Dom node in the given document
|
bool writeXml( QDomNode &node, QDomDocument &document ) const;
|
||||||
* @param node The node in which state will be restored
|
%Docstring
|
||||||
* @param document The document in which state will be stored
|
Stores state to the given Dom node in the given document
|
||||||
* @return bool True on success, False on failure
|
\param node The node in which state will be restored
|
||||||
* @see readXml()
|
\param document The document in which state will be stored
|
||||||
*/
|
:return: bool True on success, False on failure
|
||||||
bool writeXml( QDomNode & node, QDomDocument & document ) const;
|
\see readXml()
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* This file has been generated automatically from *
|
||||||
|
* *
|
||||||
|
* src/core/qgscoordinatetransform.h *
|
||||||
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
@ -1,50 +1,97 @@
|
|||||||
|
/************************************************************************
|
||||||
|
* This file has been generated automatically from *
|
||||||
|
* *
|
||||||
|
* src/core/qgsfeedback.h *
|
||||||
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** \ingroup core
|
|
||||||
* Base class for feedback objects to be used for cancelation of something running in a worker thread.
|
|
||||||
* The class may be used as is or it may be subclassed for extended functionality
|
|
||||||
* for a particular operation (e.g. report progress or pass some data for preview).
|
|
||||||
*
|
|
||||||
* When cancel() is called, the internal code has two options to check for cancelation state:
|
|
||||||
* - if the worker thread uses an event loop (e.g. for network communication), the code can
|
|
||||||
* make a queued connection to canceled() signal and handle the cancelation in its slot.
|
|
||||||
* - if the worker thread does not use an event loop, it can poll isCanceled() method regularly
|
|
||||||
* to see if the operation should be canceled.
|
|
||||||
*
|
|
||||||
* The class is meant to be created and destroyed in the main thread.
|
|
||||||
*
|
|
||||||
* For map rendering, the object may be created in constructor of a QgsMapLayerRenderer
|
|
||||||
* subclass and available with QgsMapLayerRenderer::feedback() method. When a map rendering job
|
|
||||||
* gets canceled, the cancel() method is called on the feedback object of all layers.
|
|
||||||
*
|
|
||||||
* @note added in QGIS 3.0
|
|
||||||
*/
|
|
||||||
class QgsFeedback : QObject
|
class QgsFeedback : QObject
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgsfeedback.h>
|
Base class for feedback objects to be used for cancelation of something running in a worker thread.
|
||||||
|
The class may be used as is or it may be subclassed for extended functionality
|
||||||
|
for a particular operation (e.g. report progress or pass some data for preview).
|
||||||
|
|
||||||
|
When cancel() is called, the internal code has two options to check for cancelation state:
|
||||||
|
- if the worker thread uses an event loop (e.g. for network communication), the code can
|
||||||
|
make a queued connection to canceled() signal and handle the cancelation in its slot.
|
||||||
|
- if the worker thread does not use an event loop, it can poll isCanceled() method regularly
|
||||||
|
to see if the operation should be canceled.
|
||||||
|
|
||||||
|
The class is meant to be created and destroyed in the main thread.
|
||||||
|
|
||||||
|
For map rendering, the object may be created in constructor of a QgsMapLayerRenderer
|
||||||
|
subclass and available with QgsMapLayerRenderer.feedback() method. When a map rendering job
|
||||||
|
gets canceled, the cancel() method is called on the feedback object of all layers.
|
||||||
|
|
||||||
|
.. versionadded:: 3.0
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsfeedback.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
//! Construct a feedback object
|
QgsFeedback( QObject *parent /TransferThis/ = 0 );
|
||||||
QgsFeedback( QObject* parent /TransferThis/ = nullptr );
|
%Docstring
|
||||||
|
Construct a feedback object
|
||||||
virtual ~QgsFeedback();
|
%End
|
||||||
|
|
||||||
//! Tells the internal routines that the current operation should be canceled. This should be run by the main thread
|
|
||||||
void cancel();
|
void cancel();
|
||||||
|
%Docstring
|
||||||
|
Tells the internal routines that the current operation should be canceled. This should be run by the main thread
|
||||||
|
%End
|
||||||
|
|
||||||
//! Tells whether the operation has been canceled already
|
|
||||||
bool isCanceled() const;
|
bool isCanceled() const;
|
||||||
|
%Docstring
|
||||||
|
Tells whether the operation has been canceled already
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
void setProgress( double progress );
|
void setProgress( double progress );
|
||||||
|
%Docstring
|
||||||
|
Sets the current progress for the feedback object. The ``progress``
|
||||||
|
argument is in percentage and valid values range from 0-100.
|
||||||
|
\see progress()
|
||||||
|
\see progressChanged()
|
||||||
|
.. versionadded:: 3.0
|
||||||
|
%End
|
||||||
|
|
||||||
double progress() const;
|
double progress() const;
|
||||||
|
%Docstring
|
||||||
|
Returns the current progress reported by the feedback object. Depending on how the
|
||||||
|
feedback object is used progress reporting may not be supported. The returned value
|
||||||
|
is in percentage and ranges from 0-100.
|
||||||
|
\see setProgress()
|
||||||
|
\see progressChanged()
|
||||||
|
.. versionadded:: 3.0
|
||||||
|
:rtype: float
|
||||||
|
%End
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
//! Internal routines can connect to this signal if they use event loop
|
|
||||||
void canceled();
|
void canceled();
|
||||||
|
%Docstring
|
||||||
|
Internal routines can connect to this signal if they use event loop
|
||||||
|
%End
|
||||||
|
|
||||||
void progressChanged( double progress );
|
void progressChanged( double progress );
|
||||||
|
%Docstring
|
||||||
|
Emitted when the feedback object reports a progress change. Depending on how the
|
||||||
|
feedback object is used progress reporting may not be supported. The ``progress``
|
||||||
|
argument is in percentage and ranges from 0-100.
|
||||||
|
.. versionadded:: 3.0
|
||||||
|
\see setProgress()
|
||||||
|
\see progress()
|
||||||
|
%End
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* This file has been generated automatically from *
|
||||||
|
* *
|
||||||
|
* src/core/qgsfeedback.h *
|
||||||
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
* \class QgsBrowserWatcher
|
* \class QgsBrowserWatcher
|
||||||
* \note not available in Python bindings
|
* \note not available in Python bindings
|
||||||
*/
|
*/
|
||||||
|
#ifndef SIP_RUN
|
||||||
class CORE_EXPORT QgsBrowserWatcher : public QFutureWatcher<QVector <QgsDataItem *> >
|
class CORE_EXPORT QgsBrowserWatcher : public QFutureWatcher<QVector <QgsDataItem *> >
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -44,6 +45,7 @@ class CORE_EXPORT QgsBrowserWatcher : public QFutureWatcher<QVector <QgsDataItem
|
|||||||
private:
|
private:
|
||||||
QgsDataItem *mItem = nullptr;
|
QgsDataItem *mItem = nullptr;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/** \ingroup core
|
/** \ingroup core
|
||||||
* \class QgsBrowserModel
|
* \class QgsBrowserModel
|
||||||
@ -122,7 +124,7 @@ class CORE_EXPORT QgsBrowserModel : public QAbstractItemModel
|
|||||||
QModelIndex findPath( const QString &path, Qt::MatchFlag matchFlag = Qt::MatchExactly );
|
QModelIndex findPath( const QString &path, Qt::MatchFlag matchFlag = Qt::MatchExactly );
|
||||||
|
|
||||||
//! \note not available in Python bindings
|
//! \note not available in Python bindings
|
||||||
static QModelIndex findPath( QAbstractItemModel *model, const QString &path, Qt::MatchFlag matchFlag = Qt::MatchExactly );
|
static QModelIndex findPath( QAbstractItemModel *model, const QString &path, Qt::MatchFlag matchFlag = Qt::MatchExactly ) SIP_SKIP;
|
||||||
|
|
||||||
void connectItem( QgsDataItem *item );
|
void connectItem( QgsDataItem *item );
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include "qgis_core.h"
|
#include "qgis_core.h"
|
||||||
|
#include "qgis.h"
|
||||||
|
|
||||||
/** \ingroup core
|
/** \ingroup core
|
||||||
* List of colors paired with a friendly display name identifying the color
|
* List of colors paired with a friendly display name identifying the color
|
||||||
@ -42,6 +43,24 @@ typedef QList< QPair< QColor, QString > > QgsNamedColorList;
|
|||||||
*/
|
*/
|
||||||
class CORE_EXPORT QgsColorScheme
|
class CORE_EXPORT QgsColorScheme
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifdef SIP_RUN
|
||||||
|
SIP_CONVERT_TO_SUBCLASS_CODE
|
||||||
|
if ( dynamic_cast<QgsUserColorScheme *>( sipCpp ) != NULL )
|
||||||
|
sipType = sipType_QgsUserColorScheme;
|
||||||
|
else if ( dynamic_cast<QgsRecentColorScheme *>( sipCpp ) != NULL )
|
||||||
|
sipType = sipType_QgsRecentColorScheme;
|
||||||
|
else if ( dynamic_cast<QgsCustomColorScheme *>( sipCpp ) != NULL )
|
||||||
|
sipType = sipType_QgsCustomColorScheme;
|
||||||
|
else if ( dynamic_cast<QgsProjectColorScheme *>( sipCpp ) != NULL )
|
||||||
|
sipType = sipType_QgsProjectColorScheme;
|
||||||
|
else if ( dynamic_cast<QgsGplColorScheme *>( sipCpp ) != NULL )
|
||||||
|
sipType = sipType_QgsGplColorScheme;
|
||||||
|
else
|
||||||
|
sipType = sipType_QgsColorScheme;
|
||||||
|
SIP_END
|
||||||
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/** Flags for controlling behavior of color scheme
|
/** Flags for controlling behavior of color scheme
|
||||||
@ -102,7 +121,7 @@ class CORE_EXPORT QgsColorScheme
|
|||||||
/** Clones a color scheme
|
/** Clones a color scheme
|
||||||
* \returns copy of color scheme
|
* \returns copy of color scheme
|
||||||
*/
|
*/
|
||||||
virtual QgsColorScheme *clone() const = 0;
|
virtual QgsColorScheme *clone() const = 0 SIP_FACTORY;
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_OPERATORS_FOR_FLAGS( QgsColorScheme::SchemeFlags )
|
Q_DECLARE_OPERATORS_FOR_FLAGS( QgsColorScheme::SchemeFlags )
|
||||||
@ -149,7 +168,7 @@ class CORE_EXPORT QgsUserColorScheme : public QgsGplColorScheme
|
|||||||
|
|
||||||
virtual QString schemeName() const override;
|
virtual QString schemeName() const override;
|
||||||
|
|
||||||
virtual QgsUserColorScheme *clone() const override;
|
virtual QgsUserColorScheme *clone() const override SIP_FACTORY;
|
||||||
|
|
||||||
virtual bool isEditable() const override { return true; }
|
virtual bool isEditable() const override { return true; }
|
||||||
|
|
||||||
@ -199,7 +218,7 @@ class CORE_EXPORT QgsRecentColorScheme : public QgsColorScheme
|
|||||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||||
const QColor &baseColor = QColor() ) override;
|
const QColor &baseColor = QColor() ) override;
|
||||||
|
|
||||||
QgsRecentColorScheme *clone() const override;
|
QgsRecentColorScheme *clone() const override SIP_FACTORY;
|
||||||
|
|
||||||
/** Adds a color to the list of recent colors.
|
/** Adds a color to the list of recent colors.
|
||||||
* \param color color to add
|
* \param color color to add
|
||||||
@ -237,7 +256,7 @@ class CORE_EXPORT QgsCustomColorScheme : public QgsColorScheme
|
|||||||
|
|
||||||
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() ) override;
|
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() ) override;
|
||||||
|
|
||||||
QgsCustomColorScheme *clone() const override;
|
QgsCustomColorScheme *clone() const override SIP_FACTORY;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \ingroup core
|
/** \ingroup core
|
||||||
@ -262,7 +281,7 @@ class CORE_EXPORT QgsProjectColorScheme : public QgsColorScheme
|
|||||||
|
|
||||||
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() ) override;
|
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() ) override;
|
||||||
|
|
||||||
QgsProjectColorScheme *clone() const override;
|
QgsProjectColorScheme *clone() const override SIP_FACTORY;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -67,7 +67,7 @@ class CORE_EXPORT QgsColorSchemeRegistry
|
|||||||
* \see populateFromInstance
|
* \see populateFromInstance
|
||||||
* \see removeColorScheme
|
* \see removeColorScheme
|
||||||
*/
|
*/
|
||||||
void addColorScheme( QgsColorScheme *scheme );
|
void addColorScheme( QgsColorScheme *scheme SIP_TRANSFER );
|
||||||
|
|
||||||
/** Removes all matching color schemes from the registry
|
/** Removes all matching color schemes from the registry
|
||||||
* \param scheme color scheme to remove
|
* \param scheme color scheme to remove
|
||||||
@ -87,11 +87,27 @@ class CORE_EXPORT QgsColorSchemeRegistry
|
|||||||
*/
|
*/
|
||||||
QList<QgsColorScheme *> schemes( const QgsColorScheme::SchemeFlag flag ) const;
|
QList<QgsColorScheme *> schemes( const QgsColorScheme::SchemeFlag flag ) const;
|
||||||
|
|
||||||
|
|
||||||
/** Return color schemes of a specific type
|
/** Return color schemes of a specific type
|
||||||
* \param schemeList destination list for matching schemes
|
* \param schemeList destination list for matching schemes
|
||||||
* \note not available in Python bindings
|
* \note not available in Python bindings
|
||||||
*/
|
*/
|
||||||
template<class T> void schemes( QList<T *> &schemeList );
|
#ifndef SIP_RUN
|
||||||
|
template<class T> void schemes( QList<T *> &schemeList )
|
||||||
|
{
|
||||||
|
schemeList.clear();
|
||||||
|
QList<QgsColorScheme *> schemeInstanceList = schemes();
|
||||||
|
QList<QgsColorScheme *>::iterator schemeIt = schemeInstanceList.begin();
|
||||||
|
for ( ; schemeIt != schemeInstanceList.end(); ++schemeIt )
|
||||||
|
{
|
||||||
|
T *scheme = dynamic_cast<T *>( *schemeIt );
|
||||||
|
if ( scheme )
|
||||||
|
{
|
||||||
|
schemeList.push_back( scheme );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -99,19 +115,6 @@ class CORE_EXPORT QgsColorSchemeRegistry
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T> void QgsColorSchemeRegistry::schemes( QList<T *> &schemeList )
|
|
||||||
{
|
|
||||||
schemeList.clear();
|
|
||||||
QList<QgsColorScheme *> schemeInstanceList = schemes();
|
|
||||||
QList<QgsColorScheme *>::iterator schemeIt = schemeInstanceList.begin();
|
|
||||||
for ( ; schemeIt != schemeInstanceList.end(); ++schemeIt )
|
|
||||||
{
|
|
||||||
T *scheme = dynamic_cast<T *>( *schemeIt );
|
|
||||||
if ( scheme )
|
|
||||||
{
|
|
||||||
schemeList.push_back( scheme );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
#include "qgis_core.h"
|
#include "qgis_core.h"
|
||||||
|
#include "qgis.h"
|
||||||
|
|
||||||
/** \ingroup core
|
/** \ingroup core
|
||||||
* Provides a context based help browser for a dialog.
|
* Provides a context based help browser for a dialog.
|
||||||
@ -46,9 +47,9 @@ class CORE_EXPORT QgsContextHelp : public QObject
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
QgsContextHelp();
|
QgsContextHelp() SIP_FORCE;
|
||||||
|
|
||||||
~QgsContextHelp();
|
~QgsContextHelp() SIP_FORCE;
|
||||||
|
|
||||||
QProcess *start();
|
QProcess *start();
|
||||||
void showContext( const QString &context );
|
void showContext( const QString &context );
|
||||||
|
@ -28,25 +28,25 @@
|
|||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QReadWriteLock>
|
#include <QReadWriteLock>
|
||||||
|
|
||||||
|
//qgis includes
|
||||||
|
#include "qgis.h"
|
||||||
|
#include "qgsunittypes.h"
|
||||||
|
|
||||||
class QDomNode;
|
class QDomNode;
|
||||||
class QDomDocument;
|
class QDomDocument;
|
||||||
class QgsCoordinateReferenceSystemPrivate;
|
class QgsCoordinateReferenceSystemPrivate;
|
||||||
|
|
||||||
// forward declaration for sqlite3
|
// forward declaration for sqlite3
|
||||||
typedef struct sqlite3 sqlite3;
|
typedef struct sqlite3 sqlite3 SIP_SKIP;
|
||||||
|
|
||||||
//qgis includes
|
|
||||||
#include "qgis.h"
|
|
||||||
#include "qgsunittypes.h"
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
typedef struct OGRSpatialReferenceHS *OGRSpatialReferenceH;
|
typedef struct OGRSpatialReferenceHS *OGRSpatialReferenceH SIP_SKIP;
|
||||||
#else
|
#else
|
||||||
typedef void *OGRSpatialReferenceH;
|
typedef void *OGRSpatialReferenceH SIP_SKIP;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class QgsCoordinateReferenceSystem;
|
class QgsCoordinateReferenceSystem;
|
||||||
typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & );
|
typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SKIP;
|
||||||
|
|
||||||
/** \ingroup core
|
/** \ingroup core
|
||||||
* This class represents a coordinate reference system (CRS).
|
* This class represents a coordinate reference system (CRS).
|
||||||
@ -217,8 +217,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
|||||||
* If no prefix is specified, WKT definition is assumed.
|
* If no prefix is specified, WKT definition is assumed.
|
||||||
* \param definition A String containing a coordinate reference system definition.
|
* \param definition A String containing a coordinate reference system definition.
|
||||||
* \see createFromString()
|
* \see createFromString()
|
||||||
*/
|
*/ // TODO QGIS 3: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix
|
||||||
// TODO QGIS 3: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix
|
|
||||||
explicit QgsCoordinateReferenceSystem( const QString &definition );
|
explicit QgsCoordinateReferenceSystem( const QString &definition );
|
||||||
|
|
||||||
/** Constructor a CRS object using a postgis SRID, an EPSG code or an internal QGIS CRS ID.
|
/** Constructor a CRS object using a postgis SRID, an EPSG code or an internal QGIS CRS ID.
|
||||||
@ -226,8 +225,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
|||||||
* wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile.
|
* wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile.
|
||||||
* \param id The ID valid for the chosen CRS ID type
|
* \param id The ID valid for the chosen CRS ID type
|
||||||
* \param type One of the types described in CrsType
|
* \param type One of the types described in CrsType
|
||||||
*/
|
*/ // TODO QGIS 3: remove type and always use EPSG code
|
||||||
// TODO QGIS 3: remove type and always use EPSG code
|
|
||||||
explicit QgsCoordinateReferenceSystem( const long id, CrsType type = PostgisCrsId );
|
explicit QgsCoordinateReferenceSystem( const long id, CrsType type = PostgisCrsId );
|
||||||
|
|
||||||
//! Copy constructor
|
//! Copy constructor
|
||||||
@ -300,8 +298,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
|||||||
* \note We encourage you to use EPSG code, WKT or Proj4 to describe CRS's in your code
|
* \note We encourage you to use EPSG code, WKT or Proj4 to describe CRS's in your code
|
||||||
* wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile.
|
* wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile.
|
||||||
* \returns True on success else false
|
* \returns True on success else false
|
||||||
*/
|
*/ // TODO QGIS 3: remove type and always use EPSG code, rename to createFromEpsg
|
||||||
// TODO QGIS 3: remove type and always use EPSG code, rename to createFromEpsg
|
|
||||||
bool createFromId( const long id, CrsType type = PostgisCrsId );
|
bool createFromId( const long id, CrsType type = PostgisCrsId );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -313,15 +310,13 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
|||||||
* \note this method uses an internal cache. Call invalidateCache() to clear the cache.
|
* \note this method uses an internal cache. Call invalidateCache() to clear the cache.
|
||||||
* \returns True on success else false
|
* \returns True on success else false
|
||||||
* \see fromOgcWmsCrs()
|
* \see fromOgcWmsCrs()
|
||||||
*/
|
*/ // TODO QGIS 3: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid())
|
||||||
// TODO QGIS 3: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid())
|
|
||||||
bool createFromOgcWmsCrs( const QString &crs );
|
bool createFromOgcWmsCrs( const QString &crs );
|
||||||
|
|
||||||
/** Sets this CRS by lookup of the given PostGIS SRID in the CRS database.
|
/** Sets this CRS by lookup of the given PostGIS SRID in the CRS database.
|
||||||
* \param srid The postgis SRID for the desired spatial reference system.
|
* \param srid The postgis SRID for the desired spatial reference system.
|
||||||
* \returns True on success else false
|
* \returns True on success else false
|
||||||
*/
|
*/ // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
|
||||||
// TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
|
|
||||||
bool createFromSrid( const long srid );
|
bool createFromSrid( const long srid );
|
||||||
|
|
||||||
/** Sets this CRS using a WKT definition.
|
/** Sets this CRS using a WKT definition.
|
||||||
@ -401,8 +396,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
|||||||
* passes it to createFromWkt() function.
|
* passes it to createFromWkt() function.
|
||||||
* \param definition A String containing a coordinate reference system definition.
|
* \param definition A String containing a coordinate reference system definition.
|
||||||
* \returns True on success else false
|
* \returns True on success else false
|
||||||
*/
|
*/ // TODO QGIS3: rename to createFromStringOGR so it is clear it's similar to createFromString, just different backend
|
||||||
// TODO QGIS3: rename to createFromStringOGR so it is clear it's similar to createFromString, just different backend
|
|
||||||
bool createFromUserInput( const QString &definition );
|
bool createFromUserInput( const QString &definition );
|
||||||
|
|
||||||
/** Make sure that ESRI WKT import is done properly.
|
/** Make sure that ESRI WKT import is done properly.
|
||||||
@ -435,8 +429,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
|||||||
* pieces of information about CRS.
|
* pieces of information about CRS.
|
||||||
* \note The ellipsoid and projection acronyms must be set as well as the proj4string!
|
* \note The ellipsoid and projection acronyms must be set as well as the proj4string!
|
||||||
* \returns long the SrsId of the matched CRS, zero if no match was found
|
* \returns long the SrsId of the matched CRS, zero if no match was found
|
||||||
*/
|
*/ // TODO QGIS 3: seems completely obsolete now (only compares proj4 - already done in createFromProj4)
|
||||||
// TODO QGIS 3: seems completely obsolete now (only compares proj4 - already done in createFromProj4)
|
|
||||||
long findMatchingProj();
|
long findMatchingProj();
|
||||||
|
|
||||||
/** Overloaded == operator used to compare to CRS's.
|
/** Overloaded == operator used to compare to CRS's.
|
||||||
@ -469,12 +462,12 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
|||||||
* QGIS uses implementation in QgisGui::customSrsValidation
|
* QGIS uses implementation in QgisGui::customSrsValidation
|
||||||
* \note not available in Python bindings
|
* \note not available in Python bindings
|
||||||
*/
|
*/
|
||||||
static void setCustomCrsValidation( CUSTOM_CRS_VALIDATION f );
|
static void setCustomCrsValidation( CUSTOM_CRS_VALIDATION f ) SIP_SKIP;
|
||||||
|
|
||||||
/** Gets custom function
|
/** Gets custom function
|
||||||
* \note not available in Python bindings
|
* \note not available in Python bindings
|
||||||
*/
|
*/
|
||||||
static CUSTOM_CRS_VALIDATION customCrsValidation();
|
static CUSTOM_CRS_VALIDATION customCrsValidation() SIP_SKIP;
|
||||||
|
|
||||||
// Accessors -----------------------------------
|
// Accessors -----------------------------------
|
||||||
|
|
||||||
@ -485,8 +478,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
|||||||
|
|
||||||
/** Returns PostGIS SRID for the CRS.
|
/** Returns PostGIS SRID for the CRS.
|
||||||
* \returns the PostGIS spatial_ref_sys identifier for this CRS (defaults to 0)
|
* \returns the PostGIS spatial_ref_sys identifier for this CRS (defaults to 0)
|
||||||
*/
|
*/ // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
|
||||||
// TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
|
|
||||||
long postgisSrid() const;
|
long postgisSrid() const;
|
||||||
|
|
||||||
/** Returns the authority identifier for the CRS.
|
/** Returns the authority identifier for the CRS.
|
||||||
@ -722,6 +714,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
|||||||
Q_DECLARE_METATYPE( QgsCoordinateReferenceSystem )
|
Q_DECLARE_METATYPE( QgsCoordinateReferenceSystem )
|
||||||
|
|
||||||
//! Output stream operator
|
//! Output stream operator
|
||||||
|
#ifndef SIP_RUN
|
||||||
inline std::ostream &operator << ( std::ostream &os, const QgsCoordinateReferenceSystem &r )
|
inline std::ostream &operator << ( std::ostream &os, const QgsCoordinateReferenceSystem &r )
|
||||||
{
|
{
|
||||||
QString mySummary( QStringLiteral( "\n\tSpatial Reference System:" ) );
|
QString mySummary( QStringLiteral( "\n\tSpatial Reference System:" ) );
|
||||||
@ -766,5 +759,6 @@ inline std::ostream &operator << ( std::ostream &os, const QgsCoordinateReferenc
|
|||||||
// Using streams we need to use local 8 Bit
|
// Using streams we need to use local 8 Bit
|
||||||
return os << mySummary.toLocal8Bit().data() << std::endl;
|
return os << mySummary.toLocal8Bit().data() << std::endl;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // QGSCOORDINATEREFERENCESYSTEM_H
|
#endif // QGSCOORDINATEREFERENCESYSTEM_H
|
||||||
|
@ -167,7 +167,7 @@ class CORE_EXPORT QgsCoordinateTransform
|
|||||||
* \param direction transform direction (defaults to ForwardTransform)
|
* \param direction transform direction (defaults to ForwardTransform)
|
||||||
* \note not available in Python bindings
|
* \note not available in Python bindings
|
||||||
*/
|
*/
|
||||||
void transformInPlace( float &x, float &y, double &z, TransformDirection direction = ForwardTransform ) const;
|
void transformInPlace( float &x, float &y, double &z, TransformDirection direction = ForwardTransform ) const SIP_SKIP;
|
||||||
|
|
||||||
/** Transforms an array of x, y and z float coordinates in place, from the source CRS to the destination CRS.
|
/** Transforms an array of x, y and z float coordinates in place, from the source CRS to the destination CRS.
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
||||||
@ -180,7 +180,7 @@ class CORE_EXPORT QgsCoordinateTransform
|
|||||||
* \param direction transform direction (defaults to ForwardTransform)
|
* \param direction transform direction (defaults to ForwardTransform)
|
||||||
* \note not available in Python bindings
|
* \note not available in Python bindings
|
||||||
*/
|
*/
|
||||||
void transformInPlace( float &x, float &y, float &z, TransformDirection direction = ForwardTransform ) const;
|
void transformInPlace( float &x, float &y, float &z, TransformDirection direction = ForwardTransform ) const SIP_SKIP;
|
||||||
|
|
||||||
/** Transforms a vector of x, y and z float coordinates in place, from the source CRS to the destination CRS.
|
/** Transforms a vector of x, y and z float coordinates in place, from the source CRS to the destination CRS.
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
||||||
@ -194,7 +194,7 @@ class CORE_EXPORT QgsCoordinateTransform
|
|||||||
* \note not available in Python bindings
|
* \note not available in Python bindings
|
||||||
*/
|
*/
|
||||||
void transformInPlace( QVector<float> &x, QVector<float> &y, QVector<float> &z,
|
void transformInPlace( QVector<float> &x, QVector<float> &y, QVector<float> &z,
|
||||||
TransformDirection direction = ForwardTransform ) const;
|
TransformDirection direction = ForwardTransform ) const SIP_SKIP;
|
||||||
|
|
||||||
/** Transforms a vector of x, y and z double coordinates in place, from the source CRS to the destination CRS.
|
/** Transforms a vector of x, y and z double coordinates in place, from the source CRS to the destination CRS.
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
||||||
@ -208,7 +208,7 @@ class CORE_EXPORT QgsCoordinateTransform
|
|||||||
* \note not available in Python bindings
|
* \note not available in Python bindings
|
||||||
*/
|
*/
|
||||||
void transformInPlace( QVector<double> &x, QVector<double> &y, QVector<double> &z,
|
void transformInPlace( QVector<double> &x, QVector<double> &y, QVector<double> &z,
|
||||||
TransformDirection direction = ForwardTransform ) const;
|
TransformDirection direction = ForwardTransform ) const SIP_SKIP;
|
||||||
|
|
||||||
/** Transforms a polygon to the destination coordinate system.
|
/** Transforms a polygon to the destination coordinate system.
|
||||||
* \param polygon polygon to transform (occurs in place)
|
* \param polygon polygon to transform (occurs in place)
|
||||||
@ -223,7 +223,7 @@ class CORE_EXPORT QgsCoordinateTransform
|
|||||||
* \param direction transform direction (defaults to ForwardTransform)
|
* \param direction transform direction (defaults to ForwardTransform)
|
||||||
* \returns transformed rectangle
|
* \returns transformed rectangle
|
||||||
*/
|
*/
|
||||||
QgsRectangle transform( const QgsRectangle &rectangle, TransformDirection direction = ForwardTransform ) const;
|
QgsRectangle transform( const QgsRectangle &rectangle, TransformDirection direction = ForwardTransform ) const SIP_SKIP;
|
||||||
|
|
||||||
/** Transform an array of coordinates to the destination CRS.
|
/** Transform an array of coordinates to the destination CRS.
|
||||||
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
* If the direction is ForwardTransform then coordinates are transformed from source to destination,
|
||||||
@ -243,7 +243,8 @@ class CORE_EXPORT QgsCoordinateTransform
|
|||||||
/** Returns list of datum transformations for the given src and dest CRS
|
/** Returns list of datum transformations for the given src and dest CRS
|
||||||
* \note not available in Python bindings
|
* \note not available in Python bindings
|
||||||
*/
|
*/
|
||||||
static QList< QList< int > > datumTransformations( const QgsCoordinateReferenceSystem &srcCRS, const QgsCoordinateReferenceSystem &destinationCrs );
|
static QList< QList< int > > datumTransformations( const QgsCoordinateReferenceSystem &srcCRS, const QgsCoordinateReferenceSystem &destinationCrs ) SIP_SKIP;
|
||||||
|
|
||||||
static QString datumTransformString( int datumTransform );
|
static QString datumTransformString( int datumTransform );
|
||||||
|
|
||||||
/** Gets name of source and dest geographical CRS (to show in a tooltip)
|
/** Gets name of source and dest geographical CRS (to show in a tooltip)
|
||||||
@ -281,6 +282,7 @@ class CORE_EXPORT QgsCoordinateTransform
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Output stream operator
|
//! Output stream operator
|
||||||
|
#ifndef SIP_RUN
|
||||||
inline std::ostream &operator << ( std::ostream &os, const QgsCoordinateTransform &r )
|
inline std::ostream &operator << ( std::ostream &os, const QgsCoordinateTransform &r )
|
||||||
{
|
{
|
||||||
QString mySummary( QStringLiteral( "\n%%%%%%%%%%%%%%%%%%%%%%%%\nCoordinate Transform def begins:" ) );
|
QString mySummary( QStringLiteral( "\n%%%%%%%%%%%%%%%%%%%%%%%%\nCoordinate Transform def begins:" ) );
|
||||||
@ -334,6 +336,7 @@ inline std::ostream &operator << ( std::ostream &os, const QgsCoordinateTransfor
|
|||||||
mySummary += QLatin1String( "\nCoordinate Transform def ends \n%%%%%%%%%%%%%%%%%%%%%%%%\n" );
|
mySummary += QLatin1String( "\nCoordinate Transform def ends \n%%%%%%%%%%%%%%%%%%%%%%%%\n" );
|
||||||
return os << mySummary.toLocal8Bit().data() << std::endl;
|
return os << mySummary.toLocal8Bit().data() << std::endl;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif // QGSCOORDINATETRANSFORM_H
|
#endif // QGSCOORDINATETRANSFORM_H
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include "qgis_core.h"
|
#include "qgis_core.h"
|
||||||
|
#include "qgis.h"
|
||||||
|
|
||||||
/** \ingroup core
|
/** \ingroup core
|
||||||
* Base class for feedback objects to be used for cancelation of something running in a worker thread.
|
* Base class for feedback objects to be used for cancelation of something running in a worker thread.
|
||||||
@ -44,7 +45,7 @@ class CORE_EXPORT QgsFeedback : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
//! Construct a feedback object
|
//! Construct a feedback object
|
||||||
QgsFeedback( QObject *parent = nullptr )
|
QgsFeedback( QObject *parent SIP_TRANSFERTHIS = nullptr )
|
||||||
: QObject( parent )
|
: QObject( parent )
|
||||||
, mCanceled( false )
|
, mCanceled( false )
|
||||||
{}
|
{}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user