mirror of
https://github.com/AskDavis/Casinotest.git
synced 2026-01-08 13:49:47 -08:00
Adverts widget supports population from web and from local files.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "jsonactivepromotionsparser.h"
|
||||
#include "../qtquick_controls/cpp/qmlimageprovider.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
@@ -24,7 +25,7 @@ void JsonActivePromotionsParser::ResolvePromotionsArray()
|
||||
{
|
||||
if ( singleCasinoDescriptor.isObject() )
|
||||
{
|
||||
m_aActiveCasinos.append( JsonSingleActivePromotion( singleCasinoDescriptor.toObject() ) );
|
||||
m_aActivePromotions.append( JsonSingleActivePromotion( singleCasinoDescriptor.toObject() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,10 +34,21 @@ void JsonActivePromotionsParser::ResolvePromotionsArray()
|
||||
|
||||
const QList<JsonSingleActivePromotion>& JsonActivePromotionsParser::GetPromotions() const
|
||||
{
|
||||
return m_aActiveCasinos;
|
||||
return m_aActivePromotions;
|
||||
}
|
||||
|
||||
QList<JsonSingleActivePromotion>& JsonActivePromotionsParser::GetPromotions()
|
||||
{
|
||||
return m_aActiveCasinos;
|
||||
return m_aActivePromotions;
|
||||
}
|
||||
|
||||
void JsonActivePromotionsParser::AddImagesToPool( QmlImageProvider* a_pImageProvider )
|
||||
{
|
||||
if ( a_pImageProvider )
|
||||
{
|
||||
foreach( JsonSingleActivePromotion oPromotion, m_aActivePromotions )
|
||||
{
|
||||
a_pImageProvider->AddToImagePool( oPromotion.GetImageName(), oPromotion.GetAdvertImage() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user