Files
utun2/tools/chatgui/src/flagpainter.h
T

28 lines
844 B
C++

/* Отрисовка флагов участника и общих значков storage/рации. */
#ifndef FLAGPAINTER_H
#define FLAGPAINTER_H
#include <QPainter>
#include <QColor>
#include <stdint.h>
#define MEMBER_FLAG_SUPERNODE 0x01
#define MEMBER_FLAG_ADMIN 0x02
#define MEMBER_FLAG_MODER 0x04
#define MEMBER_FLAG_DELETED 0x08
#define MEMBER_FLAG_RADIO 0x10
class FlagPainter {
public:
static void draw(QPainter* p, uint8_t flags, int x, int y, int sz);
static void drawStorage(QPainter* p, int x, int y, int sz);
static void drawRadio(QPainter* p, int x, int y, int sz, const QColor& color);
private:
static void drawLightning(QPainter* p, int x, int y, int sz);
static void drawStar(QPainter* p, int x, int y, int sz);
static void drawShield(QPainter* p, int x, int y, int sz);
};
#endif