def _load_texture(self, file, id): path = pt.join(self.IMAGE_PATH, file) img = QImage() if img.load(path): self.textures[id] = QGLWidget.convertToGLFormat(img) print(f'Texture {path} loaded...[OK]') else: print(f'Texture {path} loaded...[FAIL]')
def styleChanged(self, newTheme = 0): unused(newTheme) # Generate a background image that's dependent on the current color scheme. fill = QImage(self.width(), self.height(), QImage.Format_Indexed8) fill.fill(0) self.DEFAULT_BACKGROUND_IMAGE = QGLWidget.convertToGLFormat(fill) self.defaultColor = QColor(0x66, 0xff, 0x00) # bright green self.setPointColor = QColor(0x82, 0x17, 0x82) self.warningColor = QColor(0xff, 0xff, 0x00) self.criticalColor = QColor(0xff, 0x00, 0x00) self.infoColor = self.defaultColor self.fuelColor = self.criticalColor