KDStateMachineEditor API Documentation 2.1
Loading...
Searching...
No Matches
quickpen_p.h
Go to the documentation of this file.
1/*
2 This file is part of the KDAB State Machine Editor Library.
3
4 SPDX-FileCopyrightText: 2015 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 Author: Kevin Funk <kevin.funk@kdab.com>
6
7 SPDX-License-Identifier: LGPL-2.1-only OR LicenseRef-KDAB-KDStateMachineEditor
8
9 Licensees holding valid commercial KDAB State Machine Editor Library
10 licenses may use this file in accordance with the KDAB State Machine Editor
11 Library License Agreement provided with the Software.
12
13 Contact info@kdab.com if any conditions of this licensing are not clear to you.
14*/
15
16#ifndef KDSME_QUICK_QUICKPEN_P_H
17#define KDSME_QUICK_QUICKPEN_P_H
18
19#include <QColor>
20#include <QObject>
21
22QT_BEGIN_NAMESPACE
23class QPen;
24QT_END_NAMESPACE
25
32class QuickPen : public QObject
33{
34 Q_OBJECT
35 Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY penChanged)
36 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY penChanged)
37 Q_PROPERTY(Qt::PenStyle style READ style WRITE setStyle NOTIFY penChanged)
38
39public:
40 explicit QuickPen(QObject *parent = nullptr);
41
42 qreal width() const;
43 void setWidth(qreal width);
44
45 QColor color() const;
46 void setColor(const QColor &color);
47
48 Qt::PenStyle style() const;
49 void setStyle(Qt::PenStyle style);
50
51 QPen toQPen() const;
52 void modifyPen(QPen *pen) const;
53
54Q_SIGNALS:
55 void penChanged();
56
57private:
58 qreal m_width;
59 QColor m_color;
60 Qt::PenStyle m_style;
61};
62
63#endif // QUICKPEN_P_H
void setWidth(qreal width)
Definition quickpen.cpp:48
qreal width
Definition quickpen_p.h:35
QPen toQPen() const
Definition quickpen.cpp:36
QColor color
Definition quickpen_p.h:36
void modifyPen(QPen *pen) const
Definition quickpen.cpp:28
void setStyle(Qt::PenStyle style)
Definition quickpen.cpp:70
Qt::PenStyle style
Definition quickpen_p.h:37
void setColor(const QColor &color)
Definition quickpen.cpp:59
void penChanged()

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDStateMachineEditor
Create Qt State Machine metacode using a graphical user interface
https://github.com/KDAB/KDStateMachineEditor
Generated on Tue Jul 15 2025 15:21:47 for KDStateMachineEditor API Documentation by doxygen 1.9.8