Skip to content
Permalink
Browse files

Fix missing Q_OBJECT macros

Thanks to Clazy
  • Loading branch information
nyalldawson committed Aug 29, 2017
1 parent 972a1fe commit 78b834c5b04000bec94e5339fd05edab329bb2ab
Showing with 465 additions and 359 deletions.
  1. +2 −0 python/core/layertree/qgslayertreemodel.sip
  2. +1 −0 python/gui/qgscodeeditorsql.sip
  3. +1 −0 python/gui/symbology/qgsdatadefinedsizelegendwidget.sip
  4. +2 −0 src/app/qgsdiagramproperties.h
  5. +3 −2 src/core/CMakeLists.txt
  6. +0 −30 src/core/layertree/qgslayertreemodel.cpp
  7. +35 −1 src/core/layertree/qgslayertreemodel.h
  8. +4 −2 src/core/layertree/qgslayertreemodellegendnode.h
  9. +2 −0 src/core/layout/qgslayoutitemregistry.h
  10. +2 −0 src/core/processing/qgsnativealgorithms.h
  11. +3 −1 src/core/qgsnetworkdiskcache.cpp
  12. +13 −8 src/core/qgsnetworkdiskcache.h
  13. +2 −0 src/core/raster/qgsrasterinterface.h
  14. +39 −32 src/core/raster/qgsrasterlayerrenderer.cpp
  15. +29 −23 src/core/raster/qgsrasterlayerrenderer.h
  16. +4 −0 src/gui/locator/qgslocatorwidget.h
  17. +0 −17 src/gui/qgscodeeditorsql.cpp
  18. +25 −0 src/gui/qgscodeeditorsql.h
  19. +0 −23 src/gui/symbology/qgsdatadefinedsizelegendwidget.cpp
  20. +27 −0 src/gui/symbology/qgsdatadefinedsizelegendwidget.h
  21. +5 −1 src/plugins/grass/qgsgrassmoduleinput.h
  22. +87 −103 src/plugins/grass/qgsgrasstools.cpp
  23. +37 −0 src/plugins/grass/qgsgrasstools.h
  24. +2 −0 src/providers/arcgisrest/qgsafsdataitems.h
  25. +2 −0 src/providers/arcgisrest/qgsamsdataitems.h
  26. +0 −13 src/providers/arcgisrest/qgsarcgisservicesourceselect.cpp
  27. +14 −0 src/providers/arcgisrest/qgsarcgisservicesourceselect.h
  28. +1 −0 src/providers/grass/CMakeLists.txt
  29. +2 −0 src/providers/grass/qgsgrassdatafile.h
  30. +2 −0 src/providers/grass/qgsgrassprovidermodule.h
  31. +1 −0 src/providers/wfs/CMakeLists.txt
  32. +2 −0 src/providers/wfs/qgswfsconnection.h
  33. +1 −29 src/providers/wfs/qgswfssourceselect.cpp
  34. +32 −1 src/providers/wfs/qgswfssourceselect.h
  35. +1 −1 src/providers/wms/qgswmssourceselect.cpp
  36. +82 −72 tests/src/core/testqgslayoutitem.cpp
@@ -385,6 +385,8 @@ Filter nodes from QgsMapLayerLegend according to the current filtering rules
QFlags<QgsLayerTreeModel::Flag> operator|(QgsLayerTreeModel::Flag f1, QFlags<QgsLayerTreeModel::Flag> f2);




