Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QComboBoxPrivate Class Reference

#include <qcombobox_p.h>

+ Inheritance diagram for QComboBoxPrivate:
+ Collaboration diagram for QComboBoxPrivate:

Public Member Functions

 QComboBoxPrivate ()
 
 ~QComboBoxPrivate ()
 
void init ()
 
QComboBoxPrivateContainerviewContainer ()
 
void updateLineEditGeometry ()
 
Qt::MatchFlags matchFlags () const
 
void _q_editingFinished ()
 
void _q_returnPressed ()
 
void _q_complete ()
 
void _q_itemSelected (const QModelIndex &item)
 
bool contains (const QString &text, int role)
 
void emitActivated (const QModelIndex &index)
 
void _q_emitHighlighted (const QModelIndex &index)
 
void _q_emitCurrentIndexChanged (const QModelIndex &index)
 
void _q_modelDestroyed ()
 
void _q_modelReset ()
 
void _q_resetButton ()
 
void _q_dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
void _q_updateIndexBeforeChange ()
 
void _q_rowsInserted (const QModelIndex &parent, int start, int end)
 
void _q_rowsRemoved (const QModelIndex &parent, int start, int end)
 
void updateArrow (QStyle::StateFlag state)
 
bool updateHoverControl (const QPoint &pos)
 
void trySetValidIndex ()
 
QRect popupGeometry (const QPoint &globalPos) const
 
QStyle::SubControl newHoverControl (const QPoint &pos)
 
int computeWidthHint () const
 
QSize recomputeSizeHint (QSize &sh) const
 
void adjustComboBoxSize ()
 
QString itemText (const QModelIndex &index) const
 
QIcon itemIcon (const QModelIndex &index) const
 
int itemRole () const
 
void updateLayoutDirection ()
 
void setCurrentIndex (const QModelIndex &index)
 
void updateDelegate (bool force=false)
 
void keyboardSearchString (const QString &text)
 
void modelChanged ()
 
void updateViewContainerPaletteAndOpacity ()
 
void updateFocusPolicy ()
 
void showPopupFromMouseEvent (QMouseEvent *e)
 
void doHidePopup ()
 
void updateCurrentText (const QString &text)
 
- Public Member Functions inherited from QWidgetPrivate
 QWidgetPrivate (int version=QObjectPrivateVersion)
 
 ~QWidgetPrivate ()
 
QWExtraextraData () const
 
QTLWExtratopData () const
 
QTLWExtramaybeTopData () const
 
QPaintersharedPainter () const
 
void setSharedPainter (QPainter *painter)
 
QWidgetRepaintManagermaybeRepaintManager () const
 
QWindowwindowHandle (WindowHandleMode mode=WindowHandleMode::Direct) const
 
QWindow_q_closestWindowHandle () const
 
QScreenassociatedScreen () const
 
template<typename T >
void repaint (T t)
 
template<typename T >
void update (T t)
 
void init (QWidget *desktopWidget, Qt::WindowFlags f)
 
void create ()
 
void createRecursively ()
 
void createWinId ()
 
bool setScreenForPoint (const QPoint &pos)
 
bool setScreen (QScreen *screen)
 
void createTLExtra ()
 
void createExtra ()
 
void deleteExtra ()
 
void createSysExtra ()
 
void deleteSysExtra ()
 
void createTLSysExtra ()
 
void deleteTLSysExtra ()
 
void updateSystemBackground ()
 
void propagatePaletteChange ()
 
void setPalette_helper (const QPalette &)
 
void resolvePalette ()
 
QPalette naturalWidgetPalette (QPalette::ResolveMask inheritedMask) const
 
void setMask_sys (const QRegion &)
 
void raise_sys ()
 
void lower_sys ()
 
void stackUnder_sys (QWidget *)
 
QWidgetdeepestFocusProxy () const
 
void setFocus_sys ()
 
void updateFocusChild ()
 
void updateFont (const QFont &)
 
void setFont_helper (const QFont &font)
 
QFont localFont () const
 
void resolveFont ()
 
QFont naturalWidgetFont (uint inheritedMask) const
 
void setLayoutDirection_helper (Qt::LayoutDirection)
 
void resolveLayoutDirection ()
 
