37 static const ShapeNames result =
38 {{Qt::ArrowCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Arrow")},
39 {Qt::UpArrowCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Up Arrow")},
40 {Qt::CrossCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Cross")},
41 {Qt::WaitCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Wait")},
42 {Qt::IBeamCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"IBeam")},
43 {Qt::SizeVerCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Size Vertical")},
44 {Qt::SizeHorCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Size Horizontal")},
45 {Qt::SizeFDiagCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Size Backslash")},
46 {Qt::SizeBDiagCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Size Slash")},
47 {Qt::SizeAllCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Size All")},
48 {Qt::BlankCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Blank")},
49 {Qt::SplitVCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Split Vertical")},
50 {Qt::SplitHCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Split Horizontal")},
51 {Qt::PointingHandCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Pointing Hand")},
52 {Qt::ForbiddenCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Forbidden")},
53 {Qt::OpenHandCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Open Hand")},
54 {Qt::ClosedHandCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Closed Hand")},
55 {Qt::WhatsThisCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"What's This")},
56 {Qt::BusyCursor, QT_TRANSLATE_NOOP(
"QtCursorDatabase",
"Busy")}};
164 if constexpr (QOperatingSystemVersion::currentType() == QOperatingSystemVersion::Windows) {
165 appendCursor(Qt::ClosedHandCursor, getWindowsCursorIcon(
"closedhandcursor"_L1));
166 appendCursor(Qt::OpenHandCursor, getWindowsCursorIcon(
"openhandcursor"_L1));
167 appendCursor(Qt::SplitHCursor, getWindowsCursorIcon(
"splithcursor"_L1));
168 appendCursor(Qt::SplitVCursor, getWindowsCursorIcon(
"splitvcursor"_L1));
171 if constexpr (QOperatingSystemVersion::currentType() == QOperatingSystemVersion::MacOS) {
172 appendCursor(Qt::BusyCursor, getCocoaCursorIcon(
"spincursor.png"_L1));
173 appendCursor(Qt::WaitCursor, getCocoaCursorIcon(
"waitcursor.png"_L1));
176 appendCursor(Qt::BlankCursor, QIcon{});
178 for (
const auto &cursorResource : cursorResources) {
179 if (!hasCursor(cursorResource.first))
180 appendCursor(cursorResource.first, getResourceCursorIcon(cursorResource.second));
376 m_checkBox(
new QCheckBox(
this)),
379 auto *lt =
new QHBoxLayout;
380 if (QApplication::layoutDirection() == Qt::LeftToRight)
381 lt->setContentsMargins(4, 0, 0, 0);
383 lt->setContentsMargins(0, 0, 4, 0);
384 lt->addWidget(m_checkBox);
386 connect(m_checkBox, &QAbstractButton::toggled,
this, &QtBoolEdit::toggled);
387 setFocusProxy(m_checkBox);
388 m_checkBox->setText(tr(
"True"));
456 QPixmap result = createEmptyPixmap(size, scale);
457 QPainter painter(&result);
458 paint(&painter, QRect(0, 0, size.width(), size.height()), mode, state);