Skip to content

Commit 10d34ec

Browse files
committedApr 24, 2017
sipify batch
* QgsBearingUtils * QgsBrowserModel * QgsColorScheme, QgsColorSchemeRegistry * QgsContextHelp * QgsCoordinateReferenceSystem * QgsCoordinateTransform * QgsFeedback
1 parent 6e7b753 commit 10d34ec

16 files changed

+1405
-1016
lines changed
 

‎python/auto_sip.blacklist

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ core/conversions.sip
22
core/qgsexception.sip
33
core/qgis.sip
44
core/qgsapplication.sip
5-
core/qgsbearingutils.sip
6-
core/qgsbrowsermodel.sip
7-
core/qgscolorscheme.sip
8-
core/qgscolorschemeregistry.sip
9-
core/qgscontexthelp.sip
10-
core/qgscoordinatereferencesystem.sip
11-
core/qgscoordinatetransform.sip
125
core/qgscredentials.sip
136
core/qgscrscache.sip
147
core/qgsdataitem.sip
@@ -28,7 +21,6 @@ core/qgsexpressioncontextgenerator.sip
2821
core/qgsfeaturefilterprovider.sip
2922
core/qgsfeatureiterator.sip
3023
core/qgsfeaturerequest.sip
31-
core/qgsfeedback.sip
3224
core/qgsfield.sip
3325
core/qgsfieldconstraints.sip
3426
core/qgsfields.sip

‎python/core/qgsbearingutils.sip

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,42 @@
1-
/**
2-
* \class QgsBearingUtils
3-
* \ingroup core
4-
* Utilities for calculating bearings and directions.
5-
* \note Added in version 2.18
6-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/core/qgsbearingutils.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
713
class QgsBearingUtils
814
{
15+
%Docstring
16+
Utilities for calculating bearings and directions.
17+
.. versionadded:: 2.18
18+
%End
19+
920
%TypeHeaderCode
10-
#include <qgsbearingutils.h>
21+
#include "qgsbearingutils.h"
1122
%End
1223
public:
1324

14-
/**
15-
* Returns the direction to true north from a specified point and for a specified
16-
* coordinate reference system. The returned value is in degrees clockwise from
17-
* vertical. An exception will be thrown if the bearing could not be calculated.
18-
*/
19-
static double bearingTrueNorth( const QgsCoordinateReferenceSystem& crs,
20-
const QgsPoint& point );
25+
static double bearingTrueNorth( const QgsCoordinateReferenceSystem &crs,
26+
const QgsPoint &point );
27+
%Docstring
28+
Returns the direction to true north from a specified point and for a specified
29+
coordinate reference system. The returned value is in degrees clockwise from
30+
vertical. An exception will be thrown if the bearing could not be calculated.
31+
:rtype: float
32+
%End
33+
2134
};
35+
36+
/************************************************************************
37+
* This file has been generated automatically from *
38+
* *
39+
* src/core/qgsbearingutils.h *
40+
* *
41+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
42+
************************************************************************/

‎python/core/qgsbrowsermodel.sip

