Logo    
KDWinUtils
Helper library for MFC to Qt migration
Loading...
Searching...
No Matches
kbrush.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 <QBrush>
26#include <QColor>
27
29
37class KDWINUTILS_EXPORT KBrush : public QBrush
38{
39public:
48
49 using QBrush::QBrush;
51 /* implicit */ KBrush(const QBrush &brush);
53 /* implicit */ KBrush(const QRgb &color);
54
56 bool CreateHatchBrush(HatchStyle style, const QRgb &color);
57
58private:
59 Qt::BrushStyle toQtBrushStyle(int style);
60};
61
The KBrush class defines a brush to be used during painting.
Definition kbrush.h:38
KBrush(const QBrush &brush)
HatchStyle
Definition kbrush.h:40
@ BDiagonal
Downward hatch (left to right) at 45 degrees.
Definition kbrush.h:44
@ FDiagonal
Upward hatch (left to right) at 45 degrees.
Definition kbrush.h:43
@ Vertical
Vertical hatch.
Definition kbrush.h:42
@ Cross
Horizontal and vertical crosshatch.
Definition kbrush.h:45
@ DiagCross
Crosshatch at 45 degrees.
Definition kbrush.h:46
bool CreateHatchBrush(HatchStyle style, const QRgb &color)
Initializes a brush with the specified hatched pattern and color.
KBrush(const QRgb &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