/************************************************************************
* This file has been generated automatically from *
* *
@@ -28,6 +28,7 @@ class QgsCodeEditorSQL : QgsCodeEditor

};


/************************************************************************
* This file has been generated automatically from *
* *
@@ -40,6 +40,7 @@ Returns configuration as set up in the dialog (may be null). Ownership is passed

};


/************************************************************************
* This file has been generated automatically from *
* *
@@ -94,6 +94,8 @@ class APP_EXPORT QgsDiagramProperties : public QWidget, private Ui::QgsDiagramPr

class EditBlockerDelegate: public QStyledItemDelegate
{
Q_OBJECT

public:
EditBlockerDelegate( QObject *parent = nullptr )
: QStyledItemDelegate( parent )
@@ -659,6 +659,7 @@ SET(QGIS_CORE_MOC_HDRS
composer/qgslayoutmanager.h
composer/qgspaperitem.h

processing/qgsnativealgorithms.h
processing/qgsprocessingalgrunnertask.h
processing/qgsprocessingfeedback.h
processing/qgsprocessingprovider.h
@@ -669,6 +670,8 @@ SET(QGIS_CORE_MOC_HDRS
raster/qgsrasterfilewritertask.h
raster/qgsrasterlayer.h
raster/qgsrasterdataprovider.h
raster/qgsrasterinterface.h
raster/qgsrasterlayerrenderer.h

geometry/qgspoint.h

@@ -943,7 +946,6 @@ SET(QGIS_CORE_HDRS
metadata/qgslayermetadata.h
metadata/qgslayermetadatavalidator.h

processing/qgsnativealgorithms.h
processing/qgsprocessing.h
processing/qgsprocessingalgorithm.h
processing/qgsprocessingcontext.h
@@ -980,7 +982,6 @@ SET(QGIS_CORE_HDRS
raster/qgsrasterfilewriter.h
raster/qgsrasterhistogram.h
raster/qgsrasteridentifyresult.h
raster/qgsrasterinterface.h
raster/qgsrasteriterator.h
raster/qgsrasterminmaxorigin.h
raster/qgsrasternuller.h
@@ -33,36 +33,6 @@
#include "qgssymbollayerutils.h"
#include "qgsvectorlayer.h"

///@cond PRIVATE

/** In order to support embedded widgets in layer tree view, the model
* generates one placeholder legend node for each embedded widget.
* The placeholder will be replaced by an embedded widget in QgsLayerTreeView
*/
class EmbeddedWidgetLegendNode : public QgsLayerTreeModelLegendNode
{
public:
EmbeddedWidgetLegendNode( QgsLayerTreeLayer *nodeL )
: QgsLayerTreeModelLegendNode( nodeL )
{
// we need a valid rule key to allow the model to build a tree out of legend nodes
// if that's possible (if there is a node without a rule key, building of tree is canceled)
mRuleKey = QStringLiteral( "embedded-widget-" ) + QUuid::createUuid().toString();
}

QVariant data( int role ) const override
{
if ( role == RuleKeyRole )
return mRuleKey;
return QVariant();
}

private:
QString mRuleKey;
};

///@endcond

QgsLayerTreeModel::QgsLayerTreeModel( QgsLayerTree *rootNode, QObject *parent )
: QAbstractItemModel( parent )
, mRootNode( rootNode )
@@ -25,11 +25,11 @@

#include "qgsgeometry.h"
#include "qgsmaplayer.h"
#include "qgslayertreemodellegendnode.h"

class QgsLayerTreeNode;
class QgsLayerTreeGroup;
class QgsLayerTreeLayer;
class QgsLayerTreeModelLegendNode;
class QgsMapHitTest;
class QgsMapLayer;
class QgsMapSettings;
@@ -385,4 +385,38 @@ class CORE_EXPORT QgsLayerTreeModel : public QAbstractItemModel

Q_DECLARE_OPERATORS_FOR_FLAGS( QgsLayerTreeModel::Flags )

///@cond PRIVATE
#ifndef SIP_RUN

/** In order to support embedded widgets in layer tree view, the model
* generates one placeholder legend node for each embedded widget.
* The placeholder will be replaced by an embedded widget in QgsLayerTreeView
*/
class EmbeddedWidgetLegendNode : public QgsLayerTreeModelLegendNode
{
Q_OBJECT

public:
EmbeddedWidgetLegendNode( QgsLayerTreeLayer *nodeL )
: QgsLayerTreeModelLegendNode( nodeL )
{
// we need a valid rule key to allow the model to build a tree out of legend nodes
// if that's possible (if there is a node without a rule key, building of tree is canceled)
mRuleKey = QStringLiteral( "embedded-widget-" ) + QUuid::createUuid().toString();
}

QVariant data( int role ) const override
{
if ( role == RuleKeyRole )
return mRuleKey;
return QVariant();
}

private:
QString mRuleKey;
};
#endif

