Changeset View
Changeset View
Standalone View
Standalone View
libs/widgets/KisPaletteListWidget.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright (c) 2013 Sven Langkamp <sven.langkamp@gmail.com> | ||||
3 | * Copyright (c) 2018 Michael Zhou <simeirxh@gmail.com> | ||||
4 | * | ||||
5 | * This program is free software; you can redistribute it and/or modify | ||||
6 | * it under the terms of the GNU General Public License as published by | ||||
7 | * the Free Software Foundation; either version 2 of the License, or | ||||
8 | * (at your option) any later version. | ||||
9 | * | ||||
10 | * This program is distributed in the hope that it will be useful, | ||||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
13 | * GNU General Public License for more details. | ||||
14 | * | ||||
15 | * You should have received a copy of the GNU General Public License | ||||
16 | * along with this program; if not, write to the Free Software | ||||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
18 | */ | ||||
19 | | ||||
20 | #ifndef KISPALETTELISTWIDGET_H | ||||
21 | #define KISPALETTELISTWIDGET_H | ||||
22 | | ||||
23 | #include <QString> | ||||
24 | #include <QWidget> | ||||
25 | #include <ui_WdgPaletteListWidget.h> | ||||
26 | | ||||
27 | #include "kritawidgets_export.h" | ||||
28 | | ||||
29 | class KoResource; | ||||
30 | class KoColorSet; | ||||
31 | | ||||
32 | class KisPaletteListWidgetPrivate; | ||||
33 | | ||||
34 | class KRITAWIDGETS_EXPORT KisPaletteListWidget : public QWidget | ||||
35 | { | ||||
36 | Q_OBJECT | ||||
37 | public: | ||||
38 | explicit KisPaletteListWidget(QWidget *parent = nullptr); | ||||
39 | virtual ~KisPaletteListWidget(); | ||||
40 | | ||||
41 | public: | ||||
42 | void setAllowModification(bool allowModification); | ||||
43 | | ||||
44 | Q_SIGNALS: | ||||
45 | void sigPaletteSelected(KoColorSet*); | ||||
46 | void sigAddPalette(); | ||||
47 | void sigRemovePalette(KoColorSet *); | ||||
48 | void sigImportPalette(); | ||||
49 | void sigExportPalette(KoColorSet *); | ||||
50 | | ||||
51 | public Q_SLOTS: | ||||
52 | | ||||
53 | private /* methods */: | ||||
54 | QString newPaletteFileName(); | ||||
55 | | ||||
56 | private Q_SLOTS: | ||||
57 | void slotPaletteResourceSelected(KoResource *); | ||||
58 | void slotAdd(); | ||||
59 | void slotRemove(); | ||||
60 | void slotImport(); | ||||
61 | void slotExport(); | ||||
62 | | ||||
63 | private: | ||||
64 | QScopedPointer<Ui_WdgPaletteListWidget> m_ui; | ||||
65 | QScopedPointer<KisPaletteListWidgetPrivate> m_d; | ||||
66 | }; | ||||
67 | | ||||
68 | #endif // KISPALETTELISTWIDGET_H |