camerauis/cameraxui/cxui/inc/cxuisettingradiobuttonlistmodel.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 23 61bc0f252b2b
child 25 2c87b2808fd7
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
     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:
       
    15 *
       
    16 */
       
    17 #ifndef CXUISETTINGRADIOBUTTONLISTMODEL_H_
       
    18 #define CXUISETTINGRADIOBUTTONLISTMODEL_H_
       
    19 
       
    20 #include <QObject>
       
    21 #include <QStringList>
       
    22 #include <QAbstractListModel>
       
    23 #include "cxuienums.h"
       
    24 
       
    25 /*!
       
    26 * Model class to configure custom radio button list
       
    27 * to configure the number of lines per setting
       
    28 */
       
    29 class CxuiSettingRadioButtonListModel : public QAbstractListModel
       
    30 {
       
    31     Q_OBJECT
       
    32 
       
    33 public:
       
    34 
       
    35     CxuiSettingRadioButtonListModel();
       
    36     QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const;
       
    37     int rowCount (const QModelIndex &parent = QModelIndex()) const;
       
    38     void setItems(QStringList items);
       
    39     int listBoxType() const;
       
    40     void setListBoxType(int type);
       
    41     QStringList items() const;
       
    42     void resetModel();
       
    43 
       
    44 private:
       
    45     QStringList mItems;
       
    46     int mListBoxType;
       
    47 };
       
    48 
       
    49 #endif /* CXUISETTINGRADIOBUTTONLISTMODEL_H_ */