mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
Fix build, dox++
This commit is contained in:
parent
6470aacb33
commit
b643465b12
@ -11,12 +11,35 @@
|
|||||||
|
|
||||||
class QgsBrowserModel : QAbstractItemModel
|
class QgsBrowserModel : QAbstractItemModel
|
||||||
{
|
{
|
||||||
|
%Docstring
|
||||||
|
|
||||||
|
A model for showing available data sources and other items in a structured
|
||||||
|
tree.
|
||||||
|
|
||||||
|
QgsBrowserModel is the foundation for the QGIS browser panel, and includes
|
||||||
|
items for the different data providers and folders accessible to users.
|
||||||
|
|
||||||
|
QgsBrowserModel models are not initially populated and use a deferred initialization
|
||||||
|
approach. After constructing a QgsBrowserModel, a call must be made
|
||||||
|
to initialize() in order to populate the model.
|
||||||
|
%End
|
||||||
|
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include "qgsbrowsermodel.h"
|
#include "qgsbrowsermodel.h"
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit QgsBrowserModel( QObject *parent = 0 );
|
explicit QgsBrowserModel( QObject *parent = 0 );
|
||||||
|
%Docstring
|
||||||
|
Constructor for QgsBrowserModel, with the specified ``parent`` object.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
QgsBrowserModel models are not initially populated and use a deferred initialization
|
||||||
|
approach. After constructing a QgsBrowserModel, a call must be made
|
||||||
|
to initialize() in order to populate the model.
|
||||||
|
%End
|
||||||
|
|
||||||
~QgsBrowserModel();
|
~QgsBrowserModel();
|
||||||
|
|
||||||
enum ItemDataRole
|
enum ItemDataRole
|
||||||
@ -28,77 +51,34 @@ class QgsBrowserModel : QAbstractItemModel
|
|||||||
|
|
||||||
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. *
|
|
||||||
%End
|
|
||||||
|
|
||||||
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. *
|
|
||||||
%End
|
|
||||||
|
|
||||||
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. *
|
|
||||||
%End
|
|
||||||
|
|
||||||
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.
|
|
||||||
%End
|
|
||||||
|
|
||||||
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. *
|
|
||||||
%End
|
|
||||||
|
|
||||||
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.
|
|
||||||
%End
|
|
||||||
|
|
||||||
QModelIndex findItem( QgsDataItem *item, QgsDataItem *parent = 0 ) const;
|
|
||||||
|
|
||||||
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.
|
|
||||||
%End
|
|
||||||
|
|
||||||
virtual QStringList mimeTypes() const;
|
virtual QStringList mimeTypes() const;
|
||||||
|
|
||||||
%Docstring
|
|
||||||
Returns a list of mime that can describe model indexes
|
|
||||||
%End
|
|
||||||
|
|
||||||
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
|
|
||||||
%End
|
|
||||||
|
|
||||||
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
|
|
||||||
%End
|
|
||||||
|
|
||||||
QgsDataItem *dataItem( const QModelIndex &idx ) const;
|
|
||||||
|
|
||||||
virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
|
virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
|
||||||
|
|
||||||
|
virtual bool canFetchMore( const QModelIndex &parent ) const;
|
||||||
|
|
||||||
|
virtual void fetchMore( const QModelIndex &parent );
|
||||||
|
|
||||||
|
|
||||||
|
QModelIndex findItem( QgsDataItem *item, QgsDataItem *parent = 0 ) const;
|
||||||
|
|
||||||
|
QgsDataItem *dataItem( const QModelIndex &idx ) const;
|
||||||
|
|
||||||
void refresh( const QString &path );
|
void refresh( const QString &path );
|
||||||
%Docstring
|
%Docstring
|
||||||
@ -125,14 +105,11 @@ items, i.e. it does not fetch children.
|
|||||||
|
|
||||||
void connectItem( QgsDataItem *item );
|
void connectItem( QgsDataItem *item );
|
||||||
|
|
||||||
virtual bool canFetchMore( const QModelIndex &parent ) const;
|
bool initialized() const;
|
||||||
|
|
||||||
virtual void fetchMore( const QModelIndex &parent );
|
|
||||||
|
|
||||||
|
|
||||||
bool initialized( ) const;
|
|
||||||
%Docstring
|
%Docstring
|
||||||
Returns true if the model has been initialized
|
Returns true if the model has been initialized.
|
||||||
|
|
||||||
|
.. seealso:: :py:func:`initialize`
|
||||||
%End
|
%End
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
@ -189,7 +166,9 @@ Hide the given path in the browser model
|
|||||||
|
|
||||||
void initialize();
|
void initialize();
|
||||||
%Docstring
|
%Docstring
|
||||||
Delayed initialization, needed because the provider registry must be already populated
|
Delayed initialization, needed because the provider registry must be already populated.
|
||||||
|
|
||||||
|
.. seealso:: :py:func:`initialized`
|
||||||
%End
|
%End
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -1021,7 +1021,7 @@ called on resize or changed extent to notify canvas items to change their rectan
|
|||||||
%End
|
%End
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QgsMapCanvas( QgsMapCanvas const & );
|
QgsMapCanvas( const QgsMapCanvas &const );
|
||||||
}; // class QgsMapCanvas
|
}; // class QgsMapCanvas
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,13 +51,32 @@ class CORE_EXPORT QgsBrowserWatcher : public QFutureWatcher<QVector <QgsDataItem
|
|||||||
/**
|
/**
|
||||||
* \ingroup core
|
* \ingroup core
|
||||||
* \class QgsBrowserModel
|
* \class QgsBrowserModel
|
||||||
|
*
|
||||||
|
* A model for showing available data sources and other items in a structured
|
||||||
|
* tree.
|
||||||
|
*
|
||||||
|
* QgsBrowserModel is the foundation for the QGIS browser panel, and includes
|
||||||
|
* items for the different data providers and folders accessible to users.
|
||||||
|
*
|
||||||
|
* QgsBrowserModel models are not initially populated and use a deferred initialization
|
||||||
|
* approach. After constructing a QgsBrowserModel, a call must be made
|
||||||
|
* to initialize() in order to populate the model.
|
||||||
*/
|
*/
|
||||||
class CORE_EXPORT QgsBrowserModel : public QAbstractItemModel
|
class CORE_EXPORT QgsBrowserModel : public QAbstractItemModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for QgsBrowserModel, with the specified \a parent object.
|
||||||
|
*
|
||||||
|
* \note QgsBrowserModel models are not initially populated and use a deferred initialization
|
||||||
|
* approach. After constructing a QgsBrowserModel, a call must be made
|
||||||
|
* to initialize() in order to populate the model.
|
||||||
|
*/
|
||||||
explicit QgsBrowserModel( QObject *parent = nullptr );
|
explicit QgsBrowserModel( QObject *parent = nullptr );
|
||||||
|
|
||||||
~QgsBrowserModel() override;
|
~QgsBrowserModel() override;
|
||||||
|
|
||||||
enum ItemDataRole
|
enum ItemDataRole
|
||||||
@ -68,55 +87,24 @@ class CORE_EXPORT QgsBrowserModel : public QAbstractItemModel
|
|||||||
};
|
};
|
||||||
// implemented methods from QAbstractItemModel for read-only access
|
// 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. */
|
|
||||||
Qt::ItemFlags flags( const QModelIndex &index ) const override;
|
Qt::ItemFlags flags( const QModelIndex &index ) const override;
|
||||||
|
|
||||||
/**
|
|
||||||
* 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. */
|
|
||||||
QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const override;
|
QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const override;
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides views with information to show in their headers. The information is only retrieved
|
|
||||||
by views that can display header information. */
|
|
||||||
QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;
|
QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;
|
||||||
|
|
||||||
//! Provides the number of rows of data exposed by the model.
|
|
||||||
int rowCount( const QModelIndex &parent = QModelIndex() ) const override;
|
int rowCount( const QModelIndex &parent = QModelIndex() ) const override;
|
||||||
|
|
||||||
/**
|
|
||||||
* 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. */
|
|
||||||
int columnCount( const QModelIndex &parent = QModelIndex() ) const override;
|
int columnCount( const QModelIndex &parent = QModelIndex() ) const override;
|
||||||
|
|
||||||
//! Returns the index of the item in the model specified by the given row, column and parent index.
|
|
||||||
QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const override;
|
QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const override;
|
||||||
|
QModelIndex parent( const QModelIndex &index ) const override;
|
||||||
|
QStringList mimeTypes() const override;
|
||||||
|
QMimeData *mimeData( const QModelIndexList &indexes ) const override;
|
||||||
|
bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent ) override;
|
||||||
|
bool hasChildren( const QModelIndex &parent = QModelIndex() ) const override;
|
||||||
|
bool canFetchMore( const QModelIndex &parent ) const override;
|
||||||
|
void fetchMore( const QModelIndex &parent ) override;
|
||||||
|
|
||||||
QModelIndex findItem( QgsDataItem *item, QgsDataItem *parent = nullptr ) const;
|
QModelIndex findItem( QgsDataItem *item, QgsDataItem *parent = nullptr ) const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the parent of the model item with the given index.
|
|
||||||
* If the item has no parent, an invalid QModelIndex is returned.
|
|
||||||
*/
|
|
||||||
QModelIndex parent( const QModelIndex &index ) const override;
|
|
||||||
|
|
||||||
//! Returns a list of mime that can describe model indexes
|
|
||||||
QStringList mimeTypes() const override;
|
|
||||||
|
|
||||||
//! Returns an object that contains serialized items of data corresponding to the list of indexes specified
|
|
||||||
QMimeData *mimeData( const QModelIndexList &indexes ) const override;
|
|
||||||
|
|
||||||
//! Handles the data supplied by a drag and drop operation that ended with the given action
|
|
||||||
bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent ) override;
|
|
||||||
|
|
||||||
QgsDataItem *dataItem( const QModelIndex &idx ) const;
|
QgsDataItem *dataItem( const QModelIndex &idx ) const;
|
||||||
|
|
||||||
bool hasChildren( const QModelIndex &parent = QModelIndex() ) const override;
|
|
||||||
|
|
||||||
//! Refresh item specified by path
|
//! Refresh item specified by path
|
||||||
void refresh( const QString &path );
|
void refresh( const QString &path );
|
||||||
|
|
||||||
@ -137,11 +125,12 @@ class CORE_EXPORT QgsBrowserModel : public QAbstractItemModel
|
|||||||
|
|
||||||
void connectItem( QgsDataItem *item );
|
void connectItem( QgsDataItem *item );
|
||||||
|
|
||||||
bool canFetchMore( const QModelIndex &parent ) const override;
|
/**
|
||||||
void fetchMore( const QModelIndex &parent ) override;
|
* Returns true if the model has been initialized.
|
||||||
|
*
|
||||||
//! Returns true if the model has been initialized
|
* \see initialize()
|
||||||
bool initialized( ) const { return mInitialized; }
|
*/
|
||||||
|
bool initialized() const { return mInitialized; }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
//! Emitted when item children fetch was finished
|
//! Emitted when item children fetch was finished
|
||||||
@ -186,7 +175,10 @@ class CORE_EXPORT QgsBrowserModel : public QAbstractItemModel
|
|||||||
//! Hide the given path in the browser model
|
//! Hide the given path in the browser model
|
||||||
void hidePath( QgsDataItem *item );
|
void hidePath( QgsDataItem *item );
|
||||||
|
|
||||||
//! Delayed initialization, needed because the provider registry must be already populated
|
/**
|
||||||
|
* Delayed initialization, needed because the provider registry must be already populated.
|
||||||
|
* \see initialized()
|
||||||
|
*/
|
||||||
void initialize();
|
void initialize();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -908,7 +908,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
|
|||||||
/// this class is non-copyable
|
/// this class is non-copyable
|
||||||
|
|
||||||
#ifdef SIP_RUN
|
#ifdef SIP_RUN
|
||||||
QgsMapCanvas( QgsMapCanvas const & );
|
QgsMapCanvas( const QgsMapCanvas &const );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! encompases all map settings necessary for map rendering
|
//! encompases all map settings necessary for map rendering
|
||||||
|
Loading…
x
Reference in New Issue
Block a user