ganeswidgets/src/hgquadrenderer.cpp
changeset 1 e48454f237ca
parent 0 89c329efa980
child 2 49c70dcc3f17
equal deleted inserted replaced
0:89c329efa980 1:e48454f237ca
    52 void HgQuadRenderer::setImageFader(HgImageFader* fader)
    52 void HgQuadRenderer::setImageFader(HgImageFader* fader)
    53 {
    53 {
    54     mImageFader = fader;
    54     mImageFader = fader;
    55 }
    55 }
    56 
    56 
       
    57 void HgQuadRenderer::setDefaultImage(QImage defaultImage)
       
    58 {    
       
    59     mDefaultImage = defaultImage;
       
    60 }
       
    61 
       
    62 void HgQuadRenderer::setTranslation(const QVector2D& translate)
       
    63 {
       
    64     mTranslation = translate;
       
    65 }
       
    66 
       
    67 HgQuad* HgQuadRenderer::getQuadByUserData(const QVariant& userData) const
       
    68 {
       
    69     for (int i = 0; i < mQuads.count(); i++)
       
    70     {
       
    71         HgQuad* quad = mQuads[i];
       
    72         if (quad->userData() == userData)
       
    73             return quad;
       
    74     }
       
    75     return NULL;
       
    76 }
       
    77 
       
    78 QImage HgQuadRenderer::getDefaultImage() const
       
    79 {
       
    80     return mDefaultImage;
       
    81 }
       
    82