32 changes: 21 additions & 11 deletions src/app/qgsidentifyresultsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@
#include <QDockWidget>
#include <QMenuBar>
#include <QPushButton>
#include <QWebView>
#include <QPrinter>
#include <QPrintDialog>
#include <QDesktopServices>
#include <QMessageBox>
#include <QComboBox>
#include <QWebFrame>
#ifdef WITH_QTWEBKIT
#include <QWebFrame>
#endif

//graph
#include <qwt_plot.h>
Expand All @@ -60,6 +61,7 @@
#include <qwt_legend.h>
#include "qgsvectorcolorrampv2.h" // for random colors

#ifdef WITH_QTWEBKIT

QgsIdentifyResultsWebView::QgsIdentifyResultsWebView( QWidget *parent ) : QWebView( parent )
{
Expand Down Expand Up @@ -186,14 +188,6 @@ QSize QgsIdentifyResultsWebView::sizeHint() const
return s;
}

QgsIdentifyResultsFeatureItem::QgsIdentifyResultsFeatureItem( const QgsFields &fields, const QgsFeature &feature, const QgsCoordinateReferenceSystem &crs, const QStringList & strings )
: QTreeWidgetItem( strings )
, mFields( fields )
, mFeature( feature )
, mCrs( crs )
{
}

void QgsIdentifyResultsWebViewItem::setHtml( const QString &html )
{
mWebView->setHtml( html );
Expand Down Expand Up @@ -227,6 +221,16 @@ void QgsIdentifyResultsWebViewItem::loadFinished( bool ok )

}

#endif

QgsIdentifyResultsFeatureItem::QgsIdentifyResultsFeatureItem( const QgsFields &fields, const QgsFeature &feature, const QgsCoordinateReferenceSystem &crs, const QStringList & strings )
: QTreeWidgetItem( strings )
, mFields( fields )
, mFeature( feature )
, mCrs( crs )
{
}

// Tree hierarchy
//
// layer [userrole: QgsMapLayer]
Expand Down Expand Up @@ -735,6 +739,7 @@ void QgsIdentifyResultsDialog::addFeature( QgsRasterLayer *layer,
}
}

#ifdef WITH_QTWEBKIT
if ( currentFormat == QgsRaster::IdentifyFormatHtml || currentFormat == QgsRaster::IdentifyFormatText )
{
QgsIdentifyResultsWebViewItem *attrItem = new QgsIdentifyResultsWebViewItem( lstResults );
Expand All @@ -749,6 +754,7 @@ void QgsIdentifyResultsDialog::addFeature( QgsRasterLayer *layer,
}
}
else
#endif
{
for ( QMap<QString, QString>::const_iterator it = attributes.begin(); it != attributes.end(); ++it )
{
Expand Down Expand Up @@ -1320,6 +1326,8 @@ void QgsIdentifyResultsDialog::handleCurrentItemChanged( QTreeWidgetItem *curren
return;
}


#ifdef WITH_QTWEBKIT
// An item may be printed if a child is QgsIdentifyResultsWebViewItem
for ( int i = 0; i < current->childCount(); i++ )
{
Expand All @@ -1330,6 +1338,7 @@ void QgsIdentifyResultsDialog::handleCurrentItemChanged( QTreeWidgetItem *curren
break;
}
}
#endif

QTreeWidgetItem *layItem = layerItem( current );
if ( current == layItem )
Expand Down Expand Up @@ -1724,7 +1733,7 @@ void QgsIdentifyResultsDialog::printCurrentItem()
QTreeWidgetItem *item = lstResults->currentItem();
if ( !item )
return;

#ifdef WITH_QTWEBKIT
// There should only be one HTML item / result
QgsIdentifyResultsWebViewItem *wv = 0;
for ( int i = 0; i < item->childCount() && !wv; i++ )
Expand All @@ -1739,6 +1748,7 @@ void QgsIdentifyResultsDialog::printCurrentItem()
}

wv->webView()->print();
#endif
}

void QgsIdentifyResultsDialog::on_cmbIdentifyMode_currentIndexChanged( int index )
Expand Down
36 changes: 21 additions & 15 deletions src/app/qgsidentifyresultsdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@

