mpviewplugins/mpcollectionviewplugin/tsrc/unittest_mpcollectioncontainers/stub/inc/hgmediawall.h
changeset 29 8192e5b5c935
child 47 4cc1412daed0
equal deleted inserted replaced
25:3ec52facab4d 29:8192e5b5c935
       
     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: HgMediawall stub for testing mpcollectioncontainers
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HGMEDIAWALL_H
       
    19 #define HGMEDIAWALL_H
       
    20 
       
    21 //includes
       
    22 #include <hbglobal.h>
       
    23 #include <hbnamespace.h>
       
    24 #include <hbwidget.h>
       
    25 
       
    26 class HgWidget : public HbWidget
       
    27 {
       
    28     Q_OBJECT
       
    29 
       
    30 public:
       
    31 
       
    32     enum ScrollBarPolicy {
       
    33         ScrollBarAsNeeded = Qt::ScrollBarAsNeeded,
       
    34         ScrollBarAlwaysOff = Qt::ScrollBarAlwaysOff,
       
    35         ScrollBarAlwaysOn = Qt::ScrollBarAlwaysOn,
       
    36         ScrollBarAutoHide
       
    37     };
       
    38 
       
    39     explicit HgWidget ( QGraphicsItem *parent = 0 );
       
    40     virtual ~HgWidget ();
       
    41 
       
    42     void setScrollBarPolicy( ScrollBarPolicy policy );
       
    43     virtual void setModel(QAbstractItemModel *model);
       
    44     void scrollTo(const QModelIndex &index);
       
    45     QModelIndex currentIndex() const;
       
    46 
       
    47 signals:
       
    48 
       
    49     void scrollingEnded();
       
    50 
       
    51 };
       
    52 
       
    53 class HgMediawall : public HgWidget
       
    54 {
       
    55     Q_OBJECT
       
    56 
       
    57 public:
       
    58 
       
    59     enum LabelPosition {
       
    60         PositionNone = 0,
       
    61         PositionAboveImage,
       
    62         PositionBelowImage
       
    63     };
       
    64 
       
    65     explicit HgMediawall( QGraphicsItem *parent = 0 );
       
    66     virtual ~HgMediawall();
       
    67 
       
    68     void setTitlePosition( LabelPosition position );
       
    69     void setDescriptionPosition( LabelPosition position );
       
    70     void setTitleFontSpec( const HbFontSpec &fontSpec );
       
    71     void setDescriptionFontSpec( const HbFontSpec &fontSpec );
       
    72 
       
    73     void enableReflections( bool enabled );
       
    74     bool reflectionsEnabled() const;
       
    75 
       
    76 public:
       
    77 
       
    78     bool        mReflectionEnabled;
       
    79 
       
    80 };
       
    81 
       
    82 #endif    // HGMEDIAWALL_H