Nokia N97 SDK
Example Applications Guide

CAknExQueryView Class Reference

#include <aknexqueryview.h>

Inheritance diagram for CAknExQueryView:

List of all members.

Detailed Description

CAknExQueryView view class.

Definition at line 37 of file aknexqueryview.h.


Public Member Functions

void  ConstructL ()
  CAknExQueryView ()
virtual  ~CAknExQueryView ()
void  DisplayNextOutlineL ()
TUid  Id () const
void  HandleCommandL (TInt aCommand)
void  HandleViewRectChange ()

Private Member Functions

void  SetTitlePaneL (TInt aOutlineId)
void  DoActivateL (const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage)
void  DoDeactivate ()

Private Attributes

CAknExQueryContainer *  iContainer
TInt  iCurrentOutline


Constructor & Destructor Documentation

CAknExQueryView::CAknExQueryView (   ) 
 

CAknExQueryView Constructor.

Definition at line 42 of file aknexqueryview.cpp.

00043 : iCurrentOutline( EAknExQueryNoOutline )
00044     {
00045     }

CAknExQueryView::~CAknExQueryView (   )  [virtual]
 

~CAknExQueryView Destructor.

Definition at line 52 of file aknexqueryview.cpp.

References iContainer.

00053     {
00054     if ( iContainer )
00055         {
00056         AppUi()->RemoveFromStack( iContainer );
00057         }
00058     delete iContainer;
00059     }


Member Function Documentation

void CAknExQueryView::ConstructL (   ) 
 

ConstructL 2nd phase constructor.

Definition at line 32 of file aknexqueryview.cpp.

00033     {
00034     BaseConstructL( R_AKNEXQUERY_VIEW );
00035     }

void CAknExQueryView::DisplayNextOutlineL (   ) 
 

DisplayNextOutlineL Display next outline.

Definition at line 66 of file aknexqueryview.cpp.

References HandleCommandL(), and iCurrentOutline.

Referenced by HandleCommandL(), and CAknExQueryContainer::OfferKeyEventL().

00067     {
00068     switch( iCurrentOutline )
00069         {
00070         case EAknExQueryNoOutline:
00071             HandleCommandL( EAknExQueryOutline1 );
00072             break;
00073         case EAknExQueryOutline1:
00074             HandleCommandL( EAknExQueryOutline4 );
00075             break;
00076         case EAknExQueryOutline4:
00077             HandleCommandL( EAknExQueryOutline8 );
00078             break;
00079         case EAknExQueryOutline8:
00080             HandleCommandL( EAknExQueryOutline10 );
00081             break;
00082         case EAknExQueryOutline10:
00083             HandleCommandL( EAknExQueryOutline16 );
00084             break;
00085         case EAknExQueryOutline16:
00086             HandleCommandL( EAknExQueryOutline44 );
00087             break;
00088         case EAknExQueryOutline44:
00089             HandleCommandL( EAknExQueryOutline48 );
00090             break;
00091         case EAknExQueryOutline48:
00092             HandleCommandL( EAknExQueryOutline52 );
00093             break;
00094         case EAknExQueryOutline52:
00095             HandleCommandL( EAknExQueryOutline54 );
00096             break;
00097         case EAknExQueryOutline54:
00098             HandleCommandL( EAknExQueryOutline61 );
00099             break;
00100         case EAknExQueryOutline61:
00101             HandleCommandL( EAknExQueryNoOutline );
00102             break;
00103         default:
00104             break;
00105         }
00106     }

TUid CAknExQueryView::Id (   )  const
 

Id From CAknView, Id. Returns the ID of view.

Returns:
The ID of view.

Definition at line 113 of file aknexqueryview.cpp.

00114     {
00115     return KViewId;
00116     }

void CAknExQueryView::HandleCommandL (  TInt  aCommand  ) 
 

From CAknView, HandleCommandL. handles the commands. if the command is command which is require to display outline-screen, the command is reported to container class.

Parameters:
aCommand  Command to be handled.

Definition at line 123 of file aknexqueryview.cpp.

References CAknExQueryContainer::CreateLabelL(), DisplayNextOutlineL(), iContainer, CAknExQueryContainer::PopoutListBoxL(), CAknExQueryContainer::SetTextToLabelL(), SetTitlePaneL(), CAknExQueryContainer::ShowConfirmationQueryL(), CAknExQueryContainer::ShowDataQueryL(), CAknExQueryContainer::ShowGlobalListQueryL(), and CAknExQueryContainer::ShowListQueryL().

Referenced by DisplayNextOutlineL().

00124     {
00125     if ( !iContainer )
00126         {
00127         return;
00128         }
00129 
00130     iContainer->SetTextToLabelL( R_AKNEXQUERY_OPERATE_MESSAGE );
00131     switch ( aCommand )
00132         {
00133         case EAknExQueryNoOutline:
00134             SetTitlePaneL( aCommand );
00135             iContainer->SetTextToLabelL( R_AKNEXQUERY_TITLE_MESSAGE );
00136             break;
00137         case EAknExQueryOutline1:
00138             SetTitlePaneL( aCommand );
00139             iContainer->CreateLabelL( R_AKNEXQUERY_OUTLINE1 );
00140             iContainer->ShowDataQueryL( R_AKNEXQUERY_DATA_QUERY );
00141             break;
00142         case EAknExQueryOutline4:
00143             SetTitlePaneL( aCommand );
00144             iContainer->CreateLabelL( R_AKNEXQUERY_OUTLINE4 );
00145             iContainer->ShowDataQueryL( 
00146                 R_AKNEXQUERY_DATA_QUERY, 
00147                 R_AKNEXQUERY_DATA_QUERY_INITIAL_TEXT );
00148             break;
00149         case EAknExQueryOutline8:
00150             SetTitlePaneL( aCommand );
00151             iContainer->CreateLabelL( R_AKNEXQUERY_OUTLINE8 );
00152             iContainer->ShowDataQueryL( R_AKNEXQUERY_DATA_QUERY );
00153             break;
00154        case EAknExQueryOutline10:
00155             SetTitlePaneL( aCommand );
00156             iContainer->CreateLabelL( R_AKNEXQUERY_OUTLINE10 );
00157             iContainer->ShowConfirmationQueryL( 
00158                 R_AKNEXQUERY_CONFIRMATION_QUERY );
00159             break;
00160         case EAknExQueryOutline16:
00161             SetTitlePaneL( aCommand );
00162             iContainer->CreateLabelL( R_AKNEXQUERY_OUTLINE16 );
00163             iContainer->ShowConfirmationQueryL( 
00164                 R_AKNEXQUERY_CONFIRMATION_QUERY_OTHER_SOFTKEYS );
00165             break;
00166         case EAknExQueryOutline44:
00167             SetTitlePaneL( aCommand );
00168             iContainer->PopoutListBoxL();
00169             break;
00170         case EAknExQueryOutline48:
00171             SetTitlePaneL( aCommand );
00172             iContainer->CreateLabelL( R_AKNEXQUERY_OUTLINE48 );
00173             iContainer->ShowListQueryL( 
00174                 R_AKNEXQUERY_LIST_SINGLE_PANE );
00175             break;
00176         case EAknExQueryOutline52:
00177             SetTitlePaneL( aCommand );
00178             iContainer->CreateLabelL( R_AKNEXQUERY_OUTLINE52 );
00179             iContainer->ShowListQueryL( 
00180                 R_AKNEXQUERY_LIST_SINGLE_GRAPHIC_HEADING_PANE );
00181             break;
00182         case EAknExQueryOutline54:
00183             SetTitlePaneL( aCommand );
00184             iContainer->CreateLabelL( R_AKNEXQUERY_OUTLINE54 );
00185             iContainer->ShowListQueryL( R_AKNEXQUERY_MULTI_SELECTION_QUERY );
00186             break;
00187         case EAknExQueryOutline61:
00188             SetTitlePaneL( aCommand );
00189             iContainer->CreateLabelL( R_AKNEXQUERY_OUTLINE61 );
00190             iContainer->ShowGlobalListQueryL();
00191             break;
00192         case EAknExQueryCbaCmdNext:
00193             DisplayNextOutlineL();
00194             break;
00195         case EAknSoftkeyBack:
00196             AppUi()->ProcessCommandL( EAknCmdExit );
00197             break;
00198         default:
00199             SetTitlePaneL( EAknExQueryNoOutline );
00200             iContainer->SetTextToLabelL( R_AKNEXQUERY_TITLE_MESSAGE );
00201             break;
00202         }
00203     }

void CAknExQueryView::HandleViewRectChange (   ) 
 

HandleViewRectChange From CAknView, handles client rectangle is changed.

Definition at line 317 of file aknexqueryview.cpp.

References iContainer.

00318     {
00319     if ( iContainer )
00320         {
00321         iContainer->SetRect( ClientRect() );
00322         }
00323     }

void CAknExQueryView::SetTitlePaneL (  TInt  aOutlineId  )  [private]
 

SetTitlePaneL Set titletext for titlepane.

Definition at line 210 of file aknexqueryview.cpp.

