From dd18b02ae178fcc8bc49b2fcd8f4274de6e16c78 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 17 Jan 2020 10:07:24 -0500 Subject: [PATCH] Basic list of read-only contacts GUI --- src/mainwindow.cpp | 10 ++++++++++ src/mainwindow.h | 1 + src/mainwindow.ui | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f2010d7..416a5ce 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -124,6 +124,7 @@ MainWindow::MainWindow(QWidget *parent) : setupReceiveTab(); setupBalancesTab(); setupMarketTab(); + setupChatTab(); setupHushTab(); rpc = new RPC(this); @@ -1038,6 +1039,15 @@ void MainWindow::setupHushTab() { ui->hushlogo->setBasePixmap(QPixmap(":/img/res/zcashdlogo.gif")); } +void MainWindow::setupChatTab() { + QStringListModel *chatModel = new QStringListModel(); + QStringList contacts; + contacts << "Alice" << "Bob" << "Charlie" << "Eve"; + chatModel->setStringList(contacts); + + ui->contactsView->setModel(chatModel); +} + void MainWindow::setupMarketTab() { qDebug() << "Setting up market tab"; auto s = Settings::getInstance(); diff --git a/src/mainwindow.h b/src/mainwindow.h index 9a2f5be..f485b2a 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -81,6 +81,7 @@ private: void setupReceiveTab(); void setupBalancesTab(); void setupHushTab(); + void setupChatTab(); void setupMarketTab(); void slot_change_theme(const QString& themeName); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index c111a56..144e30d 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -1021,10 +1021,10 @@ - + - +