# Path: gsdview/qtdraw.py
# def _highlightSelectedGraphicsItem(item, painter, option, boundingrect=None):
#     def __init__(self, x=None, y=None, radius=None, parent=None, scene=None,
#                  **kargs):
#     def radius(self):
#     def setRadius(self, radius):
#     def maxFactor(self):
#     def setMaxFactor(self, maxfact):
#     def type(self):
#     def boundingRect(self):
#     def paint(self, painter, option, widget):
#     def __init__(self, parent=None, scene=None, **kargs):
#     def addToGroup(self, item):
#     def pen(self):
#     def setPen(self, pen):
#     def brush(self):
#     def setBrush(self, brush):
#     def sceneEventFilter(self, obj, event):
#     def __init__(self, parent=None):
#     def sceneEventFilter(self, obj, event):
#     def __init__(self, parent=None):
#     def sceneEventFilter(self, obj, event):
#     def __init__(self, parent=None):
#     def sceneEventFilter(self, obj, event):
# class GraphicsPointItem(QtWidgets.QAbstractGraphicsShapeItem):
# class GraphicsItemGroup(QtWidgets.QGraphicsItemGroup):
# class DrawPointMode(MouseMode):
# class DrawLineMode(MouseMode):
# class DrawRectMode(MouseMode):
# class DrawEllipseMode(MouseMode):
#             RADIUS = 3


import logging
from osgeo import ogr, osr
from qtpy import QtCore, QtGui, QtWidgets
from gsdview import qtdraw
        ane OGR layer
    :param srs:
        the target OSR spatial reference system
    :param transform:
        callable object for arbitrary coordinate conversion
    :returns:
        a Qt5 graphics item (QGraphicsItemGroup) representing the layer

    .. seealso:: :func:`singleGeometryToGraphicsItem`,
                 :func:`geometryToGraphicsItem` and
                 :data:`MAX_FEATURE_COUNT`

    """

    layer_srs = layer.GetSpatialRef()
    if (srs is not None and layer_srs is not None
            and not layer_srs.IsSame(srs)):
        srs_transform = osr.CoordinateTransformation(layer_srs, srs)
    else:
        srs_transform = None

    if layer.GetFeatureCount() > MAX_FEATURE_COUNT:
        raise RuntimeError('too many features in layer %s: %d' % (
                           layer.GetName(), layer.GetFeatureCount()))

    # qlayer = GraphicsLayerItem(layer.GetName())
    qlayer = qtdraw.GraphicsItemGroup()
    qlayer.setData(DATAKEY['name'], layer.GetName())
    for feature in layer:
        # qfeature = GraphicsFeatureItem(feature.GetFID())

# Path: gsdview/qtdraw.py
# def _highlightSelectedGraphicsItem(item, painter, option, boundingrect=None):
#     def __init__(self, x=None, y=None, radius=None, parent=None, scene=None,
#                  **kargs):
#     def radius(self):
#     def setRadius(self, radius):
#     def maxFactor(self):
#     def setMaxFactor(self, maxfact):
#     def type(self):
#     def boundingRect(self):
#     def paint(self, painter, option, widget):
#     def __init__(self, parent=None, scene=None, **kargs):
#     def addToGroup(self, item):
#     def pen(self):
#     def setPen(self, pen):
#     def brush(self):
#     def setBrush(self, brush):
#     def sceneEventFilter(self, obj, event):
#     def __init__(self, parent=None):
#     def sceneEventFilter(self, obj, event):
#     def __init__(self, parent=None):
#     def sceneEventFilter(self, obj, event):
#     def __init__(self, parent=None):
#     def sceneEventFilter(self, obj, event):
# class GraphicsPointItem(QtWidgets.QAbstractGraphicsShapeItem):
# class GraphicsItemGroup(QtWidgets.QGraphicsItemGroup):
# class DrawPointMode(MouseMode):
# class DrawLineMode(MouseMode):
# class DrawRectMode(MouseMode):
# class DrawEllipseMode(MouseMode):
#             RADIUS = 3


# Path: gsdview/gdalbackend/ogrqt.py
import logging
from osgeo import ogr, osr
from qtpy import QtCore, QtGui, QtWidgets
from gsdview import qtdraw

        ane OGR layer
    :param srs:
        the target OSR spatial reference system
    :param transform:
        callable object for arbitrary coordinate conversion
    :returns:
        a Qt5 graphics item (QGraphicsItemGroup) representing the layer

    .. seealso:: :func:`singleGeometryToGraphicsItem`,
                 :func:`geometryToGraphicsItem` and
                 :data:`MAX_FEATURE_COUNT`

    """

    layer_srs = layer.GetSpatialRef()
    if (srs is not None and layer_srs is not None
            and not layer_srs.IsSame(srs)):
        srs_transform = osr.CoordinateTransformation(layer_srs, srs)
    else:
        srs_transform = None

    if layer.GetFeatureCount() > MAX_FEATURE_COUNT:
        raise RuntimeError('too many features in layer %s: %d' % (
                           layer.GetName(), layer.GetFeatureCount()))

    # qlayer = GraphicsLayerItem(layer.GetName())
    qlayer = qtdraw.GraphicsItemGroup()
    qlayer.setData(DATAKEY['name'], layer.GetName())
    for feature in layer:
        # qfeature = GraphicsFeatureItem(feature.GetFID())

        qfeature = qtdraw.GraphicsItemGroup()