UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

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



Location: QikTaskMenu.h
Link against: qikcore.lib

Class CQikTaskMenu

class CQikTaskMenu : public CBase, private MEikMenuObserver, public MQikCommandListOwner, public MQikCommandHandler, public MCoeFocusObserver;

Description

A control that contains a collection of Tasks.

The class CQikTaskMenu is a control that contains a collection of Tasks. A Task is a configured DNL that launches another application or view. A Task can also launch a specified viewer with a given file and file syntax.

When the Task Menu is launched, the Tasks are displayed in a Menu Pane. When the user selects an item from the menu, the associated Task is executed and the Task Menu is closed. The Task Menu is not a regular control that is visible in the UI. The control is simply a piece of logic which uses the Menu Pane control to fulfill its purposes. The Task Menu is constructed using two resource structs, one for the commands used in the Menu Pane and one for the tasks associated with the commands. The commands in the Task Menu are specified in the same way as in CEikMenuPane, using QIK_COMMAND in the resource definition. Interaction with the Menu Pane is, however, different. The Task Menu handles the commands and launches the Tasks internally, though others may still observe the commands.

The following functionality can be used by the application developer: -Define the tasks that can be carried out, -Define the menu items to be displayed, -Add menu items, -Set the menu observer.

Derivation

Members

Defined in CQikTaskMenu:
AddMenuItemL(), HandleChangeInFocus(), HandleCommandL(), HandleDestructionOfFocusedItem(), LaunchMenuL(), LaunchTaskL(), MapCommandHandler(), NewL(), SetCommandDimmed(), SetInfoDimmedL(), SetMenuObserver(), SetTagL(), ~CQikTaskMenu()

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

Inherited from MEikCommandObserver:
ProcessCommandL()

Inherited from MEikMenuObserver:
CheckHotKeyNotDimmedL(), CreateCustomCommandControlL(), DynInitMenuBarL(), DynInitMenuPaneL(), EMenuBar, EMenuPane, HandleAttemptDimmedSelectionL(), HandleSideBarMenuL(), OfferKeyToAppL(), RestoreMenuL(), SetEmphasis(), TMenuType

See also:


Construction and destruction


NewL()

static IMPORT_C CQikTaskMenu *NewL(TInt aCommandListId, TInt aTaskArrayId);

Description

Stores aCommandListId, it is needed when the popup is displayed. Creates the TaskArray from aTaskArrayResId.

Parameters

TInt aCommandListId

TInt aTaskArrayId

Return value

CQikTaskMenu *

An instance of this class.


~CQikTaskMenu()

IMPORT_C ~CQikTaskMenu();

Description

Destructor

[Top]


Member functions


LaunchTaskL()

IMPORT_C void LaunchTaskL(const TDesC &aTaskBuf=KNullDesC);

Description

If only one option is defined in the resource file, the task is launched instantly, otherwise the popup is displayed so the user can select one of the choices.

Be careful with the format of the aDnlPack, it is defined by the external interface for a specific application. For the parsers, we are only interested in the tagged potion of text so it does not matter that, for instance, the phoneparser uses the phone apps external interface when it creates a DNL for to messaging for creating an SMS.

Parameters

const TDesC &aTaskBuf

Contains the text segment that will be sent in a DNL or stored in a file for a viewer. aTaskBuf has the default value KNullDesC so a task can be launched without a task buffer.


AddMenuItemL()

IMPORT_C TInt AddMenuItemL(TInt aResourceId);

Description

Adds a menu item to the menu pane. The owner can listen for menu commands using the MQikTaskMenuObserver.

Parameters

TInt aResourceId

a menu pane item resource

Return value

TInt

the menu command for the new item.


SetMenuObserver()

IMPORT_C void SetMenuObserver(MQikTaskMenuObserver *aMenuObserver);

Description

Sets the menu observer.

Parameters

MQikTaskMenuObserver *aMenuObserver


HandleChangeInFocus()

virtual void HandleChangeInFocus();

Description

Not used.


HandleDestructionOfFocusedItem()

virtual void HandleDestructionOfFocusedItem();

Description

If a focused item is deleted we assume that we don't need to delete our commands because the MQikCommandModelOwner(view/dialog) has been deleted.


LaunchMenuL()

IMPORT_C void LaunchMenuL(TDesC &aTaskBuf);

Description

Checks if ui config mode is touch screen or not If touch screen, launch menu pane

Parameters

TDesC &aTaskBuf


HandleCommandL()

virtual void HandleCommandL(CQikCommand &aCommand);

Description

HandleCommandL from MQikCommandHandler Only forwards the command to ProcessCommandL

Parameters

CQikCommand &aCommand

The command to handle


MapCommandHandler()

virtual MQikCommandHandler *MapCommandHandler(CQikCommand &);

Description

Gets the QikCommandHandler Returns the correct QikCommandHandler, in this case this.

Parameters

CQikCommand &

Return value

MQikCommandHandler *


SetTagL()

IMPORT_C void SetTagL(const TDesC &aTaskBuf);

Description

Sets the tag that is used when DLN'ing to another app.

Parameters

const TDesC &aTaskBuf

The tag to set, e.g. www.example.com,


SetCommandDimmed()

IMPORT_C void SetCommandDimmed(TInt aCommandId, TBool aDimmed=ETrue);

Description

Sets the command with command id aCommandId to be aDimmed.

Parameters

TInt aCommandId

The command id of the command to be either dimmed or undimmed.

TBool aDimmed

True or false, depending on if the command should be dimmed or undimmed.


SetInfoDimmedL()

IMPORT_C void SetInfoDimmedL(TInt aCommandId, const TDesC &aInfo);

Description

Sets the text for the command with id aCommandId that should be shown if the command is invoked when dimmed.

Parameters

TInt aCommandId

The command id of the command to be updated with info text when dimmed.

const TDesC &aInfo

The new info text when dimmed.

Terms and conditions of use of the material