#include <QWidget>
#include <QList>
#include <QWebView>
#ifdef WITH_QTWEBKIT
#include <QWebView>
#endif

class QCloseEvent;
class QTreeWidgetItem;
Expand All @@ -49,6 +51,7 @@ class QwtPlotCurve;
*@author Gary E.Sherman
*/

#ifdef WITH_QTWEBKIT
class APP_EXPORT QgsIdentifyResultsWebView : public QWebView
{
Q_OBJECT
Expand All @@ -62,20 +65,6 @@ class APP_EXPORT QgsIdentifyResultsWebView : public QWebView
QWebView *createWindow( QWebPage::WebWindowType type ) override;
};

class APP_EXPORT QgsIdentifyResultsFeatureItem: public QTreeWidgetItem
{
public:
QgsIdentifyResultsFeatureItem( const QgsFields &fields, const QgsFeature &feature, const QgsCoordinateReferenceSystem &crs, const QStringList & strings = QStringList() );
const QgsFields &fields() const { return mFields; }
const QgsFeature &feature() const { return mFeature; }
const QgsCoordinateReferenceSystem &crs() { return mCrs; }

private:
QgsFields mFields;
QgsFeature mFeature;
QgsCoordinateReferenceSystem mCrs;
};

class APP_EXPORT QgsIdentifyResultsWebViewItem: public QObject, public QTreeWidgetItem
{
Q_OBJECT
Expand All @@ -94,6 +83,22 @@ class APP_EXPORT QgsIdentifyResultsWebViewItem: public QObject, public QTreeWidg
QgsIdentifyResultsWebView *mWebView;
};

#endif

class APP_EXPORT QgsIdentifyResultsFeatureItem: public QTreeWidgetItem
{
public:
QgsIdentifyResultsFeatureItem( const QgsFields &fields, const QgsFeature &feature, const QgsCoordinateReferenceSystem &crs, const QStringList & strings = QStringList() );
const QgsFields &fields() const { return mFields; }
const QgsFeature &feature() const { return mFeature; }
const QgsCoordinateReferenceSystem &crs() { return mCrs; }

private:
QgsFields mFields;
QgsFeature mFeature;
QgsCoordinateReferenceSystem mCrs;
};

class APP_EXPORT QgsIdentifyPlotCurve
{
public:
Expand All @@ -107,6 +112,7 @@ class APP_EXPORT QgsIdentifyPlotCurve
QwtPlotCurve* mPlotCurve;
};


