mirror of
https://github.com/AskDavis/Casinotest.git
synced 2026-01-10 06:39:46 -08:00
Exchanges widget
This commit is contained in:
41
src/qt/qtquick_controls/cpp/guiexchangescontrol.cpp
Normal file
41
src/qt/qtquick_controls/cpp/guiexchangescontrol.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#include "guiexchangescontrol.h"
|
||||
#include "guiexchangeslistview.h"
|
||||
#include "qmlexchangeslistmodel.h"
|
||||
#include "qmlexchangeslistitem.h"
|
||||
|
||||
GUIExchangesControl::GUIExchangesControl( QQuickItem* a_pParent )
|
||||
: QQuickItem( a_pParent )
|
||||
, m_pExchangesView( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
GUIExchangesControl::~GUIExchangesControl()
|
||||
{
|
||||
if ( m_pExchangesView )
|
||||
{
|
||||
delete m_pExchangesView;
|
||||
m_pExchangesView = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void GUIExchangesControl::InitializeExchangesView( GUIExchangesListView* a_pView )
|
||||
{
|
||||
if ( a_pView )
|
||||
{
|
||||
if ( m_pExchangesView )
|
||||
{
|
||||
delete m_pExchangesView;
|
||||
}
|
||||
m_pExchangesView = a_pView;
|
||||
}
|
||||
}
|
||||
|
||||
void GUIExchangesControl::slotPopulateListView( JsonActiveExchangesParser* a_pActiveExchanges )
|
||||
{
|
||||
if ( m_pExchangesView )
|
||||
{
|
||||
QmlExchangesListModel* pExchangesModel = new QmlExchangesListModel( *a_pActiveExchanges );
|
||||
m_pExchangesView->SetModel( pExchangesModel );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user