|
|
|
@ -2,6 +2,7 @@ |
|
|
|
#include "accountlist.h" |
|
|
|
#include "accountlist.h" |
|
|
|
#include "accountdelegate.h" |
|
|
|
#include "accountdelegate.h" |
|
|
|
#include "memberlistmodel.h" |
|
|
|
#include "memberlistmodel.h" |
|
|
|
|
|
|
|
#include "avatars/avatargallery.h" |
|
|
|
#include "memberpropsdialog.h" |
|
|
|
#include "memberpropsdialog.h" |
|
|
|
#include "renamedialog.h" |
|
|
|
#include "renamedialog.h" |
|
|
|
#include "../db/db_manager.h" |
|
|
|
#include "../db/db_manager.h" |
|
|
|
@ -84,6 +85,9 @@ AccountList::AccountList(DbManager* db, QWidget *parent) |
|
|
|
m_listView->setModel(m_model); |
|
|
|
m_listView->setModel(m_model); |
|
|
|
auto* delegate = new AccountDelegate(m_listView); |
|
|
|
auto* delegate = new AccountDelegate(m_listView); |
|
|
|
m_listView->setItemDelegate(delegate); |
|
|
|
m_listView->setItemDelegate(delegate); |
|
|
|
|
|
|
|
connect(delegate, &AccountDelegate::avatarRequested, this, [this](const QModelIndex& index) { |
|
|
|
|
|
|
|
showAvatarGallery(m_channelId, m_model->nodeIdAt(index.row())); |
|
|
|
|
|
|
|
}); |
|
|
|
connect(delegate, &AccountDelegate::inviteRequested, this, [this](const QModelIndex& index) { |
|
|
|
connect(delegate, &AccountDelegate::inviteRequested, this, [this](const QModelIndex& index) { |
|
|
|
const quint64 peer = m_model->nodeIdAt(index.row()); |
|
|
|
const quint64 peer = m_model->nodeIdAt(index.row()); |
|
|
|
if (peer && m_db && peer != m_db->myNodeId()) |
|
|
|
if (peer && m_db && peer != m_db->myNodeId()) |
|
|
|
|