Skip to content
Permalink
Browse files

[py3] Updates to sip files

  • Loading branch information
m-kuhn committed Nov 16, 2015
1 parent 47543d9 commit 313c34ce224566e4d426c2e0552b80445290183a
@@ -103,6 +103,10 @@ INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR} # qgsconfig.h, qgsversion.h
)

IF(NOT ENABLE_QT5)
SET(SIP_DISABLE_FEATURES ${SIP_DISALE_FEATURES} QT5_SUPPORT)
ENDIF(NOT ENABLE_QT5)

IF(NOT ANDROID)
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} ANDROID)
ENDIF(NOT ANDROID)
@@ -124,10 +128,10 @@ IF(PYQT4_VERSION_NUM LESS 263680) # 0x040600
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} PROXY_FACTORY)
ENDIF(PYQT4_VERSION_NUM LESS 263680)

IF(NOT PYQT4_VERSION_NUM LESS 263941) # 0x040705
IF(NOT PYQT4_VERSION_NUM LESS 263941 AND NOT ENABLE_QT5) # 0x040705
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QSETINT_CONVERSION)
ENDIF(NOT PYQT4_VERSION_NUM LESS 263941)

ENDIF(NOT PYQT4_VERSION_NUM LESS 263941 AND NOT ENABLE_QT5)
#
IF(NOT PYQT4_VERSION_NUM LESS 264194) # 0x040802
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} QSETTYPE_CONVERSION)
ENDIF(NOT PYQT4_VERSION_NUM LESS 264194)
@@ -32,7 +32,7 @@ class QgsGraphAnalyzer
int i;
for ( i = 0; i < costResult.size(); ++i )
{
PyObject *Int = PyInt_FromLong( treeResult[i] );
PyObject *Int = PyLong_FromLong( treeResult[i] );
PyList_SET_ITEM( l1, i, Int );
PyObject *Float = PyFloat_FromDouble( costResult[i] );
PyList_SET_ITEM( l2, i, Float );
@@ -48,7 +48,7 @@ class QgsAuthManager : QObject

bool resetMasterPassword( const QString& newpassword, const QString& oldpass, bool keepbackup, QString *backuppath /In,Out/ = 0 );

const QString authManTag() const;
QString authManTag() const;

bool registerCoreAuthMethods();

@@ -213,7 +213,7 @@ class QgsAuthManager : QObject
QMutex *mutex();

signals:
void messageOut( const QString& message, const QString& tag = smAuthManTag, QgsAuthManager::MessageLevel level = INFO ) const;
void messageOut( const QString& message, const QString& tag, QgsAuthManager::MessageLevel level = INFO ) const;

void masterPasswordVerified( bool verified ) const;

@@ -105,16 +105,16 @@ class QgsComposerTableSortColumnsProxyModel : QSortFilterProxyModel
*/
enum ColumnFilterType
{
ShowSortedColumns, /*!< show only sorted columns */
ShowUnsortedColumns/*!< show only unsorted columns */
ShowSortedColumns, /*!< show only sorted columns */
ShowUnsortedColumns /*!< show only unsorted columns */
};

/** Constructor for QgsComposerTableSortColumnsProxyModel.
* @param composerTable QgsComposerAttributeTable the model is attached to
* @param filterType filter for columns, controls whether sorted or unsorted columns are shown
* @param parent optional parent
*/
QgsComposerTableSortColumnsProxyModel( QgsComposerAttributeTable *composerTable, ColumnFilterType filterType, QObject *parent /TransferThis/ = 0 );
QgsComposerTableSortColumnsProxyModel( QgsComposerAttributeTable *composerTable, QgsComposerTableSortColumnsProxyModel::ColumnFilterType filterType, QObject *parent /TransferThis/ = 0 );

virtual ~QgsComposerTableSortColumnsProxyModel();

@@ -248,7 +248,9 @@ class QgsComposerScaleBar: QgsComposerItem
@note python bindings not available on android
*/
%If (!ARM)
%If (!QT5_SUPPORT)
void segmentPositions( QList<QPair<double, double> >& posWidthList ) const;
%End
%End

/** Sets box size suitable to content*/
@@ -2,12 +2,17 @@
version=0,
keyword_arguments="Optional")

%Import QtCore/QtCoremod.sip
%Import QtGui/QtGuimod.sip
%Feature QT5_SUPPORT

%Import QtXml/QtXmlmod.sip
%Import QtNetwork/QtNetworkmod.sip
%Import QtSql/QtSqlmod.sip

%If (QT5_SUPPORT)
%Import QtPrintSupport/QtPrintSupportmod.sip
%Import QtWidgets/QtWidgetsmod.sip
%End

%Include conversions.sip
%Include qgsexception.sip

@@ -49,7 +54,9 @@
%Include qgsmaptopixelgeometrysimplifier.sip
%Include qgsgml.sip
%Include qgsgmlschema.sip
%Include qgshttptransaction.sip
%If(!QT5_SUPPORT)
%Include qgshttptransaction.sip
%End
%Include qgslabel.sip
%Include qgslabelattributes.sip
%Include qgslabelsearchtree.sip
@@ -30,7 +30,7 @@ static char **qtgui_ArgvToC(PyObject *argvlist, int &argc)
(argv[a] = (char *)sipMalloc(strlen(arg) + 1)) == NULL)
return NULL;
#else
if ((arg = PyUnicode_AsString(PyList_GET_ITEM(argvlist, a))) == NULL ||
if ((arg = PyBytes_AsString(PyList_GET_ITEM(argvlist, a))) == NULL ||
(argv[a] = (char *)sipMalloc(strlen(arg) + 1)) == NULL)
return NULL;
#endif
@@ -48,13 +48,15 @@ class QgsProviderRegistry
QWidget *selectWidget( const QString & providerKey,
QWidget * parent = 0, const Qt::WindowFlags& fl = 0 );

%If (!QT5_SUPPORT)
/** Get pointer to provider function
@param providerKey identificator of the provider
@param functionName name of function
@return pointer to function or NULL on error
*/
void *function( const QString & providerKey,
const QString & functionName );
%End

QLibrary *providerLibrary( const QString & providerKey ) const;

@@ -4,16 +4,21 @@

%Feature HAVE_QSCI_SIP

%Import core/core.sip

%Import QtCore/QtCoremod.sip
%Import QtGui/QtGuimod.sip
%Import QtXml/QtXmlmod.sip

%If (HAVE_QSCI_SIP)
%Import Qsci/qscimod4.sip
%If (!QT5_SUPPORT)
%Import Qsci/qscimod4.sip
%End
%If (QT5_SUPPORT)
%Import Qsci/qscimod5.sip
%End
%End

%Import core/core.sip

%Include qgsblendmodecombobox.sip

%Include qgisinterface.sip
@@ -9,11 +9,9 @@ class QgsFieldValidator : QValidator
QgsFieldValidator( QObject *parent, const QgsField &field, const QString& defaultValue, const QString& dateFormat = "yyyy-MM-dd" );
~QgsFieldValidator();

virtual State validate(QString & /In,Out/, int & /In,Out/) const = 0 /API=QString:2 - /;
virtual void fixup(QString &input /In,Out/) const /API=QString:2 - /;

QString dateFormat() const;

virtual State validate(QString & /Constrained/, int & /In,Out/) const = 0 /API=QString: - 2/;
virtual void fixup(QString & /Constrained/) const /API=QString: - 2/;
virtual State validate(QString & /Constrained/, int & /In,Out/) const = 0;
virtual void fixup(QString & /Constrained/) const;
};

0 comments on commit 313c34c

Please sign in to comment.
You can’t perform that action at this time.