Skip to content
Permalink
Browse files

#ifdef out dummy test item

  • Loading branch information
nyalldawson committed Dec 4, 2017
1 parent 696b21a commit dbd5215e628165cc722c429698512a555b879347
@@ -63,8 +63,9 @@ void QgsLayoutAppUtils::registerGuiForKnownItemTypes()
return new QgsLayoutViewTriangleRubberBand( view );
} );

#if 0
registry->addLayoutItemGuiMetadata( new QgsLayoutItemGuiMetadata( QgsLayoutItemRegistry::LayoutItem + 1002, QStringLiteral( "test" ), QgsApplication::getThemeIcon( QStringLiteral( "/mActionAddLabel.svg" ) ), nullptr, createRubberBand ) );

#endif

// map item

@@ -49,13 +49,16 @@ bool QgsLayoutItemRegistry::populate()
if ( !mMetadata.isEmpty() )
return false;

#if 0
// add temporary item to register
auto createTemporaryItem = []( QgsLayout * layout )->QgsLayoutItem*
{
return new TestLayoutItem( layout );
};

addLayoutItemType( new QgsLayoutItemMetadata( QgsLayoutItemRegistry::LayoutItem + 1002, QStringLiteral( "temp type" ), QgsApplication::getThemeIcon( QStringLiteral( "/mActionAddLabel.svg" ) ), createTemporaryItem ) );
#endif

addLayoutItemType( new QgsLayoutItemMetadata( LayoutGroup, QStringLiteral( "Group" ), QIcon(), QgsLayoutItemGroup::create ) );
addLayoutItemType( new QgsLayoutItemMetadata( LayoutFrame, QStringLiteral( "Frame" ), QIcon(), QgsLayoutFrame::create ) );
addLayoutItemType( new QgsLayoutItemMetadata( LayoutPage, QStringLiteral( "Page" ), QgsApplication::getThemeIcon( QStringLiteral( "/mActionFileNew.svg" ) ), QgsLayoutItemPage::create ) );
@@ -154,6 +157,7 @@ QMap<int, QString> QgsLayoutItemRegistry::itemTypes() const
}

///@cond TEMPORARY
#if 0
TestLayoutItem::TestLayoutItem( QgsLayout *layout )
: QgsLayoutItem( layout )
{
@@ -202,4 +206,5 @@ void TestLayoutItem::draw( QgsRenderContext &context, const QStyleOptionGraphics
painter->restore();
stack.end( context );
}
#endif
///@endcond
@@ -424,6 +424,7 @@ class CORE_EXPORT QgsLayoutItemRegistry : public QObject

};

#if 0
#ifndef SIP_RUN
///@cond TEMPORARY
//simple item for testing
@@ -452,6 +453,7 @@ class TestLayoutItem : public QgsLayoutItem
};
///@endcond
#endif
#endif

#endif //QGSLAYOUTITEMREGISTRY_H

0 comments on commit dbd5215

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