def loadProject(self, plugin): self.siteCodeCombo.clear() for siteCode in sorted(set(Settings.siteCodes())): self.siteCodeCombo.addItem(siteCode, siteCode) if Settings.siteCode(): self._setSiteCode(Settings.siteCode()) else: projectCode = Settings.projectCode() self.siteCodeCombo.addItem(projectCode, projectCode) self._setSiteCode(projectCode)
def load(self): if Settings.useProjectServer(): self._ark = Ark(Settings.serverUrl(), Settings.serverUser(), Settings.serverPassword()) projects = self._ark.getProjectList() self.projectCodeCombo.setMaxCount(len(projects)) for key in utils.natsorted(projects.keys()): self.projectCodeCombo.addItem(projects[key], key) self.setProjectCode(Settings.projectCode()) self.setProjectName(Settings.projectName()) self.setSiteCode(Settings.siteCode()) self.setLocation(Settings.locationEasting(), Settings.locationNorthing)
def loadProject(self, plugin): self.projectCodeEdit.setText(Settings.projectCode()) self.siteCodeEdit.setText(Settings.siteCode()) self.projectNameEdit.setText(Settings.projectName())