# 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_variables import *
from qad_snapper import *
from qad_msg import QadMsg, qadShowPluginHelp
import qad_dsettings_ui
import qad_utils
      return True


   ######################################
   # Funzioni generiche
   def eventFilter(self, obj, event):
      if event is not None:
         if event.type() == QEvent.FocusOut:
            if obj == self.lineEdit_ProgrDistance:
               return not self.lineEdit_ProgrDistance_Validation()
            elif obj == self.comboBox_increment_angle:
               return not self.comboBox_increment_angle_Validation()            

      # standard event processing
      return QObject.eventFilter(self, obj, event);


   def ButtonBOX_Accepted(self):
      self.accept_osnap_tab() # salvo i valori del tab "object snap"
      self.accept_polar_tab() # salvo i valori del tab "polar tracking"
      
      QadVariables.save()

      self.plugIn.dsettingsLastUsedTabIndex = self.tabWidget.currentIndex()
      
      self.close()
      return True


   def ButtonHELP_Pressed(self):

# 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_dsettings_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_variables import *
from qad_snapper import *
from qad_msg import QadMsg, qadShowPluginHelp
import qad_dsettings_ui
import qad_utils

      return True


   ######################################
   # Funzioni generiche
   def eventFilter(self, obj, event):
      if event is not None:
         if event.type() == QEvent.FocusOut:
            if obj == self.lineEdit_ProgrDistance:
               return not self.lineEdit_ProgrDistance_Validation()
            elif obj == self.comboBox_increment_angle:
               return not self.comboBox_increment_angle_Validation()            

      # standard event processing
      return QObject.eventFilter(self, obj, event);


   def ButtonBOX_Accepted(self):
      self.accept_osnap_tab() # salvo i valori del tab "object snap"
      self.accept_polar_tab() # salvo i valori del tab "polar tracking"
      
      QadVariables.save()

      self.plugIn.dsettingsLastUsedTabIndex = self.tabWidget.currentIndex()
      
      self.close()
      return True


   def ButtonHELP_Pressed(self):

      qadShowPluginHelp(QadMsg.translate("Help", "DSETTINGS"))