mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
Minor api cleanups (use Maximum/Minimum instead of min/max), dox
fixes (\command instead of @command)
This commit is contained in:
parent
e2fe098e4e
commit
3263211d87
@ -304,33 +304,45 @@ Sets the legend symbol ``width``.
|
||||
.. seealso:: :py:func:`symbolWidth`
|
||||
%End
|
||||
|
||||
double maxSymbolSize() const;
|
||||
double maximumSymbolSize() const;
|
||||
%Docstring
|
||||
Returns the legend maximum symbol size (in mm). 0.0 means there is no maximum set
|
||||
Returns the maximum symbol size (in mm). 0.0 means there is no maximum set.
|
||||
|
||||
.. seealso:: :py:func:`setMaximumSymbolSize`
|
||||
|
||||
.. versionadded:: 3.16
|
||||
%End
|
||||
|
||||
void setMaxSymbolSize( double size );
|
||||
void setMaximumSymbolSize( double size );
|
||||
%Docstring
|
||||
set maximum symbol size
|
||||
Set the maximum symbol ``size`` for symbol (in millimeters).
|
||||
|
||||
:param size: maximum size (in mm) or 0.0 if no maximum
|
||||
A symbol size of 0.0 indicates no maximum is set.
|
||||
|
||||
.. seealso:: :py:func:`maximumSymbolSize`
|
||||
|
||||
.. versionadded:: 3.16
|
||||
%End
|
||||
|
||||
double minSymbolSize() const;
|
||||
double minimumSymbolSize() const;
|
||||
%Docstring
|
||||
Returns the legend minimum symbol size (in mm). 0.0 means there is no minimum set
|
||||
Returns the minimum symbol size (in mm). A value 0.0 means there is no minimum set.
|
||||
|
||||
.. seealso:: :py:func:`setMinimumSymbolSize`
|
||||
|
||||
.. versionadded:: 3.16
|
||||
%End
|
||||
|
||||
void setMinSymbolSize( double size );
|
||||
void setMinimumSymbolSize( double size );
|
||||
%Docstring
|
||||
set minimum symbol size for symbol
|
||||
@param size inimum size (in mm) or 0.0 if no minimum
|
||||
%End
|
||||
Set the minimum symbol ``size`` for symbol (in millimeters).
|
||||
|
||||
A symbol size of 0.0 indicates no minimum is set.
|
||||
|
||||
.. seealso:: :py:func:`minimumSymbolSize`
|
||||
|
||||
.. versionadded:: 3.16
|
||||
%End
|
||||
|
||||
void setSymbolAlignment( Qt::AlignmentFlag alignment );
|
||||
%Docstring
|
||||
|
||||
@ -154,7 +154,7 @@ This constructor creates a bookmark manager which stores bookmarks in an XML fil
|
||||
|
||||
void initialize( const QString &filePath );
|
||||
%Docstring
|
||||
initialize
|
||||
Initializes the bookmark manager.
|
||||
%End
|
||||
|
||||
QString addBookmark( const QgsBookmark &bookmark, bool *ok /Out/ = 0 );
|
||||
|
||||
@ -223,26 +223,44 @@ Sets the default symbol size (in millimeters) used for legend items.
|
||||
.. seealso:: :py:func:`symbolSize`
|
||||
%End
|
||||
|
||||
double maxSymbolSize() const;
|
||||
double maximumSymbolSize() const;
|
||||
%Docstring
|
||||
Returns the maximum symbol size in mm
|
||||
Returns the maximum symbol size (in mm). 0.0 means there is no maximum set.
|
||||
|
||||
.. seealso:: :py:func:`setMaximumSymbolSize`
|
||||
|
||||
.. versionadded:: 3.16
|
||||
%End
|
||||
|
||||
void setMaxSymbolSize( double size );
|
||||
void setMaximumSymbolSize( double size );
|
||||
%Docstring
|
||||
Sets the maximum marker size in mm
|
||||
@param size maximum size in mm
|
||||
Set the maximum symbol ``size`` for symbol (in millimeters).
|
||||
|
||||
A symbol size of 0.0 indicates no maximum is set.
|
||||
|
||||
.. seealso:: :py:func:`maximumSymbolSize`
|
||||
|
||||
.. versionadded:: 3.16
|
||||
%End
|
||||
|
||||
double minSymbolSize() const;
|
||||
double minimumSymbolSize() const;
|
||||
%Docstring
|
||||
Returns the minimum symbol size in mm
|
||||
Returns the minimum symbol size (in mm). A value 0.0 means there is no minimum set.
|
||||
|
||||
.. seealso:: :py:func:`setMinimumSymbolSize`
|
||||
|
||||
.. versionadded:: 3.16
|
||||
%End
|
||||
|
||||
void setMinSymbolSize( double size );
|
||||
void setMinimumSymbolSize( double size );
|
||||
%Docstring
|
||||
Sets the minimum symbol size in mm
|
||||
@param size minimum size in mm
|
||||
Set the minimum symbol ``size`` for symbol (in millimeters).
|
||||
|
||||
A symbol size of 0.0 indicates no minimum is set.
|
||||
|
||||
.. seealso:: :py:func:`minimumSymbolSize`
|
||||
|
||||
.. versionadded:: 3.16
|
||||
%End
|
||||
|
||||
void setSymbolAlignment( Qt::AlignmentFlag alignment );
|
||||
|
||||
@ -68,7 +68,7 @@ Start the download
|
||||
|
||||
void cancel();
|
||||
%Docstring
|
||||
Cancel the download operation
|
||||
Cancel the download operation.
|
||||
%End
|
||||
|
||||
signals:
|
||||
|
||||
@ -28,7 +28,7 @@ class QgisApp;
|
||||
class QgsVectorLayer;
|
||||
|
||||
/**
|
||||
* @brief The QgsGeometryValidationDock class
|
||||
* \brief The QgsGeometryValidationDock class
|
||||
*/
|
||||
class QgsGeometryValidationDock : public QgsDockWidget, public Ui_QgsGeometryValidationDockBase
|
||||
{
|
||||
|
||||
@ -68,9 +68,9 @@ class QgsAuthOAuth2Config : public QObject
|
||||
//! OAuth2 grant flow
|
||||
enum GrantFlow
|
||||
{
|
||||
AuthCode, //!< @see http://tools.ietf.org/html/rfc6749#section-4.1
|
||||
Implicit, //!< @see http://tools.ietf.org/html/rfc6749#section-4.2
|
||||
ResourceOwner, //!< @see http://tools.ietf.org/html/rfc6749#section-4.3
|
||||
AuthCode, //!< See http://tools.ietf.org/html/rfc6749#section-4.1
|
||||
Implicit, //!< See http://tools.ietf.org/html/rfc6749#section-4.2
|
||||
ResourceOwner, //!< See http://tools.ietf.org/html/rfc6749#section-4.3
|
||||
};
|
||||
|
||||
//! Configuration format for serialize/unserialize operations
|
||||
|
||||
@ -557,8 +557,8 @@ QSizeF QgsSymbolLegendNode::drawSymbol( const QgsLegendSettings &settings, ItemC
|
||||
double widthOffset = 0;
|
||||
double heightOffset = 0;
|
||||
|
||||
double maxSymbolSize = settings.maxSymbolSize();
|
||||
double minSymbolSize = settings.minSymbolSize();
|
||||
double maxSymbolSize = settings.maximumSymbolSize();
|
||||
double minSymbolSize = settings.minimumSymbolSize();
|
||||
|
||||
if ( QgsMarkerSymbol *markerSymbol = dynamic_cast<QgsMarkerSymbol *>( s ) )
|
||||
{
|
||||
|
||||
@ -392,22 +392,22 @@ void QgsLayoutItemLegend::setSymbolWidth( double w )
|
||||
mSettings.setSymbolSize( QSizeF( w, mSettings.symbolSize().height() ) );
|
||||
}
|
||||
|
||||
double QgsLayoutItemLegend::maxSymbolSize() const
|
||||
double QgsLayoutItemLegend::maximumSymbolSize() const
|
||||
{
|
||||
return mSettings.maxSymbolSize();
|
||||
}
|
||||
|
||||
void QgsLayoutItemLegend::setMaxSymbolSize( double size )
|
||||
void QgsLayoutItemLegend::setMaximumSymbolSize( double size )
|
||||
{
|
||||
mSettings.setMaxSymbolSize( size );
|
||||
}
|
||||
|
||||
double QgsLayoutItemLegend::minSymbolSize() const
|
||||
double QgsLayoutItemLegend::minimumSymbolSize() const
|
||||
{
|
||||
return mSettings.minSymbolSize();
|
||||
}
|
||||
|
||||
void QgsLayoutItemLegend::setMinSymbolSize( double size )
|
||||
void QgsLayoutItemLegend::setMinimumSymbolSize( double size )
|
||||
{
|
||||
mSettings.setMinSymbolSize( size );
|
||||
}
|
||||
|
||||
@ -319,29 +319,40 @@ class CORE_EXPORT QgsLayoutItemLegend : public QgsLayoutItem
|
||||
void setSymbolWidth( double width );
|
||||
|
||||
/**
|
||||
* Returns the legend maximum symbol size (in mm). 0.0 means there is no maximum set
|
||||
* Returns the maximum symbol size (in mm). 0.0 means there is no maximum set.
|
||||
*
|
||||
* \see setMaximumSymbolSize()
|
||||
* \since QGIS 3.16
|
||||
*/
|
||||
double maxSymbolSize() const;
|
||||
double maximumSymbolSize() const;
|
||||
|
||||
/**
|
||||
* \brief set maximum symbol size
|
||||
* \param size maximum size (in mm) or 0.0 if no maximum
|
||||
* Set the maximum symbol \a size for symbol (in millimeters).
|
||||
*
|
||||
* A symbol size of 0.0 indicates no maximum is set.
|
||||
*
|
||||
* \see maximumSymbolSize()
|
||||
* \since QGIS 3.16
|
||||
*/
|
||||
void setMaxSymbolSize( double size );
|
||||
void setMaximumSymbolSize( double size );
|
||||
|
||||
/**
|
||||
* Returns the legend minimum symbol size (in mm). 0.0 means there is no minimum set
|
||||
* Returns the minimum symbol size (in mm). A value 0.0 means there is no minimum set.
|
||||
*
|
||||
* \see setMinimumSymbolSize
|
||||
* \since QGIS 3.16
|
||||
*/
|
||||
double minSymbolSize() const;
|
||||
double minimumSymbolSize() const;
|
||||
|
||||
/**
|
||||
* @brief set minimum symbol size for symbol
|
||||
* @param size inimum size (in mm) or 0.0 if no minimum
|
||||
* Set the minimum symbol \a size for symbol (in millimeters).
|
||||
*
|
||||
* A symbol size of 0.0 indicates no minimum is set.
|
||||
*
|
||||
* \see minimumSymbolSize()
|
||||
* \since QGIS 3.16
|
||||
*/
|
||||
void setMinSymbolSize( double size );
|
||||
|
||||
void setMinimumSymbolSize( double size );
|
||||
|
||||
/**
|
||||
* Sets the \a alignment for placement of legend symbols.
|
||||
|
||||
@ -165,7 +165,7 @@ class CORE_EXPORT QgsBookmarkManager : public QObject
|
||||
~QgsBookmarkManager() override;
|
||||
|
||||
/**
|
||||
* @brief initialize
|
||||
* Initializes the bookmark manager.
|
||||
*/
|
||||
void initialize( const QString &filePath );
|
||||
|
||||
|
||||
@ -235,26 +235,40 @@ class CORE_EXPORT QgsLegendSettings
|
||||
void setSymbolSize( QSizeF s ) {mSymbolSize = s;}
|
||||
|
||||
/**
|
||||
* Returns the maximum symbol size in mm
|
||||
* Returns the maximum symbol size (in mm). 0.0 means there is no maximum set.
|
||||
*
|
||||
* \see setMaximumSymbolSize()
|
||||
* \since QGIS 3.16
|
||||
*/
|
||||
double maxSymbolSize() const {return mMaxSymbolSize; }
|
||||
double maximumSymbolSize() const {return mMaxSymbolSize; }
|
||||
|
||||
/**
|
||||
* Sets the maximum marker size in mm
|
||||
* @param size maximum size in mm
|
||||
* Set the maximum symbol \a size for symbol (in millimeters).
|
||||
*
|
||||
* A symbol size of 0.0 indicates no maximum is set.
|
||||
*
|
||||
* \see maximumSymbolSize()
|
||||
* \since QGIS 3.16
|
||||
*/
|
||||
void setMaxSymbolSize( double size ) { mMaxSymbolSize = size;}
|
||||
void setMaximumSymbolSize( double size ) { mMaxSymbolSize = size;}
|
||||
|
||||
/**
|
||||
* Returns the minimum symbol size in mm
|
||||
* Returns the minimum symbol size (in mm). A value 0.0 means there is no minimum set.
|
||||
*
|
||||
* \see setMinimumSymbolSize
|
||||
* \since QGIS 3.16
|
||||
*/
|
||||
double minSymbolSize() const {return mMinSymbolSize; }
|
||||
double minimumSymbolSize() const {return mMinSymbolSize; }
|
||||
|
||||
/**
|
||||
* Sets the minimum symbol size in mm
|
||||
* @param size minimum size in mm
|
||||
* Set the minimum symbol \a size for symbol (in millimeters).
|
||||
*
|
||||
* A symbol size of 0.0 indicates no minimum is set.
|
||||
*
|
||||
* \see minimumSymbolSize()
|
||||
* \since QGIS 3.16
|
||||
*/
|
||||
void setMinSymbolSize( double size ) { mMinSymbolSize = size;}
|
||||
void setMinimumSymbolSize( double size ) { mMinSymbolSize = size;}
|
||||
|
||||
/**
|
||||
* Sets the \a alignment for placement of legend symbols.
|
||||
|
||||
@ -88,7 +88,7 @@ class CORE_EXPORT QgsFetchedContent : public QObject
|
||||
void download( bool redownload = false );
|
||||
|
||||
/**
|
||||
* @brief Cancel the download operation
|
||||
* Cancel the download operation.
|
||||
*/
|
||||
void cancel();
|
||||
|
||||
|
||||
@ -232,8 +232,8 @@ void QgsLayoutLegendWidget::setGuiElements()
|
||||
mEqualColumnWidthCheckBox->setChecked( mLegend->equalColumnWidth() );
|
||||
mSymbolWidthSpinBox->setValue( mLegend->symbolWidth() );
|
||||
mSymbolHeightSpinBox->setValue( mLegend->symbolHeight() );
|
||||
mMaxSymbolSizeSpinBox->setValue( mLegend->maxSymbolSize() );
|
||||
mMinSymbolSizeSpinBox->setValue( mLegend->minSymbolSize() );
|
||||
mMaxSymbolSizeSpinBox->setValue( mLegend->maximumSymbolSize() );
|
||||
mMinSymbolSizeSpinBox->setValue( mLegend->minimumSymbolSize() );
|
||||
mWmsLegendWidthSpinBox->setValue( mLegend->wmsLegendWidth() );
|
||||
mWmsLegendHeightSpinBox->setValue( mLegend->wmsLegendHeight() );
|
||||
mTitleSpaceBottomSpinBox->setValue( mLegend->style( QgsLegendStyle::Title ).margin( QgsLegendStyle::Bottom ) );
|
||||
@ -412,7 +412,7 @@ void QgsLayoutLegendWidget::mMaxSymbolSizeSpinBox_valueChanged( double d )
|
||||
if ( mLegend )
|
||||
{
|
||||
mLegend->beginCommand( tr( "Change Legend Maximum Symbol Size" ), QgsLayoutItem::UndoLegendMaxSymbolSize );
|
||||
mLegend->setMaxSymbolSize( d );
|
||||
mLegend->setMaximumSymbolSize( d );
|
||||
mLegend->adjustBoxSize();
|
||||
mLegend->update();
|
||||
mLegend->endCommand();
|
||||
@ -424,7 +424,7 @@ void QgsLayoutLegendWidget::mMinSymbolSizeSpinBox_valueChanged( double d )
|
||||
if ( mLegend )
|
||||
{
|
||||
mLegend->beginCommand( tr( "Change Legend Minimum Symbol Size" ), QgsLayoutItem::UndoLegendMinSymbolSize );
|
||||
mLegend->setMinSymbolSize( d );
|
||||
mLegend->setMinimumSymbolSize( d );
|
||||
mLegend->adjustBoxSize();
|
||||
mLegend->update();
|
||||
mLegend->endCommand();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user