Krita Source Code Documentation
Loading...
Searching...
No Matches
KisPaletteChooser_p.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2013 Sven Langkamp <sven.langkamp@gmail.com>
3 * SPDX-FileCopyrightText: 2018 Michael Zhou <simeirxh@gmail.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7#ifndef KISPALETTELISTWIDGET_P_H
8#define KISPALETTELISTWIDGET_P_H
9
10#include <QAbstractItemDelegate>
11#include <QListView>
12#include <QAbstractListModel>
13#include <QPointer>
14#include <QCheckBox>
15#include <QAction>
16#include <QPainter>
17
18#include <KisPaletteChooser.h>
19#include <KisResourceItemView.h>
21#include <KoColorSet.h>
22
24{
25 class View;
26 class Delegate;
27 class Model;
30
32
34
35 QScopedPointer<Delegate> delegate;
36
37 QScopedPointer<QAction> actAdd;
38 QScopedPointer<QAction> actImport;
39 QScopedPointer<QAction> actExport;
40 QScopedPointer<QAction> actModify;
41 QScopedPointer<QAction> actRemove;
42};
43
44class KisPaletteChooserPrivate::Delegate : public QAbstractItemDelegate
45{
46public:
47 Delegate(QObject *);
48 virtual ~Delegate();
49 void paint(QPainter * painter,
50 const QStyleOptionViewItem & option,
51 const QModelIndex & index) const override;
52 QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex &) const override;
53};
54
55#endif // KISPALETTELISTWIDGET_P_H
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &) const override
Definition View.h:25
QScopedPointer< QAction > actRemove
QScopedPointer< QAction > actImport
QScopedPointer< Delegate > delegate
QScopedPointer< QAction > actAdd
KisPaletteChooserPrivate(KisPaletteChooser *)
QSharedPointer< KisResourceItemChooser > itemChooser
QScopedPointer< QAction > actModify
QScopedPointer< QAction > actExport
QPointer< KisPaletteChooser > c