44 #include <QApplication>
46 #include <QPixmapCache>
48 #include <QStyleOption>
50 #include <QJsonDocument>
51 #include <QJsonObject>
54 #include <QGuiApplication>
55 #include <qpa/qplatformnativeinterface.h>
56 #include <qpa/qplatformtheme.h>
69 checkBoxControl =
NULL;
79 qwidgetsFonts->
clear();
87 objectIterator !=
object->constEnd();
92 qWarning(
"Style.json structure is unrecognized.");
104 m_androidControlsHash[int(itemType)] = checkBoxControl;
178 switch (contentsType) {
208 switch (controlElement) {
210 case CE_PushButtonBevel:
211 case CE_PushButtonLabel:
215 case CE_CheckBoxLabel:
219 case CE_RadioButtonLabel:
223 case CE_TabBarTabShape:
224 case CE_TabBarTabLabel:
228 case CE_ProgressBarGroove:
229 case CE_ProgressBarContents:
230 case CE_ProgressBarLabel:
233 case CE_ComboBoxLabel:
246 switch (primitiveElement) {
267 switch (subElement) {
275 case SE_RadioButtonContents:
278 case SE_CheckBoxContents:
291 const ItemType itemType = qtControl(pe);
293 ? m_androidControlsHash.
find(itemType)
294 : m_androidControlsHash.
end();
295 if (
it != m_androidControlsHash.
end()) {
297 it.value()->drawControl(
opt,
p,
w);
301 it.value()->drawControl(©,
p,
w);
303 }
else if (pe == PE_FrameGroupBox) {
328 const ItemType itemType = qtControl(element);
330 ? m_androidControlsHash.
find(itemType)
331 : m_androidControlsHash.
end();
332 if (
it != m_androidControlsHash.
end()) {
349 qstyleoption_cast<const QStyleOptionButton *>(
opt)) {
359 qstyleoption_cast<const QStyleOptionButton *>(
opt)) {
360 const bool isRadio = (element == CE_RadioButton);
363 : SE_CheckBoxContents,
btn,
w);
369 qstyleoption_cast<const QStyleOptionComboBox *>(
opt)) {
390 const ItemType itemType = qtControl(subElement);
392 ? m_androidControlsHash.
find(itemType)
393 : m_androidControlsHash.
end();
394 if (
it != m_androidControlsHash.
end())
396 return QFusionStyle::subElementRect(subElement,
option,
widget);
404 const ItemType itemType = qtControl(cc);
406 ? m_androidControlsHash.
find(itemType)
407 : m_androidControlsHash.
end();
408 if (
it != m_androidControlsHash.
end()) {
412 if (cc == CC_GroupBox) {
417 if (
groupBox->subControls & SC_GroupBoxCheckBox)
421 frame.QStyleOption::operator=(*groupBox);
433 finalRect.
adjust(ltr ? -4 : 0, 0, ltr ? 0 : 4, 0);
439 p->setClipRegion(region);
448 p->setPen(textColor);
457 if (
groupBox->state & State_HasFocus) {
459 fropt.QStyleOption::operator=(*groupBox);
466 if (
groupBox->subControls & SC_GroupBoxCheckBox) {
468 box.QStyleOption::operator=(*groupBox);
469 box.rect = checkBoxRect;
475 QFusionStyle::drawComplexControl(cc,
opt,
p,
widget);
483 const ItemType itemType = qtControl(cc);
485 ? m_androidControlsHash.
find(itemType)
486 : m_androidControlsHash.
end();
487 if (
it != m_androidControlsHash.
end()) {
490 if (
const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(
opt)) {
491 QRect r =
it.value()->subControlRect(slider, SC_SliderHandle,
widget);
492 if (
r.isValid() &&
r.contains(pt)) {
493 return SC_SliderHandle;
495 r =
it.value()->subControlRect(slider, SC_SliderGroove,
widget);
496 if (
r.isValid() &&
r.contains(pt))
497 return SC_SliderGroove;
505 return QFusionStyle::hitTestComplexControl(cc,
opt, pt,
widget);
513 const ItemType itemType = qtControl(cc);
515 ? m_androidControlsHash.
find(itemType)
516 : m_androidControlsHash.
end();
517 if (
it != m_androidControlsHash.
end())
518 return it.value()->subControlRect(
opt, sc,
widget);
525 int indicatorWidth = checkBoxSize.
width();
526 int indicatorHeight = checkBoxSize.
height();
529 checkBoxRect.
setWidth(indicatorWidth);
537 if (sc == SC_GroupBoxFrame) {
541 }
else if (sc == SC_GroupBoxContents) {
544 int leftMarginExtension = 0;
546 frameRect.
adjust(leftMarginExtension + margin, margin + topMargin, -margin, -margin -
groupBox->lineWidth);
550 }
else if (sc == SC_GroupBoxCheckBox) {
552 }
else if (sc == SC_GroupBoxLabel) {
566 return QFusionStyle::subControlRect(cc,
opt, sc,
widget);
573 case PM_ButtonMargin:
574 case PM_FocusFrameVMargin:
575 case PM_FocusFrameHMargin:
576 case PM_ComboBoxFrameWidth:
577 case PM_SpinBoxFrameWidth:
578 case PM_ScrollBarExtent:
580 case PM_IndicatorWidth:
582 case PM_IndicatorHeight:
585 return QFusionStyle::pixelMetric(metric,
option,
widget);
592 const QSize &contentsSize,
595 QSize sz = QFusionStyle::sizeFromContents(ct,
opt, contentsSize,
w);
596 if (ct == CT_HeaderSection) {
598 bool nullIcon = hdr->icon.isNull();
607 if (
qApp->styleSheet().isEmpty())
608 txt = hdr->fontMetrics.size(0, hdr->text);
614 + (hdr->text.isNull() ? 0 : margin) +
txt.width() + margin);
625 const ItemType itemType = qtControl(ct);
627 ? m_androidControlsHash.
find(itemType)
628 : m_androidControlsHash.
end();
629 if (
it != m_androidControlsHash.
end())
630 return it.value()->sizeFromContents(
opt, sz,
w);
631 if (ct == CT_GroupBox) {
635 int indicatorWidth = checkBoxSize.
width();
636 int indicatorHeight = checkBoxSize.
height();
639 checkBoxRect.
setWidth(indicatorWidth);
665 return QFusionStyle::generatedIconPixmap(iconMode,
pixmap,
opt);
671 case SH_Slider_AbsoluteSetButtons:
674 case SH_Slider_PageSetButtons:
677 case SH_RequestSoftwareInputPanel:
678 return RSIP_OnMouseClick;
680 case SH_SpinBox_SelectOnStep:
684 return QFusionStyle::styleHint(hint,
option,
widget, returnData);
690 return m_standardPalette;
717 if (
it != drawable.
end())
718 m_padding = extractMargins(
it.value().toMap());
768 if (m_padding.isNull() && !sz.
isNull())
769 m_padding.setLeft(sz.
width());
789 if (m_hashKey.isEmpty())
839 int QAndroidStyle::Android9PatchDrawable::calculateStretch(
int boundsLimit,
842 int numStrechyPixelsRemaining,
843 int numFixedPixelsRemaining)
845 int spaceRemaining = boundsLimit - startingPoint;
846 int stretchySpaceRemaining = spaceRemaining - numFixedPixelsRemaining;
847 return (
float(srcSpace) * stretchySpaceRemaining / numStrechyPixelsRemaining + .5);
850 void QAndroidStyle::Android9PatchDrawable::extractIntArray(
const QVariantList &
values,
860 if (m_hashKey.isEmpty())
872 const int pixmapWidth =
pixmap.width();
873 const int pixmapHeight =
pixmap.height();
875 if (bounds.
isNull() || !pixmapWidth || !pixmapHeight)
886 const qint32 x0 = m_chunkData.xDivs[0];
887 const qint32 y0 = m_chunkData.yDivs[0];
895 const bool initialXIsStretchable = (
x0 == 0);
896 bool yIsStretchable = (
y0 == 0);
897 const int bitmapWidth =
pixmap.width();
898 const int bitmapHeight =
pixmap.height();
900 int *dstRights =
static_cast<int *
>(alloca((
numXDivs + 1) *
sizeof(
int)));
901 bool dstRightsHaveBeenCached =
false;
903 int numStretchyXPixelsRemaining = 0;
905 numStretchyXPixelsRemaining += m_chunkData.xDivs[
i + 1] - m_chunkData.xDivs[
i];
907 int numFixedXPixelsRemaining = bitmapWidth - numStretchyXPixelsRemaining;
908 int numStretchyYPixelsRemaining = 0;
910 numStretchyYPixelsRemaining += m_chunkData.yDivs[
i + 1] - m_chunkData.yDivs[
i];
912 int numFixedYPixelsRemaining = bitmapHeight - numStretchyYPixelsRemaining;
931 for (
j = yIsStretchable ? 1 : 0;
933 j++, yIsStretchable = !yIsStretchable) {
937 src.setBottom(bitmapHeight);
940 src.setBottom(m_chunkData.yDivs[
j]);
941 const int srcYSize =
src.bottom() -
src.top();
942 if (yIsStretchable) {
945 numStretchyYPixelsRemaining,
946 numFixedYPixelsRemaining));
947 numStretchyYPixelsRemaining -= srcYSize;
949 dst.setBottom(
dst.top() + srcYSize);
950 numFixedYPixelsRemaining -= srcYSize;
954 xIsStretchable = initialXIsStretchable;
957 for (
i = xIsStretchable ? 1 : 0;
959 i++, xIsStretchable = !xIsStretchable) {
960 color = m_chunkData.colors[colorIndex++];
964 src.setRight(bitmapWidth);
967 src.setRight(m_chunkData.xDivs[
i]);
968 if (dstRightsHaveBeenCached) {
969 dst.setRight(dstRights[
i]);
971 const int srcXSize =
src.right() -
src.left();
972 if (xIsStretchable) {
973 dst.setRight(
dst.left() + calculateStretch(bounds.
right(),
dst.left(),
975 numStretchyXPixelsRemaining,
976 numFixedXPixelsRemaining));
977 numStretchyXPixelsRemaining -= srcXSize;
979 dst.setRight(
dst.left() + srcXSize);
980 numFixedXPixelsRemaining -= srcXSize;
982 dstRights[
i] =
dst.right();
988 if (
src.left() >=
src.right()) {
993 if (
dst.right() <=
dst.left() ||
dst.bottom() <=
dst.top()) {
1004 src.setLeft(
src.right());
1005 dst.setLeft(
dst.right());
1007 src.setTop(
src.bottom());
1008 dst.setTop(
dst.bottom());
1009 dstRightsHaveBeenCached =
true;
1024 int min = colors.
size() < positions.
size() ? colors.
size() : positions.
size();
1025 for (
int i = 0;
i < min;
i++)
1029 if (orientation ==
"TOP_BOTTOM")
1031 else if (orientation ==
"TR_BL")
1032 m_orientation =
TR_BL;
1033 else if (orientation ==
"RIGHT_LEFT")
1035 else if (orientation ==
"BR_TL")
1036 m_orientation =
BR_TL;
1037 else if (orientation ==
"BOTTOM_TOP")
1039 else if (orientation ==
"BL_TR")
1040 m_orientation =
BL_TR;
1041 else if (orientation ==
"LEFT_RIGHT")
1043 else if (orientation ==
"TL_BR")
1044 m_orientation =
TL_BR;
1046 qWarning(
"AndroidGradientDrawable: unknown orientation");
1058 switch (m_orientation) {
1061 m_gradient.setStart(
width / 2, 0);
1066 m_gradient.setStart(
width, 0);
1067 m_gradient.setFinalStop(0,
height);
1072 m_gradient.setFinalStop(0,
height / 2);
1077 m_gradient.setFinalStop(0, 0);
1082 m_gradient.setFinalStop(
width / 2, 0);
1086 m_gradient.setStart(0,
height);
1087 m_gradient.setFinalStop(
width, 0);
1091 m_gradient.setStart(0,
height / 2);
1096 m_gradient.setStart(0, 0);
1112 return QSize(m_radius * 2, m_radius * 2);
1137 m_orientation = orientation;
1148 m_drawable->draw(
painter, ©);
1173 for (
const StateType &
type : qAsConst(m_states))
1193 s = drawable->
size();
1201 if (m_states.size())
1202 return m_states[0].second;
1206 uint bestCost = 0xffff;
1207 for (
const StateType &
state : m_states) {
1209 return state.second;
1238 if (cost < bestCost) {
1240 bestMatch =
state.second;
1293 return static_cast<int>(
state);
1298 for (
const StateType &
type : qAsConst(m_states))
1324 for (
const LayerType &
layer : qAsConst(m_layers))
1325 delete layer.second;
1337 m_orientation = orientation;
1342 for (
const LayerType &
layer : m_layers) {
1343 if (
layer.first == m_id) {
1358 for (
const LayerType &
layer : m_layers) {
1359 if (
layer.first ==
id)
1360 return layer.second;
1368 for (
const LayerType &
layer : m_layers)
1377 if (
it != control.
end())
1383 if (
it != control.
end())
1384 m_minSize.setWidth(
it.value().toInt());
1387 if (
it != control.
end())
1388 m_minSize.setHeight(
it.value().toInt());
1391 if (
it != control.
end())
1392 m_maxSize.setWidth(
it.value().toInt());
1395 if (
it != control.
end())
1396 m_maxSize.setHeight(
it.value().toInt());
1401 delete m_background;
1407 m_background->draw(
p,
opt);
1410 if ((
frame->state & State_Sunken) || (
frame->state & State_Raised)) {
1418 QColor bg = fropt->backgroundColor;
1419 QPen oldPen =
p->pen();
1431 p->drawRect(focusRect.
adjusted(0, 0, -1, -1));
1445 if (drawable->type() ==
State)
1448 const QMargins &padding = drawable->padding();
1453 if (
r.width() < m_minSize.width())
1456 if (
r.height() < m_minSize.height())
1457 r.setHeight(m_minSize.height());
1472 const QSize &contentsSize,
1478 if (drawable->type() ==
State)
1480 const QMargins &padding = drawable->padding();
1484 sz = drawable->size();
1489 if (sz.
height() < m_minSize.height())
1491 if (sz.
width() < m_minSize.width())
1499 if (drawable->type() ==
State)
1509 if (drawable->type() ==
State)
1511 return drawable->
size();
1518 return m_background;
1526 if (
it != control.
end()) {
1545 m_button->draw(
p,
opt);
1551 return m_button->padding();
1558 if (m_button->type() ==
State)
1560 return m_button->size();
1567 return m_background ? m_background : m_button;
1575 if (
it != control.
end())
1581 if (
it != control.
end())
1587 if (
it != control.
end())
1591 if (
it != control.
end())
1595 if (
it != control.
end())
1599 if (
it != control.
end())
1603 if (
it != control.
end())
1607 if (
it != control.
end())
1613 delete m_progressDrawable;
1614 delete m_indeterminateDrawable;
1619 if (!m_progressDrawable)
1624 const double fraction = double(
qint64(
pb->progress) -
pb->minimum) / (
qint64(
pb->maximum) -
pb->minimum);
1630 static_cast<AndroidLayerDrawable *
>(m_progressDrawable)->setFactor(m_progressId, fraction, orientation);
1641 qstyleoption_cast<const QStyleOptionProgressBar *>(
option)) {
1646 QMargins padding = m_background->padding();
1648 padding = m_indeterminateDrawable->padding();
1650 padding = m_progressDrawable->padding();
1655 if (
r.height()<m_minSize.height())
1658 if (
r.height()>m_maxSize.height())
1659 r.setHeight(m_maxSize.height());
1661 if (
r.width()<m_minSize.width())
1662 r.setWidth(m_minSize.width());
1664 if (
r.width()>m_maxSize.width())
1665 r.setWidth(m_maxSize.width());
1673 const QSize &contentsSize,
1676 QSize sz(contentsSize);
1677 if (sz.
height() < m_minSize.height())
1679 if (sz.
width() < m_minSize.width())
1683 qstyleoption_cast<const QStyleOptionProgressBar *>(
opt)) {
1685 if (sz.
width() > m_maxSize.width())
1688 if (sz.
height() > m_maxSize.height())
1692 return contentsSize;
1700 if (
it != control.
end())
1708 delete m_seekBarThumb;
1715 if (!m_seekBarThumb || !m_progressDrawable)
1718 if (
const QStyleOptionSlider *styleOption =
1719 qstyleoption_cast<const QStyleOptionSlider *>(
option)) {
1720 double factor = double(styleOption->sliderPosition - styleOption->minimum)
1721 / double(styleOption->maximum - styleOption->minimum);
1752 m_progressDrawable->draw(
p, ©);
1756 m_seekBarThumb->draw(
p, ©);
1763 const QSize &contentsSize,
1767 if (!m_seekBarThumb)
1779 const QStyleOptionSlider *styleOption =
1780 qstyleoption_cast<const QStyleOptionSlider *>(
option);
1782 if (m_seekBarThumb && sc == SC_SliderHandle && styleOption) {
1788 double factor = double(styleOption->sliderPosition - styleOption->minimum)
1789 / (styleOption->maximum - styleOption->minimum);
1792 r.setY(
r.y() +
pos);
1795 r.setX(
r.x() +
pos);
1797 r.setSize(drawable->
size());
small capitals from c petite p scientific f u
small capitals from c petite p scientific i
[1]
virtual AndroidDrawableType type() const
Android9PatchDrawable(const QVariantMap &drawable, ItemType itemType)
virtual void draw(QPainter *painter, const QStyleOption *opt) const
virtual void setFactor(double factor, Qt::Orientation orientation)
virtual AndroidDrawableType type() const
virtual void draw(QPainter *painter, const QStyleOption *opt) const
AndroidClipDrawable(const QVariantMap &drawable, ItemType itemType)
virtual void draw(QPainter *painter, const QStyleOption *opt) const
virtual AndroidDrawableType type() const
AndroidColorDrawable(const QVariantMap &drawable, ItemType itemType)
virtual QSize size(const QStyleOption *option)
virtual QMargins padding()
virtual QRect subElementRect(SubElement subElement, const QStyleOption *option, const QWidget *widget=nullptr) const
virtual ~AndroidControl()
virtual void drawControl(const QStyleOption *opt, QPainter *p, const QWidget *w)
AndroidControl(const QVariantMap &control, ItemType itemType)
virtual const AndroidDrawable * backgroundDrawable() const
virtual QRect subControlRect(const QStyleOptionComplex *option, SubControl sc, const QWidget *widget=nullptr) const
virtual QSize sizeFromContents(const QStyleOption *opt, const QSize &contentsSize, const QWidget *w) const
const QMargins & padding() const
virtual QSize size() const
virtual ~AndroidDrawable()
static AndroidDrawable * fromMap(const QVariantMap &drawable, ItemType itemType)
static QMargins extractMargins(const QVariantMap &value)
virtual AndroidDrawableType type() const =0
AndroidDrawable(const QVariantMap &drawable, ItemType itemType)
virtual void setPaddingLeftToSizeWidth()
virtual void initPadding(const QVariantMap &drawable)
virtual void draw(QPainter *painter, const QStyleOption *opt) const =0
virtual void draw(QPainter *painter, const QStyleOption *opt) const
virtual AndroidDrawableType type() const
AndroidGradientDrawable(const QVariantMap &drawable, ItemType itemType)
virtual QSize size() const
AndroidImageDrawable(const QVariantMap &drawable, ItemType itemType)
virtual AndroidDrawableType type() const
virtual void draw(QPainter *painter, const QStyleOption *opt) const
virtual AndroidDrawableType type() const
AndroidLayerDrawable(const QVariantMap &drawable, QAndroidStyle::ItemType itemType)
virtual void setFactor(int id, double factor, Qt::Orientation orientation)
virtual void draw(QPainter *painter, const QStyleOption *opt) const
AndroidDrawable * layer(int id) const
AndroidDrawable * m_indeterminateDrawable
QSize sizeFromContents(const QStyleOption *opt, const QSize &contentsSize, const QWidget *w) const
AndroidDrawable * m_progressDrawable
virtual void drawControl(const QStyleOption *option, QPainter *p, const QWidget *w)
virtual QRect subElementRect(SubElement subElement, const QStyleOption *option, const QWidget *widget=nullptr) const
int m_secondaryProgress_id
virtual ~AndroidProgressBarControl()
AndroidProgressBarControl(const QVariantMap &control, ItemType itemType)
virtual ~AndroidSeekBarControl()
virtual void drawControl(const QStyleOption *option, QPainter *p, const QWidget *w)
QRect subControlRect(const QStyleOptionComplex *option, SubControl sc, const QWidget *widget=nullptr) const
QSize sizeFromContents(const QStyleOption *opt, const QSize &contentsSize, const QWidget *w) const
AndroidSeekBarControl(const QVariantMap &control, ItemType itemType)
virtual QRect subControlRect(const QStyleOptionComplex *option, SubControl sc, const QWidget *widget=nullptr) const
AndroidSpinnerControl(const QVariantMap &control, ItemType itemType)
const AndroidDrawable * bestAndroidStateMatch(const QStyleOption *opt) const
virtual void setPaddingLeftToSizeWidth()
static int extractState(const QVariantMap &value)
AndroidStateDrawable(const QVariantMap &drawable, ItemType itemType)
virtual void draw(QPainter *painter, const QStyleOption *opt) const
virtual AndroidDrawableType type() const
QSize sizeImage(const QStyleOption *opt) const
virtual QSize sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w=nullptr) const
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const
virtual QRect subElementRect(SubElement subElement, const QStyleOption *option, const QWidget *widget=nullptr) const
virtual SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget=nullptr) const
virtual void drawControl(QStyle::ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w=nullptr) const
void polish(QWidget *widget)
virtual QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt=nullptr, const QWidget *widget=nullptr) const
virtual QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const
virtual QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget=nullptr) const
int styleHint(StyleHint hint, const QStyleOption *option=nullptr, const QWidget *widget=nullptr, QStyleHintReturn *returnData=nullptr) const
virtual void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w=nullptr) const
virtual QPalette standardPalette() const
virtual void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget=nullptr) const
void unpolish(QWidget *widget)
static void setFont(const QFont &, const char *className=nullptr)
The QBrush class defines the fill pattern of shapes drawn by QPainter.
const QColor & color() const
The QByteArray class provides an array of bytes.
The QColor class provides colors based on RGB, HSV or CMYK values.
void setRgba(QRgb rgba) noexcept
void getHsv(int *h, int *s, int *v, int *a=nullptr) const
bool isValid() const noexcept
The QFileInfo class provides system-independent file information.
The QFontMetrics class provides font metrics information.
QRect boundingRect(QChar) const
QSize size(int flags, const QString &str, int tabstops=0, int *tabarray=nullptr) const
int midLineWidth
the width of the mid-line
int lineWidth
the line width
void setColorAt(qreal pos, const QColor &color)
static QPlatformNativeInterface * platformNativeInterface()
const_iterator constEnd() const noexcept
iterator find(const Key &key)
const_iterator constBegin() const noexcept
friend class const_iterator
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
The QJsonObject::const_iterator class provides an STL-style const iterator for QJsonObject.
The QJsonObject class encapsulates a JSON object.
The QJsonValue class encapsulates a value in JSON.
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
T value(const Key &key, const T &defaultValue=T()) const
iterator find(const Key &key)
The QMargins class defines the four margins of a rectangle.
constexpr int bottom() const noexcept
constexpr int left() const noexcept
constexpr int right() const noexcept
constexpr int top() const noexcept
The QPainter class performs low-level painting on widgets and other paint devices.
RenderHints renderHints() const
void setPen(const QColor &color)
const QBrush & brush() const
void drawPixmap(const QRectF &targetRect, const QPixmap &pixmap, const QRectF &sourceRect)
void setBrush(const QBrush &brush)
void setRenderHints(RenderHints hints, bool on=true)
void fillRect(const QRectF &, const QBrush &)
void drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode=Qt::AbsoluteSize)
The QPalette class contains color groups for each widget state.
const QBrush & windowText() const
const QBrush & window() const
The QPen class defines how a QPainter should draw lines and outlines of shapes.
static bool find(const QString &key, QPixmap *pixmap)
static bool insert(const QString &key, const QPixmap &pixmap)
The QPixmap class is an off-screen image representation that can be used as a paint device.
bool load(const QString &fileName, const char *format=nullptr, Qt::ImageConversionFlags flags=Qt::AutoColor)
The QPoint class defines a point in the plane using integer precision.
The QRectF class defines a finite rectangle in the plane using floating point precision.
The QRect class defines a rectangle in the plane using integer precision.
constexpr void adjust(int x1, int y1, int x2, int y2) noexcept
constexpr int height() const noexcept
constexpr bool isNull() const noexcept
constexpr int bottom() const noexcept
constexpr void setSize(const QSize &s) noexcept
constexpr QRect adjusted(int x1, int y1, int x2, int y2) const noexcept
constexpr int top() const noexcept
constexpr QPoint topRight() const noexcept
constexpr void moveLeft(int pos) noexcept
constexpr int left() const noexcept
constexpr int x() const noexcept
constexpr void setWidth(int w) noexcept
constexpr QSize size() const noexcept
constexpr void translate(int dx, int dy) noexcept
constexpr int width() const noexcept
QRect united(const QRect &other) const noexcept
constexpr int y() const noexcept
constexpr void setHeight(int h) noexcept
constexpr int right() const noexcept
The QRegion class specifies a clip region for a painter.
The QSize class defines the size of a two-dimensional object using integer point precision.
constexpr int height() const noexcept
constexpr int width() const noexcept
constexpr int & rheight() noexcept
constexpr QSize expandedTo(const QSize &) const noexcept
constexpr void setWidth(int w) noexcept
constexpr int & rwidth() noexcept
constexpr bool isNull() const noexcept
constexpr bool isEmpty() const noexcept
constexpr void setHeight(int h) noexcept
The QString class provides a Unicode character string.
the exposed rectangle, in item coordinates
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
@ PE_IndicatorItemViewItemCheck
@ SC_ComboBoxListBoxPopup
an OR combination of the tool button's features
the palette that should be used when painting the control
the background color on which the focus rectangle is being drawn
a bitwise OR of the features that describe this frame.
The QStyleOption class stores the parameters used by QStyle functions.
Qt::LayoutDirection direction
a bitwise OR of the features that describe this button
The QVariant class acts like a union for the most common Qt data types.
double toDouble(bool *ok=nullptr) const
QList< QVariant > toList() const
QMap< QString, QVariant > toMap() const
int toInt(bool *ok=nullptr) const
QByteArray toByteArray() const
qDeleteAll(list.begin(), list.end())
void drawControl(ControlElement element, QPainter *painter, const QWidget *widget, const QRect &rect, const QColorGroup &colorGroup, SFlags how=Style_Default, const QStyleOption &option=QStyleOption::Default) const
[1]
drawPrimitive(PE_IndicatorCheckBox, &subopt, p, widget)
QStyleOptionButton subopt
[2]
const QStyleOptionButton * btn
[3]
for(n=0;n< outline->n_points;n++)
GeneratorWrapper< std::vector< T > > chunk(size_t size, GeneratorWrapper< T > &&generator)
typename C::const_iterator const_iterator
void qDrawShadePanel(QPainter *p, int x, int y, int w, int h, const QPalette &pal, bool sunken, int lineWidth, const QBrush *fill)
void qDrawShadeLine(QPainter *p, int x1, int y1, int x2, int y2, const QPalette &pal, bool sunken, int lineWidth, int midLineWidth)
void qDrawShadeRect(QPainter *p, int x, int y, int w, int h, const QPalette &pal, bool sunken, int lineWidth, int midLineWidth, const QBrush *fill)
void qDrawPlainRect(QPainter *p, int x, int y, int w, int h, const QColor &c, int lineWidth, const QBrush *fill)
EGLOutputLayerEXT EGLint EGLAttrib value
const EGLAttrib EGLOutputLayerEXT * layers
GLenum GLsizei GLsizei GLint * values
[16]
GLsizei const GLfloat * v
[13]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLfloat GLfloat y0
GLsizei const GLint * box
GLfloat GLfloat GLfloat GLfloat h
QT_BEGIN_NAMESPACE typedef unsigned int QRgb
value toMap().value(key)
[3]