Fix ar9x compile/boot (#7102)
[opentx.git] / radio / util / taranisicons.py
blobd96abccada27402526146958d23e3ed7847c51b2
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 try:
4 from PyQt5 import Qt, QtGui
5 except:
6 from PyQt4 import Qt, QtGui
8 menu = ["radio_setup", "model_select", "model_settings", "model_checklist", "files", "version"]
10 image = QtGui.QImage(24 * 8, 24, QtGui.QImage.Format_RGB32)
11 image.fill(QtGui.QColor(255, 255, 255))
12 painter = QtGui.QPainter()
13 painter.begin(image)
14 for i, str in enumerate(menu):
15 icon = QtGui.QImage("../src/bitmaps/taranis/std/%s.png" % str)
16 painter.drawImage(Qt.QPoint(24 * i, 0), icon)
17 painter.end()
18 image.save("../src/bitmaps/taranis/mainmenu.png")