wlanutilities/wlanwizard/src/wlanwizardsummaryviewitem.cpp
branchRCL_3
changeset 25 f28ada11abbf
parent 24 63be7eb3fc78
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
     1 /*
       
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: 
       
    15  *   Wlan Wizard Page: Summary: List view item
       
    16  *
       
    17  */
       
    18 
       
    19 // System includes
       
    20 
       
    21 // User includes
       
    22 
       
    23 #include "wlanwizardsummaryviewitem.h"
       
    24 #include "OstTraceDefinitions.h"
       
    25 #ifdef OST_TRACE_COMPILER_IN_USE
       
    26 #include "wlanwizardsummaryviewitemTraces.h"
       
    27 #endif
       
    28 
       
    29 
       
    30 /*!
       
    31    \class WlanWizardSummaryListViewItem
       
    32    \brief Implements custom List view for Summary page.
       
    33 
       
    34    HbListWidget does not support directly views where selection is disabled.
       
    35 
       
    36    This implementation removes required operations to disable list selection.
       
    37  */
       
    38 
       
    39 // External function prototypes
       
    40 
       
    41 // Local constants
       
    42 
       
    43 // ======== LOCAL FUNCTIONS ========
       
    44 
       
    45 // 
       
    46 
       
    47 /*!
       
    48    Constructor.
       
    49 
       
    50    @param [in] parent parent class
       
    51  */
       
    52 WlanWizardSummaryListViewItem::WlanWizardSummaryListViewItem(
       
    53     QGraphicsItem* parent) : 
       
    54     HbListViewItem(parent)
       
    55 {
       
    56     OstTraceFunctionEntry0(
       
    57         WLANWIZARDSUMMARYLISTVIEWITEM_WLANWIZARDSUMMARYLISTVIEWITEM_ENTRY );
       
    58     OstTraceFunctionExit0(
       
    59         WLANWIZARDSUMMARYLISTVIEWITEM_WLANWIZARDSUMMARYLISTVIEWITEM_EXIT );
       
    60 }
       
    61 
       
    62 /*!
       
    63    Destructor.
       
    64  */
       
    65 WlanWizardSummaryListViewItem::~WlanWizardSummaryListViewItem()
       
    66 {
       
    67     OstTraceFunctionEntry0(
       
    68         DUP1_WLANWIZARDSUMMARYLISTVIEWITEM_WLANWIZARDSUMMARYLISTVIEWITEM_ENTRY );
       
    69     OstTraceFunctionExit0(
       
    70         DUP1_WLANWIZARDSUMMARYLISTVIEWITEM_WLANWIZARDSUMMARYLISTVIEWITEM_EXIT );
       
    71 }
       
    72 
       
    73 /*!
       
    74    See HbListViewItem::updateChildItems().
       
    75 
       
    76    Disables selection. 
       
    77  */
       
    78 void WlanWizardSummaryListViewItem::updateChildItems()
       
    79 {
       
    80     OstTraceFunctionEntry0( WLANWIZARDSUMMARYLISTVIEWITEM_UPDATECHILDITEMS_ENTRY );
       
    81     HbListViewItem::updateChildItems();
       
    82 
       
    83     ungrabGesture(Qt::TapGesture);
       
    84 
       
    85     GraphicsItemFlags itemFlags = flags();
       
    86     itemFlags &= ~QGraphicsItem::ItemIsFocusable;
       
    87     setFlags(itemFlags);
       
    88     OstTraceFunctionExit0( WLANWIZARDSUMMARYLISTVIEWITEM_UPDATECHILDITEMS_EXIT );
       
    89 }
       
    90 
       
    91 /*!
       
    92    See HbListViewItem::createItem().
       
    93  */
       
    94 HbAbstractViewItem*  WlanWizardSummaryListViewItem::createItem()
       
    95 {
       
    96     OstTraceFunctionEntry0( WLANWIZARDSUMMARYLISTVIEWITEM_CREATEITEM_ENTRY );
       
    97     OstTraceFunctionExit0( WLANWIZARDSUMMARYLISTVIEWITEM_CREATEITEM_EXIT );
       
    98     return new WlanWizardSummaryListViewItem(*this);
       
    99 }