Lines changed: 131 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,191 @@
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/core/qgsbrowsermodel.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
112
class QgsBrowserModel : QAbstractItemModel
213
{
14+
315
%TypeHeaderCode
4-
#include <qgsbrowsermodel.h>
16+
#include "qgsbrowsermodel.h"
517
%End
6-
718
public:
819
explicit QgsBrowserModel( QObject *parent = 0 );
920
~QgsBrowserModel();
1021

1122
enum ItemDataRole
1223
{
13-
PathRole, /*!< Item path used to access path in the tree, see QgsDataItem::mPath */
14-
CommentRole, /*!< Item comment */
24+
PathRole
25+
CommentRole
1526
};
16-
// implemented methods from QAbstractItemModel for read-only access
1727

18-
/** Used by other components to obtain information about each item provided by the model.
19-
In many models, the combination of flags should include Qt::ItemIsEnabled and Qt::ItemIsSelectable. */
2028
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
29+
%Docstring
30+
Used by other components to obtain information about each item provided by the model.
31+
In many models, the combination of flags should include Qt.ItemIsEnabled and Qt.ItemIsSelectable. *
32+
:rtype: Qt.ItemFlags
33+
%End
2134

22-
/** Used to supply item data to views and delegates. Generally, models only need to supply data
23-
for Qt::DisplayRole and any application-specific user roles, but it is also good practice
24-
to provide data for Qt::ToolTipRole, Qt::AccessibleTextRole, and Qt::AccessibleDescriptionRole.
25-
See the Qt::ItemDataRole enum documentation for information about the types associated with each role. */
2635
virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const;
36+
%Docstring
37+
Used to supply item data to views and delegates. Generally, models only need to supply data
38+
for Qt.DisplayRole and any application-specific user roles, but it is also good practice
39+
to provide data for Qt.ToolTipRole, Qt.AccessibleTextRole, and Qt.AccessibleDescriptionRole.
40+
See the Qt.ItemDataRole enum documentation for information about the types associated with each role. *
41+
:rtype: QVariant
42+
%End
2743

28-
/** Provides views with information to show in their headers. The information is only retrieved
29-
by views that can display header information. */
3044
virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
45+
%Docstring
46+
Provides views with information to show in their headers. The information is only retrieved
47+
by views that can display header information. *
48+
:rtype: QVariant
49+
%End
3150

32-
/** Provides the number of rows of data exposed by the model. */
3351
virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;
52+
%Docstring
53+
Provides the number of rows of data exposed by the model.
54+
:rtype: int
55+
%End
3456

35-
/** Provides the number of columns of data exposed by the model. List models do not provide this function
36-
because it is already implemented in QAbstractListModel. */
3757
virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;
58+
%Docstring
59+
Provides the number of columns of data exposed by the model. List models do not provide this function
60+
because it is already implemented in QAbstractListModel. *
61+
:rtype: int
62+
%End
3863

39-
/** Returns the index of the item in the model specified by the given row, column and parent index. */
40-
virtual QModelIndex index( int row, int column, const QModelIndex & parent = QModelIndex() ) const;
64+
virtual QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const;
65+
%Docstring
66+
Returns the index of the item in the model specified by the given row, column and parent index.
67+
:rtype: QModelIndex
68+
%End
4169

4270
QModelIndex findItem( QgsDataItem *item, QgsDataItem *parent = 0 ) const;
71+
%Docstring
72+
:rtype: QModelIndex
73+
%End
4374

44-
/** Returns the parent of the model item with the given index.
45-
* If the item has no parent, an invalid QModelIndex is returned.
46-
*/
4775
virtual QModelIndex parent( const QModelIndex &index ) const;
76+
%Docstring
77+
Returns the parent of the model item with the given index.
78+
If the item has no parent, an invalid QModelIndex is returned.
79+
:rtype: QModelIndex
80+
%End
4881

49-
/** Returns a list of mime that can describe model indexes */
5082
virtual QStringList mimeTypes() const;
83+
%Docstring
84+
Returns a list of mime that can describe model indexes
85+
:rtype: list of str
86+
%End
5187

52-
/** Returns an object that contains serialized items of data corresponding to the list of indexes specified */
53-
virtual QMimeData * mimeData( const QModelIndexList &indexes ) const;
88+
virtual QMimeData *mimeData( const QModelIndexList &indexes ) const;
89+
%Docstring
90+
Returns an object that contains serialized items of data corresponding to the list of indexes specified
91+
:rtype: QMimeData
92+
%End
5493

55-
/** Handles the data supplied by a drag and drop operation that ended with the given action */
56-
virtual bool dropMimeData( const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent );
94+
virtual bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent );
95+
%Docstring
96+
Handles the data supplied by a drag and drop operation that ended with the given action
97+
:rtype: bool
98+
%End
5799

58100
QgsDataItem *dataItem( const QModelIndex &idx ) const;
101+
%Docstring
102+
:rtype: QgsDataItem
103+
%End
104+
105+
virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
59106

60-
bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
61107

62-
//! Refresh item specified by path
63-
void refresh( const QString& path );
108+
void refresh( const QString &path );
109+
%Docstring
110+
Refresh item specified by path
111+
%End
64112

65-
//! Refresh item children
66113
void refresh( const QModelIndex &index = QModelIndex() );
114+
%Docstring
115+
Refresh item children
116+
%End
67117