class APP_EXPORT QgsIdentifyResultsDialog: public QDialog, private Ui::QgsIdentifyResultsBase
{
Q_OBJECT
Expand Down
5 changes: 4 additions & 1 deletion src/app/qgsmaptoolannotation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
#include "qgsmaptoolannotation.h"
#include "qgsformannotationdialog.h"
#include "qgsformannotationitem.h"
#ifdef WITH_QTWEBKIT
#include "qgshtmlannotationitem.h"
#include "qgshtmlannotationdialog.h"
#endif
#include "qgslogger.h"
#include "qgsmapcanvas.h"
#include "qgstextannotationdialog.h"
Expand Down Expand Up @@ -65,12 +67,13 @@ QDialog* QgsMapToolAnnotation::createItemEditor( QgsAnnotationItem *item )
{
return new QgsFormAnnotationDialog( fItem );
}

#ifdef WITH_QTWEBKIT
QgsHtmlAnnotationItem* hItem = dynamic_cast<QgsHtmlAnnotationItem*>( item );
if ( hItem )
{
return new QgsHtmlAnnotationDialog( hItem );
}
#endif

QgsSvgAnnotationItem* sItem = dynamic_cast<QgsSvgAnnotationItem*>( item );
if ( sItem )
Expand Down
31 changes: 28 additions & 3 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ SET(QGIS_CORE_SRCS
composer/qgsnumericscalebarstyle.cpp
composer/qgssingleboxscalebarstyle.cpp
composer/qgsticksscalebarstyle.cpp
composer/qgscomposerhtml.cpp
composer/qgscomposermultiframe.cpp
composer/qgscomposermodel.cpp
composer/qgscomposition.cpp
Expand Down Expand Up @@ -278,6 +277,13 @@ SET(QGIS_CORE_SRCS
raster/qgshuesaturationfilter.cpp
)

IF (WITH_QTWEBKIT)
SET(QGIS_CORE_SRCS
${QGIS_CORE_SRCS}
composer/qgscomposerhtml.cpp
)
ENDIF (WITH_QTWEBKIT)

IF(ENABLE_MODELTEST)
SET(MODELTEST_SRCS
../../tests/qt_modeltest/modeltest.cpp
Expand Down Expand Up @@ -397,7 +403,6 @@ SET(QGIS_CORE_MOC_HDRS
composer/qgscomposertable.h
composer/qgscomposertablev2.h
composer/qgscomposertablecolumn.h
composer/qgscomposerhtml.h
composer/qgscomposermultiframe.h
composer/qgscomposereffect.h
composer/qgsatlascomposition.h
Expand Down Expand Up @@ -425,6 +430,13 @@ SET(QGIS_CORE_MOC_HDRS
layertree/qgslayertreeregistrybridge.h
)

IF (WITH_QTWEBKIT)
SET(QGIS_CORE_MOC_HDRS
${QGIS_CORE_MOC_HDRS}
composer/qgscomposerhtml.h
)
ENDIF (WITH_QTWEBKIT)

IF (NOT QT5_BUILD)
SET(QGIS_CORE_MOC_HDRS ${QGIS_CORE_MOC_HDRS}
qgshttptransaction.h
Expand Down Expand Up @@ -641,7 +653,20 @@ SET(QGIS_CORE_HDRS
layertree/qgslayertreeutils.h
)

IF (QT_MOBILITY_LOCATION_FOUND)
IF (WITH_QTWEBKIT)
SET(QGIS_CORE_HDRS
${QGIS_CORE_HDRS}
composer/qgscomposerhtml.h
)
ENDIF (WITH_QTWEBKIT)

IF (NOT QT5_BUILD)
SET(QGIS_CORE_HDRS ${QGIS_CORE_HDRS}
qgshttptransaction.h
)
ENDIF (NOT QT5_BUILD)

IF (QT_MOBILITY_LOCATION_FOUND OR Qt5Positioning_FOUND)
SET(QGIS_CORE_HDRS ${QGIS_CORE_HDRS}
gps/qgsgpsconnectionregistry.h
)
Expand Down
9 changes: 7 additions & 2 deletions src/core/composer/qgscomposerlabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@
#include <QPainter>
#include <QSettings>
#include <QTimer>
#include <QWebFrame>
#include <QWebPage>
#include <QEventLoop>

#ifdef WITH_QTWEBKIT
#include <QWebFrame>
#include <QWebPage>
#endif

QgsComposerLabel::QgsComposerLabel( QgsComposition *composition )
: QgsComposerItem( composition )
, mHtmlState( 0 )
Expand Down Expand Up @@ -111,6 +114,7 @@ void QgsComposerLabel::paint( QPainter* painter, const QStyleOptionGraphicsItem*

QString textToDraw = displayText();

#ifdef WITH_QTWEBKIT
if ( mHtmlState )
{
painter->scale( 1.0 / mHtmlUnitsToMM / 10.0, 1.0 / mHtmlUnitsToMM / 10.0 );
Expand Down Expand Up @@ -167,6 +171,7 @@ void QgsComposerLabel::paint( QPainter* painter, const QStyleOptionGraphicsItem*
webPage->mainFrame()->render( painter );//DELETE WEBPAGE ?
}
else
#endif
{
painter->setFont( mFont );
//debug
Expand Down
12 changes: 11 additions & 1 deletion src/core/composer/qgscomposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#include "qgscomposerutils.h"
#include "qgscomposerarrow.h"
#include "qgscomposerframe.h"
#include "qgscomposerhtml.h"
#ifdef WITH_QTWEBKIT
#include "qgscomposerhtml.h"
#endif
#include "qgscomposerlabel.h"
#include "qgscomposerlegend.h"
#include "qgscomposermap.h"
Expand Down Expand Up @@ -632,6 +634,7 @@ const QgsComposerMap* QgsComposition::getComposerMapById( const int id ) const
return 0;
}

#ifdef WITH_QTWEBKIT
const QgsComposerHtml* QgsComposition::getComposerHtmlByItem( QgsComposerItem *item ) const
{
// an html item will be a composer frame and if it is we can try to get
Expand All @@ -650,6 +653,7 @@ const QgsComposerHtml* QgsComposition::getComposerHtmlByItem( QgsComposerItem *i
}
return 0;
}
#endif

const QgsComposerItem* QgsComposition::getComposerItemById( const QString theId ) const
{
Expand Down Expand Up @@ -1332,6 +1336,7 @@ void QgsComposition::addItemsFromXML( const QDomElement& elem, const QDomDocumen
pushAddRemoveCommand( newTable, tr( "Table added" ) );
}
}
#ifdef WITH_QTWEBKIT
// html
//TODO - fix this. pasting multiframe frame items has no effect
QDomNodeList composerHtmlList = elem.elementsByTagName( "ComposerHtml" );
Expand All @@ -1351,6 +1356,7 @@ void QgsComposition::addItemsFromXML( const QDomElement& elem, const QDomDocumen
frame->setZValue( frame->zValue() + zOrderOffset );
}*/
}
#endif
QDomNodeList composerAttributeTableV2List = elem.elementsByTagName( "ComposerAttributeTableV2" );
for ( int i = 0; i < composerAttributeTableV2List.size(); ++i )
{
Expand Down Expand Up @@ -2389,6 +2395,7 @@ void QgsComposition::addComposerTable( QgsComposerAttributeTable* table )
emit composerTableAdded( table );
}

#ifdef WITH_QTWEBKIT
void QgsComposition::addComposerHtmlFrame( QgsComposerHtml* html, QgsComposerFrame* frame )
{
addItem( frame );
Expand All @@ -2398,6 +2405,7 @@ void QgsComposition::addComposerHtmlFrame( QgsComposerHtml* html, QgsComposerFra

emit composerHtmlFrameAdded( html, frame );
}
#endif

void QgsComposition::addComposerTableFrame( QgsComposerAttributeTableV2 *table, QgsComposerFrame *frame )
{
Expand Down Expand Up @@ -2569,11 +2577,13 @@ void QgsComposition::sendItemAddedSignal( QgsComposerItem* item )
{
//emit composerFrameAdded( multiframe, frame, );
QgsComposerMultiFrame* mf = frame->multiFrame();
#ifdef WITH_QTWEBKIT
QgsComposerHtml* html = dynamic_cast<QgsComposerHtml*>( mf );
if ( html )
{
emit composerHtmlFrameAdded( html, frame );
}
#endif
QgsComposerAttributeTableV2* table = dynamic_cast<QgsComposerAttributeTableV2*>( mf );
if ( table )
{
Expand Down
6 changes: 6 additions & 0 deletions src/core/composer/qgscomposition.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,14 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene
@return QgsComposerMap or 0 pointer if the composer map item does not exist*/
const QgsComposerMap* getComposerMapById( const int id ) const;

#ifdef WITH_QTWEBKIT
/**Returns the composer html with specified id (a string as named in the
composer user interface item properties).
@param item the item.
@return QgsComposerHtml pointer or 0 pointer if no such item exists.
*/
Q_DECL_DEPRECATED const QgsComposerHtml* getComposerHtmlByItem( QgsComposerItem *item ) const;
#endif

/**Returns a composer item given its text identifier.
Ids are not necessarely unique, but this function returns only one element.
Expand Down Expand Up @@ -562,8 +564,10 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene
void addComposerShape( QgsComposerShape* shape );
/**Adds a composer table to the graphics scene and advices composer to create a widget for it (through signal)*/
void addComposerTable( QgsComposerAttributeTable* table );
#ifdef WITH_QTWEBKIT
/**Adds composer html frame and advises composer to create a widget for it (through signal)*/
void addComposerHtmlFrame( QgsComposerHtml* html, QgsComposerFrame* frame );
#endif
/**Adds composer tablev2 frame and advises composer to create a widget for it (through signal)*/
void addComposerTableFrame( QgsComposerAttributeTableV2* table, QgsComposerFrame* frame );

Expand Down Expand Up @@ -870,8 +874,10 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene
void selectedItemChanged( QgsComposerItem* selected );
/**Is emitted when new composer arrow has been added to the view*/
void composerArrowAdded( QgsComposerArrow* arrow );
#ifdef WITH_QTWEBKIT
/**Is emitted when a new composer html has been added to the view*/
void composerHtmlFrameAdded( QgsComposerHtml* html, QgsComposerFrame* frame );
#endif
/**Is emitted when new composer label has been added to the view*/
void composerLabelAdded( QgsComposerLabel* label );
/**Is emitted when new composer map has been added to the view*/
Expand Down
50 changes: 35 additions & 15 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ editorwidgets/qgsfilenamewidgetwrapper.cpp
editorwidgets/qgsfilenamewidgetfactory.cpp
editorwidgets/qgshiddenwidgetwrapper.cpp
editorwidgets/qgshiddenwidgetfactory.cpp
editorwidgets/qgsphotoconfigdlg.cpp
editorwidgets/qgsphotowidgetwrapper.cpp
editorwidgets/qgsphotowidgetfactory.cpp
editorwidgets/qgsrangeconfigdlg.cpp
editorwidgets/qgsrangewidgetwrapper.cpp
editorwidgets/qgsrangewidgetfactory.cpp
Expand All @@ -103,10 +100,6 @@ editorwidgets/qgsvaluemapwidgetfactory.cpp
editorwidgets/qgsvaluerelationconfigdlg.cpp
editorwidgets/qgsvaluerelationwidgetwrapper.cpp
editorwidgets/qgsvaluerelationwidgetfactory.cpp
editorwidgets/qgswebviewconfigdlg.cpp
editorwidgets/qgswebviewwidgetwrapper.cpp
editorwidgets/qgswebviewwidgetfactory.cpp


layertree/qgscustomlayerorderwidget.cpp
layertree/qgslayertreemapcanvasbridge.cpp
Expand Down Expand Up @@ -170,7 +163,6 @@ qgsformannotationitem.cpp
qgsgenericprojectionselector.cpp
qgshighlight.cpp
qgsidentifymenu.cpp
qgshtmlannotationitem.cpp
qgslegendinterface.cpp
qgsludialog.cpp
qgsmanageconnectionsdialog.cpp
Expand Down Expand Up @@ -226,6 +218,20 @@ qgsvertexmarker.cpp
qgsunitselectionwidget.cpp
)

IF (WITH_QTWEBKIT)
SET(QGIS_GUI_SRCS
${QGIS_GUI_SRCS}
qgshtmlannotationitem.cpp

editorwidgets/qgsphotoconfigdlg.cpp
editorwidgets/qgsphotowidgetwrapper.cpp
editorwidgets/qgsphotowidgetfactory.cpp
editorwidgets/qgswebviewconfigdlg.cpp
editorwidgets/qgswebviewwidgetwrapper.cpp
editorwidgets/qgswebviewwidgetfactory.cpp
)
ENDIF (WITH_QTWEBKIT)

IF (WITH_TOUCH)
SET(QGIS_GUI_SRCS
${QGIS_GUI_SRCS}
Expand Down Expand Up @@ -280,7 +286,6 @@ SET(QGIS_GUI_MOC_HDRS
qgsfilterlineedit.h
qgsformannotationitem.h
qgsgenericprojectionselector.h
qgshtmlannotationitem.h
qgsidentifymenu.h
qgslegendinterface.h
qgslonglongvalidator.h
Expand Down Expand Up @@ -395,8 +400,6 @@ SET(QGIS_GUI_MOC_HDRS
editorwidgets/qgsenumerationwidgetwrapper.h
editorwidgets/qgsfilenamewidgetwrapper.h
editorwidgets/qgshiddenwidgetwrapper.h
editorwidgets/qgsphotoconfigdlg.h
editorwidgets/qgsphotowidgetwrapper.h
editorwidgets/qgsrangeconfigdlg.h
editorwidgets/qgsrangewidgetwrapper.h
editorwidgets/qgsrelationreferenceconfigdlg.h
Expand All @@ -413,15 +416,26 @@ SET(QGIS_GUI_MOC_HDRS
editorwidgets/qgsvaluemapwidgetwrapper.h
editorwidgets/qgsvaluerelationconfigdlg.h
editorwidgets/qgsvaluerelationwidgetwrapper.h
editorwidgets/qgswebviewconfigdlg.h
editorwidgets/qgswebviewwidgetwrapper.h

layertree/qgscustomlayerorderwidget.h
layertree/qgslayertreemapcanvasbridge.h
layertree/qgslayertreeview.h
layertree/qgslayertreeviewdefaultactions.h
)

IF (WITH_QTWEBKIT)
SET(QGIS_GUI_MOD_HDRS
${QGIS_GUI_MOC_HDRS}
qgshtmlannotationitem.h

editorwidgets/qgsphotoconfigdlg.h
editorwidgets/qgsphotowidgetwrapper.h
editorwidgets/qgswebviewconfigdlg.h
editorwidgets/qgswebviewwidgetwrapper.h
)
ENDIF (WITH_QTWEBKIT)


QT4_WRAP_CPP(QGIS_GUI_MOC_SRCS ${QGIS_GUI_MOC_HDRS})

IF(MSVC)
Expand Down Expand Up @@ -468,19 +482,25 @@ SET(QGIS_GUI_HDRS
editorwidgets/qgsenumerationwidgetfactory.h
editorwidgets/qgsfilenamewidgetfactory.h
editorwidgets/qgshiddenwidgetfactory.h
editorwidgets/qgsphotowidgetfactory.h
editorwidgets/qgsrangewidgetfactory.h
editorwidgets/qgsrelationreferencefactory.h
editorwidgets/qgstexteditwidgetfactory.h
editorwidgets/qgsuniquevaluewidgetfactory.h
editorwidgets/qgsuuidwidgetfactory.h
editorwidgets/qgsvaluemapwidgetfactory.h
editorwidgets/qgsvaluerelationwidgetfactory.h
editorwidgets/qgswebviewwidgetfactory.h

raster/qgsrasterrendererwidget.h
)

IF (WITH_QTWEBKIT)
SET(QGIS_GUI_HDRS
${QGIS_GUI_HDRS}
editorwidgets/qgsphotowidgetfactory.h
editorwidgets/qgswebviewwidgetfactory.h
)
ENDIF (WITH_QTWEBKIT)

IF (WITH_TOUCH)
SET(QGIS_GUI_HDRS
${QGIS_GUI_HDRS}
Expand Down
2 changes: 2 additions & 0 deletions src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ void QgsEditorWidgetRegistry::initEditors( QgsMapCanvas *mapCanvas, QgsMessageBa
reg->registerWidget( "TextEdit", new QgsTextEditWidgetFactory( tr( "Text Edit" ) ) );
reg->registerWidget( "ValueRelation", new QgsValueRelationWidgetFactory( tr( "Value Relation" ) ) );
reg->registerWidget( "UuidGenerator", new QgsUuidWidgetFactory( tr( "Uuid Generator" ) ) );
#ifdef WITH_QTWEBKIT
reg->registerWidget( "Photo", new QgsPhotoWidgetFactory( tr( "Photo" ) ) );
reg->registerWidget( "WebView", new QgsWebViewWidgetFactory( tr( "Web View" ) ) );
#endif
reg->registerWidget( "Color", new QgsColorWidgetFactory( tr( "Color" ) ) );
reg->registerWidget( "RelationReference", new QgsRelationReferenceFactory( tr( "Relation Reference" ), mapCanvas, messageBar ) );
reg->registerWidget( "DateTime", new QgsDateTimeEditFactory( tr( "Date/Time" ) ) );
Expand Down
1 change: 0 additions & 1 deletion src/gui/qgsattributeeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
#include <QUuid>
#include <QGroupBox>
#include <QLabel>
#include <QWebView>
#include <QDesktopServices>

QWidget *QgsAttributeEditor::createAttributeEditor( QWidget *parent, QWidget *editor, QgsVectorLayer *vl, int idx, const QVariant &value )
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgscomposerview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,7 @@ void QgsComposerView::mouseReleaseEvent( QMouseEvent* e )
}
else
{
#ifdef WITH_QTWEBKIT
QgsComposerHtml* composerHtml = new QgsComposerHtml( composition(), true );
QgsAddRemoveMultiFrameCommand* command = new QgsAddRemoveMultiFrameCommand( QgsAddRemoveMultiFrameCommand::Added,
composerHtml, composition(), tr( "Html item added" ) );
Expand All @@ -945,11 +946,10 @@ void QgsComposerView::mouseReleaseEvent( QMouseEvent* e )
composition()->beginMultiFrameCommand( composerHtml, tr( "Html frame added" ) );
composerHtml->addFrame( frame );
composition()->endMultiFrameCommand();

composition()->setAllUnselected();
frame->setSelected( true );
emit selectedItemChanged( frame );

#endif
removeRubberBand();
emit actionFinished();
}
Expand Down
3 changes: 2 additions & 1 deletion src/helpviewer/qgshelpviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <QString>
#include <QApplication>
#include <QSettings>
#include <QLabel>

#include "qgshelpviewer.h"
#include "qgsapplication.h"
Expand Down Expand Up @@ -72,7 +73,7 @@ void QgsHelpViewer::showHelp( QString help )
// Set the browser text to the help contents
QString myStyle = QgsApplication::reportStyleSheet();
QString helpContents = "<head><style>" + myStyle + "</style></head><body>" + help + "</body>";
webView->setHtml( helpContents );
webView->setText( helpContents );
setWindowTitle( tr( "QGIS Help" ) );

#ifndef WIN32
Expand Down
29 changes: 16 additions & 13 deletions src/helpviewer/qgshelpviewerbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,25 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QWebView" name="webView">
<property name="url">
<url>
<string>about:blank</string>
</url>
<widget class="QLabel" name="webView">
<property name="text">
<string>TextLabel</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
</widget>
</item>
Expand All @@ -44,13 +54,6 @@
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QWebView</class>
<extends>QWidget</extends>
<header>QtWebKit/QWebView</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
Expand Down
76 changes: 58 additions & 18 deletions src/ui/qgspluginmanagerbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
Expand Down Expand Up @@ -227,7 +236,16 @@
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
Expand Down Expand Up @@ -366,15 +384,25 @@
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_12">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWebView" name="wvDetails">
<property name="url">
<url>
<string>about:blank</string>
</url>
<widget class="QLabel" name="wvDetails">
<property name="text">
<string>TextLabel</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
</widget>
</item>
Expand Down Expand Up @@ -503,7 +531,16 @@
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
Expand All @@ -519,8 +556,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>355</width>
<height>695</height>
<width>432</width>
<height>693</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
Expand Down Expand Up @@ -839,7 +876,16 @@ p, li { white-space: pre-wrap; }
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
Expand Down Expand Up @@ -940,11 +986,6 @@ p, li { white-space: pre-wrap; }
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QWebView</class>
<extends>QWidget</extends>
<header>QtWebKit/QWebView</header>
</customwidget>
<customwidget>
<class>QgsCollapsibleGroupBox</class>
<extends>QGroupBox</extends>
Expand All @@ -961,7 +1002,6 @@ p, li { white-space: pre-wrap; }
<tabstop>mOptionsListWidget</tabstop>
<tabstop>leFilter</tabstop>
<tabstop>vwPlugins</tabstop>
<tabstop>wvDetails</tabstop>
<tabstop>buttonUpgradeAll</tabstop>
<tabstop>buttonUninstall</tabstop>
<tabstop>buttonInstall</tabstop>
Expand Down