18#ifndef COLOR_PALETTE_WIDGET_H
19#define COLOR_PALETTE_WIDGET_H
21#include "basedockwidget.h"
47 void initUI()
override;
48 void updateUI()
override;
49 void setCore(
Editor* editor);
51 int currentColorNumber();
53 void selectColorNumber(
int)
const;
54 void refreshColorList();
56 void adjustSwatches();
58 void showContextMenu(
const QPoint&);
61 void colorNumberChanged(
int);
71 void clickAddColorButton();
72 void clickColorDialogButton();
73 void clickRemoveColorButton();
74 void palettePreferences();
77 void setSwatchSizeSmall();
78 void setSwatchSizeMedium();
79 void setSwatchSizeLarge();
84 void showPaletteReminder();
86 bool showPaletteWarning();
89 void updateItemColor(
int,
QColor);
91 void addSwatch(
int colorIndex)
const;
93 Ui::ColorPalette* ui =
nullptr;
95 QAction* mListModeAction =
nullptr;
96 QAction* mGridModeAction =
nullptr;
98 QAction* mSmallSwatchAction =
nullptr;
99 QAction* mMediumSwatchAction =
nullptr;
100 QAction* mLargeSwatchAction =
nullptr;
103 QSize mIconSize{ 34, 34 };
104 QMenu* mToolMenu =
nullptr;
109 bool mIsColorDialog =
false;
110 bool mMultipleSelected =
false;
111 bool mFitSwatches =
false;
113 const int MIN_ICON_SIZE = 19;
114 const int MEDIUM_ICON_SIZE = 26;
115 const int MAX_ICON_SIZE = 36;
117 Editor* mEditor =
nullptr;
118 Object* mObject =
nullptr;
QObject * parent() const const