Mercurial > public > ostc_companion
view ostc45_icon.h @ 14:e47e0f59101d default tip
Enable OSTC 4/5 Icon option
The button for uploading the icon is now activated based on the first FW
version supporting this function
| author | Ideenmodellierer |
|---|---|
| date | Mon, 12 Jan 2026 18:47:00 +0100 |
| parents | 6fba58c4964b |
| children |
line wrap: on
line source
#ifndef OSTC45_ICON_H #define OSTC45_ICON_H #include <QByteArray> #include <QFile> #include <QIODevice> #include <QString> #include <QVector> #include <cstdint> #include <iostream> #include <stdexcept> #include <vector> class BmpToArray { public: struct CLUTEntry { uint8_t b; uint8_t g; uint8_t r; uint8_t a; // BMP setzt meist 0 }; QByteArray getTransferBytes() const; void getImageXY(uint32_t *x, uint32_t *y); BmpToArray(const QString &fileName); private: void loadBMP(const QString &filename); QVector<CLUTEntry> clut; QVector<uint8_t> pixelData; // Pixel-Indizes QVector<uint32_t> clut32; // 32-Bit Palette uint32_t width = 0; uint32_t height = 0; }; #endif // OSTC45_ICON_H
