mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Doxygen fixes and api break fixes
This commit is contained in:
parent
7659dd8b8b
commit
c396d70d14
@ -22,6 +22,14 @@ 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.
|
||||
|
||||
.. note::
|
||||
|
||||
Since QGIS 3.10 it is recommended to use QgsBrowserGuiModel from GUI library.
|
||||
Implementation of data items used from QgsBrowserModel should not trigger any GUI
|
||||
operations such as opening of widgets/dialogs or showing message boxes. Such actions
|
||||
should be implemented in a new QgsDataItemGuiProvider subclass which is used
|
||||
by QgsBrowserGuiModel (but not by QgsBrowserModel).
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
@ -69,6 +77,8 @@ Constructor for QgsBrowserModel, with the specified ``parent`` object.
|
||||
|
||||
virtual QMimeData *mimeData( const QModelIndexList &indexes ) const;
|
||||
|
||||
virtual bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent );
|
||||
|
||||
virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
|
||||
|
||||
virtual bool canFetchMore( const QModelIndex &parent ) const;
|
||||
|
@ -17,6 +17,8 @@ tree.
|
||||
|
||||
QgsBrowserGuiModel is the foundation for the QGIS browser panel, and includes
|
||||
items for the different data providers and folders accessible to users.
|
||||
|
||||
.. versionadded:: 3.10
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
@ -41,6 +43,9 @@ Constructor for QgsBrowserGuiModel, with the specified ``parent`` object.
|
||||
int row, int column, const QModelIndex &parent );
|
||||
|
||||
void setMessageBar( QgsMessageBar *bar );
|
||||
%Docstring
|
||||
Sets message bar that will be passed in QgsDataItemGuiContext to data items
|
||||
%End
|
||||
|
||||
};
|
||||
|
||||
|
@ -26,6 +26,9 @@ QgsGui.instance()->dataItemGuiProviderRegistry().
|
||||
%End
|
||||
public:
|
||||
QgsDataItemGuiProviderRegistry( QgsProviderGuiRegistry *providerGuiRegistry );
|
||||
%Docstring
|
||||
Initializes the registry. Do not create new instances in client code - use QgsGui.dataItemGuiProviderRegistry() instead
|
||||
%End
|
||||
~QgsDataItemGuiProviderRegistry();
|
||||
|
||||
|
||||
|
@ -30,6 +30,9 @@ QgsProjectStorageGuiRegistry is not usually directly created, but rather accesse
|
||||
%End
|
||||
public:
|
||||
QgsProjectStorageGuiRegistry( QgsProviderGuiRegistry *providerGuiRegistry );
|
||||
%Docstring
|
||||
Initializes the registry. Do not create new instances in client code - use QgsGui.projectStorageGuiRegistry() instead
|
||||
%End
|
||||
~QgsProjectStorageGuiRegistry();
|
||||
|
||||
|
||||
|
@ -33,9 +33,7 @@ Constructor for provider gui metadata
|
||||
|
||||
virtual QList<QgsDataItemGuiProvider *> dataItemGuiProviders();
|
||||
%Docstring
|
||||
Data GUI item
|
||||
|
||||
.. seealso:: :py:func:`QgsProviderBrowserMetadata.dataItemProviders`
|
||||
Returns data item gui providers
|
||||
%End
|
||||
|
||||
virtual void registerGui( QMainWindow *widget );
|
||||
|
@ -596,6 +596,20 @@ QMimeData *QgsBrowserModel::mimeData( const QModelIndexList &indexes ) const
|
||||
return QgsMimeDataUtils::encodeUriList( lst );
|
||||
}
|
||||
|
||||
bool QgsBrowserModel::dropMimeData( const QMimeData *data, Qt::DropAction action, int, int, const QModelIndex &parent )
|
||||
{
|
||||
QgsDataItem *destItem = dataItem( parent );
|
||||
if ( !destItem )
|
||||
{
|
||||
QgsDebugMsgLevel( QStringLiteral( "DROP PROBLEM!" ), 4 );
|
||||
return false;
|
||||
}
|
||||
|
||||
Q_NOWARN_DEPRECATED_PUSH
|
||||
return destItem->handleDrop( data, action );
|
||||
Q_NOWARN_DEPRECATED_POP
|
||||
}
|
||||
|
||||
QgsDataItem *QgsBrowserModel::dataItem( const QModelIndex &idx ) const
|
||||
{
|
||||
void *v = idx.internalPointer();
|
||||
|
@ -61,6 +61,12 @@ class CORE_EXPORT QgsBrowserWatcher : public QFutureWatcher<QVector <QgsDataItem
|
||||
* 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.
|
||||
*
|
||||
* \note Since QGIS 3.10 it is recommended to use QgsBrowserGuiModel from GUI library.
|
||||
* Implementation of data items used from QgsBrowserModel should not trigger any GUI
|
||||
* operations such as opening of widgets/dialogs or showing message boxes. Such actions
|
||||
* should be implemented in a new QgsDataItemGuiProvider subclass which is used
|
||||
* by QgsBrowserGuiModel (but not by QgsBrowserModel).
|
||||
*/
|
||||
class CORE_EXPORT QgsBrowserModel : public QAbstractItemModel
|
||||
{
|
||||
@ -97,6 +103,7 @@ class CORE_EXPORT QgsBrowserModel : public QAbstractItemModel
|
||||
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;
|
||||
|
@ -31,6 +31,8 @@ class QgsMessageBar;
|
||||
*
|
||||
* QgsBrowserGuiModel is the foundation for the QGIS browser panel, and includes
|
||||
* items for the different data providers and folders accessible to users.
|
||||
*
|
||||
* \since QGIS 3.10
|
||||
*/
|
||||
class GUI_EXPORT QgsBrowserGuiModel : public QgsBrowserModel
|
||||
{
|
||||
@ -51,6 +53,7 @@ class GUI_EXPORT QgsBrowserGuiModel : public QgsBrowserModel
|
||||
bool dropMimeData( const QMimeData *data, Qt::DropAction action,
|
||||
int row, int column, const QModelIndex &parent ) override;
|
||||
|
||||
//! Sets message bar that will be passed in QgsDataItemGuiContext to data items
|
||||
void setMessageBar( QgsMessageBar *bar );
|
||||
|
||||
private:
|
||||
|
@ -37,6 +37,7 @@ class QgsProviderGuiRegistry;
|
||||
class GUI_EXPORT QgsDataItemGuiProviderRegistry
|
||||
{
|
||||
public:
|
||||
//! Initializes the registry. Do not create new instances in client code - use QgsGui::dataItemGuiProviderRegistry() instead
|
||||
QgsDataItemGuiProviderRegistry( QgsProviderGuiRegistry *providerGuiRegistry );
|
||||
~QgsDataItemGuiProviderRegistry();
|
||||
|
||||
|
@ -44,6 +44,7 @@ class QgsProviderGuiRegistry;
|
||||
class GUI_EXPORT QgsProjectStorageGuiRegistry
|
||||
{
|
||||
public:
|
||||
//! Initializes the registry. Do not create new instances in client code - use QgsGui::projectStorageGuiRegistry() instead
|
||||
QgsProjectStorageGuiRegistry( QgsProviderGuiRegistry *providerGuiRegistry );
|
||||
~QgsProjectStorageGuiRegistry();
|
||||
|
||||
|
@ -45,10 +45,7 @@ class GUI_EXPORT QgsProviderGuiMetadata
|
||||
|
||||
virtual ~QgsProviderGuiMetadata();
|
||||
|
||||
/**
|
||||
* Data GUI item
|
||||
* \see QgsProviderBrowserMetadata::dataItemProviders()
|
||||
*/
|
||||
//! Returns data item gui providers
|
||||
virtual QList<QgsDataItemGuiProvider *> dataItemGuiProviders();
|
||||
|
||||
//! Assigns parent to widget
|
||||
|
Loading…
x
Reference in New Issue
Block a user