References CAknExQueryContainer::DeleteLabelL(), CAknExQueryContainer::DeleteListBoxL(), iContainer, and iCurrentOutline.

Referenced by HandleCommandL().

00211     {
00212     TInt titleId( KAknExQueryInitId );
00213     TBool defaultFlg( EFalse );
00214 
00215     iContainer->DeleteLabelL();
00216     iContainer->DeleteListBoxL();
00217     iCurrentOutline = aOutlineId; // Set current display outlinenumber
00218 
00219     switch ( aOutlineId )
00220         {
00221         case EAknExQueryNoOutline:
00222             defaultFlg = ETrue;
00223             break;
00224         case EAknExQueryOutline1:
00225             titleId = R_AKNEXQUERY_OUTLINE1;
00226             break;
00227         case EAknExQueryOutline4:
00228             titleId = R_AKNEXQUERY_OUTLINE4;
00229             break;
00230         case EAknExQueryOutline8:
00231             titleId = R_AKNEXQUERY_OUTLINE8;
00232             break;
00233         case EAknExQueryOutline10:
00234             titleId = R_AKNEXQUERY_OUTLINE10;
00235             break;
00236         case EAknExQueryOutline16:
00237             titleId = R_AKNEXQUERY_OUTLINE16;
00238             break;
00239         case EAknExQueryOutline44:
00240             titleId = R_AKNEXQUERY_OUTLINE44;
00241             break;
00242         case EAknExQueryOutline48:
00243             titleId = R_AKNEXQUERY_OUTLINE48;
00244             break;
00245         case EAknExQueryOutline52:
00246             titleId = R_AKNEXQUERY_OUTLINE52;
00247             break;
00248         case EAknExQueryOutline54:
00249             titleId = R_AKNEXQUERY_OUTLINE54;
00250             break;
00251         case EAknExQueryOutline61:
00252             titleId = R_AKNEXQUERY_OUTLINE61;
00253             break;
00254         default:
00255             defaultFlg = ETrue;
00256             break;
00257         }
00258 
00259     // Fetches pointer to the default title pane control.
00260     CAknTitlePane* titlePane = 
00261         static_cast<CAknTitlePane*>
00262             ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
00263 
00264     if ( !defaultFlg )
00265         {
00266         // Makes and sets text whitch is used title pane.
00267         TBuf<KAknExQueryTitleBufLength> MessageText( KAknExQueryBufferEmpty );
00268         iCoeEnv->ReadResource( MessageText, titleId );
00269         titlePane->SetTextL( MessageText );
00270         }
00271     else
00272         {
00273         titlePane->SetTextToDefaultL();
00274         }
00275     }

void CAknExQueryView::DoActivateL (  const TVwsViewId &  aPrevViewId,
TUid  aCustomMessageId,
const TDesC8 &  aCustomMessage
)  [private]
 

From CAknView, DoActivateL. Creates the Container class object.

Parameters:
aPrevViewId  aPrevViewId is not used.
aCustomMessageId  aCustomMessageId is not used.
aCustomMessage  aCustomMessage is not used.

Definition at line 282 of file aknexqueryview.cpp.

References CAknExQueryContainer::ConstructL(), and iContainer.

00286     {
00287    if ( !iContainer )
00288         {
00289         iContainer = new ( ELeave ) CAknExQueryContainer( this );
00290         iContainer->SetMopParent( this );
00291         iContainer->ConstructL( ClientRect() );
00292         AppUi()->AddToStackL( *this, iContainer );
00293         }
00294     
00295     }

void CAknExQueryView::DoDeactivate (   )  [private]
 

From CAknView, DoDeactivate. Deletes the Container class object.

Definition at line 302 of file aknexqueryview.cpp.

References iContainer.

00303     {
00304     if ( iContainer )
00305         {
00306         AppUi()->RemoveFromStack( iContainer );
00307         delete iContainer;
00308         iContainer = NULL;
00309         }
00310     }


Member Data Documentation

CAknExQueryContainer* CAknExQueryView::iContainer [private]
 

iContainer, container class. Owned by CAknExQueryView object.

Definition at line 125 of file aknexqueryview.h.

Referenced by DoActivateL(), DoDeactivate(), HandleCommandL(), HandleViewRectChange(), SetTitlePaneL(), and ~CAknExQueryView().

TInt CAknExQueryView::iCurrentOutline [private]
 

iCurrentOutline

Definition at line 130 of file aknexqueryview.h.

Referenced by DisplayNextOutlineL(), and SetTitlePaneL().


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

© Nokia 2009

Back to top