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>.
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 editingFinished ()
 
void returnPressed ()
 
void complete ()
 
void itemSelected (const QModelIndex &item)
 
bool contains (const QString &text, int role)
 
void emitActivated (const QModelIndex &index)
 
void emitHighlighted (const QModelIndex &index)
 
void emitCurrentIndexChanged (const QModelIndex &index)
 
void modelDestroyed ()
 
void modelReset ()
 
void updateMicroFocus ()
 
void resetButton ()
 
void dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
void updateIndexBeforeChange ()
 
void rowsInserted (const QModelIndex &parent, int start, int end)
 
void 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)
 
void connectModel ()
 
void disconnectModel ()
 
- 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
 
QRhirhi () 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 reparentWidgetWindows (QWidget *parentWithWindow, Qt::WindowFlags windowFlags={})
 
void reparentWidgetWindowChildren (QWidget *parentWithWindow)
 
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 ()
 
bool isExplicitlyHidden () const
 
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
 
QWidgetclosestParentWidgetWithWindowHandle () const
 
QWidgetnextPrevElementInFocusChain (FocusDirection direction) const
 
bool removeFromFocusChain (FocusChainRemovalRules rules=FocusChainRemovalRules(), FocusDirection direction=FocusDirection::Next)
 
bool insertIntoFocusChain (FocusDirection direction, QWidget *position)
 
bool insertIntoFocusChainBefore (QWidget *position)
 
bool insertIntoFocusChainAfter (QWidget *position)
 
void reparentFocusChildren (FocusDirection direction)
 
QWidgetdetermineLastFocusChild (QWidget *noFurtherThan)
 
void initFocusChain ()
 
bool isInFocusChain () const
 
bool isFocusChainConsistent () const
 
void setNetWmWindowTypes (bool skipIfMissing=false)
 
bool stealKeyboardGrab (bool grab)
 
bool stealMouseGrab (bool grab)
 
bool hasChildWithFocusPolicy (Qt::FocusPolicy policy, const QWidget *excludeChildrenOf=nullptr) const
 
- 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)
 
QObjectList receiverList (const char *signal) 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 void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Public Attributes

std::array< QMetaObject::Connection, 8 > modelConnections
 
QAbstractItemModelmodel = nullptr
 
QLineEditlineEdit = nullptr
 
QPointer< QComboBoxPrivateContainercontainer
 
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 receiveParentEvents: 1
 
uint unused: 20
 
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 }
 
enum class  FocusDirection { Previous , Next }
 
enum class  FocusChainRemovalRule { EnsureFocusOut = 0x01 , AssertConsistency = 0x02 }
 
- 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 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 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 59 of file qcombobox.cpp.

◆ ~QComboBoxPrivate()

QComboBoxPrivate::~QComboBoxPrivate ( )

Definition at line 69 of file qcombobox.cpp.

References disconnectModel().

+ Here is the call graph for this function:

Member Function Documentation

◆ adjustComboBoxSize()

void QComboBoxPrivate::adjustComboBoxSize ( )

Definition at line 401 of file qcombobox.cpp.

References QComboBoxPrivateContainer::adjustSizeTimer, container, QBasicTimer::start(), and viewContainer().

Referenced by dataChanged(), modelChanged(), rowsInserted(), and rowsRemoved().

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

◆ complete()

void QComboBoxPrivate::complete ( )

◆ computeWidthHint()

int QComboBoxPrivate::computeWidthHint ( ) const

Definition at line 323 of file qcombobox.cpp.

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

+ Here is the call graph for this function:

◆ connectModel()

void QComboBoxPrivate::connectModel ( )

Definition at line 2077 of file qcombobox.cpp.

References QObjectPrivate::connect(), dataChanged(), QAbstractItemModel::dataChanged(), QObject::destroyed(), model, QAbstractItemModel::modelAboutToBeReset(), modelConnections, modelDestroyed(), modelReset(), QAbstractItemModel::modelReset(), QAbstractItemModel::rowsAboutToBeInserted(), QAbstractItemModel::rowsAboutToBeRemoved(), QAbstractItemModel::rowsInserted(), rowsInserted(), QAbstractItemModel::rowsRemoved(), rowsRemoved(), and updateIndexBeforeChange().

