ganeswidgets/src/hgmediawall.cpp
changeset 5 4fa04caf0f43
parent 3 c863538fcbb6
child 11 42505cd701c6
equal deleted inserted replaced
3:c863538fcbb6 5:4fa04caf0f43
    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 #include <HbMainWindow>
    23 #include <hbstyleloader.h>
    23 #include <HbStyleLoader>
       
    24 
       
    25 /*
       
    26     string name from the mediwall .css for the front cover elevation factor.
       
    27 */
       
    28 static const QString FRONT_COVER_ELEVATION_FACTOR = QLatin1String("front-cover-elevation-factor");
       
    29 
    24 
    30 
    25 HgMediawall::HgMediawall(QGraphicsItem *parent ) :
    31 HgMediawall::HgMediawall(QGraphicsItem *parent ) :
    26     HgWidget( *new HgMediawallPrivate, parent )
    32     HgWidget( *new HgMediawallPrivate, parent )
    27 {
    33 {
    28     Q_D(HgMediawall);
    34     Q_D(HgMediawall);
   131 {
   137 {
   132     Q_D(const HgMediawall);
   138     Q_D(const HgMediawall);
   133     return d->container()->reflectionsEnabled();
   139     return d->container()->reflectionsEnabled();
   134 }
   140 }
   135 
   141 
       
   142 void HgMediawall::polish(HbStyleParameters& params)
       
   143 {
       
   144     // Read front cover elevation factor from css file.
       
   145     params.addParameter( FRONT_COVER_ELEVATION_FACTOR );
       
   146 
       
   147     HbWidget::polish( params );
       
   148 
       
   149     bool success = false;
       
   150     double factor = params.value( FRONT_COVER_ELEVATION_FACTOR ).toDouble(&success);
       
   151     if (success) {
       
   152         Q_D(HgMediawall);
       
   153         d->container()->setFrontItemElevationFactor(factor);
       
   154     }
       
   155 }
       
   156 
       
   157 
   136 // EOF
   158 // EOF