show only memos from selcted contact - work in progress

This commit is contained in:
DenioD
2020-04-29 01:24:38 +02:00
parent e9ae0e78c5
commit 205bb29f4a
3 changed files with 15 additions and 6 deletions

View File

@@ -62,6 +62,8 @@ void ChatModel::showMessages()
}
}
void ChatModel::renderChatBox(QListWidget &view)
{
/*for(auto &c : this->chatItems)
@@ -82,8 +84,15 @@ void ChatModel::renderChatBox(QListWidget *view)
view->takeItem(0);
}
//QModelIndex index = parent->listContactWidget->currentIndex();
// QString itemText = index.data(Qt::DisplayRole).toString();
for(auto &c : this->chatItems)
{
// if ("" == QString(c.second.getAddress())){ ////// ToDo: render only memos from selected contact
QDateTime myDateTime;
myDateTime.setTime_t(c.second.getTimestamp());
@@ -93,6 +102,10 @@ void ChatModel::renderChatBox(QListWidget *view)
line += QString(c.second.getMemo()) + QString("\n");
view->addItem(line);
line ="";
// }
// else{
// }
}
}