# 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.core import QgsApplication
from qgis.utils import *
from qad_dim import *
from qad_msg import QadMsg, qadShowPluginHelp
import qad_dimstyle_diff_ui
import qad_utils
      dimStyle1 = self.dimStyle1.itemData(index)
      index = self.dimStyle2.currentIndex()
      dimStyle2 = self.dimStyle2.itemData(index) if index >= 0 else None
      self.showProps(dimStyle1, dimStyle2)

   def DimStyleName2Changed(self, index):
      # leggo l'elemento selezionato
      dimStyle2 = self.dimStyle2.itemData(index)
      index = self.dimStyle1.currentIndex()
      dimStyle1 = self.dimStyle1.itemData(index) if index >= 0 else None
      self.showProps(dimStyle1, dimStyle2)

   def showProps(self, dimStyle1, dimStyle2):
      self.tableWidget.clear()
      if dimStyle1 is None:
         return
     
      if dimStyle2 is None or dimStyle1.name == dimStyle2.name:
         self.showAllProps(dimStyle1)
      else:   
         self.showDiffProps(dimStyle1, dimStyle2)
      
   def showAllProps(self, dimStyle):
      if self.tableWidget.model() is not None:
         # Pulisce la tabella
         self.tableWidget.model().reset()
         self.tableWidget.setRowCount(0)
         
      self.tableWidget.setColumnCount(2)
      headerLabels = []

# 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_dimstyle_diff_dlg.py
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.core import QgsApplication
from qgis.utils import *
from qad_dim import *
from qad_msg import QadMsg, qadShowPluginHelp
import qad_dimstyle_diff_ui
import qad_utils

      dimStyle1 = self.dimStyle1.itemData(index)
      index = self.dimStyle2.currentIndex()
      dimStyle2 = self.dimStyle2.itemData(index) if index >= 0 else None
      self.showProps(dimStyle1, dimStyle2)

   def DimStyleName2Changed(self, index):
      # leggo l'elemento selezionato
      dimStyle2 = self.dimStyle2.itemData(index)
      index = self.dimStyle1.currentIndex()
      dimStyle1 = self.dimStyle1.itemData(index) if index >= 0 else None
      self.showProps(dimStyle1, dimStyle2)

   def showProps(self, dimStyle1, dimStyle2):
      self.tableWidget.clear()
      if dimStyle1 is None:
         return
     
      if dimStyle2 is None or dimStyle1.name == dimStyle2.name:
         self.showAllProps(dimStyle1)
      else:   
         self.showDiffProps(dimStyle1, dimStyle2)
      
   def showAllProps(self, dimStyle):
      if self.tableWidget.model() is not None:
         # Pulisce la tabella
         self.tableWidget.model().reset()
         self.tableWidget.setRowCount(0)
         
      self.tableWidget.setColumnCount(2)
      headerLabels = []

      headerLabels.append(QadMsg.translate("DimStyle_Diff_Dialog", "Description"))