Referenced by viewContainer().

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

◆ contains()

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

◆ dataChanged()

void QComboBoxPrivate::dataChanged ( const QModelIndex & topLeft,
const QModelIndex & bottomRight )

Definition at line 1088 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().

Referenced by connectModel().

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

◆ disconnectModel()

void QComboBoxPrivate::disconnectModel ( )

Definition at line 2102 of file qcombobox.cpp.

References connection, QObject::disconnect(), and modelConnections.

Referenced by ~QComboBoxPrivate(), and viewContainer().

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

◆ doHidePopup()

void QComboBoxPrivate::doHidePopup ( )

Definition at line 2912 of file qcombobox.cpp.

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

+ Here is the call graph for this function:

◆ editingFinished()

void QComboBoxPrivate::editingFinished ( )

Definition at line 1293 of file qcombobox.cpp.

References currentIndex, emitActivated(), QCompleterPrivate::get(), itemText(), lineEdit, matchFlags(), and QLineEdit::text.

Referenced by QComboBox::setLineEdit().

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

◆ emitActivated()

void QComboBoxPrivate::emitActivated ( const QModelIndex & index)

Definition at line 1401 of file qcombobox.cpp.

References emit, itemText(), and text.

Referenced by editingFinished(), itemSelected(), keyboardSearchString(), and returnPressed().

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

◆ emitCurrentIndexChanged()

void QComboBoxPrivate::emitCurrentIndexChanged ( const QModelIndex & index)

Definition at line 1421 of file qcombobox.cpp.

References emit, itemText(), lineEdit, text, and updateCurrentText().

Referenced by rowsInserted(), rowsRemoved(), and setCurrentIndex().

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

◆ emitHighlighted()

void QComboBoxPrivate::emitHighlighted ( const QModelIndex & index)

Definition at line 1411 of file qcombobox.cpp.

References emit, itemText(), and text.

Referenced by QComboBox::setModel(), and viewContainer().

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

◆ init()

void QComboBoxPrivate::init ( )

Definition at line 1034 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 1772 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 1440 of file qcombobox.cpp.

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

Referenced by itemText().

+ Here is the caller graph for this function:

◆ itemSelected()

void QComboBoxPrivate::itemSelected ( const QModelIndex & item)

Definition at line 1389 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:

◆ itemText()

QString QComboBoxPrivate::itemText ( const QModelIndex & index) const

Definition at line 1435 of file qcombobox.cpp.

References QAbstractItemModel::data(), itemRole(), and model.

Referenced by editingFinished(), emitActivated(), emitCurrentIndexChanged(), emitHighlighted(), 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 3429 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 1281 of file qcombobox.cpp.

References Qt::CaseSensitive, lineEdit, Qt::MatchCaseSensitive, and Qt::MatchFixedString.

Referenced by editingFinished(), and returnPressed().

+ Here is the caller graph for this function:

◆ modelChanged()

void QComboBoxPrivate::modelChanged ( )

Definition at line 3442 of file qcombobox.cpp.

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

Referenced by modelReset().

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

◆ modelDestroyed()

void QComboBoxPrivate::modelDestroyed ( )

Definition at line 259 of file qcombobox.cpp.

References model, and QAbstractItemModelPrivate::staticEmptyModel().

Referenced by connectModel().

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

◆ modelReset()

void QComboBoxPrivate::modelReset ( )

Definition at line 247 of file qcombobox.cpp.

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

Referenced by connectModel().

+ 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 306 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 283 of file qcombobox.cpp.

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

+ Here is the call graph for this function:

◆ recomputeSizeHint()

QSize QComboBoxPrivate::recomputeSizeHint ( QSize & sh) const

◆ resetButton()

void QComboBoxPrivate::resetButton ( )

Definition at line 1083 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:

◆ returnPressed()

