fix style

This commit is contained in:
Pierre-Eric Pelloux-Prayer 2019-01-23 12:05:28 +01:00
parent 39f7d9a8e6
commit 08634c4e6f
6 changed files with 24 additions and 14 deletions

View File

@ -38,7 +38,6 @@ class QgsConstWkbPtr
public:
QgsConstWkbPtr( const unsigned char *p /Array/, int size /ArraySize/ );
@ -46,6 +45,7 @@ class QgsConstWkbPtr
};
/************************************************************************

View File

@ -28,6 +28,9 @@ Runs the dialog and creates a new memory layer
%End
QgsNewMemoryLayerDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
%Docstring
New dialog constructor.
%End
~QgsNewMemoryLayerDialog();
QgsWkbTypes::Type selectedType() const;

View File

@ -28,6 +28,9 @@ If the ``initialPath`` argument is specified, then the dialog will default to th
%End
QgsNewVectorLayerDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
%Docstring
New dialog constructor.
%End
~QgsNewVectorLayerDialog();
QgsWkbTypes::Type selectedType() const;
%Docstring

View File

@ -132,19 +132,6 @@ class CORE_EXPORT QgsConstWkbPtr
mutable bool mEndianSwap;
mutable QgsWkbTypes::Type mWkbType;
#ifndef SIP_RUN
template<typename T>
void endian_swap( T &value ) const
{
char *data = reinterpret_cast<char *>( &value );
std::size_t n = sizeof( value );
for ( std::size_t i = 0, m = n / 2; i < m; ++i )
{
std::swap( data[i], data[n - 1 - i] );
}
}
#endif
/**
* \brief Verify bounds
* \note note available in Python bindings
@ -196,6 +183,17 @@ class CORE_EXPORT QgsConstWkbPtr
* \note note available in Python bindings
*/
inline int remaining() const { return mEnd - mP; } SIP_SKIP
private:
template<typename T> void endian_swap( T &value ) const SIP_SKIP
{
char *data = reinterpret_cast<char *>( &value );
std::size_t n = sizeof( value );
for ( std::size_t i = 0, m = n / 2; i < m; ++i )
{
std::swap( data[i], data[n - 1 - i] );
}
}
};
#endif // QGSWKBPTR_H

View File

@ -43,6 +43,9 @@ class GUI_EXPORT QgsNewMemoryLayerDialog: public QDialog, private Ui::QgsNewMemo
*/
static QgsVectorLayer *runAndCreateLayer( QWidget *parent = nullptr, const QgsCoordinateReferenceSystem &defaultCrs = QgsCoordinateReferenceSystem() );
/**
* New dialog constructor.
*/
QgsNewMemoryLayerDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
~QgsNewMemoryLayerDialog() override;

View File

@ -44,6 +44,9 @@ class GUI_EXPORT QgsNewVectorLayerDialog: public QDialog, private Ui::QgsNewVect
static QString runAndCreateLayer( QWidget *parent = nullptr, QString *enc = nullptr, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem(),
const QString &initialPath = QString() );
/**
* New dialog constructor.
*/
QgsNewVectorLayerDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
~QgsNewVectorLayerDialog() override;
//! Returns the selected geometry type