File indexing completed on 2024-12-22 04:15:06
0001 /* 0002 * SPDX-FileCopyrightText: 2014 Boudewijn Rempt <boud@valdyas.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #ifndef DLG_LAYERSPLIT 0007 #define DLG_LAYERSPLIT 0008 0009 #include <KoDialog.h> 0010 #include <KoColorSet.h> 0011 #include <KisPaletteChooser.h> 0012 #include <kis_types.h> 0013 0014 #include "wdg_layersplit.h" 0015 0016 /** 0017 * This dialog allows the user to create a selection mask based 0018 * on a (range of) colors. 0019 */ 0020 class DlgLayerSplit: public KoDialog 0021 { 0022 0023 Q_OBJECT 0024 0025 public: 0026 0027 DlgLayerSplit(); 0028 ~DlgLayerSplit() override; 0029 0030 bool createBaseGroup() const; 0031 bool createSeparateGroups() const; 0032 bool lockAlpha() const; 0033 bool hideOriginal() const; 0034 bool sortLayers() const; 0035 bool disregardOpacity() const; 0036 int fuzziness() const; 0037 KoColorSetSP palette() const; 0038 0039 private Q_SLOTS: 0040 0041 void slotApplyClicked(); 0042 void slotSetPalette(KoColorSetSP pal); 0043 void slotChangeMode(int); 0044 0045 private: 0046 0047 friend class LayerSplit; 0048 bool m_modeToMask; 0049 0050 WdgLayerSplit *m_page {0}; 0051 KisPaletteChooser *m_colorSetChooser {0}; 0052 KoColorSetSP m_palette {0}; 0053 }; 0054 0055 #endif // DLG_LAYERSPLIT