QGIS API Documentation  2.99.0-Master (f867b65)
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 
31 class CORE_EXPORT QgsProjectVersion
32 {
33 
34  public:
35 
40  : mMajor( 0 )
41  , mMinor( 0 )
42  , mSub( 0 )
43  {}
44 
45  QgsProjectVersion( int major, int minor, int sub, const QString &name = "" );
46  QgsProjectVersion( const QString &string );
47  int majorVersion() { return mMajor;}
48  int minorVersion() { return mMinor;}
49  int subVersion() { return mSub;}
50  QString text();
51 
55  bool isNull() const;
56 
59  bool operator==( const QgsProjectVersion &other ) const;
60 
63  bool operator!=( const QgsProjectVersion &other ) const;
64 
67  bool operator>=( const QgsProjectVersion &other ) const;
68 
71  bool operator>( const QgsProjectVersion &other ) const;
72 
73  private:
74  int mMajor;
75  int mMinor;
76  int mSub;
77  QString mName;
78 };
79 
80 #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.