void QComboBoxPrivate::returnPressed ( )

Definition at line 1325 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().

Referenced by QComboBox::setLineEdit().

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

◆ rowsInserted()

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

Definition at line 1116 of file qcombobox.cpp.

References adjustComboBoxSize(), QComboBox::AdjustToContents, container, currentIndex, emitCurrentIndexChanged(), indexBeforeChange, inserting, QString::isEmpty(), QPersistentModelIndex::isValid(), QComboBoxPrivateContainer::itemView(), QObjectData::parent, placeholderText, root, QPersistentModelIndex::row(), sizeAdjustPolicy, and sizeHint.

Referenced by connectModel().

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

◆ rowsRemoved()

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

Definition at line 1155 of file qcombobox.cpp.

References adjustComboBoxSize(), QComboBox::AdjustToContents, currentIndex, emitCurrentIndexChanged(), indexBeforeChange, QPersistentModelIndex::isValid(), lineEdit, model, QObjectData::parent, qMax(), qMin(), root, QPersistentModelIndex::row(), QAbstractItemModel::rowCount(), setCurrentIndex(), QLineEdit::setText(), sizeAdjustPolicy, sizeHint, and updateLineEditGeometry().

Referenced by connectModel().

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

◆ setCurrentIndex()

void QComboBoxPrivate::setCurrentIndex ( const QModelIndex & index)

Definition at line 2168 of file qcombobox.cpp.

References QItemSelectionModel::ClearAndSelect, currentIndex, emitCurrentIndexChanged(), indexBeforeChange, itemText(), lineEdit, model, modelColumn, QItemSelectionModel::Rows, QAbstractItemView::SelectRows, QLineEdit::setText(), QModelIndex::sibling(), QLineEdit::text, and updateLineEditGeometry().

Referenced by itemSelected(), keyboardSearchString(), QComboBox::keyPressEvent(), rowsRemoved(), QComboBox::setModelColumn(), and trySetValidIndex().

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

◆ showPopupFromMouseEvent()

◆ trySetValidIndex()

void QComboBoxPrivate::trySetValidIndex ( )

Definition at line 264 of file qcombobox.cpp.

References QModelIndex::flags(), QAbstractItemModel::index(), Qt::ItemIsEnabled, model, modelColumn, pos, root, and setCurrentIndex().

Referenced by 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 236 of file qcombobox.cpp.

References arrowState, opt, and state.

Referenced by resetButton(), and showPopupFromMouseEvent().

+ Here is the caller graph for this function:

◆ updateCurrentText()

void QComboBoxPrivate::updateCurrentText ( const QString & text)

Definition at line 2920 of file qcombobox.cpp.

References currentText, emit, and text.

Referenced by dataChanged(), and 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 1758 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 1212 of file qcombobox.cpp.

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

◆ updateHoverControl()

bool QComboBoxPrivate::updateHoverControl ( const QPoint & pos)

Definition at line 291 of file qcombobox.cpp.

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

+ Here is the call graph for this function:

◆ updateIndexBeforeChange()

void QComboBoxPrivate::updateIndexBeforeChange ( )

Definition at line 1150 of file qcombobox.cpp.

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

Referenced by connectModel().

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

◆ updateLayoutDirection()

void QComboBoxPrivate::updateLayoutDirection ( )

Definition at line 406 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 1262 of file qcombobox.cpp.

References QStyle::alignedRect(), Qt::AlignRight, QStyle::CC_ComboBox, lineEdit, opt, QStyle::SC_ComboBoxEditField, and QWidget::setGeometry().

Referenced by dataChanged(), modelReset(), rowsRemoved(), and setCurrentIndex().

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

◆ updateMicroFocus()

void QComboBoxPrivate::updateMicroFocus ( )
inline

Definition at line 332 of file qcombobox_p.h.

Referenced by QComboBox::setLineEdit().

+ Here is the caller graph for this function:

◆ updateViewContainerPaletteAndOpacity()

void QComboBoxPrivate::updateViewContainerPaletteAndOpacity ( )

