homescreenapp/hsdomainmodel/inc/hspagenewwidgetlayout.h
changeset 62 341166945d65
child 69 87476091b3f5
equal deleted inserted replaced
57:2e2dc3d30ca8 62:341166945d65
       
     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 
       
    18 #ifndef HSPAGENEWWIDGETLAYOUT_H
       
    19 #define HSPAGENEWWIDGETLAYOUT_H
       
    20 
       
    21 #include <QGraphicsLayout>
       
    22 #include "hstest_global.h"
       
    23 
       
    24 HOMESCREEN_TEST_CLASS(TestHsDomainModel)
       
    25 class HsWidgetHost;
       
    26 class HsPageNewWidgetLayout : public QGraphicsLayout 
       
    27 {
       
    28 public: 
       
    29     HsPageNewWidgetLayout(const QPointF &touchPoint = QPointF(),
       
    30                           QGraphicsLayoutItem *parent = 0);
       
    31     ~HsPageNewWidgetLayout();
       
    32         
       
    33     int count() const;
       
    34     QGraphicsLayoutItem *itemAt(int i) const;
       
    35     void removeAt(int index);
       
    36     QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
       
    37     void setGeometry(const QRectF &rect);
       
    38     
       
    39     void addItem(HsWidgetHost *item);
       
    40     
       
    41 private:
       
    42     QSizeF mSize;
       
    43     QList<HsWidgetHost*> mNewWidgets;
       
    44     QPointF mTouchPoint;
       
    45 
       
    46     HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
       
    47 };
       
    48 
       
    49 
       
    50 #endif