示例#1
0
	def __init__(self):
		QDockWidget.__init__(self)
		self.setWindowFlags(Qt.Window)
		# initialize plugin directory
		self.plgnDir = QFileInfo(QgsApplication.qgisUserDbFilePath()).path() + "/python/plugins/SemiAutomaticClassificationPlugin"
		# locale name
		self.lclNm = QSettings().value("locale/userLocale")[0:2] 
		# path to locale
		lclPth = "" 
		if QFileInfo(self.plgnDir).exists(): 
			lclPth = self.plgnDir + "/i18n/semiautomaticclassificationplugin_" + self.lclNm + ".qm" 
		if QFileInfo(lclPth).exists(): 
			self.trnsltr = QTranslator() 
			self.trnsltr.load(lclPth) 
			if qVersion() > '4.3.3': 
				QCoreApplication.installTranslator(self.trnsltr)
		self.ui = Ui_ScatterPlot()
		self.ui.setupUi(self)
class ScatterPlotDialog(QtGui.QDialog):
	def __init__(self):
		QDockWidget.__init__(self)
		self.setWindowFlags(Qt.Window)
		# initialize plugin directory
		self.plgnDir = QFileInfo(QgsApplication.qgisUserDbFilePath()).path() + "/python/plugins/SemiAutomaticClassificationPlugin"
		# locale name
		self.lclNm = QSettings().value("locale/userLocale")[0:2] 
		# path to locale
		lclPth = "" 
		if QFileInfo(self.plgnDir).exists(): 
			lclPth = self.plgnDir + "/i18n/semiautomaticclassificationplugin_" + self.lclNm + ".qm" 
		if QFileInfo(lclPth).exists(): 
			self.trnsltr = QTranslator() 
			self.trnsltr.load(lclPth) 
			if qVersion() > '4.3.3': 
				QCoreApplication.installTranslator(self.trnsltr)
		self.ui = Ui_ScatterPlot()
		self.ui.setupUi(self)
示例#3
0
 def __init__(self):
     QtGui.QDockWidget.__init__(self)
     try:
         self.setWindowFlags(cfg.QtSCP.Window)
     except:
         return
     # initialize plugin directory
     self.plgnDir = cfg.QFileInfoSCP(
         cfg.qgisCoreSCP.QgsApplication.qgisUserDbFilePath()).path(
         ) + "/python/plugins/SemiAutomaticClassificationPlugin"
     # locale name
     self.lclNm = cfg.QSettingsSCP().value("locale/userLocale")[0:2]
     # path to locale
     lclPth = ""
     if cfg.QFileInfoSCP(self.plgnDir).exists():
         lclPth = self.plgnDir + "/i18n/semiautomaticclassificationplugin_" + self.lclNm + ".qm"
     if cfg.QFileInfoSCP(lclPth).exists():
         self.trnsltr = cfg.QtCoreSCP.QTranslator()
         self.trnsltr.load(lclPth)
         if cfg.QtCoreSCP.qVersion() > '4.3.3':
             cfg.QtCoreSCP.QCoreApplication.installTranslator(self.trnsltr)
     self.ui = Ui_ScatterPlot()
     self.ui.setupUi(self)