Definition at line 1189 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 1058 of file qcombobox.cpp.

References QObjectPrivate::connect(), connectModel(), container, QItemSelectionModel::currentChanged(), disconnectModel(), Qt::ElideMiddle, emitHighlighted(), QComboBoxPrivateContainer::itemSelected(), itemSelected(), QComboBoxPrivateContainer::itemView(), model, QComboBoxPrivateContainer::resetButton(), resetButton(), QAbstractItemView::selectionModel(), QAbstractItemView::setModel(), QAbstractItemView::setTextElideMode(), 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 397 of file qcombobox_p.h.

Referenced by updateArrow().

◆ container

◆ currentIndex

◆ currentText

QString QComboBoxPrivate::currentText

Definition at line 390 of file qcombobox_p.h.

Referenced by updateCurrentText().

◆ duplicatesEnabled

bool QComboBoxPrivate::duplicatesEnabled

Definition at line 406 of file qcombobox_p.h.

Referenced by returnPressed().

◆ frame

bool QComboBoxPrivate::frame

Definition at line 407 of file qcombobox_p.h.

◆ hidingPopup

bool QComboBoxPrivate::hidingPopup

Definition at line 409 of file qcombobox_p.h.

◆ hoverControl

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

Definition at line 398 of file qcombobox_p.h.

Referenced by newHoverControl(), and updateHoverControl().

◆ hoverRect

QRect QComboBoxPrivate::hoverRect

Definition at line 391 of file qcombobox_p.h.

Referenced by newHoverControl(), and updateHoverControl().

◆ iconSize

QSize QComboBoxPrivate::iconSize

Definition at line 392 of file qcombobox_p.h.

Referenced by recomputeSizeHint().

◆ indexBeforeChange

int QComboBoxPrivate::indexBeforeChange = -1

Definition at line 400 of file qcombobox_p.h.

Referenced by rowsInserted(), rowsRemoved(), setCurrentIndex(), and updateIndexBeforeChange().

◆ inserting

bool QComboBoxPrivate::inserting

Definition at line 408 of file qcombobox_p.h.

Referenced by dataChanged(), and rowsInserted().

◆ insertPolicy

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

Definition at line 395 of file qcombobox_p.h.

Referenced by returnPressed().

◆ lineEdit

◆ maxCount

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

Definition at line 402 of file qcombobox_p.h.

◆ maxVisibleItems

int QComboBoxPrivate::maxVisibleItems = 10

Definition at line 401 of file qcombobox_p.h.

◆ minimumContentsLength

int QComboBoxPrivate::minimumContentsLength = 0

Definition at line 399 of file qcombobox_p.h.

Referenced by recomputeSizeHint().

◆ minimumSizeHint

QSize QComboBoxPrivate::minimumSizeHint
mutable

Definition at line 393 of file qcombobox_p.h.

◆ model

◆ modelColumn

int QComboBoxPrivate::modelColumn = 0

Definition at line 403 of file qcombobox_p.h.

Referenced by setCurrentIndex(), and trySetValidIndex().

◆ modelConnections

std::array<QMetaObject::Connection, 8> QComboBoxPrivate::modelConnections

Definition at line 380 of file qcombobox_p.h.

Referenced by connectModel(), and disconnectModel().

◆ placeholderIndex

int QComboBoxPrivate::placeholderIndex = -1

Definition at line 404 of file qcombobox_p.h.

◆ placeholderText

QString QComboBoxPrivate::placeholderText

Definition at line 389 of file qcombobox_p.h.

Referenced by recomputeSizeHint(), and rowsInserted().

◆ root

QPersistentModelIndex QComboBoxPrivate::root

Definition at line 388 of file qcombobox_p.h.

Referenced by dataChanged(), rowsInserted(), rowsRemoved(), and trySetValidIndex().

◆ shownOnce

bool QComboBoxPrivate::shownOnce

Definition at line 405 of file qcombobox_p.h.

◆ sizeAdjustPolicy

◆ sizeHint

QSize QComboBoxPrivate::sizeHint
mutable

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