activityfw/testapplications/activitytestmodelhbintegration/iconsview.h
changeset 117 c63ee96dbe5f
equal deleted inserted replaced
115:3ab5c078b490 117:c63ee96dbe5f
       
     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 ICONSVIEW_H
       
    18 #define ICONSVIEW_H
       
    19 
       
    20 #include <hbview.h>
       
    21 
       
    22 class HbLabel;
       
    23 class QStandardItemModel;
       
    24 class HbListView;
       
    25 
       
    26 class IconsView : public HbView
       
    27 {
       
    28     Q_OBJECT
       
    29 
       
    30 public:
       
    31     IconsView(QGraphicsItem *parent = 0);
       
    32     ~IconsView();
       
    33 
       
    34 private slots:
       
    35     void addItem();
       
    36     void removeItem();
       
    37 
       
    38 public slots:
       
    39     void saveActivity(const QString &name);
       
    40     void loadActivity(const QString &name);
       
    41     void loadActivity(const QVariant &data);
       
    42 
       
    43 public:
       
    44     QVariant generateActivityData();
       
    45 
       
    46 private:
       
    47     void updateCountLabel();
       
    48     void addItemToModel(int number);
       
    49 
       
    50 private:
       
    51     QStandardItemModel *mModel;
       
    52     HbLabel *mItemCountLabel;
       
    53     HbListView *mList;
       
    54 };
       
    55 
       
    56 #endif // ICONSVIEW_H