Logo    
KDWinUtils
Helper library for MFC to Qt migration
Loading...
Searching...
No Matches
kdpainter_helper.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 <QPainter>
26#include <QPoint>
27#include <QRect>
28
30
31namespace Utils {
32
34KDWINUTILS_EXPORT void drawArc(QPainter *painter, const QRect &rect, const QPoint &p1, const QPoint &p2);
35
37KDWINUTILS_EXPORT void drawChord(QPainter *painter, const QRect &rect, const QPoint &p1, const QPoint &p2);
38
40KDWINUTILS_EXPORT void drawPie(QPainter *painter, const QRect &rect, const QPoint &p1, const QPoint &p2);
41
43KDWINUTILS_EXPORT void drawLabel(QPainter *pDC, const QPoint &pt, const QString &label, Qt::Alignment align);
44
46KDWINUTILS_EXPORT void drawCenterLabel(QPainter *pDC, const QPoint &pt, const QString &label);
47
48} // namespace Utils
49
#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
Definition kdwincore_utils.h:34
void drawPie(QPainter *painter, const QRect &rect, const QPoint &p1, const QPoint &p2)
Draws a pie specified by the given rectangle, and 2 points.
void drawLabel(QPainter *pDC, const QPoint &pt, const QString &label, Qt::Alignment align)
Draws a label at the specified point with the given alignment.
void drawChord(QPainter *painter, const QRect &rect, const QPoint &p1, const QPoint &p2)
Draws an chrod specified by the given rectangle, and 2 points.
void drawCenterLabel(QPainter *pDC, const QPoint &pt, const QString &label)
Draws a label centered at the specified point.
void drawArc(QPainter *painter, const QRect &rect, const QPoint &p1, const QPoint &p2)
Draws an arc specified by the given rectangle, and 2 points.