![]() |
Qt 6.x
The Qt SDK
|
Static Public Member Functions | |
static int | showOldMessageBox (QWidget *parent, QMessageBox::Icon icon, const QString &title, const QString &text, int button0, int button1, int button2) |
static int | showOldMessageBox (QWidget *parent, QMessageBox::Icon icon, const QString &title, const QString &text, const QString &button0Text, const QString &button1Text, const QString &button2Text, int defaultButtonNumber, int escapeButtonNumber) |
static QMessageBox::StandardButton | showNewMessageBox (QWidget *parent, QMessageBox::Icon icon, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) |
static QPixmap | standardIcon (QMessageBox::Icon icon, QMessageBox *mb) |
static QMessageBox::StandardButton | standardButtonForRole (QMessageBox::ButtonRole role) |
![]() | |
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 | 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) |
Private Member Functions | |
void | initHelper (QPlatformDialogHelper *) override |
void | helperPrepareShow (QPlatformDialogHelper *) override |
int | dialogCode () const override |
Definition at line 165 of file qmessagebox.cpp.
|
inline |
Definition at line 170 of file qmessagebox.cpp.
void QMessageBoxPrivate::_q_buttonClicked | ( | QAbstractButton * | button | ) |
Definition at line 464 of file qmessagebox.cpp.
References button, QByteArray::clear(), detailsButton, QObject::disconnect(), HideLabel, memberToDisconnectOnClose, receiverToDisconnectOnClose, setClickedButton(), DetailButton::setLabel(), ShowLabel, signalToDisconnectOnClose, and updateSize().
Referenced by init().
void QMessageBoxPrivate::_q_helperClicked | ( | QPlatformDialogHelper::StandardButton | button, |
QPlatformDialogHelper::ButtonRole | role | ||
) |
Definition at line 498 of file qmessagebox.cpp.
References QMessageDialogOptions::CustomButton::button, QAbstractButton::click(), QMessageDialogOptions::customButton(), QPlatformDialogHelper::LastButton, options, Q_ASSERT, and Q_UNUSED.
Referenced by initHelper().
QAbstractButton * QMessageBoxPrivate::abstractButtonForId | ( | int | id | ) | const |
Definition at line 2088 of file qmessagebox.cpp.
References customButtonList, QMessageBox::FlagMask, newButton(), and QList< T >::value().
void QMessageBoxPrivate::addOldButtons | ( | int | button0, |
int | button1, | ||
int | button2 | ||
) |
Definition at line 2076 of file qmessagebox.cpp.
References compatMode, QMessageBox::Default, detectedCompat(), QMessageBox::Escape, findButton(), and newButton().
|
overridevirtual |
Reimplemented from QDialogPrivate.
Definition at line 2805 of file qmessagebox.cpp.
References Qt::AA_DontUseNativeDialogs, QDialogPrivate::canBeNativeDialog(), className, QMessageDialogOptions::DontUseNativeDialog, QDialogPrivate::nativeDialogInUse, QMessageDialogOptions::options(), options, QObjectData::q_ptr, QCoreApplication::testAttribute(), and Qt::WA_DontShowOnScreen.
Referenced by setVisible().
void QMessageBoxPrivate::detectEscapeButton | ( | ) |
Definition at line 1073 of file qmessagebox.cpp.
References QList< T >::at(), button, QDialogButtonBox::button(), buttonBox, QDialogButtonBox::buttonRole(), QDialogButtonBox::buttons(), QDialogButtonBox::Cancel, detailsButton, detectedEscapeButton, escapeButton, QList< T >::first(), QListSpecialMethodsBase< T >::indexOf(), QDialogButtonBox::NoRole, QDialogButtonBox::RejectRole, and QList< T >::size().
|
overrideprivatevirtual |
Reimplemented from QDialogPrivate.
Definition at line 444 of file qmessagebox.cpp.
References QDialog::Accepted, QMessageBox::AcceptRole, clickedButton, QDialogPrivate::dialogCode(), QMessageBox::NoRole, QDialog::Rejected, QMessageBox::RejectRole, and QMessageBox::YesRole.
int QMessageBoxPrivate::execReturnCode | ( | QAbstractButton * | button | ) |
Definition at line 433 of file qmessagebox.cpp.
References button, buttonBox, compatMode, customButtonList, QListSpecialMethodsBase< T >::indexOf(), QMessageBox::NoButton, oldButton(), ret, and QDialogButtonBox::standardButton().
Referenced by setClickedButton().
QAbstractButton * QMessageBoxPrivate::findButton | ( | int | button0, |
int | button1, | ||
int | button2, | ||
int | flags | ||
) |
Definition at line 2061 of file qmessagebox.cpp.
References button, and newButton().
Referenced by addOldButtons().
|
overrideprivatevirtual |
Reimplemented from QDialogPrivate.
Definition at line 2824 of file qmessagebox.cpp.
References checkbox, QCheckBox::checkState(), helperIcon(), helperStandardButtons(), options, QMessageDialogOptions::setCheckBox(), QMessageDialogOptions::setDetailedText(), QMessageDialogOptions::setIconPixmap(), QMessageDialogOptions::setInformativeText(), QMessageDialogOptions::setStandardButtons(), QMessageDialogOptions::setStandardIcon(), QMessageDialogOptions::setText(), QMessageDialogOptions::setWindowTitle(), and QAbstractButton::text.
void QMessageBoxPrivate::init | ( | const QString & | title = QString() , |
const QString & | text = QString() |
||
) |
Definition at line 243 of file qmessagebox.cpp.
References _q_buttonClicked(), Qt::AlignLeft, Qt::AlignVCenter, buttonBox, QObject::connect(), QSizePolicy::Fixed, icon, iconLabel, QString::isEmpty(), QMessageBox::NoIcon, QFont::setBold(), QDialogButtonBox::setCenterButtons(), QObject::setObjectName(), QWidget::setSizePolicy(), setupLayout(), QStyle::SH_MessageBox_CenterButtons, QStyle::SH_MessageBox_TextInteractionFlags, SIGNAL, SLOT, text, and title.
|
overrideprivatevirtual |
Reimplemented from QDialogPrivate.
Definition at line 2765 of file qmessagebox.cpp.
References _q_helperClicked(), checkbox, QPlatformMessageDialogHelper::checkBoxStateChanged(), QObject::connect(), options, QCheckBox::setCheckState(), SIGNAL, SLOT, and state.
int QMessageBoxPrivate::layoutMinimumWidth | ( | ) |
Definition at line 328 of file qmessagebox.cpp.
References QLayout::activate(), QWidgetPrivate::layout, QLayout::totalMinimumSize(), and QSize::width().
Referenced by updateSize().
void QMessageBoxPrivate::retranslateStrings | ( | ) |
Definition at line 2133 of file qmessagebox.cpp.
References detailsButton, HideLabel, DetailButton::setLabel(), and ShowLabel.
Referenced by setupLayout().
void QMessageBoxPrivate::setClickedButton | ( | QAbstractButton * | button | ) |
Definition at line 487 of file qmessagebox.cpp.
References button, clickedButton, emit, and execReturnCode().
Referenced by _q_buttonClicked().
void QMessageBoxPrivate::setupLayout | ( | ) |
Definition at line 275 of file qmessagebox.cpp.
References QGridLayout::addItem(), QGridLayout::addWidget(), Qt::AlignLeft, Qt::AlignTop, buttonBox, checkbox, QGridLayout::columnCount(), QSizePolicy::Fixed, iconLabel, informativeLabel, QPixmap::isNull(), QLabel::pixmap, retranslateStrings(), QGridLayout::rowCount(), QLayout::setContentsMargins(), QWidget::setContentsMargins(), QGridLayout::setHorizontalSpacing(), QLayout::SetNoConstraint, QGridLayout::setRowMinimumHeight(), QGridLayout::setRowStretch(), QLayout::setSizeConstraint(), QGridLayout::setVerticalSpacing(), QWidget::setVisible(), and updateSize().
Referenced by init().
|
overridevirtual |
Reimplemented from QDialogPrivate.
Definition at line 1653 of file qmessagebox.cpp.
References canBeNativeDialog(), QDialogPrivate::nativeDialogInUse, QDialogPrivate::setNativeDialogVisible(), QDialogPrivate::setVisible(), Qt::WA_DontShowOnScreen, Qt::WA_WState_ExplicitShowHide, and Qt::WA_WState_Hidden.
|
static |
|
static |
Definition at line 2108 of file qmessagebox.cpp.
References QMessageBox::ActionRole, QMessageBox::addButton(), QDialog::exec(), icon, QString::isEmpty(), messageBox, QMessageBox::NoButton, QObjectData::parent, QMessageBox::setDefaultButton(), QMessageBox::setEscapeButton(), text, title, and QList< T >::value().
|
static |
Definition at line 2099 of file qmessagebox.cpp.
References QDialog::exec(), icon, messageBox, QMessageBox::NoButton, QObjectData::parent, text, and title.
Referenced by showNewMessageBox().
|
static |
Definition at line 891 of file qmessagebox.cpp.
References QMessageBox::AcceptRole, QMessageBox::Apply, QMessageBox::ApplyRole, QMessageBox::Cancel, QMessageBox::DestructiveRole, QMessageBox::Discard, QMessageBox::Help, QMessageBox::HelpRole, QMessageBox::No, QMessageBox::NoButton, QMessageBox::NoRole, QMessageBox::Ok, QMessageBox::RejectRole, QMessageBox::Reset, QMessageBox::ResetRole, QMessageBox::Yes, and QMessageBox::YesRole.
Referenced by QMessageBox::addButton().
|
static |
Definition at line 2738 of file qmessagebox.cpp.
References QMessageBox::Critical, QPaintDevice::devicePixelRatio(), dpr(), icon, iconSize, QMessageBox::Information, QIcon::isNull(), QStyle::pixelMetric(), QIcon::pixmap(), QStyle::PM_MessageBoxIconSize, qApp, QMessageBox::Question, QStyle::SP_MessageBoxCritical, QStyle::SP_MessageBoxInformation, QStyle::SP_MessageBoxQuestion, QStyle::SP_MessageBoxWarning, QStyle::standardIcon(), QApplication::style(), QWidget::style(), and QMessageBox::Warning.
Referenced by QMessageBox::setIcon().
void QMessageBoxPrivate::updateSize | ( | ) |
Definition at line 334 of file qmessagebox.cpp.
References QLayout::activate(), QApplication::font(), QLayoutItem::hasHeightForWidth(), QSize::height(), QFontMetrics::horizontalAdvance(), QSizePolicy::Ignored, informativeLabel, QWidgetPrivate::layout, layoutMinimumWidth(), QEvent::LayoutRequest, QSizePolicy::Minimum, opt, policy, QSizePolicy::Preferred, qMax(), qMin(), QCoreApplication::removePostedEvents(), QSizePolicy::setHeightForWidth(), QWidget::setSizePolicy(), QLayout::totalHeightForWidth(), QLayout::totalMinimumSize(), QSize::width(), and QTextOption::WrapAnywhere.
Referenced by _q_buttonClicked(), and setupLayout().
bool QMessageBoxPrivate::autoAddOkButton |
Definition at line 230 of file qmessagebox.cpp.
QDialogButtonBox* QMessageBoxPrivate::buttonBox |
Definition at line 219 of file qmessagebox.cpp.
Referenced by detectEscapeButton(), execReturnCode(), init(), and setupLayout().
QCheckBox* QMessageBoxPrivate::checkbox |
Definition at line 223 of file qmessagebox.cpp.
Referenced by helperPrepareShow(), initHelper(), and setupLayout().
QAbstractButton* QMessageBoxPrivate::clickedButton |
Definition at line 224 of file qmessagebox.cpp.
Referenced by dialogCode(), and setClickedButton().
bool QMessageBoxPrivate::compatMode |
Definition at line 229 of file qmessagebox.cpp.
Referenced by addOldButtons(), and execReturnCode().
QList<QAbstractButton *> QMessageBoxPrivate::customButtonList |
Definition at line 220 of file qmessagebox.cpp.
Referenced by abstractButtonForId(), and execReturnCode().
QPushButton* QMessageBoxPrivate::defaultButton |
Definition at line 222 of file qmessagebox.cpp.
DetailButton* QMessageBoxPrivate::detailsButton |
Definition at line 225 of file qmessagebox.cpp.
Referenced by _q_buttonClicked(), detectEscapeButton(), and retranslateStrings().
QAbstractButton* QMessageBoxPrivate::detectedEscapeButton |
Definition at line 231 of file qmessagebox.cpp.
Referenced by detectEscapeButton().
QAbstractButton* QMessageBoxPrivate::escapeButton |
Definition at line 221 of file qmessagebox.cpp.
Referenced by detectEscapeButton().
QMessageBox::Icon QMessageBoxPrivate::icon |
Definition at line 217 of file qmessagebox.cpp.
Referenced by init(), showOldMessageBox(), showOldMessageBox(), and standardIcon().
QLabel* QMessageBoxPrivate::iconLabel |
Definition at line 218 of file qmessagebox.cpp.
Referenced by init(), and setupLayout().
QLabel* QMessageBoxPrivate::informativeLabel |
Definition at line 232 of file qmessagebox.cpp.
Referenced by setupLayout(), and updateSize().
QLabel* QMessageBoxPrivate::label |
Definition at line 216 of file qmessagebox.cpp.
QByteArray QMessageBoxPrivate::memberToDisconnectOnClose |
Definition at line 234 of file qmessagebox.cpp.
Referenced by _q_buttonClicked().
QSharedPointer<QMessageDialogOptions> QMessageBoxPrivate::options |
Definition at line 236 of file qmessagebox.cpp.
Referenced by _q_helperClicked(), canBeNativeDialog(), helperPrepareShow(), and initHelper().
Definition at line 233 of file qmessagebox.cpp.
Referenced by _q_buttonClicked().
QByteArray QMessageBoxPrivate::signalToDisconnectOnClose |
Definition at line 235 of file qmessagebox.cpp.
Referenced by _q_buttonClicked().