Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qdialogbuttonbox_p.h>
Additional Inherited Members | |
Static Public Member Functions inherited from QWidgetPrivate | |
static QWidgetPrivate * | get (QWidget *w) |
static const QWidgetPrivate * | get (const QWidget *w) |
static void | checkRestoredGeometry (const QRect &availableGeometry, QRect *restoredGeometry, int frameHeight) |
static void | adjustFlags (Qt::WindowFlags &flags, QWidget *w=nullptr) |
static QWidget * | parentGraphicsView (const QWidget *widget) |
static QRect | screenGeometry (const QWidget *widget) |
static QRect | availableScreenGeometry (const QWidget *widget) |
static QScreen * | screen (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static QRect | screenGeometry (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static QRect | availableScreenGeometry (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static void | sendComposeStatus (QWidget *w, bool end) |
static void | setWidgetParentHelper (QObject *widgetAsObject, QObject *newParent) |
static bool | insertIntoFocusChain (const QWidgetList &toBeInserted, FocusDirection direction, QWidget *position) |
static QWidgetList | takeFromFocusChain (QWidget *from, QWidget *to, FocusDirection direction=FocusDirection::Next) |
Static Public Member Functions inherited from QObjectPrivate | |
static bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (const QObject *o) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
Static Public Attributes inherited from QWidgetPrivate | |
static QWidgetMapper * | mapper = nullptr |
static QWidgetSet * | allWidgets = nullptr |
static int | instanceCounter = 0 |
static int | maxInstances = 0 |
Definition at line 23 of file qdialogbuttonbox_p.h.
|
strong |
Enumerator | |
---|---|
Connect | |
SkipConnect |
Definition at line 37 of file qdialogbuttonbox_p.h.
|
strong |
Enumerator | |
---|---|
DoLayout | |
SkipLayout |
Definition at line 33 of file qdialogbuttonbox_p.h.
|
strong |
Enumerator | |
---|---|
HideEvent | |
ManualRemove | |
Destroyed |
Definition at line 28 of file qdialogbuttonbox_p.h.
QDialogButtonBoxPrivate::QDialogButtonBoxPrivate | ( | Qt::Orientation | orient | ) |
Definition at line 117 of file qdialogbuttonbox.cpp.
void QDialogButtonBoxPrivate::addButton | ( | QAbstractButton * | button, |
QDialogButtonBox::ButtonRole | role, | ||
LayoutRule | layoutRule = LayoutRule::DoLayout, | ||
AddRule | addRule = AddRule::Connect ) |
Definition at line 391 of file qdialogbuttonbox.cpp.
References QList< T >::append(), button, buttonLists, QAbstractButton::clicked(), QObjectPrivate::connect(), Connect, QObject::destroyed(), DoLayout, handleButtonClicked(), handleButtonDestroyed(), QObject::installEventFilter(), layoutButtons(), SkipConnect, and SkipLayout.
Referenced by createButton(), and handleButtonShowAndHide().
void QDialogButtonBoxPrivate::addButtonsToLayout | ( | const QList< QAbstractButton * > & | buttonList, |
bool | reverse ) |
Definition at line 173 of file qdialogbuttonbox.cpp.
References QBoxLayout::addWidget(), button, buttonLayout, i, and QWidget::show().
Referenced by layoutButtons().
QList< QAbstractButton * > QDialogButtonBoxPrivate::allButtons | ( | ) | const |
Definition at line 681 of file qdialogbuttonbox.cpp.
References hiddenButtons, QHash< Key, T >::keys(), and visibleButtons().
QDialogButtonBox::ButtonRole QDialogButtonBoxPrivate::buttonRole | ( | QAbstractButton * | button | ) | const |
QPushButton * QDialogButtonBoxPrivate::createButton | ( | QDialogButtonBox::StandardButton | button, |
LayoutRule | layoutRule = LayoutRule::DoLayout ) |
Definition at line 306 of file qdialogbuttonbox.cpp.
References QDialogButtonBox::Abort, addButton(), QDialogButtonBox::Apply, button, QPlatformDialogHelper::buttonRole(), QDialogButtonBox::Cancel, QDialogButtonBox::Close, QDialogButtonBox::Discard, QDialogButtonBox::Help, icon, QDialogButtonBox::Ignore, QHash< Key, T >::insert(), QPlatformDialogHelper::InvalidRole, QDialogButtonBox::No, QDialogButtonBox::NoButton, QDialogButtonBox::NoToAll, QDialogButtonBox::Ok, QDialogButtonBox::Open, QGuiApplicationPrivate::platformTheme(), Q_UNLIKELY, QPushButton, qWarning, QDialogButtonBox::Reset, QDialogButtonBox::RestoreDefaults, QDialogButtonBox::Retry, QDialogButtonBox::Save, QDialogButtonBox::SaveAll, QAbstractButton::setIcon(), QAbstractButton::setShortcut(), QWidget::setStyle(), QStyle::SH_DialogButtonBox_ButtonsHaveIcons, QStyle::SP_DialogAbortButton, QStyle::SP_DialogApplyButton, QStyle::SP_DialogCancelButton, QStyle::SP_DialogCloseButton, QStyle::SP_DialogDiscardButton, QStyle::SP_DialogHelpButton, QStyle::SP_DialogIgnoreButton, QStyle::SP_DialogNoButton, QStyle::SP_DialogNoToAllButton, QStyle::SP_DialogOkButton, QStyle::SP_DialogOpenButton, QStyle::SP_DialogResetButton, QStyle::SP_DialogRetryButton, QStyle::SP_DialogSaveAllButton, QStyle::SP_DialogSaveButton, QStyle::SP_DialogYesButton, QStyle::SP_DialogYesToAllButton, QStyle::SP_RestoreDefaultsButton, standardButtonHash, QStyle::standardIcon(), QApplication::style(), QStyle::styleHint(), QDialogButtonBox::Yes, and QDialogButtonBox::YesToAll.
Referenced by createStandardButtons().
void QDialogButtonBoxPrivate::createStandardButtons | ( | QDialogButtonBox::StandardButtons | buttons | ) |
Definition at line 416 of file qdialogbuttonbox.cpp.
References createButton(), QDialogButtonBox::FirstButton, i, QDialogButtonBox::LastButton, layoutButtons(), and SkipLayout.
void QDialogButtonBoxPrivate::disconnectAll | ( | ) |
Definition at line 1040 of file qdialogbuttonbox.cpp.
References button, and QObject::disconnect().
void QDialogButtonBoxPrivate::ensureFirstAcceptIsDefault | ( | ) |
Definition at line 992 of file qdialogbuttonbox.cpp.
References QDialogButtonBox::AcceptRole, buttonLists, dialog, QObject::findChildren(), QWidget::focusWidget(), QWidgetPrivate::get(), QWidgetPrivate::hasChildWithFocusPolicy(), QPushButton::isDefault(), nullptr, QObjectData::parent, QWidget::parentWidget(), pushButton, Q_ASSERT, QPushButton::setDefault(), and Qt::StrongFocus.
Referenced by handleButtonShowAndHide().
void QDialogButtonBoxPrivate::handleButtonClicked | ( | ) |
Definition at line 863 of file qdialogbuttonbox.cpp.
References QPlatformDialogHelper::AcceptRole, button, buttonRole(), emit, QPlatformDialogHelper::HelpRole, QPlatformDialogHelper::NoRole, QPlatformDialogHelper::RejectRole, and QPlatformDialogHelper::YesRole.
Referenced by addButton(), and removeButton().
void QDialogButtonBoxPrivate::handleButtonDestroyed | ( | ) |
Definition at line 897 of file qdialogbuttonbox.cpp.
References Destroyed, removeButton(), and QObject::sender().
Referenced by addButton(), QDialogButtonBox::clear(), and removeButton().
bool QDialogButtonBoxPrivate::handleButtonShowAndHide | ( | QAbstractButton * | button, |
QEvent * | event ) |
Definition at line 904 of file qdialogbuttonbox.cpp.
References QDialogButtonBox::AcceptRole, addButton(), button, QHash< Key, T >::contains(), DoLayout, ensureFirstAcceptIsDefault(), hiddenButtons, HideEvent, QEvent::HideToParent, ignoreShowAndHide, QHash< Key, T >::insert(), QDialogButtonBox::InvalidRole, layoutButtons(), removeButton(), QEvent::ShowToParent, SkipConnect, and QHash< Key, T >::take().
void QDialogButtonBoxPrivate::initLayout | ( | ) |
Definition at line 138 of file qdialogbuttonbox.cpp.
References QSizePolicy::ButtonBox, buttonLayout, QSizePolicy::Expanding, QSizePolicy::Fixed, QWidgetPrivate::getLayoutItemMargins(), Qt::Horizontal, layoutPolicy, orientation, QStyle::SE_PushButtonLayoutItem, QLayout::setContentsMargins(), QWidgetPrivate::setLayoutItemMargins(), QStyle::SH_DialogButtonLayout, sp, Qt::Vertical, and Qt::WA_WState_OwnSizePolicy.
Referenced by resetLayout().
void QDialogButtonBoxPrivate::layoutButtons | ( | ) |
Definition at line 187 of file qdialogbuttonbox.cpp.
References QPlatformDialogHelper::AcceptRole, QPlatformDialogHelper::ActionRole, addButtonsToLayout(), QBoxLayout::addSpacing(), QBoxLayout::addStretch(), QBoxLayout::addWidget(), QPlatformDialogHelper::AlternateRole, QPlatformDialogHelper::ApplyRole, button, QPlatformDialogHelper::buttonLayout(), buttonLayout, buttonLists, center, QList< T >::constLast(), QBoxLayout::count(), QPlatformDialogHelper::DestructiveRole, QPlatformDialogHelper::EOL, QPlatformDialogHelper::HelpRole, QWidget::hide(), i, ignoreShowAndHide, QPushButton::isDefault(), QList< T >::isEmpty(), item, QBoxLayout::itemAt(), layoutPolicy, list, M, QDialogButtonBox::MacLayout, QPlatformDialogHelper::NoRole, orientation, pushButton, QPlatformDialogHelper::RejectRole, QPlatformDialogHelper::ResetRole, QPlatformDialogHelper::Reverse, QWidget::setFocusProxy(), QWidget::setTabOrder(), QWidget::show(), QPlatformDialogHelper::Stretch, QBoxLayout::takeAt(), widget, QLayoutItem::widget(), and QPlatformDialogHelper::YesRole.
Referenced by addButton(), createStandardButtons(), handleButtonShowAndHide(), and resetLayout().
void QDialogButtonBoxPrivate::removeButton | ( | QAbstractButton * | button, |
RemoveReason | reason ) |
Removes
button. | |
reason | determines the behavior following the removal: \list
|
Definition at line 727 of file qdialogbuttonbox.cpp.
References button, buttonLists, QAbstractButton::clicked(), QObject::destroyed(), Destroyed, QObjectPrivate::disconnect(), handleButtonClicked(), handleButtonDestroyed(), hiddenButtons, HideEvent, i, ManualRemove, QDialogButtonBox::NRoles, Q_FALLTHROUGH, QHash< Key, T >::remove(), QObject::removeEventFilter(), QWidget::setParent(), and standardButtonHash.
Referenced by handleButtonDestroyed(), and handleButtonShowAndHide().
void QDialogButtonBoxPrivate::resetLayout | ( | ) |
Definition at line 167 of file qdialogbuttonbox.cpp.
References initLayout(), and layoutButtons().
void QDialogButtonBoxPrivate::retranslateStrings | ( | ) |
Definition at line 427 of file qdialogbuttonbox.cpp.
References QString::isEmpty(), QGuiApplicationPrivate::platformTheme(), standardButtonHash, and text.
QList< QAbstractButton * > QDialogButtonBoxPrivate::visibleButtons | ( | ) | const |
Definition at line 670 of file qdialogbuttonbox.cpp.
References QList< T >::append(), QList< T >::at(), buttonLists, i, j, list, QDialogButtonBox::NRoles, and QList< T >::size().
Referenced by allButtons().
QBoxLayout* QDialogButtonBoxPrivate::buttonLayout |
Definition at line 50 of file qdialogbuttonbox_p.h.
Referenced by addButtonsToLayout(), initLayout(), and layoutButtons().
QList<QAbstractButton *> QDialogButtonBoxPrivate::buttonLists[QDialogButtonBox::NRoles] |
Definition at line 44 of file qdialogbuttonbox_p.h.
Referenced by addButton(), ensureFirstAcceptIsDefault(), layoutButtons(), removeButton(), and visibleButtons().
bool QDialogButtonBoxPrivate::center |
Definition at line 52 of file qdialogbuttonbox_p.h.
Referenced by layoutButtons().
std::unique_ptr<QObject> QDialogButtonBoxPrivate::filter |
Definition at line 51 of file qdialogbuttonbox_p.h.
QHash<QAbstractButton *, QDialogButtonBox::ButtonRole> QDialogButtonBoxPrivate::hiddenButtons |
Definition at line 46 of file qdialogbuttonbox_p.h.
Referenced by allButtons(), handleButtonShowAndHide(), and removeButton().
bool QDialogButtonBoxPrivate::ignoreShowAndHide = false |
Definition at line 53 of file qdialogbuttonbox_p.h.
Referenced by handleButtonShowAndHide(), and layoutButtons().
QDialogButtonBox::ButtonLayout QDialogButtonBoxPrivate::layoutPolicy |
Definition at line 49 of file qdialogbuttonbox_p.h.
Referenced by initLayout(), and layoutButtons().
Qt::Orientation QDialogButtonBoxPrivate::orientation |
Definition at line 48 of file qdialogbuttonbox_p.h.
Referenced by initLayout(), and layoutButtons().
QHash<QPushButton *, QDialogButtonBox::StandardButton> QDialogButtonBoxPrivate::standardButtonHash |
Definition at line 45 of file qdialogbuttonbox_p.h.
Referenced by createButton(), removeButton(), and retranslateStrings().