Krita Source Code Documentation
Loading...
Searching...
No Matches
KoStrokeConfigWidget.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * Made by Tomislav Lukman (tomislav.lukman@ck.tel.hr)
3 * SPDX-FileCopyrightText: 2002 Tomislav Lukman <tomislav.lukman@ck.t-com.hr>
4 * SPDX-FileCopyrightText: 2002 Rob Buis <buis@kde.org>
5 * SPDX-FileCopyrightText: 2004 Laurent Montel <montel@kde.org>
6 * SPDX-FileCopyrightText: 2005-2006 Tim Beaulen <tbscope@gmail.com>
7 * SPDX-FileCopyrightText: 2005 Inge Wallin <inge@lysator.liu.se>
8 * SPDX-FileCopyrightText: 2005, 2011 Thomas Zander <zander@kde.org>
9 * SPDX-FileCopyrightText: 2005-2008 Jan Hambrecht <jaham@gmx.net>
10 * SPDX-FileCopyrightText: 2006 C. Boemann <cbo@boemann.dk>
11 * SPDX-FileCopyrightText: 2011 Jean-Nicolas Artaud <jeannicolasartaud@gmail.com>
12 * SPDX-FileCopyrightText: 2011 Thorsten Zachmann <zachmann@kde.com>
13 *
14 * SPDX-License-Identifier: LGPL-2.0-or-later
15 */
16
17#ifndef STROKECONFIGWIDGET_H
18#define STROKECONFIGWIDGET_H
19
20#include "kritaui_export.h"
21
22#include <QWidget>
23#include <QLabel>
24#include <KoFlakeTypes.h>
25#include <KoFlake.h>
26
27
28class KoUnit;
30class KoShapeStroke;
31class KoMarker;
32class KoCanvasBase;
33class KoShapeStroke;
35
37class KRITAUI_EXPORT KoStrokeConfigWidget : public QWidget
38{
39 Q_OBJECT
40public:
41 explicit KoStrokeConfigWidget(KoCanvasBase *canvas, QWidget *parent);
42 ~KoStrokeConfigWidget() override;
43
44 void setNoSelectionTrackingMode(bool value);
45
46 // Getters
47 Qt::PenStyle lineStyle() const;
48 QVector<qreal> lineDashes() const;
49 qreal lineWidth() const;
50 QColor color() const;
51 qreal miterLimit() const;
52 KoMarker *startMarker() const;
53 KoMarker *endMarker() const;
54 Qt::PenCapStyle capStyle() const;
55 Qt::PenJoinStyle joinStyle() const;
59
65 KoShapeStrokeSP createShapeStroke();
66
67 void setActive(bool active);
68
69 void updateStyleControlsAvailability(bool enabled);
70 void setUnitManagers(KisSpinBoxUnitManager* managerLineWidth, KisSpinBoxUnitManager* managerMitterLimit);
71
72 void activate();
73 void deactivate();
74
75private Q_SLOTS:
76
77 void updateMarkers(const QList<KoMarker*> &markers);
78
79 void canvasResourceChanged(int key, const QVariant &value);
80
82 void selectionChanged();
83
85 void applyDashStyleChanges();
86 void applyLineWidthChanges();
87 void applyJoinCapChanges();
88
90 void applyMarkerChanges(int rawPosition);
91
92Q_SIGNALS:
94
95private:
96 void setUnit(const KoUnit &unit, KoShape *representativeShape);
97 void blockChildSignals(bool block);
98 void loadCurrentStrokeFillFromResourceServer();
99
100private:
101 class Private;
102 Private * const d;
103};
104
105#endif // SHADOWCONFIGWIDGET_H
float value(const T *src, size_t ch)
The KisSpinBoxUnitManager class is an abstract interface for the unitspinboxes classes to manage diff...
A widget for configuring the stroke of a shape.
qreal lineWidth() const
QColor color() const
Qt::PenStyle lineStyle() const