QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsProjectVersion Class Reference

A class to describe the version of a project. More...

#include <qgsprojectversion.h>

Public Member Functions

 QgsProjectVersion ()=default
 Creates a new NULL version.
 
 QgsProjectVersion (const QString &string)
 Constructor for QgsProjectVersion, which parses the version number from a string.
 
 QgsProjectVersion (int major, int minor, int sub, const QString &name=QString())
 Constructor for QgsProjectVersion, with the specified major, minor and sub version numbers.
 
bool isNull () const
 Returns true if this is a NULL project version.
 
int majorVersion () const
 Returns the major version number.
 
int minorVersion () const
 Returns the minor version number.
 
bool operator!= (const QgsProjectVersion &other) const
 
bool operator< (const QgsProjectVersion &other) const
 
bool operator<= (const QgsProjectVersion &other) const
 
bool operator== (const QgsProjectVersion &other) const
 
bool operator> (const QgsProjectVersion &other) const
 
bool operator>= (const QgsProjectVersion &other) const
 
int subVersion () const
 Returns the sub version number.
 
QString text () const
 Returns a string representation of the version.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QgsProjectVersion() [1/3]

QgsProjectVersion::QgsProjectVersion ( )
default

Creates a new NULL version.

◆ QgsProjectVersion() [2/3]

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() [3/3]

QgsProjectVersion::QgsProjectVersion ( const QString &  string)

Constructor for QgsProjectVersion, which parses the version number from a string.

Definition at line 32 of file qgsprojectversion.cpp.

Member Function Documentation

◆ isNull()

bool QgsProjectVersion::isNull ( ) const

Returns true if this is a NULL project version.

Definition at line 100 of file qgsprojectversion.cpp.

◆ majorVersion()

int QgsProjectVersion::majorVersion ( ) const
inline

Returns the major version number.

Definition at line 55 of file qgsprojectversion.h.

◆ minorVersion()

int QgsProjectVersion::minorVersion ( ) const
inline

Returns the minor version number.

Definition at line 60 of file qgsprojectversion.h.

◆ operator!=()

bool QgsProjectVersion::operator!= ( const QgsProjectVersion other) const

Definition at line 58 of file qgsprojectversion.cpp.

◆ operator<()

bool QgsProjectVersion::operator< ( const QgsProjectVersion other) const

Definition at line 77 of file qgsprojectversion.cpp.

◆ operator<=()

bool QgsProjectVersion::operator<= ( const QgsProjectVersion other) const

Definition at line 82 of file qgsprojectversion.cpp.

◆ operator==()

bool QgsProjectVersion::operator== ( const QgsProjectVersion other) const

Definition at line 51 of file qgsprojectversion.cpp.

◆ operator>()

bool QgsProjectVersion::operator> ( const QgsProjectVersion other) const

Definition at line 70 of file qgsprojectversion.cpp.

◆ operator>=()

bool QgsProjectVersion::operator>= ( const QgsProjectVersion other) const

Definition at line 65 of file qgsprojectversion.cpp.

◆ subVersion()

int QgsProjectVersion::subVersion ( ) const
inline

Returns the sub version number.

Definition at line 65 of file qgsprojectversion.h.

◆ text()

QString QgsProjectVersion::text ( ) const

Returns a string representation of the version.

Definition at line 88 of file qgsprojectversion.cpp.


The documentation for this class was generated from the following files: