activityfw/testapplications/activitytestmodel/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 loadActivity(const QVariant &data);
       
    40 
       
    41 signals:
       
    42     void activitySaveRequested(const QString &name);
       
    43 
       
    44 public:
       
    45     QVariant generateActivityData();
       
    46 
       
    47 private:
       
    48     void updateCountLabel();
       
    49     void addItemToModel(int number);
       
    50 
       
    51 private:
       
    52     QStandardItemModel *mModel;
       
    53     HbLabel *mItemCountLabel;
       
    54     HbListView *mList;
       
    55 };
       
    56 
       
    57 #endif // ICONSVIEW_H