Skip to content
Permalink
Browse files

Remove web view widget in favor of attachment (external resource) (#4074

)

* remove photo widget config
* remove webview widget
* Remove mention of duplicate widgets
* Update api break
* migrate web view widgets to attachments
  • Loading branch information
3nids committed Feb 1, 2017
1 parent f720106 commit b340f04e7e74dbbe0dade4e8b9163f7260c52f02
@@ -249,6 +249,7 @@ Use QgsComposerAttributeTableV2 instead.
- QgsCRSCache was removed. QgsCoordinateReferenceSystem now internally uses a cache for CRS creation,
so there is no longer a need for the separate cache class. Code which previously called QgsCRSCache::updateCRSCache()
should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinateTransformCache::instance()->invalidateCrs( authid ).
- QgsFileNameWidgetWrapper was removed. Use QgsExternalResourceWidgetWrapper instead.
- QgsFormAnnotationItem. Use QgsFormAnnotation instead.
- QgsHtmlAnnotationItem. Use QgsHtmlAnnotation instead.
- QgsHttpTransaction. This class was outdated and code should be ported to native Qt or Python implementations.
@@ -264,11 +265,13 @@ should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinat
- QgsMapCanvasMap. It is an internal class used by map canvas.
- QgsMapLayerRegistry. Its functionality has been moved to QgsProject.
- QgsMapRenderer. It has been replaced by QgsMapRendererJob with subclasses and QgsMapSettings.
- QgsPhotoWidgetWrapper was removed. Use QgsExternalResourceWidgetWrapper instead.
- QgsPseudoColorShader. This shader has been broken for some time and was replaced by QgsSingleBandPseudoColorRenderer.
- QgsProjectBadLayerGuiHandler was removed. It was unused in QGIS code and barely useful. Implement your own QgsProjectBadLayerHandler subclass if needed.
- QgsRendererV2DataDefinedMenus was removed. Use QgsDataDefinedButton instead.
- QgsLegacyHelpers.
- QgsProviderCountCalcEvent and QgsProviderExtentCalcEvent. These classes were unused in QGIS core and unmaintained.
- QgsWebviewWidgetWrapper was removed. Use QgsExternalResourceWidgetWrapper instead.
- QgsEditorWidgetConfig was removed. Use QVariantMap instead.
- QgsSvgAnnotationItem. Use QgsSvgAnnotation instead.
- QgsSymbologyV2Conversion was removed. Reading of renderers from pre-1.0 versions is not supported anymore.
@@ -850,6 +853,7 @@ QgsDiagramInterpolationSettings {#qgis_api_break_3_0_QgsDiagramInterpolat

QgsDiagramRenderer {#qgis_api_break_3_0_QgsDiagramRenderer}
------------------

- xform, fields were no longer required and are removed.
- referencedFields() no longer takes a QgsFields argument.
- renderDiagram() now takes an optional data defined overrides collection argument.
@@ -716,6 +716,15 @@ void QgsProjectFileTransform::transform2990()
else if ( ewv2Type == QStringLiteral( "FileName" ) )
{
editWidgetElement.setAttribute( "type", QStringLiteral( "ExternalResource" ) );

editWidgetConfiguration.insert( QStringLiteral( "RelativeStorage" ), 1 );
}
else if ( ewv2Type == QStringLiteral( "WebView" ) )
{
editWidgetElement.setAttribute( "type", QStringLiteral( "ExternalResource" ) );

editWidgetConfiguration.insert( QStringLiteral( "DocumentViewerHeight" ), editWidgetConfiguration.value( QStringLiteral( "Height" ) ) );
editWidgetConfiguration.insert( QStringLiteral( "DocumentViewerWidth" ), editWidgetConfiguration.value( QStringLiteral( "Width" ) ) );
editWidgetConfiguration.insert( QStringLiteral( "RelativeStorage" ), 1 );
}

@@ -315,15 +315,6 @@ SET(QGIS_GUI_SRCS
qgsfiledownloader.cpp
)

IF (WITH_QTWEBKIT)
SET(QGIS_GUI_SRCS
${QGIS_GUI_SRCS}
editorwidgets/qgswebviewconfigdlg.cpp
editorwidgets/qgswebviewwidgetfactory.cpp
editorwidgets/qgswebviewwidgetwrapper.cpp
)
ENDIF (WITH_QTWEBKIT)


IF (WITH_TOUCH)
SET(QGIS_GUI_SRCS
@@ -614,14 +605,6 @@ SET(QGIS_GUI_MOC_HDRS
layertree/qgslayertreeviewdefaultactions.h
)

IF (WITH_QTWEBKIT)
SET(QGIS_GUI_MOC_HDRS
${QGIS_GUI_MOC_HDRS}
editorwidgets/qgswebviewconfigdlg.h
editorwidgets/qgswebviewwidgetwrapper.h
)
ENDIF (WITH_QTWEBKIT)

QT5_WRAP_CPP(QGIS_GUI_MOC_SRCS ${QGIS_GUI_MOC_HDRS})

IF(MSVC)
@@ -710,13 +693,6 @@ SET(QGIS_GUI_HDRS
symbology-ng/qgssymbolwidgetcontext.h
)

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

IF (WITH_TOUCH)
SET(QGIS_GUI_HDRS
${QGIS_GUI_HDRS}
@@ -39,9 +39,6 @@
#include "qgsuuidwidgetfactory.h"
#include "qgsvaluemapwidgetfactory.h"
#include "qgsvaluerelationwidgetfactory.h"
#ifdef WITH_QTWEBKIT
#include "qgswebviewwidgetfactory.h"
#endif


QgsEditorWidgetRegistry* QgsEditorWidgetRegistry::instance()
@@ -63,9 +60,6 @@ void QgsEditorWidgetRegistry::initEditors( QgsMapCanvas *mapCanvas, QgsMessageBa
reg->registerWidget( QStringLiteral( "CheckBox" ), new QgsCheckboxWidgetFactory( tr( "Check Box" ) ) );
reg->registerWidget( QStringLiteral( "ValueRelation" ), new QgsValueRelationWidgetFactory( tr( "Value Relation" ) ) );
reg->registerWidget( QStringLiteral( "UuidGenerator" ), new QgsUuidWidgetFactory( tr( "Uuid Generator" ) ) );
#ifdef WITH_QTWEBKIT
reg->registerWidget( QStringLiteral( "WebView" ), new QgsWebViewWidgetFactory( tr( "Web View" ) ) );
#endif
reg->registerWidget( QStringLiteral( "Color" ), new QgsColorWidgetFactory( tr( "Color" ) ) );
reg->registerWidget( QStringLiteral( "RelationReference" ), new QgsRelationReferenceFactory( tr( "Relation Reference" ), mapCanvas, messageBar ) );
reg->registerWidget( QStringLiteral( "DateTime" ), new QgsDateTimeEditFactory( tr( "Date/Time" ) ) );
@@ -94,7 +88,6 @@ QgsEditorWidgetSetup QgsEditorWidgetRegistry::findBest( const QgsVectorLayer* vl
if ( !setup.isNull() )
return setup;
}

return mAutoConf.editorWidgetSetup( vl, fieldName );
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit b340f04

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