Krita Source Code Documentation
Loading...
Searching...
No Matches
KisHandleStyle.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KISHANDLESTYLE_H
8#define KISHANDLESTYLE_H
9
10#include <QVector>
11#include <QPen>
12#include <QBrush>
13
14#include "kritaglobal_export.h"
15
16struct KRITAGLOBAL_EXPORT KisHandlePalette
17{
19 : primaryColor(QColor(0, 0, 90, 180))
20 , secondaryColor(QColor(0, 0, 255, 127))
21 , gradientFillColor(QColor(255, 197, 39))
22 , highlightColor(QColor(255, 100, 100))
23 , highlightOutlineColor(QColor(155, 0, 0))
24 , selectionColor(QColor(164, 227, 243))
25 , white(Qt::white)
26 , black(Qt::black)
27 {
28 }
29
36 QColor white;
37 QColor black;
38};
39
44class KRITAGLOBAL_EXPORT KisHandleStyle
45{
46public:
47
52 static KisHandleStyle& inheritStyle();
53
58 static KisHandleStyle& primarySelection(KisHandlePalette palette = KisHandlePalette());
59
64 static KisHandleStyle& secondarySelection(KisHandlePalette palette = KisHandlePalette());
65
69 static KisHandleStyle& gradientHandles(KisHandlePalette palette = KisHandlePalette());
70
74 static KisHandleStyle& gradientArrows(KisHandlePalette palette = KisHandlePalette());
75
80 static KisHandleStyle& highlightedPrimaryHandles(KisHandlePalette palette = KisHandlePalette());
81
86 static KisHandleStyle& highlightedPrimaryHandlesWithSolidOutline(KisHandlePalette palette = KisHandlePalette());
87
92 static KisHandleStyle& partiallyHighlightedPrimaryHandles(KisHandlePalette palette = KisHandlePalette());
93
98 static KisHandleStyle& selectedPrimaryHandles(KisHandlePalette palette = KisHandlePalette());
99
101 IterationStyle() : isValid(false) {}
102 IterationStyle(const QPen &pen, const QBrush &brush)
103 : isValid(true),
104 stylePair(pen, brush)
105 {
106 }
107
109 QPair<QPen, QBrush> stylePair;
110 };
111
114};
115
116#endif // KISHANDLESTYLE_H
QVector< IterationStyle > lineIterations
QVector< IterationStyle > handleIterations
rgba palette[MAX_PALETTE]
Definition palette.c:35
QColor highlightOutlineColor
IterationStyle(const QPen &pen, const QBrush &brush)
QPair< QPen, QBrush > stylePair