///@endcond

#endif // QGSLAYERTREEMODEL_H
@@ -26,7 +26,7 @@
#include "qgis_core.h"
#include "qgis.h"

#include "qgsrasterdataprovider.h" // for QgsImageFetcher dtor visibility
#include "raster/qgsrasterdataprovider.h" // for QgsImageFetcher dtor visibility

class QgsLayerTreeLayer;
class QgsLayerTreeModel;
@@ -140,7 +140,7 @@ class CORE_EXPORT QgsLayerTreeModelLegendNode : public QObject
QString mUserLabel;
};

#include "qgslegendsymbolitem.h"
#include "symbology/qgslegendsymbolitem.h"

/** \ingroup core
* Implementation of legend node interface for displaying preview of vector symbols and their labels
@@ -388,6 +388,8 @@ class CORE_EXPORT QgsWmsLegendNode : public QgsLayerTreeModelLegendNode
*/
class CORE_EXPORT QgsDataDefinedSizeLegendNode : public QgsLayerTreeModelLegendNode
{
Q_OBJECT

public:
//! Construct the node using QgsDataDefinedSizeLegend as definition of the node's appearance
QgsDataDefinedSizeLegendNode( QgsLayerTreeLayer *nodeLayer, const QgsDataDefinedSizeLegend &settings, QObject *parent SIP_TRANSFERTHIS = nullptr );
@@ -265,6 +265,8 @@ class CORE_EXPORT QgsLayoutItemRegistry : public QObject
//simple item for testing
class TestLayoutItem : public QgsLayoutItem
{
Q_OBJECT

public:

TestLayoutItem( QgsLayout *layout );
@@ -29,6 +29,8 @@

class QgsNativeAlgorithms: public QgsProcessingProvider
{
Q_OBJECT

public:

QgsNativeAlgorithms( QObject *parent = nullptr );
@@ -18,7 +18,9 @@

#include "qgsnetworkdiskcache.h"

QgsNetworkDiskCache::ExpirableNetworkDiskCache QgsNetworkDiskCache::sDiskCache;
///@cond PRIVATE
ExpirableNetworkDiskCache QgsNetworkDiskCache::sDiskCache;
///@endcond
QMutex QgsNetworkDiskCache::sDiskCacheMutex;

QgsNetworkDiskCache::QgsNetworkDiskCache( QObject *parent )
@@ -25,6 +25,19 @@

class QNetworkDiskCache;

///@cond PRIVATE

class ExpirableNetworkDiskCache : public QNetworkDiskCache
{
Q_OBJECT

public:
explicit ExpirableNetworkDiskCache( QObject *parent = 0 ) : QNetworkDiskCache( parent ) {}
qint64 runExpire() { return QNetworkDiskCache::expire(); }
};

///@endcond

/** \ingroup core
* Wrapper implementation of QNetworkDiskCache with all methods guarded by a
* mutex soly for internal use of QgsNetworkAccessManagers
@@ -83,14 +96,6 @@ class QgsNetworkDiskCache : public QNetworkDiskCache

private:
explicit QgsNetworkDiskCache( QObject *parent );
Q_DISABLE_COPY( QgsNetworkDiskCache )

class ExpirableNetworkDiskCache : public QNetworkDiskCache
{
public:
explicit ExpirableNetworkDiskCache( QObject *parent = 0 ) : QNetworkDiskCache( parent ) {}
qint64 runExpire() { return QNetworkDiskCache::expire(); }
};

static ExpirableNetworkDiskCache sDiskCache;
static QMutex sDiskCacheMutex;
@@ -39,6 +39,8 @@
*/
class CORE_EXPORT QgsRasterBlockFeedback : public QgsFeedback
{
Q_OBJECT

public:
//! Construct a new raster block feedback object
QgsRasterBlockFeedback( QObject *parent = nullptr ) : QgsFeedback( parent ), mPreviewOnly( false ), mRenderPartialOutput( false ) {}
@@ -25,12 +25,50 @@
#include "qgsproject.h"
#include "qgsexception.h"


///@cond PRIVATE

QgsRasterLayerRendererFeedback::QgsRasterLayerRendererFeedback( QgsRasterLayerRenderer *r )
: QgsRasterBlockFeedback()
, mR( r )
, mMinimalPreviewInterval( 250 )
{
setRenderPartialOutput( r->mContext.testFlag( QgsRenderContext::RenderPartialOutput ) );
}

void QgsRasterLayerRendererFeedback::onNewData()
{
if ( !renderPartialOutput() )
return; // we were not asked for partial renders and we may not have a temporary image for overwriting...

// update only once upon a time
// (preview itself takes some time)
if ( mLastPreview.isValid() && mLastPreview.msecsTo( QTime::currentTime() ) < mMinimalPreviewInterval )
return;

// TODO: update only the area that got new data

QgsDebugMsg( QString( "new raster preview! %1" ).arg( mLastPreview.msecsTo( QTime::currentTime() ) ) );
QTime t;
t.start();
QgsRasterBlockFeedback feedback;
feedback.setPreviewOnly( true );
feedback.setRenderPartialOutput( true );
QgsRasterIterator iterator( mR->mPipe->last() );
QgsRasterDrawer drawer( &iterator );
drawer.draw( mR->mPainter, mR->mRasterViewPort, mR->mMapToPixel, &feedback );
QgsDebugMsg( QString( "total raster preview time: %1 ms" ).arg( t.elapsed() ) );
mLastPreview = QTime::currentTime();
}

///@endcond
///
QgsRasterLayerRenderer::QgsRasterLayerRenderer( QgsRasterLayer *layer, QgsRenderContext &rendererContext )
: QgsMapLayerRenderer( layer->id() )
, mRasterViewPort( nullptr )
, mPipe( nullptr )
, mContext( rendererContext )
, mFeedback( new Feedback( this ) )
, mFeedback( new QgsRasterLayerRendererFeedback( this ) )
{
mPainter = rendererContext.painter();
const QgsMapToPixel &qgsMapToPixel = rendererContext.mapToPixel();
@@ -231,34 +269,3 @@ QgsFeedback *QgsRasterLayerRenderer::feedback() const
return mFeedback;
}

QgsRasterLayerRenderer::Feedback::Feedback( QgsRasterLayerRenderer *r )
: mR( r )
, mMinimalPreviewInterval( 250 )
{
setRenderPartialOutput( r->mContext.testFlag( QgsRenderContext::RenderPartialOutput ) );
}

void QgsRasterLayerRenderer::Feedback::onNewData()
{
if ( !renderPartialOutput() )
return; // we were not asked for partial renders and we may not have a temporary image for overwriting...

// update only once upon a time
// (preview itself takes some time)
if ( mLastPreview.isValid() && mLastPreview.msecsTo( QTime::currentTime() ) < mMinimalPreviewInterval )
return;

// TODO: update only the area that got new data

QgsDebugMsg( QString( "new raster preview! %1" ).arg( mLastPreview.msecsTo( QTime::currentTime() ) ) );
QTime t;
t.start();
QgsRasterBlockFeedback feedback;
feedback.setPreviewOnly( true );
feedback.setRenderPartialOutput( true );
QgsRasterIterator iterator( mR->mPipe->last() );
QgsRasterDrawer drawer( &iterator );
drawer.draw( mR->mPainter, mR->mRasterViewPort, mR->mMapToPixel, &feedback );
QgsDebugMsg( QString( "total raster preview time: %1 ms" ).arg( t.elapsed() ) );
mLastPreview = QTime::currentTime();
}

0 comments on commit 78b834c

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