ganeswidgets/src/hgmediawall.cpp
changeset 1 e48454f237ca
parent 0 89c329efa980
child 3 c863538fcbb6
equal deleted inserted replaced
0:89c329efa980 1:e48454f237ca
    17 
    17 
    18 #include <hgwidgets/hgmediawall.h>
    18 #include <hgwidgets/hgmediawall.h>
    19 #include "hgmediawall_p.h"
    19 #include "hgmediawall_p.h"
    20 #include "hgwidgets_p.h"
    20 #include "hgwidgets_p.h"
    21 #include "hgcoverflowcontainer.h"
    21 #include "hgcoverflowcontainer.h"
       
    22 #include <hbmainwindow>
    22 
    23 
    23 HgMediawall::HgMediawall(QGraphicsItem *parent ):
    24 HgMediawall::HgMediawall(QGraphicsItem *parent ) :
    24     HgWidget(new HgMediawallPrivate, parent)
    25     HgWidget( *new HgMediawallPrivate, parent )
    25 {
    26 {
    26     Q_D(HgMediawall);
    27     Q_D(HgMediawall);
    27     d->q_ptr = this;
    28     d->q_ptr = this;
    28     d->init();
    29     d->init(mainWindow()->orientation());
       
    30 }
       
    31 
       
    32 HgMediawall::HgMediawall(HgMediawallPrivate &dd, QGraphicsItem *parent) : 
       
    33     HgWidget( dd, parent )
       
    34 {
       
    35     Q_D(HgMediawall);
       
    36     d->q_ptr = this;    
       
    37     d->init(mainWindow()->orientation());
    29 }
    38 }
    30 
    39 
    31 HgMediawall::~HgMediawall()
    40 HgMediawall::~HgMediawall()
    32 {
    41 {
    33 }
    42 }
   108 {
   117 {
   109     Q_D(const HgMediawall);
   118     Q_D(const HgMediawall);
   110     return d->descriptionFontSpec();
   119     return d->descriptionFontSpec();
   111 }
   120 }
   112 
   121 
       
   122 /*!
       
   123  *  Sets front item delta from the center of the widget.
       
   124  */
       
   125 void HgMediawall::setFrontItemPositionDelta(const QPointF& position)
       
   126 {
       
   127     Q_D(HgMediawall);
       
   128     return d->container()->setFrontItemPositionDelta(position);
       
   129 }
       
   130 
       
   131 /*!
       
   132  * Gets current front items position delta.
       
   133  */
       
   134 QPointF HgMediawall::frontItemPositionDelta() const
       
   135 {
       
   136     Q_D(const HgMediawall);
       
   137     return d->container()->frontItemPositionDelta();
       
   138 }
       
   139 
       
   140 /**
       
   141  * Enables/disables reflections in the mediawall.
       
   142  */
       
   143 void HgMediawall::enableReflections(bool enabled)
       
   144 {
       
   145     Q_D(HgMediawall);
       
   146     d->container()->enableReflections(enabled);
       
   147 }
       
   148 
       
   149 /**
       
   150  * Returns true if reflections are enabled.
       
   151  */
       
   152 bool HgMediawall::reflectionsEnabled() const
       
   153 {
       
   154     Q_D(const HgMediawall);
       
   155     return d->container()->reflectionsEnabled();
       
   156 }
       
   157 
   113 // EOF
   158 // EOF