Hush lite wallet https://faq.hush.is/sdl
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
801 B

#include "contactmodel.h"
#include "addressbook.h"
#include "mainwindow.h"
void ContactModel::renderContactList(QListView* view)
{
QStandardItemModel* contact = new QStandardItemModel();
for(auto &c : AddressBook::getInstance()->getAllAddressLabels())
{
auto theme = Settings::getInstance()->get_theme_name();
if ((theme == "dark" || theme == "midnight")) {
QString avatar = c.getAvatar();
QStandardItem* Items1 = new QStandardItem(QIcon(avatar) ,c.getName());
contact->appendRow(Items1);
view->setModel(contact);
view->setIconSize(QSize(60,70));
view->setUniformItemSizes(true);
view->setDragDropMode(QAbstractItemView::DropOnly);
}
}
}