# Path: qad_rubberband.py
# def createRubberBand(mapCanvas, geometryType = QGis.Line, alternativeBand = False, borderColor = None, fillColor = None):
#    """
#    la funzione crea un rubber band di tipo <geometryType> con le impostazioni di QGIS.
#    Se <alternativeBand> = True, il rubber band sarà impostato con più trasparenza e tipolinea punteggiato   
#    """
#    settings = QSettings()
#    width = int(settings.value( "/qgis/digitizing/line_width", 1))
# 
#    rb = QgsRubberBand(mapCanvas, geometryType)
#    
#    if alternativeBand:
#       rb.setLineStyle(Qt.DotLine)
# 
#    if borderColor is None:
#       borderColor = getQGISColorForRubberBand(geometryType, alternativeBand)
#    rb.setBorderColor(borderColor)
# 
#    if fillColor is None:
#       rb.setFillColor(borderColor)
#    else:
#       rb.setFillColor(fillColor)
# 
#    rb.setWidth(width)
#    
#    return rb
# 
# Path: qad_msg.py
# class QadMsgClass():
#    def __init__(self):
#    def translate(self, context, sourceText, disambiguation = None, encoding = QCoreApplication.UnicodeUTF8, n = -1):
# def qadShowPluginHelp(section = "", filename = "index", packageName = None):


from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
from qad_snapper import *
from qad_vertexmarker import *
from qad_rubberband import createRubberBand
from qad_msg import QadMsg
         point = intExtArc[0].getMiddlePt()
         # disegno il marcatore
         self.__vertexMarkers.append(self.getVertexMarker(QadSnapTypeEnum.EXT_INT, point))
      
      # punti di osnap usati per l'opzione polare
      if oSnapPointsForPolar is not None:
         for snapPoint in oSnapPointsForPolar.items():
            snapType = snapPoint[0]
            for item in snapPoint[1]:
               # disegno il marcatore di snap
               self.__vertexMarkers.append(self.getVertexMarker(snapType, item))

            
   def getVertexMarker(self, snapType, point):
      """
      Crea un marcatore puntuale
      """
      vertexMarker = QadVertexMarker(self.__mapCanvas)
      vertexMarker.setIconSize(self.__iconSize)
      vertexMarker.setColor(self.__color)
      vertexMarker.setPenWidth(self.__penWidth)              
      vertexMarker.setIconType(self.__getIconType(snapType))              
      vertexMarker.setCenter(point)
      return vertexMarker


   def getLineMarker(self, pt1, pt2):
      """
      Crea un marcatore lineare
      """

# Path: qad_rubberband.py
# def createRubberBand(mapCanvas, geometryType = QGis.Line, alternativeBand = False, borderColor = None, fillColor = None):
#    """
#    la funzione crea un rubber band di tipo <geometryType> con le impostazioni di QGIS.
#    Se <alternativeBand> = True, il rubber band sarà impostato con più trasparenza e tipolinea punteggiato   
#    """
#    settings = QSettings()
#    width = int(settings.value( "/qgis/digitizing/line_width", 1))
# 
#    rb = QgsRubberBand(mapCanvas, geometryType)
#    
#    if alternativeBand:
#       rb.setLineStyle(Qt.DotLine)
# 
#    if borderColor is None:
#       borderColor = getQGISColorForRubberBand(geometryType, alternativeBand)
#    rb.setBorderColor(borderColor)
# 
#    if fillColor is None:
#       rb.setFillColor(borderColor)
#    else:
#       rb.setFillColor(fillColor)
# 
#    rb.setWidth(width)
#    
#    return rb
# 
# Path: qad_msg.py
# class QadMsgClass():
#    def __init__(self):
#    def translate(self, context, sourceText, disambiguation = None, encoding = QCoreApplication.UnicodeUTF8, n = -1):
# def qadShowPluginHelp(section = "", filename = "index", packageName = None):


# Path: qad_snappointsdisplaymanager.py
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
from qad_snapper import *
from qad_vertexmarker import *
from qad_rubberband import createRubberBand
from qad_msg import QadMsg

         point = intExtArc[0].getMiddlePt()
         # disegno il marcatore
         self.__vertexMarkers.append(self.getVertexMarker(QadSnapTypeEnum.EXT_INT, point))
      
      # punti di osnap usati per l'opzione polare
      if oSnapPointsForPolar is not None:
         for snapPoint in oSnapPointsForPolar.items():
            snapType = snapPoint[0]
            for item in snapPoint[1]:
               # disegno il marcatore di snap
               self.__vertexMarkers.append(self.getVertexMarker(snapType, item))

            
   def getVertexMarker(self, snapType, point):
      """
      Crea un marcatore puntuale
      """
      vertexMarker = QadVertexMarker(self.__mapCanvas)
      vertexMarker.setIconSize(self.__iconSize)
      vertexMarker.setColor(self.__color)
      vertexMarker.setPenWidth(self.__penWidth)              
      vertexMarker.setIconType(self.__getIconType(snapType))              
      vertexMarker.setCenter(point)
      return vertexMarker


   def getLineMarker(self, pt1, pt2):
      """
      Crea un marcatore lineare
      """

      lineMarker = createRubberBand(self.__mapCanvas, QGis.Line, True)