first implementation of automated contact request detection - work in progress
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
QWidget, QMainWindow, QMenuBar, QMenu, QDialog, QTabWidget, QTableView, QTableView::item, QScrollArea, QGroupBox, QPlainTextEdit, QLineEdit, QLabel, MainWindow
|
QWidget, QMainWindow, QMenuBar, QMenu, QDialog, QTabWidget, QTableView, QTableView::item, QScrollArea, QGroupBox, QPlainTextEdit, QLineEdit, QLabel, MainWindow, ChatModel, requestDialog
|
||||||
{
|
{
|
||||||
background-color: #303335;
|
background-color: #303335;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
<ui version="4.0" >
|
|
||||||
<author></author>
|
|
||||||
<comment></comment>
|
|
||||||
<exportmacro></exportmacro>
|
|
||||||
<class>Dialog</class>
|
|
||||||
<widget class="QDialog" name="Dialog" >
|
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>400</width>
|
|
||||||
<height>300</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle" >
|
|
||||||
<string>Dialog</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox" >
|
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>30</x>
|
|
||||||
<y>240</y>
|
|
||||||
<width>341</width>
|
|
||||||
<height>32</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons" >
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<pixmapfunction></pixmapfunction>
|
|
||||||
<resources/>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>accepted()</signal>
|
|
||||||
<receiver>Dialog</receiver>
|
|
||||||
<slot>accept()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel" >
|
|
||||||
<x>248</x>
|
|
||||||
<y>254</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel" >
|
|
||||||
<x>157</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>rejected()</signal>
|
|
||||||
<receiver>Dialog</receiver>
|
|
||||||
<slot>reject()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel" >
|
|
||||||
<x>316</x>
|
|
||||||
<y>260</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel" >
|
|
||||||
<x>286</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
||||||
|
|
||||||
@@ -126,6 +126,7 @@ FORMS += \
|
|||||||
src/mobileappconnector.ui \
|
src/mobileappconnector.ui \
|
||||||
src/createhushconfdialog.ui \
|
src/createhushconfdialog.ui \
|
||||||
src/recurringdialog.ui \
|
src/recurringdialog.ui \
|
||||||
|
src/requestContactDialog.ui \
|
||||||
src/newrecurring.ui \
|
src/newrecurring.ui \
|
||||||
src/requestdialog.ui \
|
src/requestdialog.ui \
|
||||||
src/recurringmultiple.ui \
|
src/recurringmultiple.ui \
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Copyright 2019-2020 The Hush developers
|
||||||
|
// GPLv3
|
||||||
#include "addressbook.h"
|
#include "addressbook.h"
|
||||||
#include "ui_addressbook.h"
|
#include "ui_addressbook.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
|
#include "ui_requestContactDialog.h"
|
||||||
#include "addressbook.h"
|
#include "addressbook.h"
|
||||||
#include "ui_memodialog.h"
|
#include "ui_memodialog.h"
|
||||||
#include "ui_contactrequest.h"
|
#include "ui_contactrequest.h"
|
||||||
@@ -83,6 +84,7 @@ void ChatModel::showMessages()
|
|||||||
{
|
{
|
||||||
qDebug() << c.second.toChatLine();
|
qDebug() << c.second.toChatLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatModel::renderChatBox(Ui::MainWindow* ui, QListView &view)
|
void ChatModel::renderChatBox(Ui::MainWindow* ui, QListView &view)
|
||||||
@@ -97,7 +99,10 @@ void ChatModel::renderChatBox(Ui::MainWindow* ui, QListView &view)
|
|||||||
|
|
||||||
void ChatModel::renderChatBox(Ui::MainWindow* ui, QListView *view)
|
void ChatModel::renderChatBox(Ui::MainWindow* ui, QListView *view)
|
||||||
{
|
{
|
||||||
|
QObject::connect(ui->pushContact, &QPushButton::clicked,[&] ()
|
||||||
|
{
|
||||||
|
renderContactRequest();
|
||||||
|
});
|
||||||
|
|
||||||
QStandardItemModel* chat = new QStandardItemModel();
|
QStandardItemModel* chat = new QStandardItemModel();
|
||||||
|
|
||||||
@@ -136,15 +141,98 @@ void ChatModel::renderChatBox(Ui::MainWindow* ui, QListView *view)
|
|||||||
ui->listChat->setModel(chat);
|
ui->listChat->setModel(chat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ChatModel::renderContactRequest(){
|
||||||
|
|
||||||
|
Ui_requestDialog requestContact;
|
||||||
|
QDialog dialog(main);
|
||||||
|
requestContact.setupUi(&dialog);
|
||||||
|
Settings::saveRestore(&dialog);
|
||||||
|
|
||||||
|
{
|
||||||
|
QStandardItemModel* contactRequest = new QStandardItemModel();
|
||||||
|
|
||||||
|
|
||||||
|
for (auto &c : this->chatItems) {
|
||||||
|
if ((c.second.getType() == "cont") && (c.second.isOutgoing() == false) && (c.second.getMemo().startsWith("{"))) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
QStandardItem* Items = new QStandardItem(c.second.getAddress());
|
||||||
|
contactRequest->appendRow(Items);
|
||||||
|
requestContact.requestContact->setModel(contactRequest);
|
||||||
|
// requestContact.requestContact->show();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
QObject::connect(requestContact.requestContact, &QTableView::clicked, [&] () {
|
||||||
|
|
||||||
|
for (auto &c : this->chatItems){
|
||||||
|
QModelIndex index = requestContact.requestContact->currentIndex();
|
||||||
|
QString label_contact = index.data(Qt::DisplayRole).toString();
|
||||||
|
QStandardItemModel* contactMemo = new QStandardItemModel();
|
||||||
|
|
||||||
|
if (c.second.isOutgoing() == false) {
|
||||||
|
if (label_contact == c.second.getAddress()) {
|
||||||
|
if(c.second.getMemo().startsWith("{")){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
QStandardItem* Items = new QStandardItem(c.second.getMemo());
|
||||||
|
contactMemo->appendRow(Items);
|
||||||
|
requestContact.requestMemo->setModel(contactMemo);
|
||||||
|
requestContact.requestMemo->show();
|
||||||
|
|
||||||
|
requestContact.requestZaddr->setText(c.second.getRequestZaddr());
|
||||||
|
requestContact.requestCID->setText(c.second.getCid());
|
||||||
|
requestContact.requestMyAddr->setText(c.second.getAddress());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
QObject::connect(requestContact.pushButton, &QPushButton::clicked, [&] () {
|
||||||
|
|
||||||
|
QString cid = requestContact.requestCID->text();
|
||||||
|
auto addr = requestContact.requestZaddr->text().trimmed();
|
||||||
|
QString newLabel = requestContact.requestLabel->text().trimmed();
|
||||||
|
auto myAddr = requestContact.requestMyAddr->text().trimmed();
|
||||||
|
|
||||||
|
QString avatar = QString("res/") + requestContact.comboBoxAvatar->currentText() + QString(".png");
|
||||||
|
|
||||||
|
qDebug()<<"Beginn kopiert" <<cid << addr << newLabel << myAddr;
|
||||||
|
AddressBook::getInstance()->addAddressLabel(newLabel, addr, myAddr, cid, avatar);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
dialog.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void ChatModel::addCid(QString tx, QString cid)
|
void ChatModel::addCid(QString tx, QString cid)
|
||||||
{
|
{
|
||||||
this->cidMap[tx] = cid;
|
this->cidMap[tx] = cid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ChatModel::addrequestZaddr(QString tx, QString requestZaddr)
|
||||||
|
{
|
||||||
|
this->requestZaddrMap[tx] = requestZaddr;
|
||||||
|
}
|
||||||
|
|
||||||
QString ChatModel::getCidByTx(QString tx)
|
QString ChatModel::getCidByTx(QString tx)
|
||||||
{
|
{
|
||||||
for(auto& pair : this->cidMap)
|
for(auto& pair : this->cidMap)
|
||||||
@@ -160,11 +248,31 @@ QString ChatModel::getCidByTx(QString tx)
|
|||||||
return QString("0xdeadbeef");
|
return QString("0xdeadbeef");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString ChatModel::getrequestZaddrByTx(QString tx)
|
||||||
|
{
|
||||||
|
for(auto& pair : this->requestZaddrMap)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this->requestZaddrMap.count(tx) > 0)
|
||||||
|
{
|
||||||
|
return this->requestZaddrMap[tx];
|
||||||
|
}
|
||||||
|
|
||||||
|
return QString("0xdeadbeef");
|
||||||
|
}
|
||||||
|
|
||||||
void ChatModel::killCidCache()
|
void ChatModel::killCidCache()
|
||||||
{
|
{
|
||||||
this->cidMap.clear();
|
this->cidMap.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ChatModel::killrequestZaddrCache()
|
||||||
|
{
|
||||||
|
this->requestZaddrMap.clear();
|
||||||
|
}
|
||||||
|
|
||||||
QString MainWindow::createHeaderMemo(QString type, QString cid, QString zaddr, int version=0, int headerNumber=1)
|
QString MainWindow::createHeaderMemo(QString type, QString cid, QString zaddr, int version=0, int headerNumber=1)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -183,6 +291,7 @@ QString MainWindow::createHeaderMemo(QString type, QString cid, QString zaddr,
|
|||||||
header = j.toJson();
|
header = j.toJson();
|
||||||
qDebug() << "made header=" << header;
|
qDebug() << "made header=" << header;
|
||||||
return header;
|
return header;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "camount.h"
|
#include "camount.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ListViewDelegate : public QAbstractItemDelegate
|
class ListViewDelegate : public QAbstractItemDelegate
|
||||||
{
|
{
|
||||||
int d_radius;
|
int d_radius;
|
||||||
@@ -163,7 +164,9 @@ class ChatItem
|
|||||||
long _timestamp;
|
long _timestamp;
|
||||||
QString _address;
|
QString _address;
|
||||||
QString _contact;
|
QString _contact;
|
||||||
QString _memo;
|
QString _memo;
|
||||||
|
QString _requestZaddr;
|
||||||
|
QString _type;
|
||||||
QString _cid;
|
QString _cid;
|
||||||
QString _txid;
|
QString _txid;
|
||||||
bool _outgoing = false;
|
bool _outgoing = false;
|
||||||
@@ -171,24 +174,28 @@ class ChatItem
|
|||||||
public:
|
public:
|
||||||
ChatItem() {}
|
ChatItem() {}
|
||||||
|
|
||||||
ChatItem(long timestamp, QString address, QString contact, QString memo, QString cid, QString txid)
|
ChatItem(long timestamp, QString address, QString contact, QString memo,QString requestZaddr, QString type, QString cid, QString txid)
|
||||||
{
|
{
|
||||||
_timestamp = timestamp;
|
_timestamp = timestamp;
|
||||||
_address = address;
|
_address = address;
|
||||||
_contact = contact;
|
_contact = contact;
|
||||||
_memo = memo;
|
_memo = memo;
|
||||||
|
_requestZaddr = requestZaddr;
|
||||||
|
_type = type;
|
||||||
_cid = cid;
|
_cid = cid;
|
||||||
_txid = txid;
|
_txid = txid;
|
||||||
_outgoing = false;
|
_outgoing = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatItem(long timestamp, QString address, QString contact, QString memo, QString cid, QString txid, bool outgoing)
|
ChatItem(long timestamp, QString address, QString contact, QString memo, QString requestZaddr, QString type, QString cid, QString txid, bool outgoing)
|
||||||
{
|
{
|
||||||
_timestamp = timestamp;
|
_timestamp = timestamp;
|
||||||
_address = address;
|
_address = address;
|
||||||
_contact = contact;
|
_contact = contact;
|
||||||
_memo = memo;
|
_memo = memo;
|
||||||
|
_requestZaddr = requestZaddr;
|
||||||
|
_type = type;
|
||||||
_cid = cid;
|
_cid = cid;
|
||||||
_txid = txid;
|
_txid = txid;
|
||||||
_outgoing = outgoing;
|
_outgoing = outgoing;
|
||||||
@@ -215,6 +222,15 @@ class ChatItem
|
|||||||
return _memo;
|
return _memo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString getRequestZaddr()
|
||||||
|
{
|
||||||
|
return _requestZaddr;
|
||||||
|
}
|
||||||
|
QString getType()
|
||||||
|
{
|
||||||
|
return _type;
|
||||||
|
}
|
||||||
|
|
||||||
QString getCid()
|
QString getCid()
|
||||||
{
|
{
|
||||||
return _cid;
|
return _cid;
|
||||||
@@ -224,6 +240,7 @@ class ChatItem
|
|||||||
{
|
{
|
||||||
return _txid;
|
return _txid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool isOutgoing()
|
bool isOutgoing()
|
||||||
{
|
{
|
||||||
@@ -244,12 +261,22 @@ class ChatItem
|
|||||||
{
|
{
|
||||||
_contact = contact;
|
_contact = contact;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setMemo(QString memo)
|
void setMemo(QString memo)
|
||||||
{
|
{
|
||||||
_memo = memo;
|
_memo = memo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setRequestZaddr(QString requestZaddr)
|
||||||
|
{
|
||||||
|
_requestZaddr = requestZaddr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setType(QString type)
|
||||||
|
{
|
||||||
|
_type = type;
|
||||||
|
}
|
||||||
|
|
||||||
void setCid(QString cid)
|
void setCid(QString cid)
|
||||||
{
|
{
|
||||||
_cid = cid;
|
_cid = cid;
|
||||||
@@ -258,7 +285,7 @@ class ChatItem
|
|||||||
{
|
{
|
||||||
_txid = txid;
|
_txid = txid;
|
||||||
}
|
}
|
||||||
|
|
||||||
void toggleOutgo()
|
void toggleOutgo()
|
||||||
{
|
{
|
||||||
_outgoing = true;
|
_outgoing = true;
|
||||||
@@ -291,6 +318,7 @@ class ChatModel
|
|||||||
Ui::MainWindow* ui;
|
Ui::MainWindow* ui;
|
||||||
MainWindow* main;
|
MainWindow* main;
|
||||||
std::map<QString, QString> cidMap;
|
std::map<QString, QString> cidMap;
|
||||||
|
std::map<QString, QString> requestZaddrMap;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ChatModel() {};
|
ChatModel() {};
|
||||||
@@ -303,13 +331,19 @@ class ChatModel
|
|||||||
void setItems(std::vector<ChatItem> items);
|
void setItems(std::vector<ChatItem> items);
|
||||||
void renderChatBox(Ui::MainWindow* ui, QListView &view);
|
void renderChatBox(Ui::MainWindow* ui, QListView &view);
|
||||||
void renderChatBox(Ui::MainWindow* ui, QListView *view);
|
void renderChatBox(Ui::MainWindow* ui, QListView *view);
|
||||||
|
void renderContactRequest();
|
||||||
|
void triggerRequest();
|
||||||
void showMessages();
|
void showMessages();
|
||||||
void clear();
|
void clear();
|
||||||
|
//void renderContactRequest(Ui::MainWindow* ui, QListView *view);
|
||||||
void addMessage(ChatItem item);
|
void addMessage(ChatItem item);
|
||||||
void addMessage(QString timestamp, ChatItem item);
|
void addMessage(QString timestamp, ChatItem item);
|
||||||
void addCid(QString tx, QString cid);
|
void addCid(QString tx, QString cid);
|
||||||
|
void addrequestZaddr(QString tx, QString requestZaddr);
|
||||||
QString getCidByTx(QString tx);
|
QString getCidByTx(QString tx);
|
||||||
|
QString getrequestZaddrByTx(QString tx);
|
||||||
void killCidCache();
|
void killCidCache();
|
||||||
|
void killrequestZaddrCache();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "ui_connection.h"
|
#include "ui_connection.h"
|
||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
|
|
||||||
|
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
|
|
||||||
class Controller;
|
class Controller;
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
// Copyright 2019-2020 The Hush developers
|
||||||
|
// GPLv3
|
||||||
#include "contactmodel.h"
|
#include "contactmodel.h"
|
||||||
#include "addressbook.h"
|
#include "addressbook.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
#include "chatmodel.h"
|
||||||
|
|
||||||
void ContactModel::renderContactList(QListView* view)
|
void ContactModel::renderContactList(QListView* view)
|
||||||
{
|
{
|
||||||
@@ -12,7 +15,7 @@ void ContactModel::renderContactList(QListView* view)
|
|||||||
auto theme = Settings::getInstance()->get_theme_name();
|
auto theme = Settings::getInstance()->get_theme_name();
|
||||||
if ((theme == "dark" || theme == "midnight")) {
|
if ((theme == "dark" || theme == "midnight")) {
|
||||||
|
|
||||||
QString avatar = c.getAvatar();
|
QString avatar = c.getAvatar();
|
||||||
|
|
||||||
QStandardItem* Items1 = new QStandardItem(QIcon(avatar) ,c.getName());
|
QStandardItem* Items1 = new QStandardItem(QIcon(avatar) ,c.getName());
|
||||||
contact->appendRow(Items1);
|
contact->appendRow(Items1);
|
||||||
@@ -22,10 +25,8 @@ void ContactModel::renderContactList(QListView* view)
|
|||||||
view->setDragDropMode(QAbstractItemView::DropOnly);
|
view->setDragDropMode(QAbstractItemView::DropOnly);
|
||||||
view->show();
|
view->show();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Send a contact request</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="1" colspan="2">
|
<item row="0" column="1" colspan="2">
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// Copyright 2019-2020 The Hush developers
|
||||||
|
// GPLv3
|
||||||
|
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "addressbook.h"
|
#include "addressbook.h"
|
||||||
@@ -6,6 +9,7 @@
|
|||||||
#include "camount.h"
|
#include "camount.h"
|
||||||
#include "websockets.h"
|
#include "websockets.h"
|
||||||
#include "DataStore.h"
|
#include "DataStore.h"
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
DataStore<QString>* DataStore<QString>::instance = nullptr;
|
DataStore<QString>* DataStore<QString>::instance = nullptr;
|
||||||
template<>
|
template<>
|
||||||
@@ -860,7 +864,8 @@ void Controller::refreshTransactions() {
|
|||||||
QString memo;
|
QString memo;
|
||||||
if (!o["memo"].is_null()) {
|
if (!o["memo"].is_null()) {
|
||||||
memo = QString::fromStdString(o["memo"]);
|
memo = QString::fromStdString(o["memo"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString cid;
|
QString cid;
|
||||||
QString contact;
|
QString contact;
|
||||||
|
|
||||||
@@ -876,6 +881,8 @@ void Controller::refreshTransactions() {
|
|||||||
address,
|
address,
|
||||||
contact,
|
contact,
|
||||||
memo,
|
memo,
|
||||||
|
QString(""),
|
||||||
|
QString(""),
|
||||||
cid, // we have to set the cid here, its included in our Addressbook for this contact
|
cid, // we have to set the cid here, its included in our Addressbook for this contact
|
||||||
txid,
|
txid,
|
||||||
true // is an outgoing message
|
true // is an outgoing message
|
||||||
@@ -930,37 +937,40 @@ void Controller::refreshTransactions() {
|
|||||||
|
|
||||||
QString type;
|
QString type;
|
||||||
QString cid;
|
QString cid;
|
||||||
|
QString requestZaddr1;
|
||||||
|
QString requestZaddr;
|
||||||
|
|
||||||
if (memo.startsWith("{")) {
|
if (memo.startsWith("{")) {
|
||||||
|
|
||||||
type = memo.mid(75,4);
|
type = memo.mid(75,4);
|
||||||
cid = memo.mid(14,36);
|
cid = memo.mid(14,36);
|
||||||
|
requestZaddr1 = memo.right(82);
|
||||||
|
requestZaddr = requestZaddr1.left(78);
|
||||||
|
|
||||||
qDebug()<<type;
|
|
||||||
qDebug()<<cid;
|
|
||||||
chatModel->addCid(txid, cid);
|
chatModel->addCid(txid, cid);
|
||||||
|
chatModel->addrequestZaddr(txid, requestZaddr);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (type == "cont")
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
qDebug()<< "Als Request erkannt";
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (chatModel->getCidByTx(txid) != QString("0xdeadbeef")){
|
if (chatModel->getCidByTx(txid) != QString("0xdeadbeef")){
|
||||||
|
|
||||||
cid = chatModel->getCidByTx(txid);
|
cid = chatModel->getCidByTx(txid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
else{
|
else{
|
||||||
|
|
||||||
cid = "";
|
cid = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (chatModel->getrequestZaddrByTx(txid) != QString("0xdeadbeef")){
|
||||||
|
|
||||||
|
requestZaddr = chatModel->getrequestZaddrByTx(txid);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else{
|
||||||
|
requestZaddr = "";
|
||||||
|
}
|
||||||
|
|
||||||
QString contact;
|
QString contact;
|
||||||
for(auto &c : AddressBook::getInstance()->getAllAddressLabels())
|
for(auto &c : AddressBook::getInstance()->getAllAddressLabels())
|
||||||
@@ -968,23 +978,23 @@ void Controller::refreshTransactions() {
|
|||||||
|
|
||||||
if (address == c.getMyAddress()){
|
if (address == c.getMyAddress()){
|
||||||
contact = c.getName();
|
contact = c.getName();
|
||||||
qDebug()<< "Addressbuch Addresse: " << c.getMyAddress();
|
|
||||||
qDebug()<< "Addresse: " << address;
|
|
||||||
|
|
||||||
}else{ contact = "";}
|
}else{ contact = "";}
|
||||||
|
}
|
||||||
ChatItem item = ChatItem(
|
ChatItem item = ChatItem(
|
||||||
datetime,
|
datetime,
|
||||||
address,
|
address,
|
||||||
contact,
|
contact,
|
||||||
memo,
|
memo,
|
||||||
|
requestZaddr,
|
||||||
|
type,
|
||||||
cid, // we have to set the cid here, its included in the headermemo
|
cid, // we have to set the cid here, its included in the headermemo
|
||||||
txid,
|
txid,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
chatModel->addMessage(item);
|
chatModel->addMessage(item);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Copyright 2019-2020 The Hush developers
|
||||||
|
// GPLv3
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "addressbook.h"
|
#include "addressbook.h"
|
||||||
#include "viewalladdresses.h"
|
#include "viewalladdresses.h"
|
||||||
@@ -15,6 +17,8 @@
|
|||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "connection.h"
|
#include "connection.h"
|
||||||
#include "ui_contactrequest.h"
|
#include "ui_contactrequest.h"
|
||||||
|
#include "ui_requestContactDialog.h"
|
||||||
|
#include "chatmodel.h"
|
||||||
#include "requestdialog.h"
|
#include "requestdialog.h"
|
||||||
#include "websockets.h"
|
#include "websockets.h"
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
@@ -1006,22 +1010,21 @@ void MainWindow::setupchatTab() {
|
|||||||
|
|
||||||
// Is request Contact checked?
|
// Is request Contact checked?
|
||||||
|
|
||||||
if (ui->request->isChecked()) {
|
// if (ui->request->isChecked()) {
|
||||||
|
|
||||||
|
|
||||||
QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::ContactRequest);
|
QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::ContactRequest);
|
||||||
|
|
||||||
// qDebug() <<ui->request->isChecked()->text();
|
// qDebug() <<ui->request->isChecked()->text();
|
||||||
}else{
|
// }else{
|
||||||
|
|
||||||
QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::sendChatButton);
|
// QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::sendChatButton);
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
QObject::connect(ui->safeContactRequest, &QPushButton::clicked, this, &MainWindow::addContact);
|
QObject::connect(ui->safeContactRequest, &QPushButton::clicked, this, &MainWindow::addContact);
|
||||||
|
|
||||||
|
|
||||||
///////// Set selected Zaddr for Chat with Doubleklick
|
///////// Set selected Zaddr for Chat with Klick
|
||||||
|
|
||||||
QObject::connect(ui->listContactWidget, &QTableView::clicked, [=] () {
|
QObject::connect(ui->listContactWidget, &QTableView::clicked, [=] () {
|
||||||
|
|
||||||
@@ -1046,6 +1049,19 @@ void MainWindow::setupchatTab() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
void MainWindow::setChatItem(ChatItem * item)
|
||||||
|
{
|
||||||
|
this->currentChatItem = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatItem* MainWindow::getChatItem()
|
||||||
|
{
|
||||||
|
return this->currentChatItem;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
ChatMemoEdit::ChatMemoEdit(QWidget* parent) : QPlainTextEdit(parent) {
|
ChatMemoEdit::ChatMemoEdit(QWidget* parent) : QPlainTextEdit(parent) {
|
||||||
QObject::connect(this, &QPlainTextEdit::textChanged, this, &ChatMemoEdit::updateDisplay);
|
QObject::connect(this, &QPlainTextEdit::textChanged, this, &ChatMemoEdit::updateDisplay);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
#include "recurring.h"
|
#include "recurring.h"
|
||||||
|
|
||||||
|
|
||||||
// Forward declare to break circular dependency.
|
// Forward declare to break circular dependency.
|
||||||
class Controller;
|
class Controller;
|
||||||
class Settings;
|
class Settings;
|
||||||
@@ -61,6 +62,10 @@ public:
|
|||||||
|
|
||||||
void updateLabels();
|
void updateLabels();
|
||||||
void updateTAddrCombo(bool checked);
|
void updateTAddrCombo(bool checked);
|
||||||
|
// void setChatItem(ChatItem* item);
|
||||||
|
//void ChatItem* getChatItem();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Disable recurring on mainnet
|
// Disable recurring on mainnet
|
||||||
void disableRecurring();
|
void disableRecurring();
|
||||||
@@ -74,6 +79,8 @@ public:
|
|||||||
QLabel* statusIcon;
|
QLabel* statusIcon;
|
||||||
QLabel* loadingLabel;
|
QLabel* loadingLabel;
|
||||||
QWidget* hushdtab;
|
QWidget* hushdtab;
|
||||||
|
//ChatItem* currentChatItem;
|
||||||
|
|
||||||
|
|
||||||
Logger* logger;
|
Logger* logger;
|
||||||
|
|
||||||
@@ -83,8 +90,10 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
void slot_change_theme(const QString& themeName);
|
void slot_change_theme(const QString& themeName);
|
||||||
void slot_change_currency(const QString& currencyName);
|
void slot_change_currency(const QString& currencyName);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void closeEvent(QCloseEvent* event);
|
void closeEvent(QCloseEvent* event);
|
||||||
|
|
||||||
void setupSendTab();
|
void setupSendTab();
|
||||||
@@ -93,6 +102,7 @@ private:
|
|||||||
void setupBalancesTab();
|
void setupBalancesTab();
|
||||||
void setuphushdTab();
|
void setuphushdTab();
|
||||||
void setupchatTab();
|
void setupchatTab();
|
||||||
|
void renderContactRequest();
|
||||||
void setLenDisplayLabel(QLabel* label);
|
void setLenDisplayLabel(QLabel* label);
|
||||||
|
|
||||||
void updateContacts();
|
void updateContacts();
|
||||||
@@ -147,6 +157,9 @@ private:
|
|||||||
void restoreSavedStates();
|
void restoreSavedStates();
|
||||||
bool eventFilter(QObject *object, QEvent *event);
|
bool eventFilter(QObject *object, QEvent *event);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool uiPaymentsReady = false;
|
bool uiPaymentsReady = false;
|
||||||
QString pendingURIPayment;
|
QString pendingURIPayment;
|
||||||
|
|
||||||
@@ -154,6 +167,7 @@ private:
|
|||||||
WormholeClient* wormhole = nullptr;
|
WormholeClient* wormhole = nullptr;
|
||||||
|
|
||||||
Controller* rpc = nullptr;
|
Controller* rpc = nullptr;
|
||||||
|
|
||||||
QCompleter* labelCompleter = nullptr;
|
QCompleter* labelCompleter = nullptr;
|
||||||
QRegExpValidator* amtValidator = nullptr;
|
QRegExpValidator* amtValidator = nullptr;
|
||||||
QRegExpValidator* feesValidator = nullptr;
|
QRegExpValidator* feesValidator = nullptr;
|
||||||
|
|||||||
@@ -1414,9 +1414,9 @@
|
|||||||
<widget class="QPushButton" name="safeContactRequest">
|
<widget class="QPushButton" name="safeContactRequest">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>0</x>
|
||||||
<y>640</y>
|
<y>640</y>
|
||||||
<width>211</width>
|
<width>91</width>
|
||||||
<height>25</height>
|
<height>25</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -1427,7 +1427,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add conversation contact</string>
|
<string>Add contact</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="flat">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@@ -1493,6 +1493,19 @@
|
|||||||
<string>Is this message a contact request?</string>
|
<string>Is this message a contact request?</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushContact">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>110</x>
|
||||||
|
<y>640</y>
|
||||||
|
<width>191</width>
|
||||||
|
<height>25</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Incoming contact request</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -1667,7 +1680,7 @@
|
|||||||
<customwidget>
|
<customwidget>
|
||||||
<class>AddressCombo</class>
|
<class>AddressCombo</class>
|
||||||
<extends>QComboBox</extends>
|
<extends>QComboBox</extends>
|
||||||
<header>addresscombo.h</header>
|
<header location="global">addresscombo.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QRCodeLabel</class>
|
<class>QRCodeLabel</class>
|
||||||
|
|||||||
355
src/requestContactDialog.ui
Normal file
355
src/requestContactDialog.ui
Normal file
@@ -0,0 +1,355 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>requestDialog</class>
|
||||||
|
<widget class="QDialog" name="requestDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>1011</width>
|
||||||
|
<height>503</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Incoming contact request</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QListView" name="requestContact">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>9</x>
|
||||||
|
<y>9</y>
|
||||||
|
<width>256</width>
|
||||||
|
<height>461</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="mouseTracking">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="editTriggers">
|
||||||
|
<set>QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
|
||||||
|
</property>
|
||||||
|
<property name="alternatingRowColors">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::SingleSelection</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QListView" name="requestMemo">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>263</x>
|
||||||
|
<y>9</y>
|
||||||
|
<width>741</width>
|
||||||
|
<height>271</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="verticalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
|
<property name="editTriggers">
|
||||||
|
<set>QAbstractItemView::NoEditTriggers</set>
|
||||||
|
</property>
|
||||||
|
<property name="resizeMode">
|
||||||
|
<enum>QListView::Adjust</enum>
|
||||||
|
</property>
|
||||||
|
<property name="modelColumn">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="uniformItemSizes">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>276</x>
|
||||||
|
<y>296</y>
|
||||||
|
<width>101</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Request from :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="requestZaddr">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>393</x>
|
||||||
|
<y>296</y>
|
||||||
|
<width>601</width>
|
||||||
|
<height>25</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>276</x>
|
||||||
|
<y>327</y>
|
||||||
|
<width>30</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Cid :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="requestCID">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>393</x>
|
||||||
|
<y>327</y>
|
||||||
|
<width>601</width>
|
||||||
|
<height>25</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>276</x>
|
||||||
|
<y>358</y>
|
||||||
|
<width>71</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>My Zaddr :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="requestMyAddr">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>393</x>
|
||||||
|
<y>358</y>
|
||||||
|
<width>601</width>
|
||||||
|
<height>25</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>276</x>
|
||||||
|
<y>389</y>
|
||||||
|
<width>68</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Nickname</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="requestLabel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>393</x>
|
||||||
|
<y>389</y>
|
||||||
|
<width>221</width>
|
||||||
|
<height>25</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>276</x>
|
||||||
|
<y>420</y>
|
||||||
|
<width>228</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head/><body><p align="right">Choose a avatar for your contact :</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QComboBox" name="comboBoxAvatar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>510</x>
|
||||||
|
<y>420</y>
|
||||||
|
<width>106</width>
|
||||||
|
<height>25</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Stag</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<activeon>:/icons/res/Stag.png</activeon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Elsa</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normalon>:/icons/res/Elsa.png</normalon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Denio</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<activeon>:/icons/res/Denio.png</activeon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Duke</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<activeon>:/icons/res/Duke.png</activeon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Yoda</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<activeon>:/icons/res/Yoda.png</activeon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Berg</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<activeon>:/icons/res/Berg.png</activeon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Sharpee</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<activeon>:/icons/res/Sharpee.png</activeon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Garfield</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<activeon>:/icons/res/Garfield.png</activeon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Snoopy</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<activeon>:/icons/res/Snoopy.png</activeon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Popey</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<activeon>:/icons/res/Popey.png</activeon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Pinguin</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<activeon>:/icons/res/Pinguin.png</activeon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Mickey</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<activeon>:/icons/res/Mickey.png</activeon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>SDLogo</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<activeon>:/icons/res/sdlogo2.png</activeon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="cancel">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>300</x>
|
||||||
|
<y>470</y>
|
||||||
|
<width>80</width>
|
||||||
|
<height>25</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Cancel</string>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>400</x>
|
||||||
|
<y>470</y>
|
||||||
|
<width>101</width>
|
||||||
|
<height>25</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Add Contact</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
Reference in New Issue
Block a user