QGIS API Documentation  2.99.0-Master (9fdd060)
qgsprojectversion.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsprojectfile.h - description
3  -------------------
4  begin : Sun 15 dec 2007
5  copyright : (C) 2007 by Magnus Homann
6  email : magnus at homann.se
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSPROJECTVERSION_H
19 #define QGSPROJECTVERSION_H
20 
21 #include <QString>
22 #include <QStringList>
23 #include "qgis_core.h"
24 
32 class CORE_EXPORT QgsProjectVersion
33 {
34 
35  public:
36 
41  {}
42 
43  QgsProjectVersion( int major, int minor, int sub, const QString &name = "" );
44  QgsProjectVersion( const QString &string );
45  int majorVersion() { return mMajor;}
46  int minorVersion() { return mMinor;}
47  int subVersion() { return mSub;}
48  QString text();
49 
53  bool isNull() const;
54 
58  bool operator==( const QgsProjectVersion &other ) const;
59 
63  bool operator!=( const QgsProjectVersion &other ) const;
64 
68  bool operator>=( const QgsProjectVersion &other ) const;
69 
73  bool operator>( const QgsProjectVersion &other ) const;
74 
75  private:
76  int mMajor = 0;
77  int mMinor = 0;
78  int mSub = 0;
79  QString mName;
80 };
81 
82 // clazy:excludeall=qstring-allocations
83 
84 #endif // QGSPROJECTVERSION_H
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
A class to describe the version of a project.
QgsProjectVersion()
Creates a new NULL version.