Skip to content

Commit 0408094

Browse files
author
mhugent
committed
Updated python bindings with some added functions
git-svn-id: http://svn.osgeo.org/qgis/trunk@11014 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 990b740 commit 0408094

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

python/core/qgsapplication.sip

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,20 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
104104
//! Returns the path to the authors file.
105105
static const QString authorsFilePath();
106106

107+
/**Returns the path to the sponsors file.
108+
@note this function was added in version 1.2*/
109+
static const QString sponsorsFilePath();
110+
111+
/** Returns the path to the donors file.
112+
@note this function was added in version 1.2*/
113+
static const QString donorsFilePath();
114+
115+
/**
116+
* Returns the path to the sponsors file.
117+
* @note This was added in QGIS 1.1
118+
*/
119+
static const QString translatorsFilePath();
120+
107121
//! Returns the path to the developer image directory.
108122
static const QString developerPath();
109123

python/core/qgsvectorlayer.sip

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,18 @@ public:
335335
*/
336336
bool addAttribute( QString name, QString type );
337337

338+
/**Sets an alias (a display name) for attributes to display in dialogs
339+
@note added in version 1.2*/
340+
void addAttributeAlias( int attIndex, QString aliasString );
341+
342+
/**Returns the alias of an attribute name or an empty string if there is no alias
343+
@note added in version 1.2*/
344+
QString attributeAlias( int attributeIndex ) const;
345+
346+
/**Convenience function that returns the attribute alias if defined or the field name else
347+
@note added in version 1.2*/
348+
QString attributeDisplayName( int attributeIndex ) const;
349+
338350
/** delete an attribute field (but does not commit it) */
339351
bool deleteAttribute(int attr);
340352

src/core/qgsapplication.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,14 @@ class CORE_EXPORT QgsApplication: public QApplication
5454
//! Returns the path to the authors file.
5555
static const QString authorsFilePath();
5656

57-
//! Returns the path to the sponsors file.
57+
/**Returns the path to the sponsors file.
58+
@note this function was added in version 1.2*/
5859
static const QString sponsorsFilePath();
5960

60-
//! Returns the path to the donors file.
61+
/** Returns the path to the donors file.
62+
@note this function was added in version 1.2*/
6163
static const QString donorsFilePath();
62-
64+
6365
/**
6466
* Returns the path to the sponsors file.
6567
* @note This was added in QGIS 1.1

0 commit comments

Comments
 (0)