def __init__(self, iface): # initialise plugin directory self.plugin_dir = os.path.dirname(__file__) # initialize locale locale = QtCore.QSettings().value("locale/userLocale")[0:2] locale_path = os.path.join(self.plugin_dir, 'i18n', 'essTools_{}.qm'.format(locale)) if os.path.exists(locale_path): self.translator = QtCore.QTranslator() self.translator.load(locale_path) if QtCore.qVersion() > '4.3.3': QtCore.QCoreApplication.installTranslator(self.translator) # Save reference to the QGIS interface self.iface = iface self.toolbar = self.iface.addToolBar(u"Space Syntax Toolkit") self.menu = self.tr(u"&Space Syntax Toolkit") self.actions = [] # Create toolkit components self.settings = SettingsManager(self.iface) self.settings_action = None self.project = ProjectManager(self.iface, self.settings) self.project_action = None self.about = AboutDialog() self.about_action = None # for remote debugging if has_pydevd and is_debug: pydevd.settrace('localhost', port=53100, stdoutToServer=True, stderrToServer=True, suspend=False) ########### ########### # initialise the different modules self.analysis = AnalysisTool.AnalysisTool(self.iface, self.settings, self.project) self.explorer = ExplorerTool.ExplorerTool(self.iface, self.settings, self.project) self.gate_transformer = TransformerAnalysis.GateTransformer(self.iface) self.rcl_cleaner = RoadNetworkCleanerTool.RoadNetworkCleaner( self.iface) self.catchment_tool = CatchmentAnalyser.CatchmentTool(self.iface) self.udi_tool = UrbanDataInputTool.UrbanDataInputTool(self.iface)
def __init__(self, iface): # initialise plugin directory self.plugin_dir = os.path.dirname(__file__) # initialize locale locale = QtCore.QSettings().value("locale/userLocale")[0:2] locale_path = os.path.join(self.plugin_dir, 'i18n', 'essTools_{}.qm'.format(locale)) if os.path.exists(locale_path): self.translator = QtCore.QTranslator() self.translator.load(locale_path) if QtCore.qVersion() > '4.3.3': QtCore.QCoreApplication.installTranslator(self.translator) # Save reference to the QGIS interface self.iface = iface self.esst_toolbar = self.iface.addToolBar(u"Space Syntax Toolkit") # initialise base modules and interface actions self.settings = SettingsManager(self.iface) self.settings_action = None self.project = ProjectManager(self.iface, self.settings) self.project_action = None # initialise the tool modules and interface actions self.analysis = AnalysisTool.AnalysisTool(self.iface, self.settings, self.project) self.analysis_action = None self.explorer = ExplorerTool.ExplorerTool(self.iface, self.settings, self.project) self.explorer_action = None # Create other dialogs self.about = AboutDialog() about_msg = ( 'The "Space Syntax Toolkit" was originally developed at the Space Syntax Laboratory, ' 'the Bartlett School of Architecture, University College London (UCL).\n\n' 'Author: Jorge Gil\n\n' 'Contributors: Tasos Varoudis\n\n' 'Contact: [email protected]\n\n' 'Released under GNU Licence version 3') self.about.messageText.setText(about_msg) self.about.logoLabel.setPixmap(QPixmap(os.path.dirname(__file__) + '/icons/ucl.png')) self.about.logoLabel.setScaledContents(True) self.about_action = None self.help_action = None # initialise default events #self.project.loadSettings() if has_pydevd and is_debug: pydevd.settrace('localhost', port=53100, stdoutToServer=True, stderrToServer=True, suspend=False)
def __init__(self, iface): # initialise plugin directory self.plugin_dir = os.path.dirname(__file__) # initialize locale locale = QtCore.QSettings().value("locale/userLocale")[0:2] locale_path = os.path.join(self.plugin_dir, 'i18n', 'essTools_{}.qm'.format(locale)) if os.path.exists(locale_path): self.translator = QtCore.QTranslator() self.translator.load(locale_path) if QtCore.qVersion() > '4.3.3': QtCore.QCoreApplication.installTranslator(self.translator) # Save reference to the QGIS interface self.iface = iface self.esst_toolbar = self.iface.addToolBar(u"Space Syntax Toolkit") # initialise base modules and interface actions self.settings = SettingsManager(self.iface) self.settings_action = None self.project = ProjectManager(self.iface, self.settings) self.project_action = None # initialise the tool modules and interface actions self.analysis = AnalysisTool.AnalysisTool(self.iface, self.settings, self.project) self.analysis_action = None self.explorer = ExplorerTool.ExplorerTool(self.iface, self.settings, self.project) self.explorer_action = None # Create other dialogs self.about = AboutDialog() self.about_action = None self.help_action = None # initialise default events #self.project.loadSettings() if has_pydevd and is_debug: pydevd.settrace('localhost', port=53100, stdoutToServer=True, stderrToServer=True)