?? mainpage.dox
字號:
* id = EGeneralQuery;
* control = AVKON_DATA_QUERY
* {
* layout = EDataLayout;
* label = STRING_r_aknexquery_data_label_text;
* control = EDWIN
* {
* flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
* width = AKNTAQUERY_EDWIN_WIDTH;
* maxlength = AKNTAQUERY_EDWIN_MAXLENGTH;
* // added to limit expanding in forms.
* // If you want full screen use 6 here
* max_view_height_in_lines = AKNEXQUERY_EDWIN_LINES;
* // if you have the line above, you must have this.
* // It's calculable from LAF
* base_line_delta = 21;
* };
* };
* }
* };
* }
* \endcode
*
* <I>Multiple data input</I>
*
* \code
* RESOURCE DIALOG r_aknexquery_multi_line_date_and_duration_layout
* {
* flags = EGeneralQueryFlags;
* buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
* items =
* {
* DLG_LINE
* {
* type = EAknCtMultilineQuery;
* id = EMultilineFirstLine;
* control = AVKON_DATA_QUERY
* {
* layout = EMultiDataFirstEdwin;
* label = STRING_r_aknexquery_date_label_text;
* control = DATE_EDITOR
* {
* minDate = DATE
* {
* year = AKNEXQUERY_DATE_EDITOR_MIN_DATE;
* };
* maxDate = DATE
* {
* year = AKNEXQUERY_DATE_EDITOR_MAX_DATE;
* };
* flags = AKNEXQUERY_DATE_EDITOR_FLAGS;
* };
* };
* },
* DLG_LINE
* {
* type = EAknCtMultilineQuery;
* id = EMultilineSecondLine;
* control = AVKON_DATA_QUERY
* {
* layout = EMultiDataSecondEdwin;
* label = STRING_r_aknexquery_dura_label_text;
* control = DURATION_EDITOR
* {
* minDuration = DURATION
* {
* };
* maxDuration = DURATION
* {
* seconds = AKNEXQUERY_DURATION_EDITOR_MAX_SECOND;
* };
* flags = AKNEXQUERY_DURATION_EDITOR_FLAGS;
* };
* };
* }
* };
* }
* \endcode
*
* For the multiple line query, it is necessary to define two DLG_LINE
* structures. The first line for the multiple line query is identified by
* EMultilineFirstLine in "id". The second line is identified by
* EMultilineSecondLine in "id".
*
* \subsection Sub313 3.1.3 Select list item dialog
*
* The following is the resource code for the Select list item dialog. Selecting
* an item or items in the listbox is defined in the 'flags' of LISTBOX.
*
* <I>Select list item dialog</I>
*
* \code
* RESOURCE DIALOG r_aknexquery_list_single_pane
* {
* flags = EGeneralQueryFlags;
* buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
* items =
* {
* DLG_LINE
* {
* type = EAknCtListQueryControl;
* id = EListQueryControl;
* control = AVKON_LIST_QUERY_CONTROL
* {
* listtype = EAknCtSinglePopupMenuListBox;
* listbox = LISTBOX
* {
* flags = EAknListBoxMenuList;
* height = AKNEXQUERY_LISTBOX_HEIGHT;
* width = AKNEXQUERY_LISTBOX_WIDTH;
* array_id = r_aknexquery_list_single_pane_item;
* };
* heading = STRING_r_aknexquery_list_title;
* };
* }
* };
* }
* \endcode
*
* \subsection Sub314 3.1.4 Global list query
*
* The following is the resource code for the global list query. In this
* resource definition, a data array of text strings that is shown in the
* listbox needs to be set.
*
* <I>Global list query</I>
*
* \code
* RESOURCE ARRAY r_aknexquery_sub_popup_data
* {
* items =
* {
* LBUF
* {
* txt = STRING_r_aknexquery_sub_popup_data1;
* },
* LBUF
* {
* txt = STRING_r_aknexquery_sub_popup_data2;
* },
* LBUF
* {
* txt = STRING_r_aknexquery_sub_popup_data3;
* },
* LBUF
* {
* txt = STRING_r_aknexquery_sub_popup_data4;
* },
* LBUF
* {
* txt = STRING_r_aknexquery_sub_popup_data5;
* }
* };
* }
* \endcode
*
* \subsection Sub32 3.2 Displaying a query dialog and getting a user response
*
* Constructing a query dialog is very similar to constructing a normal dialog.
* When constructing a query dialog, the target query dialog object to show is
* created. At this time, the reference is passed to the object to get user
* response data. After this construction, the ExecuteLD function is called to
* display the query dialog.
*
* When the user responds to this dialog, the query dialog sets the value of the
* soft key event of \b OK or \b Cancel (or Yes or No) into the reference that
* is passed at the construction phase. Then the query dialog closes itself and
* deletes the query dialog object by itself. The program returns to the
* application from the dialog after the dialog is deleted. In this example
* application, input text data is shown in the application view.
*
* \code
* TBuf<KAknExQueryTextBufLength> textData;
* CAknTextQueryDialog* dlg;
* dlg = new ( ELeave )CAknTextQueryDialog( textData, CAknQueryDialog::ENoTone );
* TBool answer( dlg->ExecuteLD( aQueryResourceId ) );
* if ( aDisplayFlag && answer )
* {
* iLabelResultMessage->SetTextL( textData );
* }
* \endcode
*
* The following sequence diagram shows the life of a query dialog from the time
* it is instantiated until it is deleted.
*
* \image html IMAGE_QUERY033.GIF
*
* \subsection Sub33 3.3 Displaying a global query and getting a user response
*
* Using a global list query is different from the query dialog described above.
*
* At first, the active object (CAknExQueryGlobalListObserver class) is
* instantiated, (see (a)), then CAknExQueryGlobalListObserver::Start() is
* called. Next, the global list query (CAknGlobalListQuery class) is
* instantiated, (see (c)), then the iStatus variable of the active object is
* set into CAknGlobalListQuery::ShowListQueryL() as a parameter and then this
* function is called. Now the global list query is shown. When the user selects
* a list item and presses the \b OK or \b Cancel soft key, a soft key event
* occurs and the global list query is closed and the
* CAknExQueryGlobalListObserver::RunL() function is called by the active object
* framework. Then an index number (-1 is set when Cancel is selected) of the
* list that is selected in the global list query is set to iStatus of the
* active object by the notify framework.
*
* \code
* iDisplayDialog = ETrue;
* SetTextToLabelL( R_AKNEXQUERY_OPERATE_MESSAGE );
* CDesCArray* textArray =
* iCoeEnv->ReadDesCArrayResourceL(R_AKNEXQUERY_SUB_POPUP_DATA);
* CleanupStack::PushL(textArray);
* iGlobalListObserver = CAknTaQueryGlobalListObserver::NewL( this ); // (a)
* iGlobalListObserver->Start(); // <-- (b)
* iGlobalListQuery = CAknGlobalListQuery::NewL(); // <-- (c)
* iGlobalListObserver->SetSelectItemFlag();
* iGlobalListQuery->ShowListQueryL(textArray, iGlobalListObserver->iStatus, 0);
* // (d)
* CleanupStack::PopAndDestroy(); // textArray
* iDisplayDialog = EFalse;
* \endcode
*
* The following sequence diagram shows the life of the active object and global
* list query:
*
* \image html IMAGE_QUERY034.GIF
*
*
*/
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -