Skip to content

Commit b643465

Browse files
committedJun 17, 2018
Fix build, dox++
1 parent 6470aac commit b643465

File tree

4 files changed

+73
-102
lines changed

4 files changed

+73
-102
lines changed
 

‎python/core/auto_generated/qgsbrowsermodel.sip.in

Lines changed: 37 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,35 @@
1111

1212
class QgsBrowserModel : QAbstractItemModel
1313
{
14+
%Docstring
15+
16+
A model for showing available data sources and other items in a structured
17+
tree.
18+
19+
QgsBrowserModel is the foundation for the QGIS browser panel, and includes
20+
items for the different data providers and folders accessible to users.
21+
22+
QgsBrowserModel models are not initially populated and use a deferred initialization
23+
approach. After constructing a QgsBrowserModel, a call must be made
24+
to initialize() in order to populate the model.
25+
%End
1426

1527
%TypeHeaderCode
1628
#include "qgsbrowsermodel.h"
1729
%End
1830
public:
31+
1932
explicit QgsBrowserModel( QObject *parent = 0 );
33+
%Docstring
34+
Constructor for QgsBrowserModel, with the specified ``parent`` object.
35+
36+
.. note::
37+
38+
QgsBrowserModel models are not initially populated and use a deferred initialization
39+
approach. After constructing a QgsBrowserModel, a call must be made
40+
to initialize() in order to populate the model.
41+
%End
42+
2043
~QgsBrowserModel();
2144

2245
enum ItemDataRole
@@ -28,77 +51,34 @@ class QgsBrowserModel : QAbstractItemModel
2851

2952
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
3053

31-
%Docstring
32-
Used by other components to obtain information about each item provided by the model.
33-
In many models, the combination of flags should include Qt.ItemIsEnabled and Qt.ItemIsSelectable. *
34-
%End
35-
3654
virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const;
3755

38-
%Docstring
39-
Used to supply item data to views and delegates. Generally, models only need to supply data
40-
for Qt.DisplayRole and any application-specific user roles, but it is also good practice
41-
to provide data for Qt.ToolTipRole, Qt.AccessibleTextRole, and Qt.AccessibleDescriptionRole.
42-
See the Qt.ItemDataRole enum documentation for information about the types associated with each role. *
43-
%End
44-
4556
virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
4657

47-
%Docstring
48-
Provides views with information to show in their headers. The information is only retrieved
49-
by views that can display header information. *
50-
%End
51-
5258
virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;
5359

54-
%Docstring
55-
Provides the number of rows of data exposed by the model.
56-
%End
57-
5860
virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;
5961

60-
%Docstring
61-
Provides the number of columns of data exposed by the model. List models do not provide this function
62-
because it is already implemented in QAbstractListModel. *
63-
%End
64-
6562
virtual QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const;
6663

67-
%Docstring
68-
Returns the index of the item in the model specified by the given row, column and parent index.
69-
%End
70-
71-
QModelIndex findItem( QgsDataItem *item, QgsDataItem *parent = 0 ) const;
72-
7364
virtual QModelIndex parent( const QModelIndex &index ) const;
7465

75-
%Docstring
76-
Returns the parent of the model item with the given index.
77-
If the item has no parent, an invalid QModelIndex is returned.
78-
%End
79-
8066
virtual QStringList mimeTypes() const;
8167

82-
%Docstring
83-
Returns a list of mime that can describe model indexes
84-
%End
85-
8668
virtual QMimeData *mimeData( const QModelIndexList &indexes ) const;
8769

88-
%Docstring
89-
Returns an object that contains serialized items of data corresponding to the list of indexes specified
90-
%End
91-
9270
virtual bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent );
9371

94-
%Docstring
95-
Handles the data supplied by a drag and drop operation that ended with the given action
96-
%End
72+
virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
9773

98-
QgsDataItem *dataItem( const QModelIndex &idx ) const;
74+
virtual bool canFetchMore( const QModelIndex &parent ) const;
75+
76+
virtual void fetchMore( const QModelIndex &parent );
9977

100-
virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
10178

79+
QModelIndex findItem( QgsDataItem *item, QgsDataItem *parent = 0 ) const;
80+
81+
QgsDataItem *dataItem( const QModelIndex &idx ) const;
10282

10383
void refresh( const QString &path );
10484
%Docstring
@@ -125,14 +105,11 @@ items, i.e. it does not fetch children.
125105

126106
void connectItem( QgsDataItem *item );
127107

128-
virtual bool canFetchMore( const QModelIndex &parent ) const;
129-
130-
virtual void fetchMore( const QModelIndex &parent );
131-
132-
133-
bool initialized( ) const;
108+
bool initialized() const;
134109
%Docstring
135-
Returns true if the model has been initialized
110+
Returns true if the model has been initialized.
111+
112+
.. seealso:: :py:func:`initialize`
136113
%End
137114

138115
signals:
@@ -189,7 +166,9 @@ Hide the given path in the browser model
189166

190167
void initialize();
191168
%Docstring
192-
Delayed initialization, needed because the provider registry must be already populated
169+
Delayed initialization, needed because the provider registry must be already populated.
170+
171+
.. seealso:: :py:func:`initialized`
193172
%End
194173

195174
protected:

‎python/gui/auto_generated/qgsmapcanvas.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ called on resize or changed extent to notify canvas items to change their rectan
10211021
%End
10221022

10231023
private:
1024-
QgsMapCanvas( QgsMapCanvas const & );
1024+
QgsMapCanvas( const QgsMapCanvas &const );
10251025
}; // class QgsMapCanvas
10261026

10271027

‎src/core/qgsbrowsermodel.h

Lines changed: 34 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,32 @@ class CORE_EXPORT QgsBrowserWatcher : public QFutureWatcher<QVector <QgsDataItem
5151
/**
5252
* \ingroup core
5353
* \class QgsBrowserModel
54+
*
55+
* A model for showing available data sources and other items in a structured
56+
* tree.
57+
*
58+
* QgsBrowserModel is the foundation for the QGIS browser panel, and includes
59+
* items for the different data providers and folders accessible to users.
60+
*
61+
* QgsBrowserModel models are not initially populated and use a deferred initialization
62+
* approach. After constructing a QgsBrowserModel, a call must be made
63+
* to initialize() in order to populate the model.
5464
*/
5565
class CORE_EXPORT QgsBrowserModel : public QAbstractItemModel
5666
{
5767
Q_OBJECT
5868

5969
public:
70+
71+
/**
72+
* Constructor for QgsBrowserModel, with the specified \a parent object.
73+
*
74+
* \note QgsBrowserModel models are not initially populated and use a deferred initialization
75+
* approach. After constructing a QgsBrowserModel, a call must be made
76+
* to initialize() in order to populate the model.
77+
*/
6078
explicit QgsBrowserModel( QObject *parent = nullptr );
79+
6180
~QgsBrowserModel() override;
6281

6382
enum ItemDataRole
@@ -68,54 +87,23 @@ class CORE_EXPORT QgsBrowserModel : public QAbstractItemModel
6887
};
6988
// implemented methods from QAbstractItemModel for read-only access
7089

71-
/**
72-
* Used by other components to obtain information about each item provided by the model.
73-
In many models, the combination of flags should include Qt::ItemIsEnabled and Qt::ItemIsSelectable. */
7490
Qt::ItemFlags flags( const QModelIndex &index ) const override;
75-
76-
/**
77-
* Used to supply item data to views and delegates. Generally, models only need to supply data
78-
for Qt::DisplayRole and any application-specific user roles, but it is also good practice
79-
to provide data for Qt::ToolTipRole, Qt::AccessibleTextRole, and Qt::AccessibleDescriptionRole.
80-
See the Qt::ItemDataRole enum documentation for information about the types associated with each role. */
8191
QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const override;
82-
83-
/**
84-
* Provides views with information to show in their headers. The information is only retrieved
85-
by views that can display header information. */
8692
QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;
87-
88-
//! Provides the number of rows of data exposed by the model.
8993
int rowCount( const QModelIndex &parent = QModelIndex() ) const override;
90-
91-
/**
92-
* Provides the number of columns of data exposed by the model. List models do not provide this function
93-
because it is already implemented in QAbstractListModel. */
9494
int columnCount( const QModelIndex &parent = QModelIndex() ) const override;
95-
96-
//! Returns the index of the item in the model specified by the given row, column and parent index.
9795
QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const override;
98-
99-
QModelIndex findItem( QgsDataItem *item, QgsDataItem *parent = nullptr ) const;
100-
101-
/**
102-
* Returns the parent of the model item with the given index.
103-
* If the item has no parent, an invalid QModelIndex is returned.
104-
*/
10596
QModelIndex parent( const QModelIndex &index ) const override;
106-
107-
//! Returns a list of mime that can describe model indexes
10897
QStringList mimeTypes() const override;
109-
110-
//! Returns an object that contains serialized items of data corresponding to the list of indexes specified
11198
QMimeData *mimeData( const QModelIndexList &indexes ) const override;
112-
113-
//! Handles the data supplied by a drag and drop operation that ended with the given action
11499
bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent ) override;
100+
bool hasChildren( const QModelIndex &parent = QModelIndex() ) const override;
101+
bool canFetchMore( const QModelIndex &parent ) const override;
102+
void fetchMore( const QModelIndex &parent ) override;
115103

116-
QgsDataItem *dataItem( const QModelIndex &idx ) const;
104+
QModelIndex findItem( QgsDataItem *item, QgsDataItem *parent = nullptr ) const;
117105

118-
bool hasChildren( const QModelIndex &parent = QModelIndex() ) const override;
106+
QgsDataItem *dataItem( const QModelIndex &idx ) const;
119107

120108
//! Refresh item specified by path
121109
void refresh( const QString &path );
@@ -137,11 +125,12 @@ class CORE_EXPORT QgsBrowserModel : public QAbstractItemModel
137125

138126
void connectItem( QgsDataItem *item );
139127

140-
bool canFetchMore( const QModelIndex &parent ) const override;
141-
void fetchMore( const QModelIndex &parent ) override;
142-
143-
//! Returns true if the model has been initialized
144-
bool initialized( ) const { return mInitialized; }
128+
/**
129+
* Returns true if the model has been initialized.
130+
*
131+
* \see initialize()
132+
*/
133+
bool initialized() const { return mInitialized; }
145134

146135
signals:
147136
//! Emitted when item children fetch was finished
@@ -186,7 +175,10 @@ class CORE_EXPORT QgsBrowserModel : public QAbstractItemModel
186175
//! Hide the given path in the browser model
187176
void hidePath( QgsDataItem *item );
188177

189-
//! Delayed initialization, needed because the provider registry must be already populated
178+
/**
179+
* Delayed initialization, needed because the provider registry must be already populated.
180+
* \see initialized()
181+
*/
190182
void initialize();
191183

192184
protected:

‎src/gui/qgsmapcanvas.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
908908
/// this class is non-copyable
909909

910910
#ifdef SIP_RUN
911-
QgsMapCanvas( QgsMapCanvas const & );
911+
QgsMapCanvas( const QgsMapCanvas &const );
912912
#endif
913913

914914
//! encompases all map settings necessary for map rendering

0 commit comments

Comments
 (0)
Please sign in to comment.