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);
54 void setColor(
QColor,
int);
55 void refreshColorList();
57 void adjustSwatches();
59 void showContextMenu(
const QPoint&);
63 void colorNumberChanged(
int);
73 void clickAddColorButton();
74 void clickColorDialogButton();
75 void clickRemoveColorButton();
76 void palettePreferences();
79 void setSwatchSizeSmall();
80 void setSwatchSizeMedium();
81 void setSwatchSizeLarge();
86 void showPaletteReminder();
88 bool showPaletteWarning();
91 void updateItemColor(
int,
QColor);
94 Ui::ColorPalette* ui =
nullptr;
96 QAction* mListModeAction =
nullptr;
97 QAction* mGridModeAction =
nullptr;
99 QAction* mSmallSwatchAction =
nullptr;
100 QAction* mMediumSwatchAction =
nullptr;
101 QAction* mLargeSwatchAction =
nullptr;
104 QSize mIconSize{ 34, 34 };
105 QMenu* mToolMenu =
nullptr;
110 bool mIsColorDialog =
false;
111 bool mMultipleSelected =
false;
112 bool mFitSwatches =
false;
114 const int MIN_ICON_SIZE = 19;
115 const int MEDIUM_ICON_SIZE = 26;
116 const int MAX_ICON_SIZE = 36;
118 Editor* mEditor =
nullptr;
119 Object* mObject =
nullptr;
QObject * parent() const const