hgwidgets_pub/ganeswidgets_api/inc/hggrid.h
changeset 20 a60f8b6b1d32
equal deleted inserted replaced
17:a10844a9914d 20:a60f8b6b1d32
       
     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 HGGRID_H
       
    19 #define HGGRID_H
       
    20 
       
    21 #include <hgwidgets/hgwidgets.h>
       
    22 
       
    23 class HgGridPrivate;
       
    24 
       
    25 class HG_WIDGETS_EXPORT HgGrid : public HgWidget
       
    26 {
       
    27     Q_OBJECT
       
    28     Q_PROPERTY(bool effect3dEnabled  READ effect3dEnabled  WRITE setEffect3dEnabled )
       
    29     Q_PROPERTY(bool pinchEnabled  READ pinchEnabled  WRITE setPinchEnabled )
       
    30     Q_PROPERTY(bool reflectionsEnabled READ reflectionsEnabled WRITE setReflectionsEnabled)
       
    31 public:
       
    32 
       
    33     explicit HgGrid(Qt::Orientation scrollDirection, QGraphicsItem *parent = 0 );
       
    34     virtual ~HgGrid();
       
    35 
       
    36     bool effect3dEnabled() const;
       
    37     void setEffect3dEnabled(bool effect3dEnabled);
       
    38     
       
    39     bool pinchEnabled() const;
       
    40     void setPinchEnabled(bool pinchEnabled);
       
    41 
       
    42     void setPinchLevels(QPair<int,int> levels, Qt::Orientation scrollDirection);
       
    43     QPair<int,int> pinchLevels(Qt::Orientation scrollDirection) const;
       
    44 
       
    45     void setRowCount(int count, Qt::Orientation scrollDirection = Qt::Horizontal);
       
    46     int rowCount(Qt::Orientation scrollDirection = Qt::Horizontal) const;
       
    47 
       
    48     void setReflectionsEnabled(bool reflectionsEnabled);
       
    49     bool reflectionsEnabled() const;
       
    50     
       
    51 signals:
       
    52 
       
    53     void emptySpacePressed();
       
    54     
       
    55 protected:
       
    56     HgGrid(Qt::Orientation scrollDirection, HgGridPrivate &dd, QGraphicsItem *parent);
       
    57 
       
    58 private:
       
    59     Q_DECLARE_PRIVATE_D(p_ptr, HgGrid)
       
    60     Q_DISABLE_COPY(HgGrid)
       
    61 };
       
    62 
       
    63 #endif  //HGGRID_H
       
    64