Example #1
0
QgsLayout::QgsLayout( QgsProject *project )
  : QGraphicsScene()
  , mProject( project )
  , mSnapper( QgsLayoutSnapper( this ) )
  , mPageCollection( new QgsLayoutPageCollection( this ) )
  , mGuideCollection( new QgsLayoutGuideCollection( this, mPageCollection.get() ) )
{
  // just to make sure - this should be the default, but maybe it'll change in some future Qt version...
  setBackgroundBrush( Qt::NoBrush );
}
Example #2
0
QgsLayout::QgsLayout( QgsProject *project )
  : mProject( project )
  , mRenderContext( new QgsLayoutRenderContext( this ) )
  , mReportContext( new QgsLayoutReportContext( this ) )
  , mSnapper( QgsLayoutSnapper( this ) )
  , mGridSettings( this )
  , mPageCollection( new QgsLayoutPageCollection( this ) )
  , mUndoStack( new QgsLayoutUndoStack( this ) )
{
  // just to make sure - this should be the default, but maybe it'll change in some future Qt version...
  setBackgroundBrush( Qt::NoBrush );
  mItemsModel.reset( new QgsLayoutModel( this ) );
}