![]() |
Qt 6.x
The Qt SDK
|
#include <qcombobox_p.h>
Additional Inherited Members | |
![]() | |
enum | DrawWidgetFlag { DrawAsRoot = 0x01 , DrawPaintOnScreen = 0x02 , DrawRecursive = 0x04 , DrawInvisible = 0x08 , DontSubtractOpaqueChildren = 0x10 , DontDrawOpaqueChildren = 0x20 , DontDrawNativeChildren = 0x40 , DontSetCompositionMode = 0x80 , UseEffectRegionBounds = 0x100 } |
enum | Direction { DirectionNorth = 0x01 , DirectionEast = 0x10 , DirectionSouth = 0x02 , DirectionWest = 0x20 } |
enum class | WindowHandleMode { Direct , Closest , TopLevel } |
enum | CloseMode { CloseNoEvent , CloseWithEvent , CloseWithSpontaneousEvent } |
![]() | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData > |
![]() | |
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) |
![]() | |
static QWidgetMapper * | mapper = nullptr |
static QWidgetSet * | allWidgets = nullptr |
static int | instanceCounter = 0 |
static int | maxInstances = 0 |
Definition at line 312 of file qcombobox_p.h.
QComboBoxPrivate::QComboBoxPrivate | ( | ) |
Definition at line 56 of file qcombobox.cpp.
QComboBoxPrivate::~QComboBoxPrivate | ( | ) |
Definition at line 66 of file qcombobox.cpp.
void QComboBoxPrivate::_q_complete | ( | ) |
void QComboBoxPrivate::_q_dataChanged | ( | const QModelIndex & | topLeft, |
const QModelIndex & | bottomRight | ||
) |
Definition at line 1059 of file qcombobox.cpp.
References adjustComboBoxSize(), QComboBox::AdjustToContents, currentIndex, inserting, lineEdit, QModelIndex::parent(), root, QPersistentModelIndex::row(), QModelIndex::row(), QLineEdit::setText(), sizeAdjustPolicy, sizeHint, text, updateCurrentText(), and updateLineEditGeometry().
void QComboBoxPrivate::_q_editingFinished | ( | ) |
Definition at line 1253 of file qcombobox.cpp.
References QListSpecialMethodsBase< T >::contains(), currentIndex, emitActivated(), QCompleterPrivate::get(), itemText(), lineEdit, matchFlags(), QCompleterPrivate::popup, QItemSelectionModel::selectedIndexes, and QLineEdit::text.
void QComboBoxPrivate::_q_emitCurrentIndexChanged | ( | const QModelIndex & | index | ) |
Definition at line 1381 of file qcombobox.cpp.
References emit, itemText(), lineEdit, text, and updateCurrentText().
Referenced by _q_rowsInserted(), _q_rowsRemoved(), and setCurrentIndex().
void QComboBoxPrivate::_q_emitHighlighted | ( | const QModelIndex & | index | ) |
Definition at line 1371 of file qcombobox.cpp.
References emit, itemText(), and text.
Referenced by viewContainer().
void QComboBoxPrivate::_q_itemSelected | ( | const QModelIndex & | item | ) |
Definition at line 1349 of file qcombobox.cpp.
References currentIndex, emitActivated(), item, lineEdit, QPersistentModelIndex::row(), QLineEdit::selectAll(), setCurrentIndex(), and QLineEdit::setText().
Referenced by viewContainer().
void QComboBoxPrivate::_q_modelDestroyed | ( | ) |
Definition at line 255 of file qcombobox.cpp.
References model, and QAbstractItemModelPrivate::staticEmptyModel().
void QComboBoxPrivate::_q_modelReset | ( | ) |
Definition at line 243 of file qcombobox.cpp.
References lineEdit, modelChanged(), QLineEdit::setText(), trySetValidIndex(), and updateLineEditGeometry().
void QComboBoxPrivate::_q_resetButton | ( | ) |
Definition at line 1054 of file qcombobox.cpp.
References QStyle::State_None, and updateArrow().
Referenced by doHidePopup(), and viewContainer().
void QComboBoxPrivate::_q_returnPressed | ( | ) |
Definition at line 1285 of file qcombobox.cpp.
References currentIndex, QLineEdit::deselect(), duplicatesEnabled, emitActivated(), QLineEdit::end(), i, QComboBox::InsertAfterCurrent, QComboBox::InsertAlphabetically, QComboBox::InsertAtBottom, QComboBox::InsertAtCurrent, QComboBox::InsertAtTop, QComboBox::InsertBeforeCurrent, insertPolicy, QString::isEmpty(), QPersistentModelIndex::isValid(), lineEdit, matchFlags(), QComboBox::NoInsert, text, QLineEdit::text, this, and QString::toLower().
void QComboBoxPrivate::_q_rowsInserted | ( | const QModelIndex & | parent, |
int | start, | ||
int | end | ||
) |
Definition at line 1087 of file qcombobox.cpp.
References _q_emitCurrentIndexChanged(), adjustComboBoxSize(), QComboBox::AdjustToContents, currentIndex, indexBeforeChange, inserting, QString::isEmpty(), QPersistentModelIndex::isValid(), QObjectData::parent, placeholderText, root, QPersistentModelIndex::row(), sizeAdjustPolicy, and sizeHint.
void QComboBoxPrivate::_q_rowsRemoved | ( | const QModelIndex & | parent, |
int | start, | ||
int | end | ||
) |
Definition at line 1115 of file qcombobox.cpp.
References _q_emitCurrentIndexChanged(), adjustComboBoxSize(), QComboBox::AdjustToContents, currentIndex, indexBeforeChange, QPersistentModelIndex::isValid(), lineEdit, model, QObjectData::parent, qMax(), qMin(), root, QPersistentModelIndex::row(), QAbstractItemModel::rowCount(), setCurrentIndex(), QLineEdit::setText(), sizeAdjustPolicy, sizeHint, and updateLineEditGeometry().
void QComboBoxPrivate::_q_updateIndexBeforeChange | ( | ) |
Definition at line 1110 of file qcombobox.cpp.
References currentIndex, indexBeforeChange, and QPersistentModelIndex::row().
void QComboBoxPrivate::adjustComboBoxSize | ( | ) |
Definition at line 397 of file qcombobox.cpp.
References QComboBoxPrivateContainer::adjustSizeTimer, container, QBasicTimer::start(), and viewContainer().
Referenced by _q_dataChanged(), _q_rowsInserted(), _q_rowsRemoved(), and modelChanged().
int QComboBoxPrivate::computeWidthHint | ( | ) | const |
Definition at line 319 of file qcombobox.cpp.
References QStyle::CT_ComboBox, fontMetrics, i, opt, qMax(), and QSize::width().
bool QComboBoxPrivate::contains | ( | const QString & | text, |
int | role | ||
) |
void QComboBoxPrivate::doHidePopup | ( | ) |
Definition at line 2852 of file qcombobox.cpp.
References _q_resetButton(), container, QWidget::hide(), and QWidget::isVisible().
void QComboBoxPrivate::emitActivated | ( | const QModelIndex & | index | ) |
Definition at line 1361 of file qcombobox.cpp.
References emit, itemText(), and text.
Referenced by _q_editingFinished(), _q_itemSelected(), _q_returnPressed(), and keyboardSearchString().
void QComboBoxPrivate::init | ( | ) |
Definition at line 1008 of file qcombobox.cpp.
References QSizePolicy::ComboBox, QSizePolicy::Fixed, QSizePolicy::Preferred, QStyle::SE_ComboBoxLayoutItem, QWidgetPrivate::setLayoutItemMargins(), Qt::TabFocus, Qt::WA_InputMethodEnabled, and Qt::WheelFocus.
QIcon QComboBoxPrivate::itemIcon | ( | const QModelIndex & | index | ) | const |
Definition at line 1730 of file qcombobox.cpp.
References QAbstractItemModel::data(), decoration, Qt::DecorationRole, model, and QVariant::userType().
int QComboBoxPrivate::itemRole | ( | ) | const |
Definition at line 1400 of file qcombobox.cpp.
References Qt::DisplayRole, and Qt::EditRole.
Referenced by itemText().
QString QComboBoxPrivate::itemText | ( | const QModelIndex & | index | ) | const |
Definition at line 1395 of file qcombobox.cpp.
References QAbstractItemModel::data(), itemRole(), model, and QVariant::toString().
Referenced by _q_editingFinished(), _q_emitCurrentIndexChanged(), _q_emitHighlighted(), emitActivated(), and setCurrentIndex().
Definition at line 3364 of file qcombobox.cpp.
References currentIndex, emitActivated(), QComboBoxPrivateContainer::itemView(), setCurrentIndex(), text, view, and viewContainer().
Qt::MatchFlags QComboBoxPrivate::matchFlags | ( | ) | const |
Definition at line 1241 of file qcombobox.cpp.
References Qt::CaseSensitive, lineEdit, Qt::MatchCaseSensitive, and Qt::MatchFixedString.
Referenced by _q_editingFinished(), and _q_returnPressed().
void QComboBoxPrivate::modelChanged | ( | ) |
Definition at line 3377 of file qcombobox.cpp.
References adjustComboBoxSize(), QComboBox::AdjustToContents, sizeAdjustPolicy, and sizeHint.
Referenced by _q_modelReset().
QStyle::SubControl QComboBoxPrivate::newHoverControl | ( | const QPoint & | pos | ) |
Definition at line 302 of file qcombobox.cpp.
References QStyle::CC_ComboBox, hoverControl, hoverRect, opt, pos, QStyle::SC_All, and QStyle::SC_None.
Referenced by updateHoverControl().
Definition at line 279 of file qcombobox.cpp.
References QWidgetPrivate::availableScreenGeometry(), QWidgetPrivate::screenGeometry(), and QStylePrivate::useFullScreenForPopup().
Definition at line 343 of file qcombobox.cpp.
References QComboBox::AdjustToContents, QComboBox::AdjustToContentsOnFirstShow, QComboBox::AdjustToMinimumContentsLengthWithIcon, QFontMetrics::boundingRect(), QStyle::CT_ComboBox, QFontMetricsF::height(), QSize::height(), QFontMetrics::horizontalAdvance(), i, iconSize, QString::isEmpty(), QSize::isValid(), minimumContentsLength, opt, placeholderText, qCeil(), qMax(), QSize::rwidth(), QSize::setHeight(), QSize::setWidth(), sizeAdjustPolicy, sizeHint, QRect::width(), and QSize::width().
void QComboBoxPrivate::setCurrentIndex | ( | const QModelIndex & | index | ) |
Definition at line 2119 of file qcombobox.cpp.
References _q_emitCurrentIndexChanged(), currentIndex, indexBeforeChange, itemText(), lineEdit, modelColumn, QModelIndex::row(), QLineEdit::setText(), QModelIndex::sibling(), QLineEdit::text, and updateLineEditGeometry().
Referenced by _q_itemSelected(), _q_rowsRemoved(), keyboardSearchString(), QComboBox::keyPressEvent(), QComboBox::setModelColumn(), and trySetValidIndex().
void QComboBoxPrivate::showPopupFromMouseEvent | ( | QMouseEvent * | e | ) |
Definition at line 3096 of file qcombobox.cpp.
References QComboBoxPrivateContainer::blockMouseReleaseTimer, QStyle::CC_ComboBox, container, QApplication::doubleClickInterval, e, QLineEdit::event(), QComboBoxPrivateContainer::initialClickPosition, isVisible(), Qt::LeftButton, lineEdit, QEvent::MouseButtonRelease, opt, QStyle::SC_ComboBoxArrow, QStyle::SC_ComboBoxEditField, QStyle::SC_None, QTimer::start(), QStyle::State_Sunken, updateArrow(), and viewContainer().
void QComboBoxPrivate::trySetValidIndex | ( | ) |
Definition at line 260 of file qcombobox.cpp.
References QModelIndex::flags(), QAbstractItemModel::index(), Qt::ItemIsEnabled, model, modelColumn, pos, root, and setCurrentIndex().
Referenced by _q_modelReset().
void QComboBoxPrivate::updateArrow | ( | QStyle::StateFlag | state | ) |
Definition at line 232 of file qcombobox.cpp.
References arrowState, opt, and state.
Referenced by _q_resetButton(), and showPopupFromMouseEvent().
Definition at line 2860 of file qcombobox.cpp.
References currentText, emit, and text.
Referenced by _q_dataChanged(), and _q_emitCurrentIndexChanged().
update the default delegate depending on the style's SH_ComboBox_Popup hint, we use a different default delegate.
but we do not change the delegate is the combobox use a custom delegate, unless force is set to true.
Definition at line 1716 of file qcombobox.cpp.
References opt, and QStyle::SH_ComboBox_Popup.
Referenced by viewContainer().
void QComboBoxPrivate::updateFocusPolicy | ( | ) |
Definition at line 1172 of file qcombobox.cpp.
References Qt::TabFocus, and Qt::WheelFocus.
bool QComboBoxPrivate::updateHoverControl | ( | const QPoint & | pos | ) |
Definition at line 287 of file qcombobox.cpp.
References hoverControl, hoverRect, newHoverControl(), pos, and Qt::WA_Hover.
void QComboBoxPrivate::updateLayoutDirection | ( | ) |
Definition at line 402 of file qcombobox.cpp.
References container, dir, lineEdit, opt, QWidget::setLayoutDirection(), and QStyle::SH_ComboBox_LayoutDirection.
Referenced by viewContainer().
void QComboBoxPrivate::updateLineEditGeometry | ( | ) |
Definition at line 1222 of file qcombobox.cpp.
References QStyle::alignedRect(), Qt::AlignRight, QStyle::CC_ComboBox, lineEdit, opt, QStyle::SC_ComboBoxEditField, QWidget::setGeometry(), QRect::setWidth(), QRect::size(), and QRect::width().
Referenced by _q_dataChanged(), _q_modelReset(), _q_rowsRemoved(), and setCurrentIndex().
void QComboBoxPrivate::updateViewContainerPaletteAndOpacity | ( | ) |
Definition at line 1149 of file qcombobox.cpp.
References container, QWidget::ensurePolished(), lineEdit, menu, opt, QWidget::palette, QWidget::setPalette(), QWidget::setWindowOpacity(), QStyle::SH_ComboBox_Popup, and QWidget::windowOpacity.
Referenced by viewContainer().
QComboBoxPrivateContainer * QComboBoxPrivate::viewContainer | ( | ) |
Definition at line 1032 of file qcombobox.cpp.
References _q_emitHighlighted(), _q_itemSelected(), _q_resetButton(), QObject::connect(), container, Qt::ElideMiddle, QComboBoxPrivateContainer::itemView(), model, QAbstractItemView::selectionModel(), QAbstractItemView::setModel(), QAbstractItemView::setTextElideMode(), SIGNAL, SLOT, updateDelegate(), updateLayoutDirection(), and updateViewContainerPaletteAndOpacity().
Referenced by adjustComboBoxSize(), keyboardSearchString(), and showPopupFromMouseEvent().
QStyle::StateFlag QComboBoxPrivate::arrowState = QStyle::State_None |
Definition at line 393 of file qcombobox_p.h.
Referenced by updateArrow().
QComboBoxPrivateContainer* QComboBoxPrivate::container = nullptr |
Definition at line 379 of file qcombobox_p.h.
Referenced by adjustComboBoxSize(), doHidePopup(), showPopupFromMouseEvent(), updateLayoutDirection(), updateViewContainerPaletteAndOpacity(), and viewContainer().
QPersistentModelIndex QComboBoxPrivate::currentIndex |
Definition at line 383 of file qcombobox_p.h.
Referenced by _q_dataChanged(), _q_editingFinished(), _q_itemSelected(), _q_returnPressed(), _q_rowsInserted(), _q_rowsRemoved(), _q_updateIndexBeforeChange(), keyboardSearchString(), QComboBox::keyPressEvent(), setCurrentIndex(), and QComboBox::setModelColumn().
QString QComboBoxPrivate::currentText |
Definition at line 386 of file qcombobox_p.h.
Referenced by updateCurrentText().
bool QComboBoxPrivate::duplicatesEnabled |
Definition at line 402 of file qcombobox_p.h.
Referenced by _q_returnPressed().
bool QComboBoxPrivate::frame |
Definition at line 403 of file qcombobox_p.h.
bool QComboBoxPrivate::hidingPopup |
Definition at line 405 of file qcombobox_p.h.
QStyle::SubControl QComboBoxPrivate::hoverControl = QStyle::SC_None |
Definition at line 394 of file qcombobox_p.h.
Referenced by newHoverControl(), and updateHoverControl().
QRect QComboBoxPrivate::hoverRect |
Definition at line 387 of file qcombobox_p.h.
Referenced by newHoverControl(), and updateHoverControl().
QSize QComboBoxPrivate::iconSize |
Definition at line 388 of file qcombobox_p.h.
Referenced by recomputeSizeHint().
int QComboBoxPrivate::indexBeforeChange = -1 |
Definition at line 396 of file qcombobox_p.h.
Referenced by _q_rowsInserted(), _q_rowsRemoved(), _q_updateIndexBeforeChange(), and setCurrentIndex().
bool QComboBoxPrivate::inserting |
Definition at line 404 of file qcombobox_p.h.
Referenced by _q_dataChanged(), and _q_rowsInserted().
QComboBox::InsertPolicy QComboBoxPrivate::insertPolicy = QComboBox::InsertAtBottom |
Definition at line 391 of file qcombobox_p.h.
Referenced by _q_returnPressed().
Definition at line 378 of file qcombobox_p.h.
Referenced by _q_dataChanged(), _q_editingFinished(), _q_emitCurrentIndexChanged(), _q_itemSelected(), _q_modelReset(), _q_returnPressed(), _q_rowsRemoved(), matchFlags(), setCurrentIndex(), showPopupFromMouseEvent(), updateLayoutDirection(), updateLineEditGeometry(), and updateViewContainerPaletteAndOpacity().
int QComboBoxPrivate::maxCount = (std::numeric_limits<int>::max)() |
Definition at line 398 of file qcombobox_p.h.
int QComboBoxPrivate::maxVisibleItems = 10 |
Definition at line 397 of file qcombobox_p.h.
int QComboBoxPrivate::minimumContentsLength = 0 |
Definition at line 395 of file qcombobox_p.h.
Referenced by recomputeSizeHint().
|
mutable |
Definition at line 389 of file qcombobox_p.h.
QAbstractItemModel* QComboBoxPrivate::model = nullptr |
Definition at line 377 of file qcombobox_p.h.
Referenced by _q_modelDestroyed(), _q_rowsRemoved(), itemIcon(), itemText(), trySetValidIndex(), and viewContainer().
int QComboBoxPrivate::modelColumn = 0 |
Definition at line 399 of file qcombobox_p.h.
Referenced by setCurrentIndex(), and trySetValidIndex().
int QComboBoxPrivate::placeholderIndex = -1 |
Definition at line 400 of file qcombobox_p.h.
QString QComboBoxPrivate::placeholderText |
Definition at line 385 of file qcombobox_p.h.
Referenced by _q_rowsInserted(), and recomputeSizeHint().
QPersistentModelIndex QComboBoxPrivate::root |
Definition at line 384 of file qcombobox_p.h.
Referenced by _q_dataChanged(), _q_rowsInserted(), _q_rowsRemoved(), and trySetValidIndex().
bool QComboBoxPrivate::shownOnce |
Definition at line 401 of file qcombobox_p.h.
QComboBox::SizeAdjustPolicy QComboBoxPrivate::sizeAdjustPolicy = QComboBox::AdjustToContentsOnFirstShow |
Definition at line 392 of file qcombobox_p.h.
Referenced by _q_dataChanged(), _q_rowsInserted(), _q_rowsRemoved(), modelChanged(), and recomputeSizeHint().
|
mutable |
Definition at line 390 of file qcombobox_p.h.
Referenced by _q_dataChanged(), _q_rowsInserted(), _q_rowsRemoved(), modelChanged(), and recomputeSizeHint().