![]() |
KVIrc
4.9.2
DeveloperAPIs
|
#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_pPainterPath) delete m_pPainterPath | |
| if (m_pGradient) delete m_pGradient | |
| if (m_pPainter &&!bDonotdeleteinternalqpainter) delete m_pPainter | |
| if (m_pPrinter) delete m_pPrinter | |
| KVSO_CLASS_FUNCTION (painter, setFont) | |
| KVSO_CLASS_FUNCTION (painter, setFontSize) | |
| KVSO_CLASS_FUNCTION (painter, setBackGroundMode) | |
| KVSO_CLASS_FUNCTION (painter, drawLine) | |
| KVSO_CLASS_FUNCTION (painter, drawRect) | |
| KVSO_CLASS_FUNCTION (painter, drawEllipse) | |
| KVSO_CLASS_FUNCTION (painter, drawRoundRect) | |
| KVSO_CLASS_FUNCTION (painter, drawArc) | |
| KVSO_CLASS_FUNCTION (painter, drawChord) | |
| KVSO_CLASS_FUNCTION (painter, setBrush) | |
| KVSO_CLASS_FUNCTION (painter, pen) | |
| KVSO_CLASS_FUNCTION (painter, setPen) | |
| KVSO_CLASS_FUNCTION (painter, drawPie) | |
| KVSO_CLASS_FUNCTION (painter, drawPoint) | |
| KVSO_CLASS_FUNCTION (painter, fontDescent) | |
| KVSO_CLASS_FUNCTION (painter, fontAscent) | |
| KVSO_CLASS_FUNCTION (painter, fontMetricsWidth) | |
| KVSO_CLASS_FUNCTION (painter, fontMetricsHeight) | |
| KVSO_CLASS_FUNCTION (painter, begin) | |
| KVSO_CLASS_FUNCTION (painter, end) | |
| KVSO_CLASS_FUNCTION (painter, beginPdf) | |
| KVSO_CLASS_FUNCTION (painter, drawText) | |
| KVSO_CLASS_FUNCTION (painter, drawPixmap) | |
| KVSO_CLASS_FUNCTION (painter, drawPixmapWithColorEffect) | |
| KVSO_CLASS_FUNCTION (painter, drawPixmapMirrored) | |
| KVSO_CLASS_FUNCTION (painter, rotate) | |
| KVSO_CLASS_FUNCTION (painter, translate) | |
| KVSO_CLASS_FUNCTION (painter, shear) | |
| KVSO_CLASS_FUNCTION (painter, scale) | |
| KVSO_CLASS_FUNCTION (painter, reset) | |
| KVSO_CLASS_FUNCTION (painter, drawHtmlText) | |
| KVSO_CLASS_FUNCTION (painter, htmlTextSize) | |
| KVSO_CLASS_FUNCTION (painter, drawIcon) | |
| KVSO_CLASS_FUNCTION (painter, setOpacity) | |
| KVSO_CLASS_FUNCTION (painter, setTextAntialiasing) | |
| KVSO_CLASS_FUNCTION (painter, setAntialiasing) | |
| KVSO_CLASS_FUNCTION (painter, setSmoothPixmapTransform) | |
| KVSO_CLASS_FUNCTION (painter, setPenJoinStyle) | |
| KVSO_CLASS_FUNCTION (painter, setPenCapStyle) | |
| KVSO_CLASS_FUNCTION (painter, save) | |
| KVSO_CLASS_FUNCTION (painter, restore) | |
| KVSO_CLASS_FUNCTION (painter, setPenStyle) | |
| KVSO_CLASS_FUNCTION (painter, setBrushStyle) | |
| KVSO_CLASS_FUNCTION (painter, setGradientStart) | |
| KVSO_CLASS_FUNCTION (painter, setGradientStop) | |
| KVSO_CLASS_FUNCTION (painter, setGradientColor) | |
| KVSO_CLASS_FUNCTION (painter, setGradientAsBrush) | |
| KVSO_CLASS_FUNCTION (painter, clearGradient) | |
| KVSO_CLASS_FUNCTION (painter, setPenWidth) | |
| KVSO_CLASS_FUNCTION (painter, fillRect) | |
| KVSO_CLASS_FUNCTION (painter, colorNames) | |
| KVSO_CLASS_FUNCTION (painter, painterDeviceWidth) | |
| KVSO_CLASS_FUNCTION (painter, painterDeviceHeight) | |
| KVSO_CLASS_FUNCTION (painter, pathMoveTo) | |
| KVSO_CLASS_FUNCTION (painter, pathLineTo) | |
| KVSO_CLASS_FUNCTION (painter, pathAddText) | |
| KVSO_CLASS_FUNCTION (painter, drawPath) | |
| KVSO_CLASS_FUNCTION (painter, setCompositionMode) | |
| KVSO_CLASS_FUNCTION (painter, resetPath) | |
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 [] |
Referenced by KVSO_CLASS_FUNCTION().
| #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 | |||
| ) |
Referenced by KVSO_CLASS_FUNCTION().
| #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_pPainterPath | ) |
| if | ( | m_pGradient | ) |
| if | ( | m_pPainter &&! | bDonotdeleteinternalqpainter | ) |
| if | ( | m_pPrinter | ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setFont | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setFontSize | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_UNSIGNEDINTEGER, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setBackGroundMode | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawLine | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawRect | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawEllipse | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawRoundRect | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawArc | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawChord | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setBrush | |||
| ) |
References __tr2qs_ctx(), KviKvsVariant::asHObject(), KviKvsVariant::asInteger(), KviKvsVariant::asString(), c, 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(), and KviKvsKernel::objectController().
| KVSO_CLASS_FUNCTION | ( | painter | , |
| pen | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setPen | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawPie | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawPoint | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| fontDescent | |||
| ) |
References c, and CHECK_INTERNAL_POINTER.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| fontAscent | |||
| ) |
References c, and CHECK_INTERNAL_POINTER.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| fontMetricsWidth | |||
| ) |
References __tr2qs_ctx(), c, CHECK_INTERNAL_POINTER, KVS_PT_STRING, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| fontMetricsHeight | |||
| ) |
References __tr2qs_ctx(), c, and CHECK_INTERNAL_POINTER.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| begin | |||
| ) |
References __tr2qs_ctx(), KviKvsVariant::asHObject(), KviKvsVariant::asString(), c, CHECK_INTERNAL_POINTER, KviQString::equalCI(), KviKvsObject::inheritsClass(), KviKvsKernel::instance(), KviKvsVariant::isHObject(), KviKvsVariant::isString(), KVS_PF_OPTIONAL, KVS_PT_STRING, KVS_PT_VARIANT, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, KviKvsObjectController::lookupObject(), m_pPrinter, KviKvsKernel::objectController(), and v.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| end | |||
| ) |
References c, m_pDeviceObject, m_pPrinter, and Q_UNUSED().
| KVSO_CLASS_FUNCTION | ( | painter | , |
| beginPdf | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_STRING, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, and m_pPrinter.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawText | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawPixmap | |||
| ) |
References __tr2qs_ctx(), c, 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(), and KviKvsKernel::objectController().
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawPixmapWithColorEffect | |||
| ) |
References __tr2qs_ctx(), c, 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(), KviKvsKernel::objectController(), r, w, x, and y.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawPixmapMirrored | |||
| ) |
References __tr2qs_ctx(), c, 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(), and KviKvsKernel::objectController().
| KVSO_CLASS_FUNCTION | ( | painter | , |
| rotate | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| translate | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_DOUBLE, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, and PAINTER_TRANSLATE.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| shear | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_DOUBLE, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, and PAINTER_SHEAR.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| scale | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_DOUBLE, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, and PAINTER_SCALE.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| reset | |||
| ) |
References CHECK_INTERNAL_POINTER.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawHtmlText | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_INT, KVS_PT_STRING, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| htmlTextSize | |||
| ) |
References a, c, CHECK_INTERNAL_POINTER, KVS_PT_STRING, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, KVSO_PARAMETERS_END, and KviKvsArray::set().
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawIcon | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setOpacity | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_DOUBLE, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setTextAntialiasing | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_BOOL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setAntialiasing | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_BOOL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setSmoothPixmapTransform | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_BOOL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setPenJoinStyle | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KviQString::equalCI(), KVS_PT_STRING, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setPenCapStyle | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KviQString::equalCI(), KVS_PT_STRING, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| save | |||
| ) |
References CHECK_INTERNAL_POINTER.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| restore | |||
| ) |
References CHECK_INTERNAL_POINTER.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setPenStyle | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setBrushStyle | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setGradientStart | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_DOUBLE, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setGradientStop | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_DOUBLE, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setGradientColor | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setGradientAsBrush | |||
| ) |
References CHECK_INTERNAL_POINTER.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| clearGradient | |||
| ) |
References c, m_pGradient, and Q_UNUSED().
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setPenWidth | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_REAL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| fillRect | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| colorNames | |||
| ) |
References a, c, CHECK_INTERNAL_POINTER, i, and KviKvsArray::set().
| KVSO_CLASS_FUNCTION | ( | painter | , |
| painterDeviceWidth | |||
| ) |
References c, and CHECK_INTERNAL_POINTER.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| painterDeviceHeight | |||
| ) |
References c, and CHECK_INTERNAL_POINTER.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| pathMoveTo | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_REAL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| pathLineTo | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_REAL, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| pathAddText | |||
| ) |
References c, CHECK_INTERNAL_POINTER, KVS_PT_REAL, KVS_PT_STRING, KVSO_PARAMETER, KVSO_PARAMETERS_BEGIN, and KVSO_PARAMETERS_END.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| drawPath | |||
| ) |
References CHECK_INTERNAL_POINTER.
| KVSO_CLASS_FUNCTION | ( | painter | , |
| setCompositionMode | |||
| ) |
| KVSO_CLASS_FUNCTION | ( | painter | , |
| resetPath | |||
| ) |
References c, m_pPainterPath, and Q_UNUSED().
| const int align_cod[] |
Referenced by KVSO_CLASS_FUNCTION().
| const char* const align_tbl[] |
Referenced by KVSO_CLASS_FUNCTION().
| bDonotdeleteinternalqpainter = false |
| 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 KVSO_CLASS_FUNCTION().
| m_pPainter = new QPainter() |
| m_pPainterPath = nullptr |
Referenced by KVSO_CLASS_FUNCTION().
| m_pPrinter = nullptr |
Referenced by KVSO_CLASS_FUNCTION().
| const Qt::PenStyle penstyles_cod[] |
Referenced by KVSO_CLASS_FUNCTION().
| const char* const penstyles_tbl[] |
Referenced by KVSO_CLASS_FUNCTION().
1.8.7