From d3d19cab9e62c25436c753dcc973444b47b1fbee Mon Sep 17 00:00:00 2001
From: DenioD <41270280+DenioD@users.noreply.github.com>
Date: Sun, 3 May 2020 19:44:50 +0200
Subject: [PATCH 1/2] switch sides of conversation
---
src/contactrequest.ui | 72 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 src/contactrequest.ui
diff --git a/src/contactrequest.ui b/src/contactrequest.ui
new file mode 100644
index 0000000..fb923db
--- /dev/null
+++ b/src/contactrequest.ui
@@ -0,0 +1,72 @@
+
+
+
+
+ Dialog
+
+
+
+ 0
+ 0
+ 400
+ 300
+
+
+
+ Dialog
+
+
+
+
+ 30
+ 240
+ 341
+ 32
+
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+
+
+
+
+
+
+
+ buttonBox
+ accepted()
+ Dialog
+ accept()
+
+
+ 248
+ 254
+
+
+ 157
+ 274
+
+
+
+
+ buttonBox
+ rejected()
+ Dialog
+ reject()
+
+
+ 316
+ 260
+
+
+ 286
+ 274
+
+
+
+
+
+
From 4da6eddae2ba504eb59eafb2a276ebb6c535f44a Mon Sep 17 00:00:00 2001
From: DenioD <41270280+DenioD@users.noreply.github.com>
Date: Sun, 3 May 2020 19:45:49 +0200
Subject: [PATCH 2/2] switch sides of conversation
---
src/chatmodel.cpp | 14 ++++++++++++--
src/contactmodel.cpp | 4 ++--
src/contactmodel.h | 2 ++
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/chatmodel.cpp b/src/chatmodel.cpp
index 4f5a7e6..de38e97 100644
--- a/src/chatmodel.cpp
+++ b/src/chatmodel.cpp
@@ -8,6 +8,7 @@
#include "ui_mainwindow.h"
#include "addressbook.h"
#include "ui_memodialog.h"
+#include "ui_contactrequest.h"
#include "addressbook.h"
#include
#include
@@ -122,7 +123,7 @@ void ChatModel::renderChatBox(Ui::MainWindow* ui, QListView *view)
{
QStandardItem* Items = new QStandardItem(c.second.toChatLine());
- Items->setData("Incoming", Qt::UserRole +1);
+ Items->setData("Outgoing", Qt::UserRole +1);
chat->appendRow(Items);
ui->listChat->setModel(chat);
@@ -141,7 +142,7 @@ void ChatModel::renderChatBox(Ui::MainWindow* ui, QListView *view)
{
QStandardItem* Items1 = new QStandardItem(c.second.toChatLine());
- Items1->setData("Outgoing", Qt::UserRole +1);
+ Items1->setData("Incoming", Qt::UserRole +1);
chat->appendRow(Items1);
}
@@ -423,6 +424,15 @@ Tx MainWindow::createTxForSafeContactRequest() {
//////////////////De-activated for now///////////////////
void MainWindow::safeContactRequest() {
+
+ // Ui_ContactRequest contactRequest;
+ // QDialog dialog(this);
+ // contactRequest.setupUi(&dialog);
+ // Settings::saveRestore(&dialog);
+
+ // memoDialog.memoTxt->setLenDisplayLabel(memoDialog.memoSize);
+ // memoDialog.memoTxt->setAcceptButton(memoDialog.buttonBox->button(QDialogButtonBox::Ok));
+
////////////////////////////Todo: Check if its a zaddr//////////
// Create a Tx from the values on the send tab. Note that this Tx object
diff --git a/src/contactmodel.cpp b/src/contactmodel.cpp
index 1a677e1..956bd63 100644
--- a/src/contactmodel.cpp
+++ b/src/contactmodel.cpp
@@ -15,7 +15,7 @@ void ContactModel::renderContactList(QListView* view)
QStandardItem* Items1 = new QStandardItem(QIcon("res/sdlogo.png"),c.getName());
contact->appendRow(Items1);
view->setModel(contact);
- view->setIconSize(QSize(80,100));
+ view->setIconSize(QSize(60,70));
view->setUniformItemSizes(true);
view->setDragDropMode(QAbstractItemView::DropOnly);;
}
@@ -24,7 +24,7 @@ void ContactModel::renderContactList(QListView* view)
QStandardItem* Items1 = new QStandardItem(QIcon("res/sdlogo2.png"),c.getName());
contact->appendRow(Items1);
view->setModel(contact);
- view->setIconSize(QSize(80,100));
+ view->setIconSize(QSize(60,70));
view->setUniformItemSizes(true);
view->setDragDropMode(QAbstractItemView::DropOnly);;
diff --git a/src/contactmodel.h b/src/contactmodel.h
index b97cc8a..2bf3fe3 100644
--- a/src/contactmodel.h
+++ b/src/contactmodel.h
@@ -1,3 +1,5 @@
+// Copyright 2019-2020 The Hush developers
+// GPLv3
#ifndef CONTACTMODEL_H
#define CONTACTMODEL_H