Skip to content

Commit 8ed2174

Browse files
author
jef
committedMar 28, 2011
add bindings to QgsProjectVersion
git-svn-id: http://svn.osgeo.org/qgis/trunk@15633 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3cd6998 commit 8ed2174

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
 

‎python/core/core.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
%Include qgspluginlayerregistry.sip
5454
%Include qgspoint.sip
5555
%Include qgsproject.sip
56+
%Include qgsprojectversion.sip
5657
%Include qgsprovidermetadata.sip
5758
%Include qgsproviderregistry.sip
5859
%Include qgsrasterbandstats.sip

‎python/core/qgsprojectversion.sip

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/** \ingroup core
2+
* A class to describe the version of a project.
3+
* Used in places where you need to check if the current version
4+
* of QGIS is greater than the one used to create a project file.
5+
*/
6+
7+
class QgsProjectVersion
8+
{
9+
%TypeHeaderCode
10+
#include "qgsprojectversion.h"
11+
%End
12+
13+
public:
14+
15+
QgsProjectVersion();
16+
~QgsProjectVersion();
17+
QgsProjectVersion( int major, int minor, int sub, QString name = "" );
18+
QgsProjectVersion( QString string );
19+
int majorVersion();
20+
int minorVersion();
21+
int subVersion();
22+
QString text();
23+
24+
/*! Boolean equal operator
25+
*/
26+
bool operator==( const QgsProjectVersion &other );
27+
28+
/*! Boolean >= operator
29+
*/
30+
bool operator>=( const QgsProjectVersion &other );
31+
32+
/*! Boolean > operator
33+
*/
34+
bool operator>( const QgsProjectVersion &other );
35+
36+
};
37+

0 commit comments

Comments
 (0)
Please sign in to comment.