emailuis/nmailuiwidgets/src/nmautofilllistview.cpp
changeset 74 6c59112cfd31
equal deleted inserted replaced
69:4e54af54a4a1 74:6c59112cfd31
       
     1 /*
       
     2 * Copyright (c) 2009 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: List view for the autofill items. 
       
    15 *
       
    16 */
       
    17 
       
    18 #include "nmailuiwidgetsheaders.h"
       
    19 
       
    20 
       
    21 static const int NmHorizontalPreferredWidth(500);
       
    22 static const int NmVerticalPreferredWidth(300);
       
    23 
       
    24 /*!
       
    25     \class NmAutoFillListView
       
    26     \brief List view for the autofill items.
       
    27     
       
    28     The main function is to handle the virtual keyboard openings and closings. 
       
    29 */
       
    30 
       
    31 /*!
       
    32     Constructor of NmAutoFillListView.
       
    33     
       
    34     Registers widgetML and CSS files to HbStyle system for view items.
       
    35 */
       
    36 NmAutoFillListView::NmAutoFillListView(QGraphicsItem *parent) : HbListView(parent)
       
    37 {
       
    38 }
       
    39 /*!
       
    40     The popup size changes with the orientation. In horizontal orientation, the popup is wider.
       
    41     
       
    42     \param orientation 
       
    43  */
       
    44 void NmAutoFillListView::orientationChanged(Qt::Orientation orientation)
       
    45 {
       
    46     if (orientation == Qt::Horizontal) {
       
    47         setPreferredWidth(NmHorizontalPreferredWidth);
       
    48     }
       
    49     else {
       
    50         setPreferredWidth(NmVerticalPreferredWidth);
       
    51     }
       
    52 }