Krita Source Code Documentation
Loading...
Searching...
No Matches
KisColorSelectorInterface.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Boudewijn Rempt <boud@valdyas.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#ifndef KISCOLORSELECTORINTERFACE_H
8#define KISCOLORSELECTORINTERFACE_H
9
10#include "kritawidgets_export.h"
11
12#include <QWidget>
13#include <KoColor.h>
14
16class KoColorSpace;
17
18class KRITAWIDGETS_EXPORT KisColorSelectorInterface : public QWidget {
19 Q_OBJECT
20public:
21 KisColorSelectorInterface(QWidget *parent = 0)
22 : QWidget(parent)
23 {
24 // Color selectors don't have context menus. Setting this prevents any
25 // long-presses from delaying inputs, see KisLongPressEventFilter.cpp.
26 setContextMenuPolicy(Qt::PreventContextMenu);
27 }
29 virtual void setConfig(bool forceCircular, bool forceSelfUpdate)
30 {
31 Q_UNUSED(forceCircular);
32 Q_UNUSED(forceSelfUpdate);
33 }
34 virtual void setDisplayRenderer (const KoColorDisplayRendererInterface *displayRenderer)
35 {
36 Q_UNUSED(displayRenderer);
37 }
38
39 virtual KoColor getCurrentColor() const = 0;
40
41Q_SIGNALS:
42 void sigNewColor(const KoColor &c);
43
44public Q_SLOTS:
45 virtual void slotSetColor(const KoColor &c) = 0;
55 virtual void slotSetColorSpace(const KoColorSpace *cs);
56};
57
58#endif // KISCOLORSELECTORINTERFACE_H
virtual void slotSetColor(const KoColor &c)=0
void sigNewColor(const KoColor &c)
KisColorSelectorInterface(QWidget *parent=0)
virtual void setDisplayRenderer(const KoColorDisplayRendererInterface *displayRenderer)
virtual void setConfig(bool forceCircular, bool forceSelfUpdate)
virtual KoColor getCurrentColor() const =0