2#include <NDEVR/QCustomLineEdit.h>
12 class QCustomColorDialog;
13 class QColorLuminancePicker;
18 class QColorPickingEventFilter;
20 class QColorShowLabel;
27 QWellArray(
int rows,
int cols, QWidget* parent = 0);
54 inline int rowY(
int row)
const
61 return cellWidth() * (ncols - column - 1);
83 if (row >= 0 && row < nrows && column >= 0 && column < ncols)
93 virtual void paintCell(QPainter*,
int row,
int col,
const QRect&);
118 void setCol(
int h,
int s,
int v);
119 void setCol(
int h,
int s);
127 enum { foff = 3, coff = 4 };
146 void setCol(
int h,
int s);
158 QPoint colPt(
int width,
int height);
159 int huePt(
const QPoint& pt,
int width,
int height);
160 int satPt(
const QPoint& pt,
int width,
int height);
161 void setCol(
const QPoint& pt,
int width,
int height);
182 void setHsv(
int h,
int s,
int v);
232 setFrameStyle(QFrame::Panel | QFrame::Sunken);
233 setAcceptDrops(
true);
234 mousePressed =
false;
244#if QT_CONFIG(draganddrop)
245 void dragEnterEvent(QDragEnterEvent* e)
override;
246 void dragLeaveEvent(QDragLeaveEvent* e)
override;
247 void dropEvent(QDropEvent* e)
override;
265 void init(
const QColor& initial);
318 QTimer* update_timer;
319 QWindow dummyTransparentWindow;
#define _t(english_string)
Definition Translator.h:87
Definition CustomColorDialogWidgets.h:111
void paintEvent(QPaintEvent *) override
Definition QCustomColorDialog.cpp:466
void mousePressEvent(QMouseEvent *) override
Definition QCustomColorDialog.cpp:447
virtual QSize minimumSizeHint() const override
Definition CustomColorDialogWidgets.h:116
~QColorLuminancePicker()
Definition QCustomColorDialog.cpp:439
void setCol(int h, int s, int v)
Definition QCustomColorDialog.cpp:499
void mouseMoveEvent(QMouseEvent *) override
Definition QCustomColorDialog.cpp:443
void newHsv(int h, int s, int v)
QColorLuminancePicker(QWidget *parent=0)
Definition QCustomColorDialog.cpp:432
Definition CustomColorDialogWidgets.h:138
QColorPicker(QWidget *parent)
Definition QCustomColorDialog.cpp:525
void paintEvent(QPaintEvent *) override
Definition QCustomColorDialog.cpp:574
QSize sizeHint() const override
Definition QCustomColorDialog.cpp:544
void mousePressEvent(QMouseEvent *) override
Definition QCustomColorDialog.cpp:567
void resizeEvent(QResizeEvent *) override
Definition QCustomColorDialog.cpp:589
virtual QSize minimumSizeHint() const override
Definition CustomColorDialogWidgets.h:144
~QColorPicker()
Definition QCustomColorDialog.cpp:534
void setCrossVisible(bool visible)
Definition QCustomColorDialog.cpp:537
void newCol(int h, int s)
void setCol(int h, int s)
Definition QCustomColorDialog.cpp:548
void mouseMoveEvent(QMouseEvent *) override
Definition QCustomColorDialog.cpp:560
Definition QCustomColorDialog.cpp:237
Definition CustomColorDialogWidgets.h:228
void paintEvent(QPaintEvent *) override
Definition QCustomColorDialog.cpp:617
void setColor(QColor c)
Definition CustomColorDialogWidgets.h:236
QColorShowLabel(QWidget *parent)
Definition CustomColorDialogWidgets.h:231
void mousePressEvent(QMouseEvent *e) override
Definition QCustomColorDialog.cpp:642
void mouseMoveEvent(QMouseEvent *e) override
Definition QCustomColorDialog.cpp:647
void mouseReleaseEvent(QMouseEvent *e) override
Definition QCustomColorDialog.cpp:695
Definition CustomColorDialogWidgets.h:177
QColorValueBox * gEd
Definition CustomColorDialogWidgets.h:217
void currentColorChanged(const QColor &color)
bool isAlphaVisible() const
Definition QCustomColorDialog.cpp:638
void addWidget(QWidget *widget)
Definition QCustomColorDialog.cpp:989
int currentAlpha() const
Definition QCustomColorDialog.cpp:634
QLabel * lblVal
Definition CustomColorDialogWidgets.h:208
QRgb currentColor() const
Definition CustomColorDialogWidgets.h:187
void setRgb(QRgb rgb)
Definition QCustomColorDialog.cpp:937
QColorValueBox * sEd
Definition CustomColorDialogWidgets.h:214
QLabel * lblBlue
Definition CustomColorDialogWidgets.h:211
void setCurrentAlpha(int a)
Definition QCustomColorDialog.cpp:624
void retranslateStrings()
Definition QCustomColorDialog.cpp:971
int hue
Definition CustomColorDialogWidgets.h:203
QColorShower(QCustomColorDialog *parent, bool small_display)
Definition QCustomColorDialog.cpp:701
void setHsv(int h, int s, int v)
Definition QCustomColorDialog.cpp:952
QColor currentQColor() const
Definition CustomColorDialogWidgets.h:188
QColorValueBox * rEd
Definition CustomColorDialogWidgets.h:216
QColorValueBox * hEd
Definition CustomColorDialogWidgets.h:213
QLabel * lblGreen
Definition CustomColorDialogWidgets.h:210
void showCurrentColor()
Definition QCustomColorDialog.cpp:883
int val
Definition CustomColorDialogWidgets.h:203
QLabel * lblRed
Definition CustomColorDialogWidgets.h:209
QCustomColorDialog * colorDialog
Definition CustomColorDialogWidgets.h:224
QColorValueBox * alphaEd
Definition CustomColorDialogWidgets.h:219
QRgb curCol
Definition CustomColorDialogWidgets.h:204
void updateQColor()
Definition QCustomColorDialog.cpp:982
QColorShowLabel * color_show_label
Definition CustomColorDialogWidgets.h:222
bool rgbOriginal
Definition CustomColorDialogWidgets.h:223
QLabel * lblHtml
Definition CustomColorDialogWidgets.h:212
QLabel * alphaLab
Definition CustomColorDialogWidgets.h:220
QCustomLineEdit * htEd
Definition CustomColorDialogWidgets.h:221
QColorValueBox * vEd
Definition CustomColorDialogWidgets.h:215
QLabel * lblSat
Definition CustomColorDialogWidgets.h:207
void showAlpha(bool b)
Definition QCustomColorDialog.cpp:629
QColor curQColor
Definition CustomColorDialogWidgets.h:205
QColorValueBox * bEd
Definition CustomColorDialogWidgets.h:218
QGridLayout * gl
Definition CustomColorDialogWidgets.h:225
int sat
Definition CustomColorDialogWidgets.h:203
QLabel * lblHue
Definition CustomColorDialogWidgets.h:206
Definition CustomColorDialogWidgets.h:166
QColorValueBox(QWidget *parent)
Definition CustomColorDialogWidgets.h:168
Definition QCustomColorDialog.h:18
Definition CustomColorDialogWidgets.h:256
Button * add_custom_color_button
Definition CustomColorDialogWidgets.h:311
void setCurrentRgbColor(QRgb rgb)
Definition QCustomColorDialog.cpp:1004
void _q_updateColorPicking()
Definition QCustomColorDialog.cpp:1457
QCustomLabel * lbl_basic_colors
Definition CustomColorDialogWidgets.h:307
QColorPicker * cp
Definition CustomColorDialogWidgets.h:304
bool handleColorPickingMouseButtonRelease(QMouseEvent *e)
Definition QCustomColorDialog.cpp:1489
void _q_newStandard(int, int)
Definition QCustomColorDialog.cpp:1093
bool isAlphaVisible() const
Definition QCustomColorDialog.cpp:878
void initWidgets()
Definition QCustomColorDialog.cpp:1177
SetColorMode
Definition CustomColorDialogWidgets.h:259
@ ShowColor
Definition CustomColorDialogWidgets.h:260
@ SetColorAll
Definition CustomColorDialogWidgets.h:262
@ SelectColor
Definition CustomColorDialogWidgets.h:261
int next_cust
Definition CustomColorDialogWidgets.h:298
int currentAlpha() const
Definition QCustomColorDialog.cpp:875
Button * m_cancel_button
Definition CustomColorDialogWidgets.h:310
QRgb currentColor() const
Definition QCustomColorDialog.cpp:874
bool screenColorPicking
Definition CustomColorDialogWidgets.h:322
QColor selected_color
Definition CustomColorDialogWidgets.h:297
QColorPickingEventFilter * colorPickingEventFilter
Definition CustomColorDialogWidgets.h:313
QCustomColorDialog * q
Definition CustomColorDialogWidgets.h:316
void setCurrentAlpha(int a)
Definition QCustomColorDialog.cpp:876
QColorShower * m_color_shower
Definition CustomColorDialogWidgets.h:306
void _q_pickScreenColor()
Definition QCustomColorDialog.cpp:1099
QWellArray * custom
Definition CustomColorDialogWidgets.h:300
Button * m_ok_button
Definition CustomColorDialogWidgets.h:309
void retranslateStrings()
Definition QCustomColorDialog.cpp:1314
void _q_newHsv(int h, int s, int v)
Definition QCustomColorDialog.cpp:995
void _q_nextCustom(int, int)
Definition QCustomColorDialog.cpp:1082
bool smallDisplay
Definition CustomColorDialogWidgets.h:321
QColor currentQColor() const
Definition QCustomColorDialog.cpp:879
QByteArray memberToDisconnectOnClose
Definition CustomColorDialogWidgets.h:315
QRgb beforeScreenColorPicking
Definition CustomColorDialogWidgets.h:294
void _q_addCustom()
Definition QCustomColorDialog.cpp:1303
QCustomLabel * lbl_custom_colors
Definition CustomColorDialogWidgets.h:308
Button * screen_color_picker_button
Definition CustomColorDialogWidgets.h:312
void _q_newCustom(int, int)
Definition QCustomColorDialog.cpp:1086
void releaseColorPicking()
Definition QCustomColorDialog.cpp:1133
QColorDialog::ColorDialogOptions options
Definition CustomColorDialogWidgets.h:295
void setCurrentColor(const QColor &color, SetColorMode setColorMode=SetColorAll)
Definition QCustomColorDialog.cpp:1347
QWellArray * standard
Definition CustomColorDialogWidgets.h:301
QColor grabScreenColor(const QPointF &p)
Definition QCustomColorDialog.cpp:1056
QCustomColorDialogPrivate(QCustomColorDialog *dialog)
Definition QCustomColorDialog.cpp:1150
QVBoxLayout * m_right_layout
Definition CustomColorDialogWidgets.h:302
QWidget * m_button_widget
Definition CustomColorDialogWidgets.h:303
void init(const QColor &initial)
Definition QCustomColorDialog.cpp:1163
void showAlpha(bool b)
Definition QCustomColorDialog.cpp:877
void updateColorPicking(const QPointF &pos)
Definition QCustomColorDialog.cpp:1473
QColorLuminancePicker * lp
Definition CustomColorDialogWidgets.h:305
bool handleColorPickingKeyPress(QKeyEvent *e)
Definition QCustomColorDialog.cpp:1495
bool selectColor(const QColor &color)
Definition QCustomColorDialog.cpp:1017
QPointer< QObject > receiverToDisconnectOnClose
Definition CustomColorDialogWidgets.h:296
void _q_newColorTypedIn(QRgb rgb)
Definition QCustomColorDialog.cpp:1075
bool handleColorPickingMouseMove(QMouseEvent *e)
Definition QCustomColorDialog.cpp:1481
Definition QCustomLabel.h:42
Definition QCustomLineEdit.h:118
void setup(const TranslatedString &title)
Definition QCustomLineEdit.h:156
QCustomValidator & customValidator()
Definition QCustomLineEdit.cpp:56
void setMax(fltp08 max)
Definition QCustomValidator.h:77
void setMin(fltp08 min)
Definition QCustomValidator.h:78
Definition CustomColorDialogWidgets.h:22
int numRows() const
Definition CustomColorDialogWidgets.h:64
void paintEvent(QPaintEvent *) override
Definition QCustomColorDialog.cpp:48
int cellHeight() const
Definition CustomColorDialogWidgets.h:40
QString cellContent(int row, int col) const
int columnAt(fltp04 x) const
Definition CustomColorDialogWidgets.h:48
virtual void setCurrent(int row, int col)
Definition QCustomColorDialog.cpp:156
QSize gridSize() const
Definition CustomColorDialogWidgets.h:76
QSize sizeHint() const override
Definition QCustomColorDialog.cpp:103
void mousePressEvent(QMouseEvent *) override
Definition QCustomColorDialog.cpp:145
void currentChanged(int row, int col)
int selectedColumn() const
Definition CustomColorDialogWidgets.h:30
void focusOutEvent(QFocusEvent *) override
Definition QCustomColorDialog.cpp:192
int numCols() const
Definition CustomColorDialogWidgets.h:68
int cellWidth() const
Definition CustomColorDialogWidgets.h:36
virtual QSize minimumSizeHint() const override
Definition CustomColorDialogWidgets.h:34
void keyPressEvent(QKeyEvent *) override
Definition QCustomColorDialog.cpp:196
int rowY(int row) const
Definition CustomColorDialogWidgets.h:54
void focusInEvent(QFocusEvent *) override
Definition QCustomColorDialog.cpp:187
int selectedRow() const
Definition CustomColorDialogWidgets.h:31
void colorChanged(int index, QRgb color)
int columnX(int column) const
Definition CustomColorDialogWidgets.h:58
int selectedRow
Definition CustomColorDialogWidgets.h:25
virtual void paintCellContents(QPainter *, int row, int col, const QRect &)
Definition QCustomColorDialog.cpp:136
int rowAt(fltp04 y) const
Definition CustomColorDialogWidgets.h:44
QRect cellRect() const
Definition CustomColorDialogWidgets.h:72
virtual void setSelected(int row, int col)
Definition QCustomColorDialog.cpp:170
void mouseReleaseEvent(QMouseEvent *) override
Definition QCustomColorDialog.cpp:151
int selectedColumn
Definition CustomColorDialogWidgets.h:24
void selected(int row, int col)
void updateCell(int row, int column)
Definition CustomColorDialogWidgets.h:87
QRect cellGeometry(int row, int column)
Definition CustomColorDialogWidgets.h:80
virtual void paintCell(QPainter *, int row, int col, const QRect &)
Definition QCustomColorDialog.cpp:108
constexpr t_type getMax(const t_type &left, const t_type &right)
Finds the max of the given arguments using the > operator.
Definition BaseFunctions.hpp:116
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:514