QGIS API Documentation
3.18.1-Zürich (202f1bf7e5)
|
A class to describe the version of a project. More...
#include <qgsprojectversion.h>
Public Member Functions | |
QgsProjectVersion ()=default | |
Creates a new NULL version. More... | |
QgsProjectVersion (const QString &string) | |
Constructor for QgsProjectVersion, which parses the version number from a string. More... | |
QgsProjectVersion (int major, int minor, int sub, const QString &name=QString()) | |
Constructor for QgsProjectVersion, with the specified major, minor and sub version numbers. More... | |
bool | isNull () const |
Returns true if this is a NULL project version. More... | |
int | majorVersion () const |
Returns the major version number. More... | |
int | minorVersion () const |
Returns the minor version number. More... | |
bool | operator!= (const QgsProjectVersion &other) const |
Boolean not equal operator. More... | |
bool | operator== (const QgsProjectVersion &other) const |
Boolean equal operator. More... | |
bool | operator> (const QgsProjectVersion &other) const |
Boolean > operator. More... | |
bool | operator>= (const QgsProjectVersion &other) const |
Boolean >= operator. More... | |
int | subVersion () const |
Returns the sub version number. More... | |
QString | text () const |
Returns a string representation of the version. More... | |
A class to describe the version of a project.
Used in places where you need to check if the current version of QGIS is greater than the one used to create a project file.
Definition at line 32 of file qgsprojectversion.h.
|
default |
Creates a new NULL version.
QgsProjectVersion::QgsProjectVersion | ( | int | major, |
int | minor, | ||
int | sub, | ||
const QString & | name = QString() |
||
) |
Constructor for QgsProjectVersion, with the specified major, minor and sub version numbers.
Definition at line 24 of file qgsprojectversion.cpp.
QgsProjectVersion::QgsProjectVersion | ( | const QString & | string | ) |
Constructor for QgsProjectVersion, which parses the version number from a string.
Definition at line 32 of file qgsprojectversion.cpp.
bool QgsProjectVersion::isNull | ( | ) | const |
Returns true
if this is a NULL project version.
Definition at line 89 of file qgsprojectversion.cpp.
|
inline |
Returns the major version number.
Definition at line 55 of file qgsprojectversion.h.
|
inline |
Returns the minor version number.
Definition at line 60 of file qgsprojectversion.h.
bool QgsProjectVersion::operator!= | ( | const QgsProjectVersion & | other | ) | const |
Boolean not equal operator.
Definition at line 58 of file qgsprojectversion.cpp.
bool QgsProjectVersion::operator== | ( | const QgsProjectVersion & | other | ) | const |
Boolean equal operator.
Definition at line 51 of file qgsprojectversion.cpp.
bool QgsProjectVersion::operator> | ( | const QgsProjectVersion & | other | ) | const |
Boolean > operator.
Definition at line 70 of file qgsprojectversion.cpp.
bool QgsProjectVersion::operator>= | ( | const QgsProjectVersion & | other | ) | const |
Boolean >= operator.
Definition at line 65 of file qgsprojectversion.cpp.
|
inline |
Returns the sub version number.
Definition at line 65 of file qgsprojectversion.h.
QString QgsProjectVersion::text | ( | ) | const |
Returns a string representation of the version.
Definition at line 77 of file qgsprojectversion.cpp.