mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
doxymentation and better wording
This commit is contained in:
parent
b957e17408
commit
95ab3d05e0
@ -911,12 +911,18 @@ Emitted when a layer from a projects was read.
|
||||
%End
|
||||
|
||||
void loadingLayer( const QString &layerName );
|
||||
%Docstring
|
||||
Emitted when a layer is loaded
|
||||
%End
|
||||
|
||||
void loadingLayerMessages( const QString &layerName, const QList<QgsReadWriteContext::ReadWriteMessage> &messages );
|
||||
void loadingLayerMessageReceived( const QString &layerName, const QList<QgsReadWriteContext::ReadWriteMessage> &messages );
|
||||
%Docstring
|
||||
Emitted when loading layers has produced some messages
|
||||
@param layerName the layer name
|
||||
@param messages a list of pairs of Qgis.MessageLevel and messages
|
||||
|
||||
:param layerName: the layer name
|
||||
:param messages: a list of pairs of Qgis.MessageLevel and messages
|
||||
|
||||
.. versionadded:: 3.2
|
||||
%End
|
||||
|
||||
void nonIdentifiableLayersChanged( QStringList nonIdentifiableLayers );
|
||||
|
@ -24,7 +24,7 @@ The class is used as a container of context for various read/write operations on
|
||||
|
||||
struct ReadWriteMessage
|
||||
{
|
||||
ReadWriteMessage( const QString &message, Qgis::MessageLevel level = Qgis::Warning, QStringList categories = QStringList() );
|
||||
ReadWriteMessage( const QString &message, Qgis::MessageLevel level = Qgis::Warning, const QStringList &categories = QStringList() );
|
||||
%Docstring
|
||||
Construct a container for QgsReadWriteContext error or warning messages
|
||||
%End
|
||||
@ -65,7 +65,7 @@ Sets up path resolver for conversion between relative and absolute paths
|
||||
|
||||
void pushMessage( const QString &message, Qgis::MessageLevel level );
|
||||
%Docstring
|
||||
append a message to the context
|
||||
Append a message to the context
|
||||
|
||||
.. versionadded:: 3.2
|
||||
%End
|
||||
@ -86,7 +86,7 @@ Pop the last category
|
||||
|
||||
QList<QgsReadWriteContext::ReadWriteMessage> takeMessages();
|
||||
%Docstring
|
||||
return the stored messages and remove them
|
||||
Return the stored messages and remove them
|
||||
|
||||
.. versionadded:: 3.2
|
||||
%End
|
||||
|
@ -83,8 +83,6 @@ convenience method for pushing a message with title to the bar
|
||||
convenience method for pushing a message to the bar with a detail text which be shown when pressing a "more" button
|
||||
%End
|
||||
|
||||
|
||||
|
||||
QgsMessageBarItem *currentItem();
|
||||
|
||||
signals:
|
||||
|
@ -3230,7 +3230,7 @@ void QgisApp::setupConnections()
|
||||
this, &QgisApp::showProgress );
|
||||
connect( QgsProject::instance(), &QgsProject::loadingLayer,
|
||||
this, &QgisApp::showStatusMessage );
|
||||
connect( QgsProject::instance(), &QgsProject::loadingLayerMessages,
|
||||
connect( QgsProject::instance(), &QgsProject::loadingLayerMessageReceived,
|
||||
this, &QgisApp::loadingLayerMessages );
|
||||
connect( QgsProject::instance(), &QgsProject::readProject,
|
||||
this, &QgisApp::readProject );
|
||||
|
@ -260,7 +260,7 @@ void QgsEditFormConfig::setSuppress( QgsEditFormConfig::FeatureFormSuppress s )
|
||||
|
||||
void QgsEditFormConfig::readXml( const QDomNode &node, QgsReadWriteContext &context )
|
||||
{
|
||||
context.enterCategory( QString( "Edit form config" ) );
|
||||
context.enterCategory( QObject::tr( "Edit form config" ) );
|
||||
d.detach();
|
||||
|
||||
QDomNode editFormNode = node.namedItem( QStringLiteral( "editform" ) );
|
||||
|
@ -719,7 +719,7 @@ bool QgsProject::_getMapLayers( const QDomDocument &doc, QList<QDomNode> &broken
|
||||
const auto messages = context.takeMessages();
|
||||
if ( messages.count() )
|
||||
{
|
||||
emit loadingLayerMessages( tr( "Loading layer %1" ).arg( name ), messages );
|
||||
emit loadingLayerMessageReceived( tr( "Loading layer %1" ).arg( name ), messages );
|
||||
}
|
||||
}
|
||||
emit layerLoaded( i + 1, nl.count() );
|
||||
|
@ -888,14 +888,16 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
|
||||
*/
|
||||
void layerLoaded( int i, int n );
|
||||
|
||||
//! Emitted when a layer is loaded
|
||||
void loadingLayer( const QString &layerName );
|
||||
|
||||
/**
|
||||
* @brief Emitted when loading layers has produced some messages
|
||||
* @param layerName the layer name
|
||||
* @param messages a list of pairs of Qgis::MessageLevel and messages
|
||||
* \brief Emitted when loading layers has produced some messages
|
||||
* \param layerName the layer name
|
||||
* \param messages a list of pairs of Qgis::MessageLevel and messages
|
||||
* \since 3.2
|
||||
*/
|
||||
void loadingLayerMessages( const QString &layerName, const QList<QgsReadWriteContext::ReadWriteMessage> &messages );
|
||||
void loadingLayerMessageReceived( const QString &layerName, const QList<QgsReadWriteContext::ReadWriteMessage> &messages );
|
||||
|
||||
//! Emitted when the list of layer which are excluded from map identification changes
|
||||
void nonIdentifiableLayersChanged( QStringList nonIdentifiableLayers );
|
||||
|
@ -38,7 +38,7 @@ class CORE_EXPORT QgsReadWriteContext
|
||||
struct ReadWriteMessage
|
||||
{
|
||||
//! Construct a container for QgsReadWriteContext error or warning messages
|
||||
ReadWriteMessage( const QString &message, Qgis::MessageLevel level = Qgis::Warning, QStringList categories = QStringList() )
|
||||
ReadWriteMessage( const QString &message, Qgis::MessageLevel level = Qgis::Warning, const QStringList &categories = QStringList() )
|
||||
: mMessage( message )
|
||||
, mLevel( level )
|
||||
, mCategories( categories )
|
||||
@ -54,9 +54,9 @@ class CORE_EXPORT QgsReadWriteContext
|
||||
QStringList categories() const {return mCategories;}
|
||||
|
||||
private:
|
||||
QString mMessage = QString();
|
||||
Qgis::MessageLevel mLevel = Qgis::Warning;
|
||||
QStringList mCategories = QStringList();
|
||||
QString mMessage;
|
||||
Qgis::MessageLevel mLevel;
|
||||
QStringList mCategories;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -73,7 +73,7 @@ class CORE_EXPORT QgsReadWriteContext
|
||||
void setPathResolver( const QgsPathResolver &resolver );
|
||||
|
||||
/**
|
||||
* append a message to the context
|
||||
* Append a message to the context
|
||||
* \since QGIS 3.2
|
||||
*/
|
||||
void pushMessage( const QString &message, Qgis::MessageLevel level );
|
||||
@ -91,7 +91,7 @@ class CORE_EXPORT QgsReadWriteContext
|
||||
void leaveCategory();
|
||||
|
||||
/**
|
||||
* return the stored messages and remove them
|
||||
* Return the stored messages and remove them
|
||||
* \since QGIS 3.2
|
||||
*/
|
||||
QList<QgsReadWriteContext::ReadWriteMessage> takeMessages();
|
||||
|
@ -92,10 +92,6 @@ class GUI_EXPORT QgsMessageBar: public QFrame
|
||||
//! convenience method for pushing a message to the bar with a detail text which be shown when pressing a "more" button
|
||||
void pushMessage( const QString &title, const QString &text, const QString &showMore, Qgis::MessageLevel level = Qgis::Info, int duration = 5 );
|
||||
|
||||
// //! make out a widget containing a message to be displayed on the bar with a detail text which be shown when pressing a "more" button
|
||||
// QgsMessageBarItem( const QString &title, const QString &text, const QString &showMore, Qgis::MessageLevel level = Qgis::Info, int duration = 0, QWidget *parent SIP_TRANSFERTHIS = nullptr );
|
||||
|
||||
|
||||
QgsMessageBarItem *currentItem() { return mCurrentItem; }
|
||||
|
||||
signals:
|
||||
|
Loading…
x
Reference in New Issue
Block a user