|
23 | 23 | #include "qgscompositionwidget.h" |
24 | 24 | #include "qgscomposerarrow.h" |
25 | 25 | #include "qgscomposerarrowwidget.h" |
| 26 | +#include "qgscomposerframe.h" |
| 27 | +#include "qgscomposerhtml.h" |
| 28 | +#include "qgscomposerhtmlwidget.h" |
26 | 29 | #include "qgscomposerlabel.h" |
27 | 30 | #include "qgscomposerlabelwidget.h" |
28 | 31 | #include "qgscomposerlegend.h" |
@@ -368,6 +371,7 @@ void QgsComposer::connectSlots() |
368 | 371 |
|
369 | 372 | connect( mComposition, SIGNAL( selectedItemChanged( QgsComposerItem* ) ), this, SLOT( showItemOptions( QgsComposerItem* ) ) ); |
370 | 373 | connect( mComposition, SIGNAL( composerArrowAdded( QgsComposerArrow* ) ), this, SLOT( addComposerArrow( QgsComposerArrow* ) ) ); |
| 374 | + connect( mComposition, SIGNAL( composerHtmlAdded( QgsComposerHtml* ) ), this, SLOT( addComposerHtml( QgsComposerHtml* ) ) ); |
371 | 375 | connect( mComposition, SIGNAL( composerLabelAdded( QgsComposerLabel* ) ), this, SLOT( addComposerLabel( QgsComposerLabel* ) ) ); |
372 | 376 | connect( mComposition, SIGNAL( composerMapAdded( QgsComposerMap* ) ), this, SLOT( addComposerMap( QgsComposerMap* ) ) ); |
373 | 377 | connect( mComposition, SIGNAL( composerScaleBarAdded( QgsComposerScaleBar* ) ), this, SLOT( addComposerScaleBar( QgsComposerScaleBar* ) ) ); |
@@ -1344,7 +1348,13 @@ void QgsComposer::addComposerHtml( QgsComposerHtml* html ) |
1344 | 1348 | return; |
1345 | 1349 | } |
1346 | 1350 |
|
1347 | | - //todo: create html widget and create entry for each frame in the item/widget map |
| 1351 | + QgsComposerHtmlWidget* hWidget = new QgsComposerHtmlWidget( html ); |
| 1352 | + QList<QgsComposerFrame*> frameList = html->frameItems(); |
| 1353 | + QList<QgsComposerFrame*>::iterator frameIt = frameList.begin(); |
| 1354 | + for ( ; frameIt != frameList.end(); ++frameIt ) |
| 1355 | + { |
| 1356 | + mItemWidgetMap.insert( *frameIt, hWidget ); |
| 1357 | + } |
1348 | 1358 | } |
1349 | 1359 |
|
1350 | 1360 | void QgsComposer::deleteItem( QgsComposerItem* item ) |
|
0 commit comments