void setLocale_helper (const QLocale &l, bool forceUpdate=false)
 
void resolveLocale ()
 
void setStyle_helper (QStyle *newStyle, bool propagate)
 
void inheritStyle ()
 
void setUpdatesEnabled_helper (bool)
 
bool updateBrushOrigin (QPainter *, const QBrush &brush) const
 
void paintBackground (QPainter *, const QRegion &, DrawWidgetFlags flags=DrawAsRoot) const
 
bool isAboutToShow () const
 The graphicsEffect function returns a pointer to the widget's graphics effect.
 
QRegion prepareToRender (const QRegion &region, QWidget::RenderFlags renderFlags)
 
void render_helper (QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
 
void render (QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
 
void drawWidget (QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, DrawWidgetFlags flags, QPainter *sharedPainter=nullptr, QWidgetRepaintManager *repaintManager=nullptr)
 
void sendPaintEvent (const QRegion &toBePainted)
 
void paintSiblingsRecursive (QPaintDevice *pdev, const QObjectList &children, int index, const QRegion &rgn, const QPoint &offset, DrawWidgetFlags flags, QPainter *sharedPainter, QWidgetRepaintManager *repaintManager)
 
bool shouldPaintOnScreen () const
 
void paintOnScreen (const QRegion &rgn)
 
QRect clipRect () const
 
QRegion clipRegion () const
 
void setSystemClip (QPaintEngine *paintEngine, qreal devicePixelRatio, const QRegion &region)
 
void subtractOpaqueChildren (QRegion &rgn, const QRect &clipRect) const
 
void subtractOpaqueSiblings (QRegion &source, bool *hasDirtySiblingsAbove=nullptr, bool alsoNonOpaque=false) const
 
void clipToEffectiveMask (QRegion &region) const
 
void updateIsOpaque ()
 
void setOpaque (bool opaque)
 
void updateIsTranslucent ()
 
const QRegiongetOpaqueChildren () const
 
void setDirtyOpaqueRegion ()
 
bool close ()
 
bool handleClose (CloseMode mode)
 
void setWindowIcon_helper ()
 
void setWindowIcon_sys ()
 
void setWindowOpacity_sys (qreal opacity)
 
void adjustQuitOnCloseAttribute ()
 
void scrollChildren (int dx, int dy)
 
void moveRect (const QRect &, int dx, int dy)
 
void scrollRect (const QRect &, int dx, int dy)
 
void invalidateBackingStore_resizeHelper (const QPoint &oldPos, const QSize &oldSize)
 Invalidates the backing store when the widget is resized.
 
template<class T >
void invalidateBackingStore (const T &)
 
QRegion overlappedRegion (const QRect &rect, bool breakAfterFirst=false) const
 
bool isOverlapped (const QRect &rect) const
 
void syncBackingStore ()
 
void syncBackingStore (const QRegion &region)
 
bool shouldDiscardSyncRequest () const
 
void updateWidgetTransform (QEvent *event)
 
void reparentFocusWidgets (QWidget *oldtlw)
 
void setWinId (WId)
 
void showChildren (bool spontaneous)
 
void hideChildren (bool spontaneous)
 
void setParent_sys (QWidget *parent, Qt::WindowFlags)
 
void scroll_sys (int dx, int dy)
 
void scroll_sys (int dx, int dy, const QRect &r)
 
void deactivateWidgetCleanup ()
 
void setGeometry_sys (int, int, int, int, bool)
 
void fixPosIncludesFrame ()
 
void sendPendingMoveAndResizeEvents (bool recursive=false, bool disableUpdates=false)
 
void activateChildLayoutsRecursively ()
 
void show_recursive ()
 
void show_helper ()
 
void show_sys ()
 
void hide_sys ()
 
void hide_helper ()
 
void _q_showIfNotHidden ()
 
void setVisible (bool)
 
void setEnabled_helper (bool)
 
void updateFrameStrut ()
 
QRect frameStrut () const
 
void setWindowIconText_sys (const QString &cap)
 
void setWindowIconText_helper (const QString &cap)
 
void setWindowTitle_sys (const QString &cap)
 
void setWindowFilePath_sys (const QString &filePath)
 
void setCursor_sys (const QCursor &cursor)
 
void unsetCursor_sys ()
 
void setWindowTitle_helper (const QString &cap)
 
void setWindowFilePath_helper (const QString &filePath)
 
void setWindowModified_helper ()
 
virtual void setWindowFlags (Qt::WindowFlags windowFlags)
 
bool setMinimumSize_helper (int &minw, int &minh)
 
bool setMaximumSize_helper (int &maxw, int &maxh)
 
void setConstraints_sys ()
 
bool pointInsideRectAndMask (const QPoint &) const
 
QWidgetchildAt_helper (const QPoint &, bool) const
 
QWidgetchildAtRecursiveHelper (const QPoint &p, bool) const
 
void updateGeometry_helper (bool forceUpdate)
 
void getLayoutItemMargins (int *left, int *top, int *right, int *bottom) const
 
void setLayoutItemMargins (int left, int top, int right, int bottom)
 
void setLayoutItemMargins (QStyle::SubElement element, const QStyleOption *opt=nullptr)
 
void updateContentsRect ()
 
QMargins safeAreaMargins () const
 
virtual void aboutToDestroy ()
 
QWidgeteffectiveFocusWidget ()
 
void setModal_sys ()
 
void setRedirected (QPaintDevice *replacement, const QPoint &offset)
 
QPaintDeviceredirected (QPoint *offset) const
 
void restoreRedirected ()
 
void enforceNativeChildren ()
 
bool nativeChildrenForced () const
 
QRect effectiveRectFor (const QRegion &region) const
 
QRect effectiveRectFor (const QRect &rect) const
 
QSize adjustedSize () const
 
void handleSoftwareInputPanel (Qt::MouseButton button, bool clickCausedFocus)
 
void handleSoftwareInputPanel (bool clickCausedFocus=false)
 
void setWSGeometry ()
 
QPoint mapToWS (const QPoint &p) const
 
QPoint mapFromWS (const QPoint &p) const
 
QRect mapToWS (const QRect &r) const
 
QRect mapFromWS (const QRect &r) const
 
virtual QObjectfocusObject ()
 
virtual QPlatformBackingStoreRhiConfig rhiConfig () const
 
virtual TextureData texture () const
 
virtual QPlatformTextureList::Flags textureListFlags ()
 
virtual QImage grabFramebuffer ()
 
virtual void beginBackingStorePainting ()
 
virtual void endBackingStorePainting ()
 
virtual void beginCompose ()
 
virtual void endCompose ()
 
void setRenderToTexture ()
 
void setTextureChildSeen ()
 
virtual void initializeViewportFramebuffer ()
 
virtual void resizeViewportFramebuffer ()
 
virtual void resolveSamples ()
 
virtual bool isStereoEnabled ()
 
virtual bool toggleStereoTargetBuffer ()
 
std::string flagsForDumping () const override
 
void setNetWmWindowTypes (bool skipIfMissing=false)
 
bool stealKeyboardGrab (bool grab)
 
bool stealMouseGrab (bool grab)
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
void _q_reregisterTimers (void *pointer)
 
bool isSender (const QObject *receiver, const char *signal) const
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Public Attributes

QAbstractItemModelmodel = nullptr
 
QLineEditlineEdit = nullptr
 
QComboBoxPrivateContainercontainer = nullptr
 
QPersistentModelIndex currentIndex
 
QPersistentModelIndex root
 
QString placeholderText
 
QString currentText
 
QRect hoverRect
 
QSize iconSize
 
QSize minimumSizeHint
 
QSize sizeHint
 
QComboBox::InsertPolicy insertPolicy = QComboBox::InsertAtBottom
 
QComboBox::SizeAdjustPolicy sizeAdjustPolicy = QComboBox::AdjustToContentsOnFirstShow
 
QStyle::StateFlag arrowState = QStyle::State_None
 
QStyle::SubControl hoverControl = QStyle::SC_None
 
int minimumContentsLength = 0
 
int indexBeforeChange = -1
 
int maxVisibleItems = 10
 
int maxCount = (std::numeric_limits<int>::max)()
 
int modelColumn = 0
 
int placeholderIndex = -1
 
bool shownOnce: 1
 
bool duplicatesEnabled: 1
 
bool frame: 1
 
bool inserting: 1
 
bool hidingPopup: 1
 
- Public Attributes inherited from QWidgetPrivate
std::unique_ptr< QWExtraextra
 
QWidgetfocus_next
 
QWidgetfocus_prev
 
QWidgetfocus_child
 
QLayoutlayout
 
QRegionneedsFlush
 
QPaintDeviceredirectDev
 
QWidgetItemV2widgetItem
 
QPaintEngineextraPaintEngine
 
const QMetaObjectpolished
 
QGraphicsEffectgraphicsEffect
 
Qt::InputMethodHints imHints
 
QRegion opaqueChildren
 
QRegion dirty
 
uint directFontResolveMask
 
uint inheritedFontResolveMask
 
decltype(std::declval< QPalette >().resolveMask()) directPaletteResolveMask
 
QPalette::ResolveMask inheritedPaletteResolveMask
 
short leftmargin
 
short topmargin
 
short rightmargin
 
short bottommargin
 
signed char leftLayoutItemMargin
 
signed char topLayoutItemMargin
 
signed char rightLayoutItemMargin
 
signed char bottomLayoutItemMargin
 
Qt::HANDLE hd
 
QWidgetData data
 
QSizePolicy size_policy
 
QLocale locale
 
QPoint redirectOffset
 
QList< QAction * > actions
 
QMap< Qt::GestureType, Qt::GestureFlags > gestureContext
 
uint high_attributes [4]
 
QPalette::ColorRole fg_role: 8
 
QPalette::ColorRole bg_role: 8
 
uint dirtyOpaqueChildren: 1
 
uint isOpaque: 1
 
uint retainSizeWhenHiddenChanged: 1
 
uint inDirtyList: 1
 
uint isScrolled: 1
 
uint isMoved: 1
 
uint usesDoubleBufferedGLContext: 1
 
uint mustHaveWindowHandle: 1
 
uint renderToTexture: 1
 
uint textureChildSeen: 1
 
uint inheritsInputMethodHints: 1
 
uint renderToTextureReallyDirty: 1
 
uint usesRhiFlush: 1
 
uint childrenHiddenByWState: 1
 
uint childrenShownByExpose: 1
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint unused: 21
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Additional Inherited Members

- Public Types inherited from QWidgetPrivate
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 }
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData >
 
- Static Public Member Functions inherited from QWidgetPrivate
static QWidgetPrivateget (QWidget *w)
 
static const QWidgetPrivateget (const QWidget *w)
 
static void checkRestoredGeometry (const QRect &availableGeometry, QRect *restoredGeometry, int frameHeight)
 
static void adjustFlags (Qt::WindowFlags &flags, QWidget *w=nullptr)
 
static QWidgetparentGraphicsView (const QWidget *widget)
 
static QRect screenGeometry (const QWidget *widget)
 
static QRect availableScreenGeometry (const QWidget *widget)
 
static QScreenscreen (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 Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (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 QWidgetMappermapper = nullptr
 
static QWidgetSetallWidgets = nullptr
 
static int instanceCounter = 0
 
static int maxInstances = 0
 

Detailed Description

Definition at line 312 of file qcombobox_p.h.

Constructor & Destructor Documentation

◆ QComboBoxPrivate()

QComboBoxPrivate::QComboBoxPrivate ( )

Definition at line 56 of file qcombobox.cpp.

◆ ~QComboBoxPrivate()

QComboBoxPrivate::~QComboBoxPrivate ( )

Definition at line 66 of file qcombobox.cpp.

Member Function Documentation

◆ _q_complete()

void QComboBoxPrivate::_q_complete ( )

◆ _q_dataChanged()

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().

+ Here is the call graph for this function:

◆ _q_editingFinished()

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.

+ Here is the call graph for this function:

◆ _q_emitCurrentIndexChanged()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _q_emitHighlighted()

void QComboBoxPrivate::_q_emitHighlighted ( const QModelIndex index)

Definition at line 1371 of file qcombobox.cpp.

References emit, itemText(), and text.

Referenced by viewContainer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _q_itemSelected()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _q_modelDestroyed()

void QComboBoxPrivate::_q_modelDestroyed ( )

Definition at line 255 of file qcombobox.cpp.

References model, and QAbstractItemModelPrivate::staticEmptyModel().

+ Here is the call graph for this function:

◆ _q_modelReset()

void QComboBoxPrivate::_q_modelReset ( )

Definition at line 243 of file qcombobox.cpp.

References lineEdit, modelChanged(), QLineEdit::setText(), trySetValidIndex(), and updateLineEditGeometry().

+ Here is the call graph for this function:

◆ _q_resetButton()

void QComboBoxPrivate::_q_resetButton ( )

Definition at line 1054 of file qcombobox.cpp.

References QStyle::State_None, and updateArrow().

Referenced by doHidePopup(), and viewContainer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _q_returnPressed()

◆ _q_rowsInserted()

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.

+ Here is the call graph for this function:

◆ _q_rowsRemoved()

void QComboBoxPrivate::_q_rowsRemoved ( const QModelIndex parent,
int  start,
int  end 
)

◆ _q_updateIndexBeforeChange()

void QComboBoxPrivate::_q_updateIndexBeforeChange ( )

Definition at line 1110 of file qcombobox.cpp.

References currentIndex, indexBeforeChange, and QPersistentModelIndex::row().

+ Here is the call graph for this function:

◆ adjustComboBoxSize()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ computeWidthHint()

int QComboBoxPrivate::computeWidthHint ( ) const

Definition at line 319 of file qcombobox.cpp.

References QStyle::CT_ComboBox, fontMetrics, i, opt, qMax(), and QSize::width().

+ Here is the call graph for this function:

◆ contains()

bool QComboBoxPrivate::contains ( const QString text,
int  role 
)

◆ doHidePopup()

void QComboBoxPrivate::doHidePopup ( )

Definition at line 2852 of file qcombobox.cpp.

References _q_resetButton(), container, QWidget::hide(), and QWidget::isVisible().

+ Here is the call graph for this function:

◆ emitActivated()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

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.

+ Here is the call graph for this function:

◆ itemIcon()

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().

+ Here is the call graph for this function:

◆ itemRole()

int QComboBoxPrivate::itemRole ( ) const

Definition at line 1400 of file qcombobox.cpp.

References Qt::DisplayRole, and Qt::EditRole.

Referenced by itemText().

+ Here is the caller graph for this function:

◆ 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ keyboardSearchString()

void QComboBoxPrivate::keyboardSearchString ( const QString text)

Definition at line 3364 of file qcombobox.cpp.

References currentIndex, emitActivated(), QComboBoxPrivateContainer::itemView(), setCurrentIndex(), text, view, and viewContainer().

+ Here is the call graph for this function:

◆ matchFlags()

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().

+ Here is the caller graph for this function:

◆ modelChanged()

void QComboBoxPrivate::modelChanged ( )

Definition at line 3377 of file qcombobox.cpp.

References adjustComboBoxSize(), QComboBox::AdjustToContents, sizeAdjustPolicy, and sizeHint.

Referenced by _q_modelReset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ newHoverControl()

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().

+ Here is the caller graph for this function:

◆ popupGeometry()

QRect QComboBoxPrivate::popupGeometry ( const QPoint globalPos) const

Definition at line 279 of file qcombobox.cpp.

References QWidgetPrivate::availableScreenGeometry(), QWidgetPrivate::screenGeometry(), and QStylePrivate::useFullScreenForPopup().

+ Here is the call graph for this function:

◆ recomputeSizeHint()

◆ setCurrentIndex()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPopupFromMouseEvent()

void QComboBoxPrivate::showPopupFromMouseEvent ( QMouseEvent e)

◆ trySetValidIndex()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateArrow()

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().

+ Here is the caller graph for this function:

◆ updateCurrentText()

void QComboBoxPrivate::updateCurrentText ( const QString text)

Definition at line 2860 of file qcombobox.cpp.

References currentText, emit, and text.

Referenced by _q_dataChanged(), and _q_emitCurrentIndexChanged().

+ Here is the caller graph for this function:

◆ updateDelegate()

void QComboBoxPrivate::updateDelegate ( bool  force = false)

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().

+ Here is the caller graph for this function:

◆ updateFocusPolicy()

void QComboBoxPrivate::updateFocusPolicy ( )

Definition at line 1172 of file qcombobox.cpp.

References Qt::TabFocus, and Qt::WheelFocus.

◆ updateHoverControl()

bool QComboBoxPrivate::updateHoverControl ( const QPoint pos)

Definition at line 287 of file qcombobox.cpp.

References hoverControl, hoverRect, newHoverControl(), pos, and Qt::WA_Hover.

+ Here is the call graph for this function:

◆ updateLayoutDirection()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateLineEditGeometry()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateViewContainerPaletteAndOpacity()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ arrowState

QStyle::StateFlag QComboBoxPrivate::arrowState = QStyle::State_None

Definition at line 393 of file qcombobox_p.h.

Referenced by updateArrow().

◆ container

◆ currentIndex

◆ currentText

QString QComboBoxPrivate::currentText

Definition at line 386 of file qcombobox_p.h.

Referenced by updateCurrentText().

◆ duplicatesEnabled

bool QComboBoxPrivate::duplicatesEnabled

Definition at line 402 of file qcombobox_p.h.

Referenced by _q_returnPressed().

◆ frame

bool QComboBoxPrivate::frame

Definition at line 403 of file qcombobox_p.h.

◆ hidingPopup

bool QComboBoxPrivate::hidingPopup

Definition at line 405 of file qcombobox_p.h.

◆ hoverControl

QStyle::SubControl QComboBoxPrivate::hoverControl = QStyle::SC_None

Definition at line 394 of file qcombobox_p.h.

Referenced by newHoverControl(), and updateHoverControl().

◆ hoverRect

QRect QComboBoxPrivate::hoverRect

Definition at line 387 of file qcombobox_p.h.

Referenced by newHoverControl(), and updateHoverControl().

◆ iconSize

QSize QComboBoxPrivate::iconSize

Definition at line 388 of file qcombobox_p.h.

Referenced by recomputeSizeHint().

◆ indexBeforeChange

int QComboBoxPrivate::indexBeforeChange = -1

◆ inserting

bool QComboBoxPrivate::inserting

Definition at line 404 of file qcombobox_p.h.

Referenced by _q_dataChanged(), and _q_rowsInserted().

◆ insertPolicy

QComboBox::InsertPolicy QComboBoxPrivate::insertPolicy = QComboBox::InsertAtBottom

Definition at line 391 of file qcombobox_p.h.

Referenced by _q_returnPressed().

◆ lineEdit

◆ maxCount

int QComboBoxPrivate::maxCount = (std::numeric_limits<int>::max)()

Definition at line 398 of file qcombobox_p.h.

◆ maxVisibleItems

int QComboBoxPrivate::maxVisibleItems = 10

Definition at line 397 of file qcombobox_p.h.

◆ minimumContentsLength

int QComboBoxPrivate::minimumContentsLength = 0

Definition at line 395 of file qcombobox_p.h.

Referenced by recomputeSizeHint().

◆ minimumSizeHint

QSize QComboBoxPrivate::minimumSizeHint
mutable

Definition at line 389 of file qcombobox_p.h.

◆ model

QAbstractItemModel* QComboBoxPrivate::model = nullptr

◆ modelColumn

int QComboBoxPrivate::modelColumn = 0

Definition at line 399 of file qcombobox_p.h.

Referenced by setCurrentIndex(), and trySetValidIndex().

◆ placeholderIndex

int QComboBoxPrivate::placeholderIndex = -1

Definition at line 400 of file qcombobox_p.h.

◆ placeholderText

QString QComboBoxPrivate::placeholderText

Definition at line 385 of file qcombobox_p.h.

Referenced by _q_rowsInserted(), and recomputeSizeHint().

◆ root

QPersistentModelIndex QComboBoxPrivate::root

Definition at line 384 of file qcombobox_p.h.

Referenced by _q_dataChanged(), _q_rowsInserted(), _q_rowsRemoved(), and trySetValidIndex().

◆ shownOnce

bool QComboBoxPrivate::shownOnce

Definition at line 401 of file qcombobox_p.h.

◆ sizeAdjustPolicy

◆ sizeHint

QSize QComboBoxPrivate::sizeHint
mutable

The documentation for this class was generated from the following files: