Skip to content
Permalink
Browse files

fix style

  • Loading branch information
peppsac committed Jan 23, 2019
1 parent 39f7d9a commit 08634c4e6f8ff46d0c13db420e620750a3f89233
@@ -38,14 +38,14 @@ class QgsConstWkbPtr




public:
QgsConstWkbPtr( const unsigned char *p /Array/, int size /ArraySize/ );






};

/************************************************************************
@@ -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;
@@ -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
@@ -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
@@ -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;

@@ -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

0 comments on commit 08634c4

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