UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

[Index] [Spacer] [Previous] [Next]



Location: QikDateEditor.h
Link against: qikctl.lib

Class CQikDateEditor

class CQikDateEditor : public CQikTTimeEditor, private MEikCalendarObserver, public MQikCommandListOwner, public MQikCommandHandler;

Description

Date editor.

This editor simply displays a date. On a tap, a calendar/date picker is displayed, this can be used to select a new date.

The editor has day, month and year fields, and two separator characters. Global locale information is used to determine field order and the characters used to separate the date components, see TLocale . Associated resource is QIK_DATE_EDITOR.

The base class CQikTTimeEditor provides the members for setting the maximum and minimum values that the user may enter into the editor, and for getting and setting the current editor value. A flag can be passed to CQikTTimeEditor::ConstructL() to disable the calendar/date picker popout.

This class is not intended for user derivation.

Note:

Derivation

  • MObjectProvider - An interface that allows an object to be part of a network of object providers
  • CBase - Base class for all classes to be instantiated on the heap
  • Members

    Defined in CQikDateEditor:
    CQikDateEditor(), ConstructFromResourceL(), DrawContent(), GetColorUseListL(), GetMinimumAndMaximumAndInitialDatesForCalendarL(), HandleCommandL(), HandlePointerEventL(), HandleResourceChange(), InputCapabilities(), MapCommandHandler(), MinimumSize(), OfferKeyEventL(), PrepareForFocusGainL(), PrepareForFocusLossL(), SetDateFromCalendarAndDrawNow(), ~CQikDateEditor()

    Inherited from CBase:
    Delete(), Extension_(), operator new()

    Inherited from CCoeControl:
    AccumulatedZoom(), ActivateGc(), BackedUpWindow(), Background(), CapturesPointer(), ClaimPointerGrab(), CloseWindow(), Components(), ControlContext(), ControlEnv(), CopyControlContextFrom(), CreateBackedUpWindowL(), CreateWindowL(), DeactivateGc(), DrawBackground(), DrawDeferred(), DrawForeground(), DrawNow(), DrawableWindow(), EAbsoluteZoom, ERelativeZoom, EnableDragEvents(), FindBackground(), FindFontProvider(), GetColor(), GetGc(), GrabbingComponent(), HandleComponentControlsResourceChange(), HandleRedrawEvent(), HitTest(), IgnoreEventsUntilNextPointerUp(), Index(), InitComponentArrayL(), IsActivated(), IsBackedUp(), IsBeingDestroyed(), IsBlank(), IsDimmed(), IsFocused(), IsNonFocusing(), IsReadyToDraw(), IsVisible(), LayoutManager(), MaximumWidth(), Observer(), OverrideColorL(), OwnsWindow(), Parent(), Position(), PositionRelativeToScreen(), Rect(), RecursivelyMergedInputCapabilities(), ReportEventL(), Reserved_CCoeControl_10(), Reserved_CCoeControl_11(), Reserved_CCoeControl_12(), Reserved_CCoeControl_13(), ResetGc(), ScreenFont(), SetAllowStrayPointers(), SetBackground(), SetBlank(), SetCanDrawOutsideRect(), SetComponentsToInheritVisibility(), SetControlContext(), SetCornerAndSize(), SetExtent(), SetExtentToWholeScreen(), SetFocus(), SetFocusing(), SetFontProviderL(), SetGc(), SetGloballyCapturing(), SetHitTest(), SetMaximumWidth(), SetMopParent(), SetNonFocusing(), SetObserver(), SetPointerCapture(), SetPosition(), SetRect(), SetSize(), SetSizeWithoutNotification(), SetUniqueHandle(), SetZoomFactorL(), Size(), SystemGc(), TZoomType, TextDrawer(), UniqueHandle(), Window(), ZoomWithType(), iCoeEnv, iContext, iPosition, iSize

    Inherited from CEikBorderedControl:
    ActivateL(), Border(), ComponentControl(), CountComponentControls(), FocusChanged(), GetHelpContext(), HandleControlArrayEventL(), HandlePointerBufferReadyL(), HasBorder(), MakeVisible(), MopSupplyObject(), PositionChanged(), RequestRelayout(), SetAdjacent(), SetBorder(), SetContainerWindowL(), SetDimmed(), SetLayoutManagerL(), SetNeighbor(), SetParent(), SetTextBaselineSpacing(), SizeChanged(), TextBaselineOffset(), WriteInternalStateL(), iBorder

    Inherited from CQikTTimeEditor:
    ConstructL(), Draw(), EDisableWrapTime, EFiveMinuteSteps, EForce24HourFormat, EMirroredLayout, EWithoutPopoutCalendar, EWithoutPopoutPicker, Font(), GetMinimumAndMaximum(), SetMinimumAndMaximum(), SetTimeL(), SetWrapTime(), Time(), anonymous, iDateString, iTimeString

    Inherited from MEikBorderedControl:
    ETypeId

    Inherited from MObjectProvider:
    MopGetObject(), MopGetObjectNoChaining()

    Inherited from MQikCommandHandler:
    HandleAttemptDimmedSelectionL()


    Construction and destruction


    CQikDateEditor()

    IMPORT_C CQikDateEditor();

    Description

    Default constructor.

    This function constructs an uninitialised CQikDateEditor . It should be used as the first stage in two stage construction, followed by a call to either ConstructFromResourceL() (to initialise the editor's field values from a resource file) or CQikTTimeEditor::ConstructL() (if no resource file is used).

    If ConstructL() is used, CQikTTimeEditor::EQikTimeWithoutPopout may be passed to the aFlags variable.

    See also:


    ~CQikDateEditor()

    IMPORT_C ~CQikDateEditor();

    Description

    Destructor. The destructor frees any resources owned by the editor, prior to its destruction.

    [Top]


    Member functions


    MinimumSize()

    virtual IMPORT_C TSize MinimumSize();

    Description

    Gets the minimum size of the control.

    Return value

    TSize

    A TSize object containing the minimum size of the control.

    See also:


    ConstructFromResourceL()

    virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aResourceReader);

    Description

    Second phase construction from a resource.

    This function completes the construction of a newly-allocated date editor from a QIK_DATE_EDITOR resource. The minimum and maximum dates and the editor flags are read from the resource, and CQikTTimeEditor::ConstructL() is called with these settings. The initial date is set to the maximum date value.

    Parameters

    TResourceReader &aResourceReader

    Resource file reader.

    See also:


    GetColorUseListL()

    virtual IMPORT_C void GetColorUseListL(CArrayFix< TCoeColorUse > &aColorUseList) const;

    Description

    Gets the list of logical colors employed in the drawing of the control. Pairs the colors with an explanation of how they are used and appends this information to aColorUseList .

    Parameters

    CArrayFix< TCoeColorUse > &aColorUseList

    List of logical colors.

    See also:


    HandleResourceChange()

    virtual IMPORT_C void HandleResourceChange(TInt aType);

    Description

    Handles a change to the control's resources of type aType which are shared across the environment. Colors or fonts for example.

    Parameters

    TInt aType

    The type of resource that has changed.


    OfferKeyEventL()

    virtual IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);

    Description

    Offers key events to the controller.

    Parameters

    const TKeyEvent &aKeyEvent

    A struct with the keys, modifiers etc that were pressed.

    TEventCode aType

    What type of event that is offered.

    Return value

    TKeyResponse

    See also:


    DrawContent()

    virtual IMPORT_C void DrawContent(CWindowGc &aGc, const TRect &aRect) const;

    Description

    Draw the control's contents.

    Parameters

    CWindowGc &aGc

    The graphic context where to draw.

    const TRect &aRect

    The are where to draw.


    GetMinimumAndMaximumAndInitialDatesForCalendarL()

    virtual IMPORT_C void GetMinimumAndMaximumAndInitialDatesForCalendarL(TTime &aMinimumDate, TTime &aMaximumDate, TTime &aInitialDate) const;

    Description

    Gets initialisation information for a CEikCalendar . The information includes the maximum and minimum permissible dates for display in a CEikCalendar , and the date which should be selected initially. This function is called from within CEikCalendar::ExecuteLD() to provide initial information for the calendar's display. Panics if aMinimumDate is not before aMaximumDate .

    Implementations of this pure virtual function should alter the values of aMinimumDate , aMaximumDate and aInitialDate appropriately.

    Parameters

    TTime &aMinimumDate

    On return, contains the minimum date permissible for display in the calling CEikCalendar .

    TTime &aMaximumDate

    On return, contains the maximum date permissible.

    TTime &aInitialDate

    On return, contains the date which should be selected initially.


    SetDateFromCalendarAndDrawNow()

    virtual IMPORT_C void SetDateFromCalendarAndDrawNow(const TTime &aDate);

    Description

    Sets the observer's date from the calendar selection.

    This function is called when a the user has chosen a date from the calendar. It should update the internal state of the observer object to reflect the chosen date, and also redraw the program's screen.

    Parameters

    const TTime &aDate

    The date selected by the user on the observer's associated calendar.


    PrepareForFocusGainL()

    virtual IMPORT_C void PrepareForFocusGainL();

    Description

    See also:


    PrepareForFocusLossL()

    virtual IMPORT_C void PrepareForFocusLossL();

    Description

    See also:


    MapCommandHandler()

    protected: virtual IMPORT_C MQikCommandHandler *MapCommandHandler(CQikCommand &aCommand);

    Description

    Called from the CQikCommandManager for each command being added which do not already has its handler set.

    Parameters

    CQikCommand &aCommand

    Return value

    MQikCommandHandler *


    HandleCommandL()

    protected: virtual IMPORT_C void HandleCommandL(CQikCommand &aCommand);

    Description

    Called when a softkey or menupane item has been selected.

    Parameters

    CQikCommand &aCommand

    Command that should be executed.

    Panic codes

    EQikPanicUnknownCommandId

    DEBUG_BUILDS: The supplied command id is unknown. RELEASE_BUILDS: Does nothing.


    HandlePointerEventL()

    protected: virtual IMPORT_C void HandlePointerEventL(const TPointerEvent &aPointerEvent);

    Description

    Handles pointer events.

    Parameters

    const TPointerEvent &aPointerEvent

    The pointer event. If this is EButton1Down it creates a popup. Otherwise it does nothing.

    See also:


    InputCapabilities()

    protected: virtual IMPORT_C TCoeInputCapabilities InputCapabilities() const;

    Description

    Gets the editor's input capabilities.

    This editor supports entry of numbers that are TCoeInputCapabilities::EWesternNumericIntegerNegative , or TCoeInputCapabilities::EWesternNumericIntegerPositive .

    Return value

    TCoeInputCapabilities

    The editor's input capabilities.

    See also:

    Terms and conditions of use of the material