![]() |
KVIrc 5.2.6
Developer APIs
|
#include "KvsObject_painter.h"
#include "KvsObject_pixmap.h"
#include "KvsObject_widget.h"
#include "kvi_debug.h"
#include "KviLocale.h"
#include "KviError.h"
#include "KviIconManager.h"
#include "KviMemory.h"
#include <QPrintDialog>
#include <QTextDocument>
#include <QIcon>
Macros | |
#define | align_num (sizeof(align_tbl) / sizeof(align_tbl[0])) |
#define | brushstyles_num (sizeof(brushstyles_tbl) / sizeof(brushstyles_tbl[0])) |
#define | composition_num (sizeof(composition_tbl) / sizeof(composition_tbl[0])) |
#define | KVSO_2ARRAYPARAMETERS(__pXOrArray, __iY) |
#define | KVSO_3OR4ARRAYPARAMETERS(__pCol1OrArray, __iCol2, __iCol3, __iOpacity) |
#define | KVSO_PARAMETERS_PAINTER(__pXOrArray, __iY, __iW, __iH) |
#define | PAINTER_ROTATE(__angle, __axis) |
#define | PAINTER_SCALE(__sX, __sY) |
#define | PAINTER_SHEAR(__sH, __sV) |
#define | PAINTER_TRANSLATE(__x, __y) |
#define | penstyles_num (sizeof(penstyles_tbl) / sizeof(penstyles_tbl[0])) |
Functions | |
if (m_pGradient) delete m_pGradient | |
if (m_pPainter &&!bDonotdeleteinternalqpainter) delete m_pPainter | |
if (m_pPainterPath) delete m_pPainterPath | |
if (m_pPrinter) delete m_pPrinter | |
KVSO_CLASS_FUNCTION (painter, begin) | |
KVSO_CLASS_FUNCTION (painter, beginPdf) | |
KVSO_CLASS_FUNCTION (painter, clearGradient) | |
KVSO_CLASS_FUNCTION (painter, colorNames) | |
KVSO_CLASS_FUNCTION (painter, drawArc) | |
KVSO_CLASS_FUNCTION (painter, drawChord) | |
KVSO_CLASS_FUNCTION (painter, drawEllipse) | |
KVSO_CLASS_FUNCTION (painter, drawHtmlText) | |
KVSO_CLASS_FUNCTION (painter, drawIcon) | |
KVSO_CLASS_FUNCTION (painter, drawLine) | |
KVSO_CLASS_FUNCTION (painter, drawPath) | |
KVSO_CLASS_FUNCTION (painter, drawPie) | |
KVSO_CLASS_FUNCTION (painter, drawPixmap) | |
KVSO_CLASS_FUNCTION (painter, drawPixmapMirrored) | |
KVSO_CLASS_FUNCTION (painter, drawPixmapWithColorEffect) | |
KVSO_CLASS_FUNCTION (painter, drawPoint) | |
KVSO_CLASS_FUNCTION (painter, drawRect) | |
KVSO_CLASS_FUNCTION (painter, drawRoundRect) | |
KVSO_CLASS_FUNCTION (painter, drawText) | |
KVSO_CLASS_FUNCTION (painter, end) | |
KVSO_CLASS_FUNCTION (painter, fillRect) | |
KVSO_CLASS_FUNCTION (painter, fontAscent) | |
KVSO_CLASS_FUNCTION (painter, fontDescent) | |
KVSO_CLASS_FUNCTION (painter, fontMetricsHeight) | |
KVSO_CLASS_FUNCTION (painter, fontMetricsWidth) | |
KVSO_CLASS_FUNCTION (painter, htmlTextSize) | |
KVSO_CLASS_FUNCTION (painter, painterDeviceHeight) | |
KVSO_CLASS_FUNCTION (painter, painterDeviceWidth) | |
KVSO_CLASS_FUNCTION (painter, pathAddText) | |
KVSO_CLASS_FUNCTION (painter, pathLineTo) | |
KVSO_CLASS_FUNCTION (painter, pathMoveTo) | |
KVSO_CLASS_FUNCTION (painter, pen) | |
KVSO_CLASS_FUNCTION (painter, reset) | |
KVSO_CLASS_FUNCTION (painter, resetPath) | |
KVSO_CLASS_FUNCTION (painter, restore) | |
KVSO_CLASS_FUNCTION (painter, rotate) | |
KVSO_CLASS_FUNCTION (painter, save) | |
KVSO_CLASS_FUNCTION (painter, scale) | |
KVSO_CLASS_FUNCTION (painter, setAntialiasing) | |
KVSO_CLASS_FUNCTION (painter, setBackGroundMode) | |
KVSO_CLASS_FUNCTION (painter, setBrush) | |
KVSO_CLASS_FUNCTION (painter, setBrushStyle) | |
KVSO_CLASS_FUNCTION (painter, setCompositionMode) | |
KVSO_CLASS_FUNCTION (painter, setFont) | |
KVSO_CLASS_FUNCTION (painter, setFontSize) | |
KVSO_CLASS_FUNCTION (painter, setGradientAsBrush) | |
KVSO_CLASS_FUNCTION (painter, setGradientColor) | |
KVSO_CLASS_FUNCTION (painter, setGradientStart) | |
KVSO_CLASS_FUNCTION (painter, setGradientStop) | |
KVSO_CLASS_FUNCTION (painter, setOpacity) | |
KVSO_CLASS_FUNCTION (painter, setPen) | |
KVSO_CLASS_FUNCTION (painter, setPenCapStyle) | |
KVSO_CLASS_FUNCTION (painter, setPenJoinStyle) | |
KVSO_CLASS_FUNCTION (painter, setPenStyle) | |
KVSO_CLASS_FUNCTION (painter, setPenWidth) | |
KVSO_CLASS_FUNCTION (painter, setSmoothPixmapTransform) | |
KVSO_CLASS_FUNCTION (painter, setTextAntialiasing) | |
KVSO_CLASS_FUNCTION (painter, shear) | |
KVSO_CLASS_FUNCTION (painter, translate) | |
Variables | |
const int | align_cod [] |
const char *const | align_tbl [] |
bDonotdeleteinternalqpainter = false | |
const Qt::BrushStyle | brushstyles_cod [] |
const char *const | brushstyles_tbl [] |
const QPainter::CompositionMode | composition_cod [] |
const char *const | composition_tbl [] |
m_pDeviceObject = nullptr | |
m_pGradient = nullptr | |
m_pPainter = new QPainter() | |
m_pPainterPath = nullptr | |
m_pPrinter = nullptr | |
const Qt::PenStyle | penstyles_cod [] |
const char *const | penstyles_tbl [] |
#define brushstyles_num (sizeof(brushstyles_tbl) / sizeof(brushstyles_tbl[0])) |
Referenced by KVSO_CLASS_FUNCTION().
#define composition_num (sizeof(composition_tbl) / sizeof(composition_tbl[0])) |
Referenced by KVSO_CLASS_FUNCTION().
#define KVSO_2ARRAYPARAMETERS | ( | __pXOrArray, | |
__iY ) |
Referenced by KVSO_CLASS_FUNCTION().
#define KVSO_3OR4ARRAYPARAMETERS | ( | __pCol1OrArray, | |
__iCol2, | |||
__iCol3, | |||
__iOpacity ) |
#define KVSO_PARAMETERS_PAINTER | ( | __pXOrArray, | |
__iY, | |||
__iW, | |||
__iH ) |
#define PAINTER_ROTATE | ( | __angle, | |
__axis ) |
Referenced by KVSO_CLASS_FUNCTION().
#define PAINTER_SCALE | ( | __sX, | |
__sY ) |
Referenced by KVSO_CLASS_FUNCTION().
#define PAINTER_SHEAR | ( | __sH, | |
__sV ) |
Referenced by KVSO_CLASS_FUNCTION().
#define PAINTER_TRANSLATE | ( | __x, | |
__y ) |
Referenced by KVSO_CLASS_FUNCTION().
#define penstyles_num (sizeof(penstyles_tbl) / sizeof(penstyles_tbl[0])) |
Referenced by KVSO_CLASS_FUNCTION().
if | ( | m_pGradient | ) |
References if(), and m_pGradient.
if | ( | m_pPainter &&! | bDonotdeleteinternalqpainter | ) |
References bDonotdeleteinternalqpainter, if(), and m_pPainter.
if | ( | m_pPainterPath | ) |
References if(), and m_pPainterPath.
if | ( | m_pPrinter | ) |
References if(), KVSO_END_CONSTRUCTOR, and m_pPrinter.
KVSO_CLASS_FUNCTION | ( | painter | , |
begin | ) |
References __tr2qs_ctx, begin(), CHECK_INTERNAL_POINTER, KviQString::equalCI(), KviKvsObject::inheritsClass(), KviKvsKernel::instance(), KVS_PF_OPTIONAL, KVS_PT_STRING, KVS_PT_VARIANT, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, KviKvsObjectController::lookupObject(), m_pPainter, m_pPrinter, KviKvsKernel::objectController(), and v.
KVSO_CLASS_FUNCTION | ( | painter | , |
beginPdf | ) |
References CHECK_INTERNAL_POINTER, KVS_PT_STRING, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, m_pPainter, and m_pPrinter.
KVSO_CLASS_FUNCTION | ( | painter | , |
clearGradient | ) |
References m_pGradient.
KVSO_CLASS_FUNCTION | ( | painter | , |
colorNames | ) |
References a, CHECK_INTERNAL_POINTER, i, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
drawArc | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
drawChord | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
drawEllipse | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
drawHtmlText | ) |
References CHECK_INTERNAL_POINTER, KVS_PT_INT, KVS_PT_STRING, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
drawIcon | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
drawLine | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
drawPath | ) |
References CHECK_INTERNAL_POINTER, m_pPainter, and m_pPainterPath.
KVSO_CLASS_FUNCTION | ( | painter | , |
drawPie | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
drawPixmap | ) |
References __tr2qs_ctx, CHECK_INTERNAL_POINTER, KviKvsObject::inheritsClass(), KviKvsKernel::instance(), KVS_PF_OPTIONAL, KVS_PT_BOOLEAN, KVS_PT_HOBJECT, KVS_PT_REAL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, KviKvsObjectController::lookupObject(), m_pPainter, and KviKvsKernel::objectController().
KVSO_CLASS_FUNCTION | ( | painter | , |
drawPixmapMirrored | ) |
References __tr2qs_ctx, CHECK_INTERNAL_POINTER, KviKvsObject::inheritsClass(), KviKvsKernel::instance(), KVS_PF_OPTIONAL, KVS_PT_BOOLEAN, KVS_PT_HOBJECT, KVS_PT_INT, KVS_PT_REAL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, KviKvsObjectController::lookupObject(), m_pPainter, and KviKvsKernel::objectController().
KVSO_CLASS_FUNCTION | ( | painter | , |
drawPixmapWithColorEffect | ) |
References __tr2qs_ctx, CHECK_INTERNAL_POINTER, KviQString::equalCI(), g, h, KviKvsObject::inheritsClass(), KviKvsKernel::instance(), KVS_PF_OPTIONAL, KVS_PT_HOBJECT, KVS_PT_INT, KVS_PT_REAL, KVS_PT_STRING, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, KviKvsObjectController::lookupObject(), m_pPainter, KviKvsKernel::objectController(), r, w, x, and y.
KVSO_CLASS_FUNCTION | ( | painter | , |
drawPoint | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
drawRect | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
drawRoundRect | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
drawText | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
end | ) |
References end(), m_pDeviceObject, m_pPainter, and m_pPrinter.
KVSO_CLASS_FUNCTION | ( | painter | , |
fillRect | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
fontAscent | ) |
References CHECK_INTERNAL_POINTER, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
fontDescent | ) |
References CHECK_INTERNAL_POINTER, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
fontMetricsHeight | ) |
References __tr2qs_ctx, CHECK_INTERNAL_POINTER, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
fontMetricsWidth | ) |
References __tr2qs_ctx, CHECK_INTERNAL_POINTER, KVS_PT_STRING, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
htmlTextSize | ) |
References a, CHECK_INTERNAL_POINTER, KVS_PT_STRING, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
painterDeviceHeight | ) |
References CHECK_INTERNAL_POINTER, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
painterDeviceWidth | ) |
References CHECK_INTERNAL_POINTER, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
pathAddText | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
pathLineTo | ) |
References CHECK_INTERNAL_POINTER, KVS_PT_REAL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, m_pPainter, and m_pPainterPath.
KVSO_CLASS_FUNCTION | ( | painter | , |
pathMoveTo | ) |
References CHECK_INTERNAL_POINTER, KVS_PT_REAL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, m_pPainter, and m_pPainterPath.
KVSO_CLASS_FUNCTION | ( | painter | , |
pen | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
reset | ) |
References CHECK_INTERNAL_POINTER, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
resetPath | ) |
References m_pPainterPath.
KVSO_CLASS_FUNCTION | ( | painter | , |
restore | ) |
References CHECK_INTERNAL_POINTER, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
rotate | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
save | ) |
References CHECK_INTERNAL_POINTER, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
scale | ) |
References CHECK_INTERNAL_POINTER, KVS_PT_DOUBLE, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, m_pPainter, and PAINTER_SCALE.
KVSO_CLASS_FUNCTION | ( | painter | , |
setAntialiasing | ) |
References CHECK_INTERNAL_POINTER, KVS_PT_BOOL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
setBackGroundMode | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
setBrush | ) |
References __tr2qs_ctx, KviKvsVariant::asHObject(), KviKvsVariant::asInteger(), KviKvsVariant::asString(), CHECK_INTERNAL_POINTER, KviQString::equalCI(), KviKvsObject::inheritsClass(), KviKvsKernel::instance(), KviKvsVariant::isHObject(), KVS_PF_OPTIONAL, KVS_PT_INT, KVS_PT_STRING, KVS_PT_VARIANT, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, KviKvsObjectController::lookupObject(), m_pPainter, and KviKvsKernel::objectController().
KVSO_CLASS_FUNCTION | ( | painter | , |
setBrushStyle | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
setCompositionMode | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
setFont | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
setFontSize | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
setGradientAsBrush | ) |
References CHECK_INTERNAL_POINTER, m_pGradient, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
setGradientColor | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
setGradientStart | ) |
References CHECK_INTERNAL_POINTER, KVS_PT_DOUBLE, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, m_pGradient, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
setGradientStop | ) |
References CHECK_INTERNAL_POINTER, KVS_PT_DOUBLE, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, m_pGradient, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
setOpacity | ) |
References CHECK_INTERNAL_POINTER, KVS_PT_DOUBLE, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
setPen | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
setPenCapStyle | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
setPenJoinStyle | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
setPenStyle | ) |
KVSO_CLASS_FUNCTION | ( | painter | , |
setPenWidth | ) |
References CHECK_INTERNAL_POINTER, KVS_PT_REAL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
setSmoothPixmapTransform | ) |
References CHECK_INTERNAL_POINTER, KVS_PT_BOOL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
setTextAntialiasing | ) |
References CHECK_INTERNAL_POINTER, KVS_PT_BOOL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, and m_pPainter.
KVSO_CLASS_FUNCTION | ( | painter | , |
shear | ) |
References CHECK_INTERNAL_POINTER, KVS_PT_DOUBLE, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, m_pPainter, and PAINTER_SHEAR.
KVSO_CLASS_FUNCTION | ( | painter | , |
translate | ) |
const int align_cod[] |
const char* const align_tbl[] |
bDonotdeleteinternalqpainter = false |
Referenced by if().
const Qt::BrushStyle brushstyles_cod[] |
Referenced by KVSO_CLASS_FUNCTION().
const char* const brushstyles_tbl[] |
Referenced by KVSO_CLASS_FUNCTION().
const QPainter::CompositionMode composition_cod[] |
Referenced by KVSO_CLASS_FUNCTION().
const char* const composition_tbl[] |
Referenced by KVSO_CLASS_FUNCTION().
m_pDeviceObject = nullptr |
Referenced by KVSO_CLASS_FUNCTION().
m_pGradient = nullptr |
Referenced by if(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), and KVSO_CLASS_FUNCTION().
m_pPainter = new QPainter() |
Referenced by if(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), and KVSO_CLASS_FUNCTION().
m_pPainterPath = nullptr |
Referenced by if(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), and KVSO_CLASS_FUNCTION().
m_pPrinter = nullptr |
Referenced by if(), KVSO_CLASS_FUNCTION(), KVSO_CLASS_FUNCTION(), and KVSO_CLASS_FUNCTION().
const Qt::PenStyle penstyles_cod[] |
Referenced by KVSO_CLASS_FUNCTION().
const char* const penstyles_tbl[] |
Referenced by KVSO_CLASS_FUNCTION().