# Path: qad_highlight.py
# class QadHighlight():
#    def __init__(self, mapCanvas, borderColor = None, fillColor = None):
#       self.mapCanvas = mapCanvas
#       self.__highlight = []
# 
#    def __del__(self):
#       self.reset()
#       
#       for highlight in self.__highlight:
#          self.mapCanvas.scene().removeItem(highlight)
# 
#       del self.__highlight[:]
#    
#    def hide(self):
#       for highlight in self.__highlight:
#          highlight.hide()
# 
#    def show(self):
#       for highlight in self.__highlight:
#          highlight.show()
#       
#    def addGeometry(self, geom, layer, borderColor = None, fillColor = None):
#       highlight = createHighlight(self.mapCanvas, geom, layer, borderColor, fillColor)
#       highlight.show()
#       self.__highlight.append(highlight)
# 
#    def addGeometries(self, geoms, layer, borderColor = None, fillColor = None):
#       for g in geoms:
#          self.addGeometry(g, layer, borderColor, fillColor)         
#          
#    def reset(self):
#       self.hide()
#       for highlight in self.__highlight:
#          self.mapCanvas.scene().removeItem(highlight)
#       del self.__highlight[:]
# 
# 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_snappointsdisplaymanager import *
from qad_variables import *
from qad_getpoint import *
from qad_dim import *
from qad_highlight import QadHighlight
from qad_msg import QadMsg
import math
import qad_utils
import qad_stretch_fun






#===============================================================================
# Qad_stretch_maptool_ModeEnum class.
#===============================================================================
class Qad_stretch_maptool_ModeEnum():
   # si richiede la selezione del primo punto del rettangolo per selezionare gli oggetti
   ASK_FOR_FIRST_PT_RECTANGLE = 1
   # noto niente il primo punto del rettangolo si richiede il secondo punto
   FIRST_PT_KNOWN_ASK_FOR_SECOND_PT_RECTANGLE = 2   
   # noto niente si richiede il punto base
   NONE_KNOWN_ASK_FOR_BASE_PT = 3
   # noto il punto base si richiede il secondo punto per lo spostamento
   BASE_PT_KNOWN_ASK_FOR_MOVE_PT = 4     


#===============================================================================
# Qad_stretch_maptool class
#===============================================================================
class Qad_stretch_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)
                        
      self.basePt = None
      self.SSGeomList = [] # lista di entità da stirare con geom di selezione

# Path: qad_highlight.py
# class QadHighlight():
#    def __init__(self, mapCanvas, borderColor = None, fillColor = None):
#       self.mapCanvas = mapCanvas
#       self.__highlight = []
# 
#    def __del__(self):
#       self.reset()
#       
#       for highlight in self.__highlight:
#          self.mapCanvas.scene().removeItem(highlight)
# 
#       del self.__highlight[:]
#    
#    def hide(self):
#       for highlight in self.__highlight:
#          highlight.hide()
# 
#    def show(self):
#       for highlight in self.__highlight:
#          highlight.show()
#       
#    def addGeometry(self, geom, layer, borderColor = None, fillColor = None):
#       highlight = createHighlight(self.mapCanvas, geom, layer, borderColor, fillColor)
#       highlight.show()
#       self.__highlight.append(highlight)
# 
#    def addGeometries(self, geoms, layer, borderColor = None, fillColor = None):
#       for g in geoms:
#          self.addGeometry(g, layer, borderColor, fillColor)         
#          
#    def reset(self):
#       self.hide()
#       for highlight in self.__highlight:
#          self.mapCanvas.scene().removeItem(highlight)
#       del self.__highlight[:]
# 
# 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_stretch_maptool.py
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
from qad_snapper import *
from qad_snappointsdisplaymanager import *
from qad_variables import *
from qad_getpoint import *
from qad_dim import *
from qad_highlight import QadHighlight
from qad_msg import QadMsg
import math
import qad_utils
import qad_stretch_fun







#===============================================================================
# Qad_stretch_maptool_ModeEnum class.
#===============================================================================
class Qad_stretch_maptool_ModeEnum():
   # si richiede la selezione del primo punto del rettangolo per selezionare gli oggetti
   ASK_FOR_FIRST_PT_RECTANGLE = 1
   # noto niente il primo punto del rettangolo si richiede il secondo punto
   FIRST_PT_KNOWN_ASK_FOR_SECOND_PT_RECTANGLE = 2   
   # noto niente si richiede il punto base
   NONE_KNOWN_ASK_FOR_BASE_PT = 3
   # noto il punto base si richiede il secondo punto per lo spostamento
   BASE_PT_KNOWN_ASK_FOR_MOVE_PT = 4     


#===============================================================================
# Qad_stretch_maptool class
#===============================================================================
class Qad_stretch_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)
                        
      self.basePt = None
      self.SSGeomList = [] # lista di entità da stirare con geom di selezione

      self.__highlight = QadHighlight(self.canvas)