68-
/** Return index of item with given path. It only searches in currently fetched
69-
* items, i.e. it does not fetch children.
70-
* @param path item path
71-
* @param matchFlag supported is Qt::MatchExactly and Qt::MatchStartsWith which has reverse meaning, i.e. find
72-
* item with the longest match from start with path (to get as close/deep as possible to deleted item).
73-
* @return model index, invalid if item not found */
74-
QModelIndex findPath( const QString& path, Qt::MatchFlag matchFlag = Qt::MatchExactly );
118+
QModelIndex findPath( const QString &path, Qt::MatchFlag matchFlag = Qt::MatchExactly );
119+
%Docstring
120+
Return index of item with given path. It only searches in currently fetched
121+
items, i.e. it does not fetch children.
122+
\param path item path
123+
\param matchFlag supported is Qt.MatchExactly and Qt.MatchStartsWith which has reverse meaning, i.e. find
124+
item with the longest match from start with path (to get as close/deep as possible to deleted item).
125+
:return: model index, invalid if item not found *
126+
:rtype: QModelIndex
127+
%End
75128

76-
//! @note not available in python bindings
77-
// static QModelIndex findPath( QAbstractItemModel *model, const QString& path, Qt::MatchFlag matchFlag = Qt::MatchExactly );
78129

79130
void connectItem( QgsDataItem *item );
80131

81-
bool canFetchMore( const QModelIndex & parent ) const;
82-
void fetchMore( const QModelIndex & parent );
132+
virtual bool canFetchMore( const QModelIndex &parent ) const;
133+
134+
virtual void fetchMore( const QModelIndex &parent );
135+
83136

84137
signals:
85-
/** Emitted when item children fetch was finished */
86-
void stateChanged( const QModelIndex & index, QgsDataItem::State oldState );
138+
void stateChanged( const QModelIndex &index, QgsDataItem::State oldState );
139+
%Docstring
140+
Emitted when item children fetch was finished
141+
%End
87142

88143
public slots:
89-
//! Reload the whole model
90144
void reload();
145+
%Docstring
146+
Reload the whole model
147+
%End
91148
void beginInsertItems( QgsDataItem *parent, int first, int last );
92149
void endInsertItems();
93150
void beginRemoveItems( QgsDataItem *parent, int first, int last );
94151
void endRemoveItems();
95-
void itemDataChanged( QgsDataItem * item );
96-
void itemStateChanged( QgsDataItem * item, QgsDataItem::State oldState );
97-
98-
/**
99-
* Adds a directory to the favorites group.
100-
* @note added in QGIS 3.0
101-
* @see removeFavorite()
102-
*/
103-
void addFavoriteDirectory( const QString& directory );
104-
105-
/**
106-
* Removes a favorite directory from its corresponding model index.
107-
* @note added in QGIS 3.0
108-
* @see addFavoriteDirectory()
109-
*/
152+
void itemDataChanged( QgsDataItem *item );
153+
void itemStateChanged( QgsDataItem *item, QgsDataItem::State oldState );
154+
155+
void addFavoriteDirectory( const QString &directory );
156+
%Docstring
157+
Adds a directory to the favorites group.
158+
.. versionadded:: 3.0
159+
\see removeFavorite()
160+
%End
161+
110162
void removeFavorite( const QModelIndex &index );
163+
%Docstring
164+
Removes a favorite directory from its corresponding model index.
165+
.. versionadded:: 3.0
166+
\see addFavoriteDirectory()
167+
%End
111168

112169
void updateProjectHome();
113170

114-
/** Hide the given path in the browser model */
115171
void hidePath( QgsDataItem *item );
172+
%Docstring
173+
Hide the given path in the browser model
174+
%End
116175

117176
protected:
118-
//! Populates the model
119177
void addRootItems();
178+
%Docstring
179+
Populates the model
180+
%End
120181
void removeRootItems();
182+
121183
};
184+
185+
/************************************************************************
186+
* This file has been generated automatically from *
187+
* *
188+
* src/core/qgsbrowsermodel.h *
189+
* *
190+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
191+
************************************************************************/

0 commit comments

Comments
 (0)
Please sign in to comment.