Logo    
KDWinUtils
Helper library for MFC to Qt migration
Loading...
Searching...
No Matches
kpen.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of KDWinutils, KDAB's MFC to Qt migration tool.
4**
5** Copyright (C) 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6** All rights reserved.
7**
8** This file is intended solely for use by the migration tools and services
9** provided by Klarälvdalens Datakonsult AB.
10**
11** Any other use or distribution of this software that is not otherwise agreed
12** upon in writing and signed by an authorized representative of Klarälvdalens
13** Datakonsult AB, KDAB (USA) LLC, KDAB (Deutschland) GmbH & Co. K.G.,
14** KDAB (France) SAS, KDAB (UK), Ltd., or any future subsidiary of Klarälvdalens
15** Datakonsult AB is hereby prohibited.
16**
17** Contact info@kdab.com if any conditions stated above are unclear to you.
18**
19****************************************************************************/
20
21#pragma once
22
24
25#include <QPen>
26#include <QRgb>
27
28#ifdef KDWINUTILS_WITHMFC
29#include <afxwin.h>
30#endif // KDWINUTILS_WITHMFC
31
33
41class KDWINUTILS_EXPORT KPen : public QPen
42{
43public:
44 enum PenStyle {
45 Solid = 0,
46 Dash = 1,
47 Dot = 2,
48 DashDot = 3,
49 DashDotDot = 4,
50 Null = 5,
51 InsideFrame = 6,
52 UserStyle = 7,
53 Alternate = 8,
54 StyleMask = 0x0000000F,
55 };
56
57 using QPen::QPen;
59 /* implicit */ KPen(const QPen &pen);
61 /* implicit */ KPen(PenStyle style, int width, const QColor &color);
62
63#ifdef KDWINUTILS_WITHMFC
65 KPen(const CPen &pen);
66#endif
67
68private:
69 void applyStyle(PenStyle style);
70 Qt::PenStyle toQtPenStyle(PenStyle style) const;
71};
72
The KPen class defines a font to be used during painting.
Definition kpen.h:42
PenStyle
Definition kpen.h:44
KPen(const QPen &pen)
KPen(const CPen &pen)
KPen(PenStyle style, int width, const QColor &color)
#define KDWINUTILS_EXPORT
Definition kdwinutils_export.h:31
#define KDWINUTILS_BEGIN_NAMESPACE
Definition kdwinutils_global.h:27
#define KDWINUTILS_END_NAMESPACE
Definition kdwinutils_global.h:28