(self, what)
| 135 | pass |
| 136 | |
| 137 | def _compile(self, what): |
| 138 | cell_list = self._config.get(what) |
| 139 | if cell_list == None: |
| 140 | print("highlight plugin: configuration has no '{0}' configuration".format(what)) |
| 141 | return |
| 142 | for cell in cell_list: |
| 143 | for item in cell: |
| 144 | # colors |
| 145 | if (item == Highlight.COLOR or item == Highlight.BGCOLOR): |
| 146 | if cell[item] != "" and cell[item] is not None: |
| 147 | try: |
| 148 | cell[item] = QColor(cell[item]) |
| 149 | except Exception as e: |
| 150 | cell[item] = None |
| 151 | else: |
| 152 | cell[item] = None |
| 153 | |
| 154 | # alignments |
| 155 | if item == Highlight.ALIGNMENT: |
| 156 | cell[item] = self.getAlignment(cell[item]) |
| 157 | |
| 158 | # TODO: fonts |
| 159 | #if item == Highlight.FONT: |
| 160 | # cell[item] = self.getFont(cell[item]) |
| 161 | |
| 162 | return self._config |
| 163 | |
| 164 | def compile(self): |
| 165 | """transform json items to Qt objects. |
no test coverage detected