5#include <QtWidgets/private/qtwidgetsglobal_p.h>
17#if QT_CONFIG(lineedit)
25#if QT_CONFIG(shortcut)
26# include "qshortcut.h"
31#if defined(Q_OS_MACOS)
33#include <QtGui/private/qcoregraphics_p.h>
34#elif QT_CONFIG(style_windowsvista)
39#include "private/qdialog_p.h"
69 const int MaxIterations = 100;
72 for (
int i = 0;
i < MaxIterations; ++
i) {
78 if (candidate != ancestor && ancestor->
isAncestorOf(candidate))
101 const char property[13];
104 {
"QAbstractButton",
"checked" },
105 {
"QAbstractSlider",
"value" },
106 {
"QComboBox",
"currentIndex" },
107 {
"QDateTimeEdit",
"dateTime" },
108 {
"QLineEdit",
"text" },
109 {
"QListWidget",
"currentRow" },
110 {
"QSpinBox",
"value" },
122 case 0:
return SIGNAL(toggled(
bool));
123 case 1:
return SIGNAL(valueChanged(
int));
124 case 2:
return SIGNAL(currentIndexChanged(
int));
127 case 5:
return SIGNAL(currentRowChanged(
int));
128 case 6:
return SIGNAL(valueChanged(
int));
131 Q_UNREACHABLE_RETURN(
nullptr);
169 const char *
property,
const char *changedSignal)
171 changedSignal(changedSignal)
173 if (
name.endsWith(u
'*')) {
190 for (
int i = 0;
i < propertyCount; ++
i) {
262#if QT_CONFIG(style_windowsvista)
264 bool vistaDisabled()
const;
280 titleLabel =
new QLabel(
this);
283 subTitleLabel =
new QLabel(
this);
287 logoLabel =
new QLabel(
this);
304 layout->
addWidget(titleLabel, 2, 1, 1, 2);
306 layout->
addWidget(logoLabel, 1, 5, 5, 1);
309#if QT_CONFIG(style_windowsvista)
310bool QWizardHeader::vistaDisabled()
const
312 bool styleDisabled =
false;
318 styleDisabled =
v.
isValid() &&
v.toBool();
320 return styleDisabled;
338 int minColumnWidth0 = modern ?
info.topLevelMarginLeft +
info.topLevelMarginRight : 0;
339 int minColumnWidth1 = modern ?
info.topLevelMarginLeft +
info.topLevelMarginRight + 1
349 subTitleLabel->
setText(
"Pq\nPq"_L1);
351 subTitleLabel->
setText(subTitle);
354 bannerPixmap = banner;
359 if (bannerPixmap.
isNull()) {
364 int delta = candidateSubTitleWidth >> 1;
367 <= desiredSubTitleHeight)
368 candidateSubTitleWidth -= delta;
372 subTitleLabel->
setMinimumSize(candidateSubTitleWidth, desiredSubTitleHeight);
423 if (m_sideWidget ==
widget)
427 m_sideWidget->
hide();
477 emit q->completeChanged();
489#if QT_CONFIG(style_windowsvista)
493 , wizardPrivate(wizardPrivate) {}
534#if QT_CONFIG(style_windowsvista)
535 bool vistaDisabled()
const;
536 bool handleAeroStyleChange();
546 static QPixmap findDefaultBackgroundPixmap();
598#if QT_CONFIG(style_windowsvista)
599 QVistaHelper *vistaHelper =
nullptr;
600# if QT_CONFIG(shortcut)
603 bool vistaInitPending =
true;
604 bool vistaDirty =
true;
605 bool vistaStateChanged =
false;
606 bool inHandleAeroStyleChange =
false;
616#if !QT_CONFIG(style_windowsvista)
622 return macStyle ? QWizard::tr(
"Go Back") : QWizard::tr(
"< &Back");
625 return QWizard::tr(
"Continue");
628 ? QWizard::tr(
"&Next") : QWizard::tr(
"&Next >");
630 return QWizard::tr(
"Commit");
632 return macStyle ? QWizard::tr(
"Done") : QWizard::tr(
"&Finish");
634 return QWizard::tr(
"Cancel");
636 return macStyle ? QWizard::tr(
"Help") : QWizard::tr(
"&Help");
656#if QT_CONFIG(style_windowsvista)
657 vistaHelper =
new QVistaHelper(
q);
692 q->currentPage()->hide();
699 page->d_func()->initialized =
false;
702 emit q->currentIdChanged(-1);
711 const auto idx =
it.key();
712 const auto page =
it.value()->d_func();
715 page->initialized =
false;
736 myField.
page,
SLOT(_q_maybeEmitCompleteChanged()));
750 field.
page,
SLOT(_q_maybeEmitCompleteChanged()));
769 q->cleanupPage(oldId);
770 oldPage->d_func()->initialized =
false;
783 if (!newPage->d_func()->initialized) {
784 newPage->d_func()->initialized =
true;
814 candidate = nextOrFinishButton;
815 }
else if (newPage) {
819 candidate = nextOrFinishButton;
842 return SLOT(accept());
844 return SLOT(reject());
846 return SIGNAL(helpRequested());
875 info.hspacing = (layoutHorizontalSpacing == -1)
877 : layoutHorizontalSpacing;
879 info.buttonSpacing = (layoutHorizontalSpacing == -1)
881 : layoutHorizontalSpacing;
884 info.buttonSpacing = 12;
900 titleText =
page->title();
901 subTitleText =
page->subTitle();
910 && !watermarkPixmap.
isNull();
927 if (
item->layout()) {
928 item->layout()->setParent(
nullptr);
946 int deltaMarginLeft =
info.topLevelMarginLeft -
info.childMarginLeft;
947 int deltaMarginRight =
info.topLevelMarginRight -
info.childMarginRight;
948 int deltaMarginTop =
info.topLevelMarginTop -
info.childMarginTop;
949 int deltaMarginBottom =
info.topLevelMarginBottom -
info.childMarginBottom;
950 int deltaVSpacing =
info.topLevelMarginBottom -
info.vspacing;
956 }
else if (
info.watermark ||
info.sideWidget) {
961 int pageColumn =
qMin(1, numColumns - 1);
973 deltaMarginRight, deltaMarginBottom);
975 info.topLevelMarginRight,
info.topLevelMarginBottom);
978 info.topLevelMarginRight,
info.topLevelMarginBottom);
996 int watermarkStartRow =
row;
1008 QFont titleFont =
q->font();
1015 titleFont =
QFont(
"Segoe UI"_L1, 12);
1022 const int aeroTitleIndent = 25;
1056 if (
info.subTitle) {
1062 info.childMarginRight , 0);
1082 }
else if (classic) {
1089 int leftMargin = 18;
1107 const bool wasSemiTransparent =
1114 if (wasSemiTransparent)
1117 bool baseBackground = (modern && !
info.header);
1144 int watermarkEndRow =
row;
1153 int buttonStartColumn =
info.extension ? 1 : 0;
1154 int buttonNumColumns =
info.extension ? 1 : numColumns;
1156 if (classic || modern) {
1167 if (
info.watermark ||
info.sideWidget) {
1169 watermarkEndRow =
row;
1171 watermarkEndRow - watermarkStartRow, 1);
1209 bool expandPage = !
page->layout();
1227 if (
info.watermark ||
info.sideWidget) {
1229 if (
info.watermark) {
1243 if (
info.subTitle) {
1281 int extraHeight = 0;
1282#if QT_CONFIG(style_windowsvista)
1284 extraHeight = vistaHelper->titleBarSize() + vistaHelper->topOffset(
q);
1292 if (
info.watermark && !
info.sideWidget) {
1316 if (
q->currentPage()) {
1331 return u
"qt_wizard_commit"_s;
1333 return u
"qt_wizard_finish"_s;
1335 return u
"qt_wizard_cancel"_s;
1350 Q_UNREACHABLE_RETURN(
QString());
1397 if (
q->currentPage() && (
q->currentPage()->d_func()->buttonCustomTexts.contains(
i)))
1398 btns[
i]->
setText(
q->currentPage()->d_func()->buttonCustomTexts.value(
i));
1408#if QT_CONFIG(shortcut) && QT_CONFIG(style_windowsvista)
1410 if (vistaNextShortcut.isNull()) {
1416 delete vistaNextShortcut;
1431 const int ArraySize = 12;
1472 for (
int i = 0;
i <
size; ++
i) {
1505 q->updateGeometry();
1512#if QT_CONFIG(style_windowsvista)
1513bool QWizardPrivate::vistaDisabled()
const
1516 const QVariant v =
q->property(
"_q_wizard_vista_off");
1520bool QWizardPrivate::handleAeroStyleChange()
1524 if (inHandleAeroStyleChange)
1531 if (
isWindow && (!
q->windowHandle() || !
q->windowHandle()->handle()))
1533 inHandleAeroStyleChange =
true;
1535 vistaHelper->disconnectBackButton();
1536 q->removeEventFilter(vistaHelper);
1538 bool vistaMargins =
false;
1541 const int topOffset = vistaHelper->topOffset(
q);
1542 const int topPadding = vistaHelper->topPadding(
q);
1544 vistaHelper->setDWMTitleBar(QVistaHelper::ExtendedTitleBar);
1545 q->installEventFilter(vistaHelper);
1547 q->setMouseTracking(
true);
1549 vistaHelper->backButton()->move(
1551 -
qMin(topOffset, topPadding + 1));
1552 vistaMargins =
true;
1553 vistaHelper->backButton()->show();
1555 vistaHelper->setTitleBarIconAndCaptionVisible(
false);
1558 vistaHelper->backButton()->show();
1560 q->setMouseTracking(
true);
1565 vistaHelper->hideBackButton();
1567 vistaHelper->setTitleBarIconAndCaptionVisible(
true);
1572 vistaHelper->updateCustomMargins(vistaMargins);
1574 inHandleAeroStyleChange =
false;
1581#if QT_CONFIG(style_windowsvista)
1592 q->setUpdatesEnabled(
false);
1602 q->setUpdatesEnabled(
true);
1625 bool complete =
page &&
page->isComplete();
1637 bool commitPage =
page &&
page->isCommitPage();
1638 btn.back->setVisible(backButtonVisible);
1651 if (
QPushButton *nextPush = qobject_cast<QPushButton *>(
btn.next))
1652 nextPush->setDefault(
canContinue && useDefault && !commitPage);
1653 if (
QPushButton *commitPush = qobject_cast<QPushButton *>(
btn.commit))
1654 commitPush->setDefault(
canContinue && useDefault && commitPage);
1655 if (
QPushButton *finishPush = qobject_cast<QPushButton *>(
btn.finish))
1656 finishPush->setDefault(!
canContinue && useDefault);
1658#if QT_CONFIG(style_windowsvista)
1660 vistaHelper->backButton()->setEnabled(
btn.back->isEnabled());
1661 vistaHelper->backButton()->setVisible(backButtonVisible);
1662 btn.back->setVisible(
false);
1671 int destroyed_index = -1;
1675 if (field.
object ==
object) {
1683 if (destroyed_index != -1) {
1687 if (
index > destroyed_index) {
1703 it.value()->setStyle(style);
1707QPixmap QWizardPrivate::findDefaultBackgroundPixmap()
1709 auto *keyboardAssistantURL = [NSWorkspace.sharedWorkspace
1710 URLForApplicationWithBundleIdentifier:
@"com.apple.KeyboardSetupAssistant"];
1711 auto *keyboardAssistantBundle = [NSBundle bundleWithURL:keyboardAssistantURL];
1712 auto *assistantBackground = [keyboardAssistantBundle imageForResource:
@"Background"];
1713 auto size = QSizeF::fromCGSize(assistantBackground.size);
1714 static const QSizeF expectedSize(242, 414);
1715 if (
size == expectedSize)
1716 return qt_mac_toQPixmap(assistantBackground,
size);
1722#if QT_CONFIG(style_windowsvista)
1725 if (wizardPrivate->isVistaThemeEnabled()) {
1726 int leftMargin, topMargin, rightMargin, bottomMargin;
1727 wizardPrivate->buttonLayout->getContentsMargins(
1728 &leftMargin, &topMargin, &rightMargin, &bottomMargin);
1729 const int buttonLayoutTop = wizardPrivate->buttonLayout->contentsRect().top() - topMargin;
2138 delete d->buttonLayout;
2153 if (!
d->pageMap.isEmpty())
2154 theid =
d->pageMap.lastKey() + 1;
2174 qWarning(
"QWizard::setPage: Cannot insert null page");
2179 qWarning(
"QWizard::setPage: Cannot insert page with ID -1");
2184 qWarning(
"QWizard::setPage: Page with duplicate ID %d ignored", theid);
2188 page->setParent(
d->pageFrame);
2191 for (
const auto &
field : std::as_const(pendingFields))
2193 pendingFields.
clear();
2197 d->pageMap.insert(theid,
page);
2198 page->d_func()->wizard =
this;
2200 int n =
d->pageVBoxLayout->count();
2203 bool pageVBoxLayoutEnabled =
d->pageVBoxLayout->isEnabled();
2204 d->pageVBoxLayout->setEnabled(
false);
2206 d->pageVBoxLayout->insertWidget(
n - 1,
page);
2210 d->pageVBoxLayout->setEnabled(pageVBoxLayoutEnabled);
2212 if (!
d->startSetByUser &&
d->pageMap.constBegin().key() == theid)
2232 if (
d->pageMap.size() > 0) {
2233 if (
d->start ==
id) {
2234 const int firstId =
d->pageMap.constBegin().key();
2235 if (firstId ==
id) {
2236 if (
d->pageMap.size() > 1)
2237 d->start = (++
d->pageMap.constBegin()).
key();
2243 d->startSetByUser =
false;
2247 if (
d->pageMap.contains(
id))
2250 if (!
d->history.contains(
id)) {
2252 removedPage =
d->pageMap.take(
id);
2253 d->updateCurrentPage();
2254 }
else if (
id !=
d->current) {
2256 removedPage =
d->pageMap.take(
id);
2257 d->history.removeOne(
id);
2258 d->_q_updateButtonStates();
2259 }
else if (
d->history.size() == 1) {
2262 removedPage =
d->pageMap.take(
id);
2263 if (
d->pageMap.isEmpty())
2264 d->updateCurrentPage();
2270 removedPage =
d->pageMap.take(
id);
2271 d->updateCurrentPage();
2275 if (removedPage->d_func()->initialized) {
2277 removedPage->d_func()->initialized =
false;
2280 d->pageVBoxLayout->removeWidget(removedPage);
2282 for (
int i =
d->fields.size() - 1;
i >= 0; --
i) {
2283 if (
d->fields.at(
i).page == removedPage) {
2284 removedPage->d_func()->pendingFields +=
d->fields.at(
i);
2285 d->removeFieldAt(
i);
2302 return d->pageMap.value(theid);
2318 return d->history.contains(theid);
2342 return d->pageMap.keys();
2358 int newStart = theid;
2360 newStart =
d->pageMap.size() ?
d->pageMap.constBegin().key() : -1;
2362 if (
d->start == newStart) {
2363 d->startSetByUser = theid != -1;
2368 qWarning(
"QWizard::setStartId: Invalid page ID %d", newStart);
2371 d->start = newStart;
2372 d->startSetByUser = theid != -1;
2392 return page(
d->current);
2424 int index =
d->fieldIndexMap.value(
name, -1);
2432 qWarning(
"QWizard::setField: Couldn't write to property '%s'",
2447 int index =
d->fieldIndexMap.value(
name, -1);
2454 return field.object->property(
field.property);
2473 const bool styleChange =
style !=
d->wizStyle;
2475#if QT_CONFIG(style_windowsvista)
2476 const bool aeroStyleChange =
2478 d->vistaStateChanged =
false;
2479 d->vistaInitPending =
false;
2487 d->disableUpdates();
2489 d->updateButtonTexts();
2490#if QT_CONFIG(style_windowsvista)
2491 if (aeroStyleChange) {
2501#if QT_CONFIG(style_windowsvista)
2503 if (aeroStyleChange && !
d->handleAeroStyleChange() &&
d->wizStyle ==
AeroStyle)
2504 d->vistaInitPending =
true;
2524 if (!(
d->opts &
option) != !on)
2537 return (
d->opts &
option) != 0;
2558 WizardOptions changed = (
options ^
d->opts);
2562 d->disableUpdates();
2566 d->cleanupPagesNotInHistory();
2571 d->updateButtonLayout();
2575 d->_q_updateButtonStates();
2609 if (!
d->ensureButton(which))
2612 d->buttonCustomTexts.insert(which,
text);
2615 d->btns[which]->setText(
text);
2634 if (!
d->ensureButton(which))
2637 if (
d->buttonCustomTexts.contains(which))
2638 return d->buttonCustomTexts.value(which);
2644 return d->btns[which]->text();
2669 for (
int i = 0;
i <
layout.size(); ++
i) {
2674 if (!
d->ensureButton(button1))
2678 for (
int j = 0;
j <
i; ++
j) {
2681 qWarning(
"QWizard::setButtonLayout: Duplicate button in layout");
2687 d->buttonsHaveCustomLayout =
true;
2688 d->buttonsCustomLayout =
layout;
2689 d->updateButtonLayout();
2717 d->buttonCustomTexts.insert(which,
button->
text());
2718 d->connectButton(which);
2720 d->buttonCustomTexts.remove(which);
2721 d->ensureButton(which);
2724 d->updateButtonLayout();
2735#if QT_CONFIG(style_windowsvista)
2737 return d->vistaHelper->backButton();
2739 if (!
d->ensureButton(which))
2741 return d->btns[which];
2783 return d->subTitleFmt;
2802 d->defaultPixmaps[which] =
pixmap;
2803 d->updatePixmap(which);
2822 return d->defaultPixmaps[which];
2851 const char *changedSignal)
2854 for (
int i =
d->defaultPropertyTable.size() - 1;
i >= 0; --
i) {
2856 d->defaultPropertyTable.remove(
i);
2892 if (
d->watermarkLabel) {
2893 d->watermarkLabel->setSideWidget(
widget);
2909 return d->sideWidget;
2919 if (
d->current == -1)
2932 QSize extra(500, 360);
2933 if (
d->wizStyle ==
MacStyle &&
d->current != -1) {
2949 return result.expandedTo(extra);
3034 int n =
d->history.size() - 2;
3051 if (
d->current == -1)
3089 if (
d->current == -1)
3098 if (
id < 0 ||
Q_UNLIKELY(!
d->pageMap.contains(
id))) {
3099 qWarning(
"QWizard::setCurrentId: No such page: %d",
id);
3115 d->disableUpdates();
3133#if QT_CONFIG(style_windowsvista)
3135 d->vistaInitPending =
false;
3137 d->handleAeroStyleChange();
3139 else if (
d->isVistaThemeEnabled()) {
3143 ?
width() -
d->vistaHelper->backButton()->sizeHint().width()
3146 d->vistaHelper->backButton()->move(buttonLeft,
3147 d->vistaHelper->backButton()->y());
3150 d->vistaHelper->mouseEvent(
event);
3162 int heightOffset = 0;
3163#if QT_CONFIG(style_windowsvista)
3164 if (
d->isVistaThemeEnabled()) {
3165 heightOffset =
d->vistaHelper->topOffset(
this);
3166 heightOffset +=
d->vistaHelper->titleBarSize();
3169 d->antiFlickerWidget->resize(
event->size().width(),
event->size().height() - heightOffset);
3170#if QT_CONFIG(style_windowsvista)
3171 if (
d->isVistaThemeEnabled())
3172 d->vistaHelper->resizeEvent(
event);
3185 if (backgroundPixmap.
isNull())
3191#if QT_CONFIG(style_windowsvista)
3192 else if (
d->isVistaThemeEnabled()) {
3193 d->vistaHelper->paintEvent(
event);
3200#if defined(Q_OS_WIN) || defined(Q_QDOC)
3206#if QT_CONFIG(style_windowsvista)
3208 if (
d->isVistaThemeEnabled() && eventType ==
"windows_generic_MSG") {
3210 const bool winEventResult =
d->vistaHelper->handleWinEvent(windowsMessage,
result);
3211 if (
d->vistaDirty) {
3214 if (windowsMessage->message == WM_GETICON) {
3215 d->vistaStateChanged =
true;
3216 d->vistaDirty =
false;
3220 return winEventResult;
3268 page->initializePage();
3286 page->cleanupPage();
3311 return page->validatePage();
3334 return page->nextId();
3417 connect(
this,
SIGNAL(completeChanged()),
this,
SLOT(_q_updateCachedCompleteState()));
3445 if (
d->wizard &&
d->wizard->currentPage() ==
this)
3446 d->wizard->d_func()->updateLayout();
3478 if (
d->wizard &&
d->wizard->currentPage() ==
this)
3479 d->wizard->d_func()->updateLayout();
3506 if (
d->wizard &&
d->wizard->currentPage() ==
this)
3507 d->wizard->d_func()->updatePixmap(which);
3571 for (
const auto &
field : fields) {
3572 if (
field.page ==
this)
3622 const auto end = wizardFields.
crend();
3630#if QT_CONFIG(lineedit)
3636#if QT_CONFIG(spinbox)
3662 d->explicitlyFinal = finalPage;
3665 wizard->d_func()->updateCurrentPage();
3683 if (
d->explicitlyFinal)
3712 d->commit = commitPage;
3715 wizard->d_func()->updateCurrentPage();
3740 d->buttonCustomTexts.insert(which,
text);
3742 wizard()->d_func()->btns[which]->setText(
text);
3762 if (
d->buttonCustomTexts.contains(which))
3763 return d->buttonCustomTexts.value(which);
3794 bool foundCurrentPage =
false;
3797 QWizardPrivate::PageMap::const_iterator
i = pageMap.
constBegin();
3798 QWizardPrivate::PageMap::const_iterator
end = pageMap.
constEnd();
3800 for (;
i !=
end; ++
i) {
3801 if (
i.value() ==
this) {
3802 foundCurrentPage =
true;
3803 }
else if (foundCurrentPage) {
3859 return d->wizard->field(
name);
3909 const char *changedSignal)
3914 d->wizard->d_func()->addField(
field);
3916 d->pendingFields +=
field;
3934#include "moc_qwizard.cpp"
The QAbstractSpinBox class provides a spinbox and a line edit to display values.
bool hasAcceptableInput() const
static QStyle * style()
Returns the application's style object.
static QPalette palette()
Returns the current application palette.
void invalidate() override
Resets cached information.
int count() const override
\reimp
void addWidget(QWidget *, int stretch=0, Qt::Alignment alignment=Qt::Alignment())
Adds widget to the end of this box layout, with a stretch factor of stretch and alignment alignment.
QLayoutItem * takeAt(int) override
\reimp
void addItem(QLayoutItem *) override
\reimp
void addSpacing(int size)
Adds a non-stretchable space (a QSpacerItem) with size size to the end of this box layout.
void addStretch(int stretch=0)
Adds a stretchable space (a QSpacerItem) with zero minimum size and stretch factor stretch to the end...
QLayoutItem * itemAt(int) const override
\reimp
void insertWidget(int index, QWidget *widget, int stretch=0, Qt::Alignment alignment=Qt::Alignment())
Inserts widget at position index, with stretch factor stretch and alignment alignment.
void setSpacing(int spacing) override
Reimplements QLayout::setSpacing().
const QColor & color() const
Returns the brush color.
bool isEmpty() const noexcept
Returns true if the byte array has size 0; otherwise returns false.
The QColor class provides colors based on RGB, HSV or CMYK values.
int alpha() const noexcept
Returns the alpha color component of this color.
void setAlpha(int alpha)
Sets the alpha of this color to alpha.
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
\inmodule QtCore\reentrant
The QDialog class is the base class of dialog windows.
void resizeEvent(QResizeEvent *) override
\reimp
virtual void done(int)
Closes the dialog and sets its result code to r.
void setPointSize(int)
Sets the point size to pointSize.
int pointSize() const
Returns the point size of the font.
void setBold(bool)
If enable is true sets the font's weight to \l{Weight}{QFont::Bold}; otherwise sets the weight to \l{...
The QFrame class is the base class of widgets that can have a frame.
void setFrameStyle(int)
Sets the frame style to style.
void setMidLineWidth(int)
The QGridLayout class lays out widgets in a grid.
void setHorizontalSpacing(int spacing)
void addWidget(QWidget *w)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void addLayout(QLayout *, int row, int column, Qt::Alignment=Qt::Alignment())
Places the layout at position (row, column) in the grid.
void setRowMinimumHeight(int row, int minSize)
Sets the minimum height of row row to minSize pixels.
int count() const override
\reimp
void setColumnMinimumWidth(int column, int minSize)
Sets the minimum width of column column to minSize pixels.
void setSpacing(int spacing) override
This function sets both the vertical and horizontal spacing to spacing.
int rowCount() const
Returns the number of rows in this grid.
void setVerticalSpacing(int spacing)
void setRowStretch(int row, int stretch)
Sets the stretch factor of row row to stretch.
int columnCount() const
Returns the number of columns in this grid.
QLayoutItem * takeAt(int index) override
\reimp
void setColumnStretch(int column, int stretch)
Sets the stretch factor of column column to stretch.
QScreen * primaryScreen
the primary (or default) screen of the application.
The QHBoxLayout class lines up widgets horizontally.
The QKeySequence class encapsulates a key sequence as used by shortcuts.
The QLabel widget provides a text or image display.
int heightForWidth(int) const override
\reimp
void setText(const QString &)
void setTextFormat(Qt::TextFormat)
QPixmap pixmap
the label's pixmap.
void setPixmap(const QPixmap &)
void setAlignment(Qt::Alignment)
void setWordWrap(bool on)
QSize sizeHint() const override
\reimp
The QLayoutItem class provides an abstract item that a QLayout manipulates.
virtual Qt::Orientations expandingDirections() const =0
Returns whether this layout item can make use of more space than sizeHint().
virtual QSpacerItem * spacerItem()
If this item is a QSpacerItem, it is returned as a QSpacerItem; otherwise \nullptr is returned.
The QLayout class is the base class of geometry managers.
QSize totalSizeHint() const
void removeWidget(QWidget *w)
Removes the widget widget from the layout.
void setSizeConstraint(SizeConstraint)
QSize totalMaximumSize() const
QSize totalMinimumSize() const
virtual int indexOf(const QWidget *) const
Searches for widget widget in this layout (not including child layouts).
void setContentsMargins(int left, int top, int right, int bottom)
The QLineEdit widget is a one-line text editor.
bool hasAcceptableInput() const
qsizetype size() const noexcept
const_pointer constData() const noexcept
const T & constLast() const noexcept
iterator erase(const_iterator begin, const_iterator end)
const_reference at(qsizetype i) const noexcept
const_reverse_iterator crbegin() const noexcept
void remove(qsizetype i, qsizetype n=1)
void reserve(qsizetype size)
void removeLast() noexcept
const_iterator cend() const noexcept
void append(parameter_type t)
const_iterator cbegin() const noexcept
const_reverse_iterator crend() const noexcept
iterator insert(const Key &key, const T &value)
T value(const Key &key, const T &defaultValue=T()) const
bool contains(const Key &key) const
size_type remove(const Key &key)
const_iterator constBegin() const
const_iterator constEnd() const
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
QObject * sender() const
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; othe...
virtual bool event(QEvent *event)
This virtual function receives events to an object and should return true if the event e was recogniz...
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
QVariant property(const char *name) const
Returns the value of the object's name property.
Q_WEAK_OVERLOAD void setObjectName(const QString &name)
Sets the object's name to name.
The QPaintEvent class contains event parameters for paint events.
The QPainter class performs low-level painting on widgets and other paint devices.
void drawPoint(const QPointF &pt)
Draws a single point at the given position using the current pen's color.
void setPen(const QColor &color)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void drawLine(const QLineF &line)
Draws a line defined by line.
void drawPixmap(const QRectF &targetRect, const QPixmap &pixmap, const QRectF &sourceRect)
Draws the rectangular portion source of the given pixmap into the given target in the paint device.
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
The QPalette class contains color groups for each widget state.
const QBrush & brush(ColorGroup cg, ColorRole cr) const
Returns the brush in the specified color group, used for the given color role.
const QBrush & mid() const
Returns the mid brush of the current color group.
void setBrush(ColorRole cr, const QBrush &brush)
Sets the brush for the given color role to the specified brush for all groups in the palette.
void setColor(ColorGroup cg, ColorRole cr, const QColor &color)
Sets the color in the specified color group, used for the given color role, to the specified solid co...
const QBrush & base() const
Returns the base brush of the current color group.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
int height() const
Returns the height of the pixmap.
QSizeF deviceIndependentSize() const
Returns the size of the pixmap in device independent pixels.
QSize size() const
Returns the size of the pixmap.
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
The QResizeEvent class contains event parameters for resize events.
The QShortcut class is used to create keyboard shortcuts.
constexpr QSize toSize() const noexcept
Returns an integer based copy of this size.
constexpr int height() const noexcept
Returns the height.
constexpr int width() const noexcept
Returns the width.
constexpr void setWidth(int w) noexcept
Sets the width to the given width.
constexpr void setHeight(int h) noexcept
Sets the height to the given height.
The QSpacerItem class provides blank space in a layout.
void changeSize(int w, int h, QSizePolicy::Policy hData=QSizePolicy::Minimum, QSizePolicy::Policy vData=QSizePolicy::Minimum)
Changes this spacer item to have preferred width w, preferred height h, horizontal size policy hPolic...
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isNull() const
Returns true if this string is null; otherwise returns false.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QStyleOption class stores the parameters used by QStyle functions.
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget.
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
virtual int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const =0
@ PM_LayoutVerticalSpacing
@ PM_LayoutHorizontalSpacing
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const =0
Returns the value of the given pixel metric.
The QVBoxLayout class lines up widgets vertically.
bool isValid() const
Returns true if the storage type of this variant is not QMetaType::UnknownType; otherwise returns fal...
const void * constData() const
QSize minimumSizeHint() const override
\reimp
void setSideWidget(QWidget *widget)
QWatermarkLabel(QWidget *parent, QWidget *sideWidget)
QWidget * sideWidget() const
QWizardDefaultProperty(const char *className, const char *property, const char *changedSignal)
void resolve(const QList< QWizardDefaultProperty > &defaultPropertyTable)
void findProperty(const QWizardDefaultProperty *properties, int propertyCount)
QWizard::WizardStyle wizStyle
bool operator!=(const QWizardLayoutInfo &other) const
bool operator==(const QWizardLayoutInfo &other) const
QPixmap pixmaps[QWizard::NPixmaps]
void _q_maybeEmitCompleteChanged()
QList< QWizardField > pendingFields
QMap< int, QString > buttonCustomTexts
void _q_updateCachedCompleteState()
bool cachedIsComplete() const
The QWizardPage class is the base class for wizard pages.
QString title
the title of the page
void setFinalPage(bool finalPage)
Explicitly sets this page to be final if finalPage is true.
QVariant field(const QString &name) const
Returns the value of the field called name.
void setButtonText(QWizard::WizardButton which, const QString &text)
Sets the text on button which to be text on this page.
bool isCommitPage() const
Returns true if this page is a commit page; otherwise returns false.
virtual void initializePage()
This virtual function is called by QWizard::initializePage() to prepare the page just before it is sh...
void registerField(const QString &name, QWidget *widget, const char *property=nullptr, const char *changedSignal=nullptr)
Creates a field called name associated with the given property of the given widget.
virtual void cleanupPage()
This virtual function is called by QWizard::cleanupPage() when the user leaves the page by clicking \...
void setTitle(const QString &title)
void setField(const QString &name, const QVariant &value)
Sets the value of the field called name to value.
virtual bool validatePage()
This virtual function is called by QWizard::validateCurrentPage() when the user clicks \uicontrol Nex...
QWizard * wizard() const
Returns the wizard associated with this page, or \nullptr if this page hasn't been inserted into a QW...
virtual int nextId() const
This virtual function is called by QWizard::nextId() to find out which page to show when the user cli...
void setSubTitle(const QString &subTitle)
~QWizardPage()
Destructor.
bool isFinalPage() const
This function is called by QWizard to determine whether the \uicontrol Finish button should be shown ...
virtual bool isComplete() const
This virtual function is called by QWizard to determine whether the \uicontrol Next or \uicontrol Fin...
QString buttonText(QWizard::WizardButton which) const
Returns the text on button which on this page.
QWizardPage(QWidget *parent=nullptr)
Constructs a wizard page with the given parent.
QPixmap pixmap(QWizard::WizardPixmap which) const
Returns the pixmap set for role which.
void setPixmap(QWizard::WizardPixmap which, const QPixmap &pixmap)
Sets the pixmap for role which to pixmap.
QString subTitle
the subtitle of the page
void setCommitPage(bool commitPage)
Sets this page to be a commit page if commitPage is true; otherwise, sets it to be a normal page.
QWizardAntiFlickerWidget * antiFlickerWidget
void setStyle(QStyle *style)
bool buttonLayoutContains(QWizard::WizardButton which)
QWizard::WizardOptions opts
QList< QWizardField > fields
void _q_updateButtonStates()
QWizardHeader * headerWidget
QWizardLayoutInfo layoutInfoForCurrentPage()
QMap< QString, int > fieldIndexMap
void connectButton(QWizard::WizardButton which) const
void removeFieldAt(int index)
QWatermarkLabel * watermarkLabel
QHBoxLayout * buttonLayout
void recreateLayout(const QWizardLayoutInfo &info)
QList< QWizard::WizardButton > buttonsCustomLayout
QList< QWizardDefaultProperty > defaultPropertyTable
void updateMinMaxSizes(const QWizardLayoutInfo &info)
void _q_emitCustomButtonClicked()
void setButtonLayout(const QWizard::WizardButton *array, int size)
bool isVistaThemeEnabled() const
QPixmap defaultPixmaps[QWizard::NPixmaps]
QMap< int, QWizardPage * > PageMap
void updatePixmap(QWizard::WizardPixmap which)
void _q_handleFieldObjectDestroyed(QObject *)
void switchToPage(int newId, Direction direction)
struct QWizardPrivate::@502::@504 btn
Qt::TextFormat subTitleFmt
void updateButtonLayout()
QVBoxLayout * pageVBoxLayout
bool ensureButton(QWizard::WizardButton which) const
QWizard::WizardStyle wizStyle
QWidget * placeholderWidget1
QWizardRuler * bottomRuler
QWidget * placeholderWidget2
bool buttonsHaveCustomLayout
void cleanupPagesNotInHistory()
QAbstractButton * btns[QWizard::NButtons]
QMap< int, QString > buttonCustomTexts
void addField(const QWizardField &field)
QWizardLayoutInfo layoutInfo
QWizardRuler(QWidget *parent=nullptr)
The QWizard class provides a framework for wizards.
WizardOptions options
the various options that affect the look and feel of the wizard
void resizeEvent(QResizeEvent *event) override
\reimp
void setWizardStyle(WizardStyle style)
void paintEvent(QPaintEvent *event) override
\reimp
void setPage(int id, QWizardPage *page)
Adds the given page to the wizard with the given id.
int currentId
the ID of the current page
QAbstractButton * button(WizardButton which) const
Returns the button corresponding to role which.
QWidget * sideWidget() const
virtual int nextId() const
This virtual function is called by QWizard to find out which page to show when the user clicks the \u...
void setButtonText(WizardButton which, const QString &text)
Sets the text on button which to be text.
void setSubTitleFormat(Qt::TextFormat format)
QList< int > pageIds() const
Returns the list of page IDs.
QVariant field(const QString &name) const
Returns the value of the field called name.
WizardOption
This enum specifies various options that affect the look and feel of a wizard.
@ NoCancelButtonOnLastPage
@ DisabledBackButtonOnLastPage
@ HaveFinishButtonOnEarlyPages
@ NoBackButtonOnStartPage
@ ExtendedWatermarkPixmap
@ HaveNextButtonOnLastPage
void setButtonLayout(const QList< WizardButton > &layout)
Sets the order in which buttons are displayed to layout, where layout is a list of \l{WizardButton}s.
Qt::TextFormat subTitleFormat
the text format used by page subtitles
virtual void initializePage(int id)
This virtual function is called by QWizard to prepare page id just before it is shown either as a res...
QWizardPage * page(int id) const
Returns the page with the given id, or \nullptr if there is no such page.
QSize sizeHint() const override
\reimp
void setOptions(WizardOptions options)
void next()
Advances to the next page.
void setOption(WizardOption option, bool on=true)
Sets the given option to be enabled if on is true; otherwise, clears the given option.
WizardPixmap
This enum specifies the pixmaps that can be associated with a page.
WizardStyle wizardStyle
the look and feel of the wizard
virtual bool validateCurrentPage()
This virtual function is called by QWizard when the user clicks \uicontrol Next or \uicontrol Finish ...
WizardStyle
This enum specifies the different looks supported by QWizard.
void setCurrentId(int id)
Sets currentId to id, without visiting the pages between currentId and id.
QWizardPage * currentPage() const
Returns a pointer to the current page, or \nullptr if there is no current page (e....
bool hasVisitedPage(int id) const
Returns true if the page history contains page id; otherwise, returns false.
~QWizard()
Destroys the wizard and its pages, releasing any allocated resources.
void setPixmap(WizardPixmap which, const QPixmap &pixmap)
Sets the pixmap for role which to pixmap.
void setSideWidget(QWidget *widget)
void setDefaultProperty(const char *className, const char *property, const char *changedSignal)
Sets the default property for className to be property, and the associated change signal to be change...
virtual void cleanupPage(int id)
This virtual function is called by QWizard to clean up page id just before the user leaves it by clic...
QWizard(QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
Constructs a wizard with the given parent and window flags.
int addPage(QWizardPage *page)
Adds the given page to the wizard, and returns the page's ID.
bool testOption(WizardOption option) const
Returns true if the given option is enabled; otherwise, returns false.
QString buttonText(WizardButton which) const
Returns the text on button which.
Qt::TextFormat titleFormat
the text format used by page titles
void setField(const QString &name, const QVariant &value)
Sets the value of the field called name to value.
QList< int > visitedIds() const
void back()
Goes back to the previous page.
void setButton(WizardButton which, QAbstractButton *button)
Sets the button corresponding to role which to button.
void removePage(int id)
Removes the page with the given id.
QPixmap pixmap(WizardPixmap which) const
Returns the pixmap set for role which.
WizardButton
This enum specifies the buttons in a wizard.
void setTitleFormat(Qt::TextFormat format)
bool event(QEvent *event) override
\reimp
void restart()
Restarts the wizard at the start page.
int startId
the ID of the first page
void textChanged(const QString &newText)
QSet< QString >::iterator it
void newState(QList< State > &states, const char *token, const char *lexem, bool pre)
Combined button and popup list for selecting options.
Q_CORE_EXPORT int qstrcmp(const char *str1, const char *str2)
static const QCssKnownValue properties[NumProperties - 1]
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
static int oldButton(int button)
constexpr const T & qMin(const T &a, const T &b)
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLint GLint GLint GLsizei GLsizei GLsizei GLboolean commit
GLuint GLsizei const GLchar * message
GLint GLsizei GLsizei GLenum format
GLdouble GLdouble GLdouble GLdouble q
GLenum GLenum GLsizei void * row
#define qUtf16Printable(string)
#define QT_CONFIG(feature)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
static const char * buttonSlots(QWizard::WizardButton which)
static QString buttonDefaultText(int wstyle, int which, const QWizardPrivate *wizardPrivate)
static QString object_name_for_button(QWizard::WizardButton which)
const int ModernHeaderTopMargin
static void changeSpacerSize(QLayout *layout, int index, int width, int height)
const int MacLayoutLeftMargin
const int GapBetweenLogoAndRightEdge
static bool objectInheritsXAndXIsCloserThanY(const QObject *object, const QByteArray &classX, const QByteArray &classY)
static QWidget * iWantTheFocus(QWidget *ancestor)
const int MacLayoutBottomMargin
const int MacLayoutRightMargin
static const char * changed_signal(int which)
const size_t NFallbackDefaultProperties
const int MacButtonTopMargin
const struct @492 fallbackProperties[]
const char className[16]
[1]
QFileInfo info(fileName)
[8]
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
obj metaObject() -> className()
QPushButton * connectButton
bool contains(const AT &t) const noexcept
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent