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
QDateTimeEditPrivate Class Reference

#include <qdatetimeedit_p.h>

+ Inheritance diagram for QDateTimeEditPrivate:
+ Collaboration diagram for QDateTimeEditPrivate:

Public Member Functions

 QDateTimeEditPrivate (const QTimeZone &zone=QTimeZone::LocalTime)
 
void init (const QVariant &var)
 
void readLocaleSettings ()
 
QDateTime validateAndInterpret (QString &input, int &, QValidator::State &state, bool fixup=false) const
 
void clearSection (int index)
 
void emitSignals (EmitPolicy ep, const QVariant &old) override
 
QString textFromValue (const QVariant &f) const override
 
QVariant valueFromText (const QString &f) const override
 
void editorCursorPositionChanged (int oldpos, int newpos) override
 
void interpret (EmitPolicy ep) override
 
void clearCache () const override
 
QStyle::SubControl newHoverControl (const QPoint &pos) override
 
void updateEditFieldGeometry () override
 
QVariant getZeroVariant () const override
 
void setRange (const QVariant &min, const QVariant &max) override
 
void updateEdit () override
 
QString displayText () const override
 
QDateTime getMinimum () const override
 
QDateTime getMaximum () const override
 
QLocale locale () const override
 
int cursorPosition () const override
 
int absoluteIndex (QDateTimeEdit::Section s, int index) const
 
int absoluteIndex (SectionNode s) const
 
QDateTime stepBy (int index, int steps, bool test=false) const
 
int sectionAt (int pos) const
 
int closestSection (int index, bool forward) const
 
int nextPrevSection (int index, bool forward) const
 
void setSelected (int index, bool forward=false)
 
void updateCache (const QVariant &val, const QString &str) const
 
QDateTime convertTimeZone (const QDateTime &datetime)
 
void updateTimeZone ()
 
QString valueToText (const QVariant &var) const
 
QDateTime dateTimeValue (QDate date, QTime time) const
 
void _q_resetButton ()
 
void updateArrow (QStyle::StateFlag state)
 
bool calendarPopupEnabled () const
 
void syncCalendarWidget ()
 
bool isSeparatorKey (const QKeyEvent *k) const
 
void initCalendarPopup (QCalendarWidget *cw=nullptr)
 
void positionCalendarPopup ()
 
- Public Member Functions inherited from QAbstractSpinBoxPrivate
 QAbstractSpinBoxPrivate ()
 
 ~QAbstractSpinBoxPrivate ()
 
void init ()
 
void reset ()
 
void updateState (bool up, bool fromKeyboard=false)
 
QString stripped (const QString &text, int *pos=nullptr) const
 
bool specialValue () const
 
void setValue (const QVariant &val, EmitPolicy ep, bool updateEdit=true)
 
virtual QVariant bound (const QVariant &val, const QVariant &old=QVariant(), int steps=0) const
 
void editorTextChanged (const QString &)
 
bool updateHoverControl (const QPoint &pos)
 
virtual QVariant calculateAdaptiveDecimalStep (int steps) const
 
- 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 Member Functions inherited from QDateTimeParser
 QDateTimeParser (QMetaType::Type t, Context ctx, QCalendar cal=QCalendar())
 
virtual ~QDateTimeParser ()
 
StateNode parse (const QString &input, int position, const QDateTime &defaultValue, bool fixup) const
 
bool fromString (const QString &text, QDate *date, QTime *time, int baseYear=QLocale::DefaultTwoDigitBaseYear) const
 
bool fromString (const QString &text, QDateTime *datetime, int baseYear) const
 
bool parseFormat (QStringView format)
 
FieldInfo fieldInfo (int index) const
 
void setDefaultLocale (const QLocale &loc)
 
void setCalendar (QCalendar calendar)
 Sets cal as the calendar to use.
 

Static Public Member Functions

static QDateTimeEdit::Sections convertSections (QDateTimeParser::Sections s)
 
static QDateTimeEdit::Section convertToPublic (QDateTimeParser::Section s)
 
- Static Public Member Functions inherited from QAbstractSpinBoxPrivate
static int variantCompare (const QVariant &arg1, const QVariant &arg2)
 
static QVariant variantBound (const QVariant &min, const QVariant &value, const QVariant &max)
 
- 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)
 

Public Attributes

QDateTimeEdit::Sections sections = {}
 
bool cacheGuard = false
 
QString defaultDateFormat
 
QString defaultTimeFormat
 
QString defaultDateTimeFormat
 
QString unreversedFormat
 
QVariant conflictGuard
 
bool hasHadFocus = false
 
bool formatExplicitlySet = false
 
bool calendarPopup = false
 
QStyle::StateFlag arrowState = QStyle::State_None
 
QCalendarPopupmonthCalendar = nullptr
 
QTimeZone timeZone
 
- Public Attributes inherited from QAbstractSpinBoxPrivate
QString prefix
 
QString suffix
 
QString specialValueText
 
QVariant value
 
QVariant minimum
 
QVariant maximum
 
QVariant singleStep
 
QRect hoverRect
 
QString cachedText = { u'\x01' }
 
QVariant cachedValue
 
QSize cachedSizeHint
 
QSize cachedMinimumSizeHint
 
QLineEditedit = nullptr
 
QSpinBoxValidatorvalidator = nullptr
 
QMetaType::Type type = QMetaType::UnknownType
 
int spinClickTimerId = -1
 
int spinClickTimerInterval = 100
 
int spinClickThresholdTimerId = -1
 
int spinClickThresholdTimerInterval = -1
 
qreal effectiveSpinRepeatRate = 1
 
int acceleration = 0
 
int wheelDeltaRemainder = 0
 
Qt::KeyboardModifiers keyboardModifiers = Qt::NoModifier
 
Qt::KeyboardModifier stepModifier = Qt::ControlModifier
 
QAbstractSpinBox::CorrectionMode correctionMode = QAbstractSpinBox::CorrectToPreviousValue
 
QAbstractSpinBox::StepType stepType = QAbstractSpinBox::StepType::DefaultStepType
 
QAbstractSpinBox::ButtonSymbols buttonSymbols = QAbstractSpinBox::UpDownArrows
 
QStyle::SubControl hoverControl = QStyle::SC_None
 
QValidator::State cachedState = QValidator::Invalid
 
uint buttonState = None
 
uint pendingEmit: 1
 
uint readOnly: 1
 
uint wrapping: 1
 
uint ignoreCursorPositionChanged: 1
 
uint frame: 1
 
uint accelerate: 1
 
uint keyboardTracking: 1
 
uint cleared: 1
 
uint ignoreUpdateEdit: 1
 
uint showGroupSeparator: 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>
 
- Public Types inherited from QDateTimeParser
enum  Context { FromString , DateTimeEdit }
 
enum  Section {
  NoSection = 0x00000 , AmPmSection = 0x00001 , MSecSection = 0x00002 , SecondSection = 0x00004 ,
  MinuteSection = 0x00008 , Hour12Section = 0x00010 , Hour24Section = 0x00020 , TimeZoneSection = 0x00040 ,
  HourSectionMask = (Hour12Section | Hour24Section) , TimeSectionMask , DaySection = 0x00100 , MonthSection = 0x00200 ,
  YearSection = 0x00400 , YearSection2Digits = 0x00800 , YearSectionMask = YearSection | YearSection2Digits , DayOfWeekSectionShort = 0x01000 ,
  DayOfWeekSectionLong = 0x02000 , DayOfWeekSectionMask = DayOfWeekSectionShort | DayOfWeekSectionLong , DaySectionMask = DaySection | DayOfWeekSectionMask , DateSectionMask = DaySectionMask | MonthSection | YearSectionMask ,
  Internal = 0x10000 , FirstSection = 0x20000 | Internal , LastSection = 0x40000 | Internal , CalendarPopupSection = 0x80000 | Internal ,
  NoSectionIndex = -1 , FirstSectionIndex = -2 , LastSectionIndex = -3 , CalendarPopupIndex = -4
}
 
enum  State { Invalid , Intermediate , Acceptable }
 
enum  AmPm { AmText , PmText }
 
enum  FieldInfoFlag { Numeric = 0x01 , FixedWidth = 0x02 , AllowPartial = 0x04 , Fraction = 0x08 }
 
- Static Public Attributes inherited from QWidgetPrivate
static QWidgetMappermapper = nullptr
 
static QWidgetSetallWidgets = nullptr
 
static int instanceCounter = 0
 
static int maxInstances = 0
 
- Protected Member Functions inherited from QDateTimeParser
int sectionSize (int index) const
 
int sectionMaxSize (int index) const
 
int sectionPos (int index) const
 
int sectionPos (SectionNode sn) const
 
const SectionNodesectionNode (int index) const
 
Section sectionType (int index) const
 
QString sectionText (int sectionIndex) const
 
int getDigit (const QDateTime &dt, int index) const
 
bool setDigit (QDateTime &t, int index, int newval) const
 
int absoluteMax (int index, const QDateTime &value=QDateTime()) const
 
int absoluteMin (int index) const
 
bool skipToNextSection (int section, const QDateTime &current, QStringView sectionText) const
 
bool skipToNextSection (int section, const QDateTime &current, const QString &sectionText) const
 
QString stateName (State s) const
 
- Protected Attributes inherited from QDateTimeParser
int currentSectionIndex = int(NoSectionIndex)
 
int defaultCenturyStart = QLocale::DefaultTwoDigitBaseYear
 
Sections display
 
int cachedDay = -1
 
QString m_text
 
QList< SectionNodesectionNodes
 
SectionNode first
 
SectionNode last
 
SectionNode none
 
SectionNode popup
 
QStringList separators
 
QString displayFormat
 
QLocale defaultLocale
 
QMetaType::Type parserType
 
bool fixday = false
 
Context context
 
QCalendar calendar
 

Detailed Description

Definition at line 36 of file qdatetimeedit_p.h.

Constructor & Destructor Documentation

◆ QDateTimeEditPrivate()

QDateTimeEditPrivate::QDateTimeEditPrivate ( const QTimeZone & zone = QTimeZone::LocalTime)

Constructs a QDateTimeEditPrivate object

Definition at line 1753 of file qdatetimeedit.cpp.

References QDateTimeParser::currentSectionIndex, QDateTimeParser::FirstSectionIndex, QDateTimeParser::fixday, QAbstractSpinBoxPrivate::maximum, QAbstractSpinBoxPrivate::minimum, QDATETIMEEDIT_COMPAT_DATE_MIN, QDATETIMEEDIT_DATE_MAX, readLocaleSettings(), and timeZone.

+ Here is the call graph for this function:

Member Function Documentation

◆ _q_resetButton()

void QDateTimeEditPrivate::_q_resetButton ( )

Definition at line 2571 of file qdatetimeedit.cpp.

References QStyle::State_None, and updateArrow().

Referenced by initCalendarPopup().

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

◆ absoluteIndex() [1/2]

int QDateTimeEditPrivate::absoluteIndex ( QDateTimeEdit::Section s,
int index ) const

Definition at line 2471 of file qdatetimeedit.cpp.

References convertToPublic(), i, QDateTimeParser::NoSectionIndex, and QDateTimeParser::sectionNodes.

+ Here is the call graph for this function:

◆ absoluteIndex() [2/2]

int QDateTimeEditPrivate::absoluteIndex ( SectionNode s) const

Definition at line 2481 of file qdatetimeedit.cpp.

References QDateTimeParser::sectionNodes.

◆ calendarPopupEnabled()

bool QDateTimeEditPrivate::calendarPopupEnabled ( ) const

Definition at line 2709 of file qdatetimeedit.cpp.

References calendarPopup, QDateTimeParser::DateSectionMask, and sections.

Referenced by newHoverControl(), and updateEditFieldGeometry().

+ Here is the caller graph for this function:

◆ clearCache()

void QDateTimeEditPrivate::clearCache ( ) const
overridevirtual

Reimplemented from QAbstractSpinBoxPrivate.

Definition at line 2504 of file qdatetimeedit.cpp.

References QDateTimeParser::cachedDay, and QAbstractSpinBoxPrivate::clearCache().

Referenced by validateAndInterpret().

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

◆ clearSection()

void QDateTimeEditPrivate::clearSection ( int index)

Clears the text of section s.

Definition at line 1973 of file qdatetimeedit.cpp.

References QLineEdit::cursorPosition, QAbstractSpinBoxPrivate::edit, fill(), pos, Q_UNLIKELY, QDTEDEBUG, qWarning, QDateTimeParser::sectionPos(), QDateTimeParser::sectionSize(), QLineEdit::setCursorPosition(), QLineEdit::setText(), and QLineEdit::text.

+ Here is the call graph for this function:

◆ closestSection()

int QDateTimeEditPrivate::closestSection ( int pos,
bool forward ) const

Returns the closest section of index index. Searches forward for a section if forward is true. Otherwise searches backwards.

Definition at line 1911 of file qdatetimeedit.cpp.

References displayText(), QDateTimeParser::FirstSectionIndex, i, QDateTimeParser::LastSectionIndex, QDateTimeParser::NoSectionIndex, pos, Q_ASSERT, qWarning, QDateTimeParser::sectionNodes, QDateTimeParser::sectionPos(), QDateTimeParser::sectionSize(), QDateTimeParser::separators, QString::size(), text, and updateCache().

Referenced by editorCursorPositionChanged().

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

◆ convertSections()

◆ convertTimeZone()

QDateTime QDateTimeEditPrivate::convertTimeZone ( const QDateTime & datetime)

Definition at line 1767 of file qdatetimeedit.cpp.

References timeZone, and QDateTime::toTimeZone().

+ Here is the call graph for this function:

◆ convertToPublic()

◆ cursorPosition()

int QDateTimeEditPrivate::cursorPosition ( ) const
inlineoverridevirtual

Reimplemented from QDateTimeParser.

Definition at line 67 of file qdatetimeedit_p.h.

References QLineEdit::cursorPosition, and edit.

◆ dateTimeValue()

QDateTime QDateTimeEditPrivate::dateTimeValue ( QDate date,
QTime time ) const

Definition at line 1772 of file qdatetimeedit.cpp.

References date, time, and timeZone.

Referenced by init().

+ Here is the caller graph for this function:

◆ displayText()

QString QDateTimeEditPrivate::displayText ( ) const
inlineoverridevirtual

Reimplemented from QDateTimeParser.

Definition at line 63 of file qdatetimeedit_p.h.

References edit, and QLineEdit::text.

Referenced by closestSection(), editorCursorPositionChanged(), emitSignals(), interpret(), sectionAt(), setSelected(), stepBy(), and updateEdit().

+ Here is the caller graph for this function:

◆ editorCursorPositionChanged()

◆ emitSignals()

void QDateTimeEditPrivate::emitSignals ( EmitPolicy ep,
const QVariant & old )
overridevirtual

Reimplemented from QAbstractSpinBoxPrivate.

Definition at line 2287 of file qdatetimeedit.cpp.

References AlwaysEmit, QDateTimeParser::DateSectionMask, displayText(), emit, NeverEmit, QAbstractSpinBoxPrivate::pendingEmit, sections, syncCalendarWidget(), QDateTimeParser::TimeSectionMask, QVariant::toDate(), QVariant::toTime(), and updateCache().

+ Here is the call graph for this function:

◆ getMaximum()

QDateTime QDateTimeEditPrivate::getMaximum ( ) const
overridevirtual

Reimplemented from QDateTimeParser.

Definition at line 1834 of file qdatetimeedit.cpp.

References QDateTimeParser::getMaximum(), QAbstractSpinBoxPrivate::keyboardTracking, Qt::LocalTime, QAbstractSpinBoxPrivate::maximum, QDATETIMEEDIT_DATE_MAX, QTimeZone::timeSpec(), timeZone, and QVariant::toDateTime().

+ Here is the call graph for this function:

◆ getMinimum()

QDateTime QDateTimeEditPrivate::getMinimum ( ) const
overridevirtual

Reimplemented from QDateTimeParser.

Definition at line 1823 of file qdatetimeedit.cpp.

References QDateTimeParser::getMinimum(), QAbstractSpinBoxPrivate::keyboardTracking, Qt::LocalTime, QAbstractSpinBoxPrivate::minimum, QDATETIMEEDIT_DATE_MIN, QTimeZone::timeSpec(), timeZone, and QVariant::toDateTime().

+ Here is the call graph for this function:

◆ getZeroVariant()

QVariant QDateTimeEditPrivate::getZeroVariant ( ) const
overridevirtual

Convenience function to get a variant of the right type.

Reimplemented from QAbstractSpinBoxPrivate.

Definition at line 2629 of file qdatetimeedit.cpp.

References Q_ASSERT, QDATETIMEEDIT_DATE_INITIAL, and timeZone.

Referenced by validateAndInterpret().

+ Here is the caller graph for this function:

◆ init()

void QDateTimeEditPrivate::init ( const QVariant & var)

◆ initCalendarPopup()

void QDateTimeEditPrivate::initCalendarPopup ( QCalendarWidget * cw = nullptr)

Definition at line 2656 of file qdatetimeedit.cpp.

References _q_resetButton(), QDateTimeParser::calendar, QWidgetPrivate::close(), QObject::connect(), cw, monthCalendar, QCalendarPopup::setCalendarWidget(), QObject::setObjectName(), SIGNAL, SLOT, and syncCalendarWidget().

+ Here is the call graph for this function:

◆ interpret()

void QDateTimeEditPrivate::interpret ( EmitPolicy ep)
overridevirtual

Interprets text and emits signals. Called when the spinbox needs to interpret the text on the lineedit.

Reimplemented from QAbstractSpinBoxPrivate.

Definition at line 2486 of file qdatetimeedit.cpp.

References QValidator::Acceptable, QDateTimeParser::AllowPartial, QAbstractSpinBoxPrivate::correctionMode, QAbstractSpinBox::CorrectToPreviousValue, QDateTimeParser::currentSectionIndex, QLineEdit::cursorPosition, displayText(), QAbstractSpinBoxPrivate::edit, QDateTimeParser::fieldInfo(), QAbstractSpinBoxPrivate::interpret(), QValidator::Invalid, pos, QAbstractSpinBoxPrivate::setValue(), state, and updateTimeZone().

Referenced by editorCursorPositionChanged().

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

◆ isSeparatorKey()

bool QDateTimeEditPrivate::isSeparatorKey ( const QKeyEvent * k) const

Definition at line 2642 of file qdatetimeedit.cpp.

References QDateTimeParser::currentSectionIndex, QDateTimeParser::fieldInfo(), QDateTimeParser::Numeric, QDateTimeParser::sectionNodes, and QDateTimeParser::separators.

+ Here is the call graph for this function:

◆ locale()

QLocale QDateTimeEditPrivate::locale ( ) const
inlineoverridevirtual

Reimplemented from QDateTimeParser.

Definition at line 66 of file qdatetimeedit_p.h.

Referenced by stepBy().

+ Here is the caller graph for this function:

◆ newHoverControl()

QStyle::SubControl QDateTimeEditPrivate::newHoverControl ( const QPoint & pos)
overridevirtual

Returns the hover control at pos. This will update the hoverRect and hoverControl.

Reimplemented from QAbstractSpinBoxPrivate.

Definition at line 2597 of file qdatetimeedit.cpp.

References calendarPopupEnabled(), QStyle::CC_ComboBox, QAbstractSpinBoxPrivate::hoverControl, QStyleOption::initFrom(), QAbstractSpinBoxPrivate::newHoverControl(), pos, and QStyle::SC_All.

+ Here is the call graph for this function:

◆ nextPrevSection()

int QDateTimeEditPrivate::nextPrevSection ( int current,
bool forward ) const

Returns a copy of the section that is before or after current, depending on forward.

Definition at line 1943 of file qdatetimeedit.cpp.

References QDateTimeParser::FirstSectionIndex, QDateTimeParser::LastSectionIndex, QDateTimeParser::NoSectionIndex, Q_ASSERT, and QDateTimeParser::sectionNodes.

◆ positionCalendarPopup()

void QDateTimeEditPrivate::positionCalendarPopup ( )

Definition at line 2673 of file qdatetimeedit.cpp.

References QScreen::availableGeometry, QRect::bottom(), QRect::left(), monthCalendar, QWidget::move(), pos, QGuiApplication::primaryScreen, qMax(), QRect::right(), Qt::RightToLeft, screen, QGuiApplication::screenAt(), QRect::setX(), QWidget::sizeHint, and QRect::top().

+ Here is the call graph for this function:

◆ readLocaleSettings()

void QDateTimeEditPrivate::readLocaleSettings ( )

Try to get the format from the local settings

Definition at line 2387 of file qdatetimeedit.cpp.

References QLocale::dateFormat(), QLocale::dateTimeFormat(), defaultDateFormat, defaultDateTimeFormat, defaultTimeFormat, QLocale::ShortFormat, and QLocale::timeFormat().

Referenced by QDateTimeEditPrivate().

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

◆ sectionAt()

int QDateTimeEditPrivate::sectionAt ( int pos) const

Returns the section at index index or NoSection if there are no sections there.

Definition at line 1880 of file qdatetimeedit.cpp.

References displayText(), QDateTimeParser::FirstSectionIndex, i, QDateTimeParser::LastSectionIndex, QDateTimeParser::NoSectionIndex, pos, QDateTimeParser::sectionNodes, QDateTimeParser::sectionPos(), QDateTimeParser::sectionSize(), QDateTimeParser::separators, QString::size(), text, and updateCache().

Referenced by editorCursorPositionChanged().

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

◆ setRange()

void QDateTimeEditPrivate::setRange ( const QVariant & min,
const QVariant & max )
overridevirtual

Convenience function to set min/max values.

Reimplemented from QAbstractSpinBoxPrivate.

Definition at line 2635 of file qdatetimeedit.cpp.

References QAbstractSpinBoxPrivate::setRange(), and syncCalendarWidget().

+ Here is the call graph for this function:

◆ setSelected()

void QDateTimeEditPrivate::setSelected ( int sectionIndex,
bool forward = false )

Selects the section s. If forward is false selects backwards.

Definition at line 1851 of file qdatetimeedit.cpp.

References displayText(), QAbstractSpinBoxPrivate::edit, QDateTimeParser::FirstSection, QDateTimeParser::LastSection, QDateTimeParser::NoSection, QDateTimeParser::sectionNode(), QDateTimeParser::sectionPos(), QDateTimeParser::sectionSize(), QLineEdit::selectAll(), QLineEdit::setSelection(), QAbstractSpinBoxPrivate::specialValue(), QDateTimeParser::SectionNode::type, and updateCache().

Referenced by editorCursorPositionChanged().

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

◆ stepBy()

◆ syncCalendarWidget()

void QDateTimeEditPrivate::syncCalendarWidget ( )

Definition at line 2714 of file qdatetimeedit.cpp.

References monthCalendar, QCalendarPopup::setDate(), and QCalendarPopup::setDateRange().

Referenced by emitSignals(), initCalendarPopup(), and setRange().

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

◆ textFromValue()

QString QDateTimeEditPrivate::textFromValue ( const QVariant & f) const
overridevirtual

Reimplemented from QAbstractSpinBoxPrivate.

Definition at line 2089 of file qdatetimeedit.cpp.

Referenced by updateEdit(), and validateAndInterpret().

+ Here is the caller graph for this function:

◆ updateArrow()

void QDateTimeEditPrivate::updateArrow ( QStyle::StateFlag state)

Definition at line 2576 of file qdatetimeedit.cpp.

References arrowState, QAbstractSpinBoxPrivate::buttonState, QAbstractSpinBoxPrivate::hoverControl, Mouse, QStyle::SC_ComboBoxFrame, state, and QStyle::State_None.

Referenced by _q_resetButton().

+ Here is the caller graph for this function:

◆ updateCache()

void QDateTimeEditPrivate::updateCache ( const QVariant & val,
const QString & str ) const

updates the cached values

Definition at line 1998 of file qdatetimeedit.cpp.

References QAbstractSpinBoxPrivate::cachedText, QAbstractSpinBoxPrivate::cachedValue, cacheGuard, copy(), QLineEdit::cursorPosition, QAbstractSpinBoxPrivate::edit, str, QObjectData::unused, and validateAndInterpret().

Referenced by closestSection(), editorCursorPositionChanged(), emitSignals(), sectionAt(), setSelected(), and validateAndInterpret().

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

◆ updateEdit()

void QDateTimeEditPrivate::updateEdit ( )
overridevirtual

Updates the line edit to reflect the current value of the spin box.

Reimplemented from QAbstractSpinBoxPrivate.

Definition at line 1793 of file qdatetimeedit.cpp.

References QDateTimeParser::currentSectionIndex, cursor, displayText(), QAbstractSpinBoxPrivate::edit, qBound(), QDTEDEBUG, QDateTimeParser::sectionPos(), QLineEdit::selectedText, QLineEdit::setCursorPosition(), QLineEdit::setSelection(), QLineEdit::setText(), QString::size(), QAbstractSpinBoxPrivate::specialValue(), QAbstractSpinBoxPrivate::specialValueText, and textFromValue().

+ Here is the call graph for this function:

◆ updateEditFieldGeometry()

void QDateTimeEditPrivate::updateEditFieldGeometry ( )
overridevirtual

Reimplemented from QAbstractSpinBoxPrivate.

Definition at line 2612 of file qdatetimeedit.cpp.

References calendarPopupEnabled(), QStyle::CC_ComboBox, QAbstractSpinBoxPrivate::edit, QStyleOption::initFrom(), QStyle::SC_ComboBoxEditField, QWidget::setGeometry(), and QAbstractSpinBoxPrivate::updateEditFieldGeometry().

+ Here is the call graph for this function:

◆ updateTimeZone()

void QDateTimeEditPrivate::updateTimeZone ( )

Definition at line 1777 of file qdatetimeedit.cpp.

References QDateTimeEdit::DateSections_Mask, QDate::endOfDay(), QAbstractSpinBoxPrivate::maximum, QAbstractSpinBoxPrivate::minimum, sections, QDate::startOfDay(), timeZone, QVariant::toDate(), QVariant::toDateTime(), QVariant::toTime(), and QDateTime::toTimeZone().

Referenced by init(), and interpret().

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

◆ validateAndInterpret()

◆ valueFromText()

QVariant QDateTimeEditPrivate::valueFromText ( const QString & f) const
overridevirtual

This function's name is slightly confusing; it is not to be confused with QAbstractSpinBox::valueFromText().

Reimplemented from QAbstractSpinBoxPrivate.

Definition at line 2102 of file qdatetimeedit.cpp.

References timeZone.

◆ valueToText()

QString QDateTimeEditPrivate::valueToText ( const QVariant & var) const
inline

Definition at line 81 of file qdatetimeedit_p.h.

References QAbstractSpinBoxPrivate::textFromValue(), and var.

+ Here is the call graph for this function:

Member Data Documentation

◆ arrowState

QStyle::StateFlag QDateTimeEditPrivate::arrowState = QStyle::State_None

Definition at line 103 of file qdatetimeedit_p.h.

Referenced by updateArrow().

◆ cacheGuard

bool QDateTimeEditPrivate::cacheGuard = false
mutable

Definition at line 98 of file qdatetimeedit_p.h.

Referenced by updateCache().

◆ calendarPopup

bool QDateTimeEditPrivate::calendarPopup = false

Definition at line 102 of file qdatetimeedit_p.h.

Referenced by calendarPopupEnabled().

◆ conflictGuard

QVariant QDateTimeEditPrivate::conflictGuard
mutable

Definition at line 101 of file qdatetimeedit_p.h.

Referenced by validateAndInterpret().

◆ defaultDateFormat

QString QDateTimeEditPrivate::defaultDateFormat

Definition at line 100 of file qdatetimeedit_p.h.

Referenced by init(), and readLocaleSettings().

◆ defaultDateTimeFormat

QString QDateTimeEditPrivate::defaultDateTimeFormat

Definition at line 100 of file qdatetimeedit_p.h.

Referenced by init(), and readLocaleSettings().

◆ defaultTimeFormat

QString QDateTimeEditPrivate::defaultTimeFormat

Definition at line 100 of file qdatetimeedit_p.h.

Referenced by init(), and readLocaleSettings().

◆ formatExplicitlySet

bool QDateTimeEditPrivate::formatExplicitlySet = false

Definition at line 102 of file qdatetimeedit_p.h.

◆ hasHadFocus

bool QDateTimeEditPrivate::hasHadFocus = false

Definition at line 102 of file qdatetimeedit_p.h.

◆ monthCalendar

QCalendarPopup* QDateTimeEditPrivate::monthCalendar = nullptr

◆ sections

QDateTimeEdit::Sections QDateTimeEditPrivate::sections = {}

Definition at line 97 of file qdatetimeedit_p.h.

Referenced by calendarPopupEnabled(), emitSignals(), stepBy(), and updateTimeZone().

◆ timeZone

◆ unreversedFormat

QString QDateTimeEditPrivate::unreversedFormat

Definition at line 100 of file qdatetimeedit_p.h.


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