8 #include <ff7tkqtwidgets_export.h>
10 #define COLOR_DISPLAY_MIN_CELL_SIZE 9
11 #define COLOR_DISPLAY_BORDER_WIDTH 1
18 void setColors(
const QList<QRgb> &colors);
19 const QList<QRgb> &colors()
const;
20 bool isReadOnly()
const;
21 void setReadOnly(
bool ro);
22 QSize sizeHint()
const override;
23 QSize minimumSizeHint()
const override;
25 return cellWidth(width());
28 return cellHeight(height());
31 void colorEdited(
int id, QRgb value);
32 void colorHovered(
int id);
34 int colorId(
const QPoint &pos)
const;
35 int cellWidth(
int w)
const;
36 int cellHeight(
int h)
const;
37 QSize cellSize()
const;
41 void paintEvent(QPaintEvent *event)
override;
42 void enterEvent(QEnterEvent *event)
override;
43 void leaveEvent(QEvent *event)
override;
44 void mouseMoveEvent(QMouseEvent *event)
override;
45 void mouseReleaseEvent(QMouseEvent *event)
override;