Пример #1
0
QgsComposerShape::QgsComposerShape( QgsComposition* composition ): QgsComposerItem( composition ),
    mShape( Ellipse ),
    mCornerRadius( 0 ),
    mUseSymbolV2( false ), //default to not using SymbolV2 for shapes, to preserve 2.0 api
    mShapeStyleSymbol( 0 ),
    mMaxSymbolBleed( 0 )
{
  setFrameEnabled( true );
  createDefaultShapeStyleSymbol();
}
Пример #2
0
QgsComposerShape::QgsComposerShape( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition ):
    QgsComposerItem( x, y, width, height, composition ),
    mShape( Ellipse ),
    mCornerRadius( 0 ),
    mUseSymbolV2( false ), //default to not using SymbolV2 for shapes, to preserve 2.0 api
    mShapeStyleSymbol( 0 ),
    mMaxSymbolBleed( 0 )
{
  setSceneRect( QRectF( x, y, width, height ) );
  setFrameEnabled( true );
  createDefaultShapeStyleSymbol();
}
Пример #3
0
QgsComposerShape::QgsComposerShape( QgsComposition* composition ): QgsComposerItem( composition ),
    mShape( Ellipse ),
    mCornerRadius( 0 ),
    mUseSymbolV2( false ), //default to not using SymbolV2 for shapes, to preserve 2.0 api
    mShapeStyleSymbol( 0 ),
    mMaxSymbolBleed( 0 )
{
  setFrameEnabled( true );
  createDefaultShapeStyleSymbol();

  if ( mComposition )
  {
    //connect to atlas feature changes
    //to update symbol style (in case of data-defined symbology)
    connect( &mComposition->atlasComposition(), SIGNAL( featureChanged( QgsFeature* ) ), this, SLOT( repaint() ) );
  }
}
Пример #4
0
QgsComposerShape::QgsComposerShape( QgsComposition *composition )
  : QgsComposerItem( composition )
  , mShape( Ellipse )
  , mCornerRadius( 0 )
  , mUseSymbol( false ) //default to not using symbol for shapes, to preserve 2.0 api
  , mShapeStyleSymbol( nullptr )
  , mMaxSymbolBleed( 0 )
{
  setFrameEnabled( true );
  createDefaultShapeStyleSymbol();

  if ( mComposition )
  {
    //connect to atlas feature changes
    //to update symbol style (in case of data-defined symbology)
    connect( &mComposition->atlasComposition(), &QgsAtlasComposition::featureChanged, this, &QgsComposerItem::repaint );
  }
}
Пример #5
0
QgsComposerShape::QgsComposerShape( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition )
    : QgsComposerItem( x, y, width, height, composition )
    , mShape( Ellipse )
    , mCornerRadius( 0 )
    , mUseSymbol( false ) //default to not using Symbol for shapes, to preserve 2.0 api
    , mShapeStyleSymbol( nullptr )
    , mMaxSymbolBleed( 0 )
{
    setSceneRect( QRectF( x, y, width, height ) );
    setFrameEnabled( true );
    createDefaultShapeStyleSymbol();

    if ( mComposition )
    {
        //connect to atlas feature changes
        //to update symbol style (in case of data-defined symbology)
        connect( &mComposition->atlasComposition(), SIGNAL( featureChanged( QgsFeature* ) ), this, SLOT( repaint() ) );
    }
}