Exemple #1
0
 def loadGlyphList(self):
     glyphListPath = settings.glyphListPath()
     if glyphListPath and os.path.exists(glyphListPath):
         try:
             glyphList_ = glyphList.parseGlyphList(glyphListPath)
         except Exception as e:
             msg = self.tr("The glyph list at {0} cannot " "be parsed and will be dropped.").format(glyphListPath)
             errorReports.showWarningException(e, msg)
             settings.removeGlyphListPath()
         else:
             self.GL2UV = glyphList_
Exemple #2
0
 def loadGlyphList(self):
     glyphListPath = settings.glyphListPath()
     if glyphListPath and os.path.exists(glyphListPath):
         try:
             glyphList_ = glyphList.parseGlyphList(glyphListPath)
         except Exception as e:
             msg = self.tr(
                 "The glyph list at {0} cannot "
                 "be parsed and will be dropped.").format(glyphListPath)
             errorReports.showWarningException(e, msg)
             settings.removeGlyphListPath()
         else:
             self.GL2UV = glyphList_
Exemple #3
0
    def readSettings(self):
        defaultGlyphSet = settings.defaultGlyphSet()
        self.defaultGlyphSetBox.setChecked(len(defaultGlyphSet))

        self.glyphSets = settings.readGlyphSets()
        self.defaultGlyphSetDrop.clear()
        self.defaultGlyphSetDrop.addItems(self.glyphSets.keys())

        self.glyphSetList.clear()
        glyphSetNames = self.glyphSets.keys()
        # Normally we should be enforcing this rather decently in the interface
        # already
        if glyphSetNames:
            for glyphSetName in glyphSetNames:
                item = QListWidgetItem(glyphSetName, self.glyphSetList)
                item.setFlags(item.flags() | Qt.ItemIsEditable)
            self.glyphSetList.setCurrentRow(0)
        self.removeGlyphSetButton.setEnabled(len(self.glyphSets) > 1)

        glyphListPath = settings.glyphListPath()
        self.glyphListBox.setChecked(bool(glyphListPath))
        self.glyphListEdit.setEnabled(bool(glyphListPath))
        self.glyphListEdit.setText(glyphListPath)
        self.glyphListButton.setEnabled(bool(glyphListPath))
Exemple #4
0
    def readSettings(self):
        defaultGlyphSet = settings.defaultGlyphSet()
        self.defaultGlyphSetBox.setChecked(len(defaultGlyphSet))

        self.glyphSets = settings.readGlyphSets()
        self.defaultGlyphSetDrop.clear()
        self.defaultGlyphSetDrop.addItems(self.glyphSets.keys())

        self.glyphSetList.clear()
        glyphSetNames = self.glyphSets.keys()
        # Normally we should be enforcing this rather decently in the interface
        # already
        if glyphSetNames:
            for glyphSetName in glyphSetNames:
                item = QListWidgetItem(glyphSetName, self.glyphSetList)
                item.setFlags(item.flags() | Qt.ItemIsEditable)
            self.glyphSetList.setCurrentRow(0)
        self.removeGlyphSetButton.setEnabled(len(self.glyphSets) > 1)

        glyphListPath = settings.glyphListPath()
        self.glyphListBox.setChecked(bool(glyphListPath))
        self.glyphListEdit.setEnabled(bool(glyphListPath))
        self.glyphListEdit.setText(glyphListPath)
        self.glyphListButton.setEnabled(bool(glyphListPath))