Browse Source

add contact on Chattab

pull/130/head
DenioD 4 years ago
parent
commit
dc61bb38c7
  1. 2
      application.qrc
  2. 0
      res/Stag.png
  3. 23
      src/addressbook.cpp
  4. 2
      src/addressbook.ui
  5. 137
      src/chatmodel.cpp
  6. 1
      src/chatmodel.h
  7. 1
      src/contactmodel.cpp
  8. 338
      src/contactrequest.ui
  9. 46
      src/mainwindow.cpp
  10. 2
      src/mainwindow.h
  11. 54
      src/mainwindow.ui

2
application.qrc

@ -21,7 +21,7 @@
<file>res/Popey.png</file> <file>res/Popey.png</file>
<file>res/Garfield.png</file> <file>res/Garfield.png</file>
<file>res/Pinguin.png</file> <file>res/Pinguin.png</file>
<file>res/Hirsch.png</file> <file>res/Stag.png</file>
</qresource> </qresource>
<qresource prefix="/img"> <qresource prefix="/img">
<file>res/hushdlogo.gif</file> <file>res/hushdlogo.gif</file>

0
res/Hirsch.png → res/Stag.png

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

23
src/addressbook.cpp

@ -335,34 +335,11 @@ void AddressBook::open(MainWindow* parent, QLineEdit* target)
} }
}; };
// Get Avatar Data
// int avatar_index = ab.comboBoxAvatar->findText(AddressBook::getInstance()->get_avatar_name(), Qt::MatchExactly);
// ab.comboBoxAvatar->setCurrentIndex(avatar_index);
// QObject::connect(ab.comboBoxAvatar, &QComboBox::currentTextChanged, [=] (QString avatar_name) {
// parent->slot_change_avatar(avatar_name);
// rpc->refresh(true);
// });
// Refresh after the dialog is closed to update the labels everywhere. // Refresh after the dialog is closed to update the labels everywhere.
parent->getRPC()->refresh(true); parent->getRPC()->refresh(true);
model.updateUi(); //todo fix updating gui after adding model.updateUi(); //todo fix updating gui after adding
} }
QString AddressBook::get_avatar_name() {
// Load from the QT Settings.
// QString avatar = ab.comboBoxAvatar.text();
// return QString()
}
void AddressBook::set_avatar_name(QString avatar_name) {
avatar_name = "abs.comboBoxAvatar.text()";
}
//============= //=============
// AddressBook singleton class // AddressBook singleton class
//============= //=============

2
src/addressbook.ui

@ -69,7 +69,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset>
<activeon>:/icons/res/Hirsch.png</activeon> <activeon>:/icons/res/Stag.png</activeon>
</iconset> </iconset>
</property> </property>
</item> </item>

137
src/chatmodel.cpp

@ -164,7 +164,7 @@ QString ChatModel::getCidByTx(QString tx)
{ {
for(auto& pair : this->cidMap) for(auto& pair : this->cidMap)
{ {
// qDebug() << "TXID=" << pair.first << " CID=" << pair.second;
} }
if(this->cidMap.count(tx) > 0) if(this->cidMap.count(tx) > 0)
@ -247,9 +247,7 @@ Tx MainWindow::createTxFromChatPage() {
void MainWindow::sendChatButton() { void MainWindow::sendChatButton() {
////////////////////////////Todo: Check if a Contact is selected//////////
////////////////////////////Todo: Check if a Contact is selected//////////
// Create a Tx from the values on the send tab. Note that this Tx object // Create a Tx from the values on the send tab. Note that this Tx object
// might not be valid yet. // might not be valid yet.
@ -377,25 +375,80 @@ QString MainWindow::doSendChatTxValidations(Tx tx) {
return ""; return "";
} }
void::MainWindow::addContact() {
// Create a Tx from the current state of the Chat page. Ui_Dialog request;
Tx MainWindow::createTxForSafeContactRequest() {
Ui_Dialog request;
QDialog dialog(this); QDialog dialog(this);
request.setupUi(&dialog); request.setupUi(&dialog);
Settings::saveRestore(&dialog); Settings::saveRestore(&dialog);
dialog.exec();
Tx tx;
QObject::connect(request.cancel, &QPushButton::clicked, [&] () { bool sapling = true;
rpc->createNewZaddr(sapling, [=] (json reply) {
QString myAddr = QString::fromStdString(reply.get<json::array_t>()[0]);
QString cid = QUuid::createUuid().toString(QUuid::WithoutBraces);
ui->listReceiveAddresses->insertItem(0, myAddr);
ui->listReceiveAddresses->setCurrentIndex(0);
qDebug() << "new generated myAddr" << myAddr;
request.myzaddr->setText(myAddr);
request.cid->setText(cid);
});
QObject::connect(request.sendRequestButton, &QPushButton::clicked, [&] () {
QString cid = request.cid->text();
auto addr = request.zaddr->text().trimmed();
QString newLabel = request.labelRequest->text().trimmed();
auto myAddr = request.myzaddr->text().trimmed();
QString avatar = QString("res/") + request.comboBoxAvatar->currentText() + QString(".png");
if (addr.isEmpty() || newLabel.isEmpty())
{
QMessageBox::critical(
this,
QObject::tr("Address or Label Error"),
QObject::tr("Address or Label cannot be empty"),
QMessageBox::Ok
);
return;
}
// Test if address is valid.
if (!Settings::isValidAddress(addr))
{
QMessageBox::critical(
this,
QObject::tr("Address Format Error"),
QObject::tr("%1 doesn't seem to be a valid hush address.").arg(addr),
QMessageBox::Ok
);
return;
}
////// We need a better popup here.
AddressBook::getInstance()->addAddressLabel(newLabel, addr, myAddr, cid, avatar);
QMessageBox::critical(
this,
QObject::tr("Add Successfully"),
QObject::tr("juhu").arg(newLabel),
QMessageBox::Ok
);
return;
dialog.close();
}); });
dialog.exec();
}
QObject::connect(request.sendRequestButton, &QPushButton::clicked, this, &MainWindow::ContactRequest); // Create a Tx for a contact Request
Tx MainWindow::createTxForSafeContactRequest() {
Tx tx;
// For each addr/amt in the Chat tab // For each addr/amt in the Chat tab
{ {
CAmount totalAmt; CAmount totalAmt;
@ -408,71 +461,41 @@ dialog.exec();
for(auto &c : AddressBook::getInstance()->getAllAddressLabels()) for(auto &c : AddressBook::getInstance()->getAllAddressLabels())
if (request.zaddr->text().trimmed() != c.getPartnerAddress()) { if (ui->contactNameMemo->text().trimmed() == c.getName()) {
QString cid = c.getCid(); QString cid = c.getCid();
QString myAddr = c.getMyAddress(); QString myAddr = c.getMyAddress();
QString type = "cont"; QString type = "cont";
QString addr = request.zaddr->text(); QString addr = c.getPartnerAddress();
QString hmemo= createHeaderMemo(type,cid,myAddr,0,0); QString hmemo= createHeaderMemo(type,cid,myAddr);
QString memo = request.requestmemo->toPlainText().trimmed(); QString memo = ui->memoTxtChat->toPlainText().trimmed();
tx.toAddrs.push_back(ToFields{addr, amt, hmemo}); tx.toAddrs.push_back(ToFields{addr, amt, hmemo});
tx.toAddrs.push_back(ToFields{addr, amt, memo}); tx.toAddrs.push_back(ToFields{addr, amt, memo});
qDebug() << "pushback chattx"; qDebug() << "pushback chattx";
tx.fee = Settings::getMinerFee();
}
tx.fee = Settings::getMinerFee();
return tx; return tx;
qDebug() << "ChatTx created"; qDebug() << "RequestTx created";
} if (request.zaddr->text().trimmed().isEmpty() == false){
QMessageBox msg(QMessageBox::Critical, tr("Please insert a contact Address"), request.zaddr->text(),
QMessageBox::Ok, this);
msg.exec();
}
} }
} }
void MainWindow::ContactRequest() {
////////////////////////////Todo: Check if a Contact is selected//////////
// Create a Tx from the values on the send tab. Note that this Tx object
// might not be valid yet.
// Memos can only be used with zAddrs. So check that first void MainWindow::ContactRequest() {
// for(auto &c : AddressBook::getInstance()->getAllAddressLabels())
// if (ui->contactNameMemo->text().trimmed().isEmpty() || ui->memoTxtChat->toPlainText().trimmed().isEmpty()) {
// auto addr = "";
// if (! Settings::isZAddress(AddressBook::addressFromAddressLabel(addr->text()))) {
// QMessageBox msg(QMessageBox::Critical, tr("You have to select a contact and insert a Memo"),
// tr("You have selected no Contact from Contactlist,\n") + tr("\nor your Memo is empty"),
// QMessageBox::Ok, this);
// msg.exec();
// return;
// }
//};
Tx tx = createTxForSafeContactRequest(); Tx tx = createTxForSafeContactRequest();
QString error = doSendChatTxValidations(tx); QString error = doSendRequestTxValidations(tx);
if (!error.isEmpty()) { if (!error.isEmpty()) {
// Something went wrong, so show an error and exit // Something went wrong, so show an error and exit
@ -504,7 +527,7 @@ void MainWindow::ContactRequest() {
} }
connD->status->setText(tr("Please wait...")); connD->status->setText(tr("Please wait..."));
connD->statusDetail->setText(tr("Your Message will be send")); connD->statusDetail->setText(tr("Your Contact will be send"));
d->show(); d->show();
ui->memoTxtChat->clear(); ui->memoTxtChat->clear();

1
src/chatmodel.h

@ -310,6 +310,7 @@ class ChatModel
void addCid(QString tx, QString cid); void addCid(QString tx, QString cid);
QString getCidByTx(QString tx); QString getCidByTx(QString tx);
void killCidCache(); void killCidCache();
}; };
#endif #endif

1
src/contactmodel.cpp

@ -12,7 +12,6 @@ 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")) {
// QIcon avatar = c.getAvatar();
QString avatar = c.getAvatar(); QString avatar = c.getAvatar();
QStandardItem* Items1 = new QStandardItem(QIcon(avatar) ,c.getName()); QStandardItem* Items1 = new QStandardItem(QIcon(avatar) ,c.getName());

338
src/contactrequest.ui

@ -13,130 +13,230 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string>Dialog</string>
</property> </property>
<widget class="QLabel" name="label"> <layout class="QGridLayout" name="gridLayout">
<property name="geometry"> <item row="0" column="1" colspan="2">
<rect> <widget class="QLabel" name="label_6">
<x>0</x> <property name="text">
<y>100</y> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;right&quot;&gt;Choose a avatar for your contact :&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<width>351</width> </property>
<height>17</height> </widget>
</rect> </item>
</property> <item row="1" column="0">
<property name="text"> <widget class="QLabel" name="label_3">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Please insert the Address of your contact :&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <property name="text">
</property> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Please insert a Nickname for your contact :&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</widget> </property>
<widget class="QLabel" name="label_2"> </widget>
<property name="geometry"> </item>
<rect> <item row="1" column="1" colspan="2">
<x>10</x> <widget class="QComboBox" name="comboBoxAvatar">
<y>190</y> <item>
<width>461</width> <property name="text">
<height>17</height> <string>Stag</string>
</rect> </property>
</property> <property name="icon">
<property name="text"> <iconset>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Insert a Message, and ask your friend for the contact request : &lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <activeon>:/icons/res/Hirsch.png</activeon>
</property> </iconset>
</widget> </property>
<widget class="QTextEdit" name="requestmemo"> </item>
<property name="geometry"> <item>
<rect> <property name="text">
<x>0</x> <string>Denio</string>
<y>240</y> </property>
<width>591</width> <property name="icon">
<height>101</height> <iconset>
</rect> <activeon>:/icons/res/Denio.png</activeon>
</property> </iconset>
</widget> </property>
<widget class="QLineEdit" name="zaddr"> </item>
<property name="geometry"> <item>
<rect> <property name="text">
<x>0</x> <string>Duke</string>
<y>140</y> </property>
<width>591</width> <property name="icon">
<height>25</height> <iconset>
</rect> <activeon>:/icons/res/Duke.png</activeon>
</property> </iconset>
</widget> </property>
<widget class="QPushButton" name="sendRequestButton"> </item>
<property name="geometry"> <item>
<rect> <property name="text">
<x>490</x> <string>Yoda</string>
<y>360</y> </property>
<width>114</width> <property name="icon">
<height>25</height> <iconset>
</rect> <activeon>:/icons/res/Yoda.png</activeon>
</property> </iconset>
<property name="baseSize"> </property>
<size> </item>
<width>100</width> <item>
<height>0</height> <property name="text">
</size> <string>Berg</string>
</property> </property>
<property name="text"> <property name="icon">
<string>Send</string> <iconset>
</property> <activeon>:/icons/res/Berg.png</activeon>
<property name="flat"> </iconset>
<bool>false</bool> </property>
</property> </item>
</widget> <item>
<widget class="QPushButton" name="cancel"> <property name="text">
<property name="geometry"> <string>Sharpee</string>
<rect> </property>
<x>320</x> <property name="icon">
<y>360</y> <iconset>
<width>114</width> <activeon>:/icons/res/Sharpee.png</activeon>
<height>25</height> </iconset>
</rect> </property>
</property> </item>
<property name="baseSize"> <item>
<size> <property name="text">
<width>100</width> <string>Garfield</string>
<height>0</height> </property>
</size> <property name="icon">
</property> <iconset>
<property name="text"> <activeon>:/icons/res/Garfield.png</activeon>
<string>Cancel</string> </iconset>
</property> </property>
<property name="flat"> </item>
<bool>false</bool> <item>
</property> <property name="text">
</widget> <string>Snoopy</string>
<widget class="QLabel" name="label_3"> </property>
<property name="geometry"> <property name="icon">
<rect> <iconset>
<x>0</x> <activeon>:/icons/res/Snoopy.png</activeon>
<y>10</y> </iconset>
<width>351</width> </property>
<height>17</height> </item>
</rect> <item>
</property> <property name="text">
<property name="text"> <string>Popey</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Please insert a Nickname for your contact :&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> </property>
</property> <property name="icon">
</widget> <iconset>
<widget class="QLineEdit" name="labelRequest"> <activeon>:/icons/res/Popey.png</activeon>
<property name="geometry"> </iconset>
<rect> </property>
<x>0</x> </item>
<y>50</y> <item>
<width>591</width> <property name="text">
<height>25</height> <string>Pinguin</string>
</rect> </property>
</property> <property name="icon">
</widget> <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>
</item>
<item row="2" column="0">
<widget class="QLineEdit" name="labelRequest"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Please insert the Address of your contact :&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<widget class="QLineEdit" name="zaddr"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Your HushChat Address</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="3">
<widget class="QLabel" name="myzaddr">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>The Conversation ID </string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="3">
<widget class="QLabel" name="cid">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QPushButton" name="cancel">
<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>
</item>
<item row="9" column="2">
<widget class="QPushButton" name="sendRequestButton">
<property name="baseSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Add Contact</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget> </widget>
<resources/> <resources/>
<connections> <connections>
<connection> <connection>
<sender>sendRequestButton</sender> <sender>cancel</sender>
<signal>clicked()</signal> <signal>clicked()</signal>
<receiver>Dialog</receiver> <receiver>Dialog</receiver>
<slot>accept()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>536</x> <x>396</x>
<y>262</y> <y>262</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
@ -146,13 +246,13 @@
</hints> </hints>
</connection> </connection>
<connection> <connection>
<sender>cancel</sender> <sender>sendRequestButton</sender>
<signal>clicked()</signal> <signal>clicked()</signal>
<receiver>Dialog</receiver> <receiver>Dialog</receiver>
<slot>reject()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>396</x> <x>536</x>
<y>262</y> <y>262</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">

46
src/mainwindow.cpp

@ -40,10 +40,9 @@ MainWindow::MainWindow(QWidget *parent) :
ui->setupUi(this); ui->setupUi(this);
// ui->checkBox->setChecked(true); ui->request->setChecked(true);
logger = new Logger(this, QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("silentdragonlite-wallet.log")); logger = new Logger(this, QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("silentdragonlite-wallet.log"));
ui->memoTxtChat->setAutoFillBackground(false); ui->memoTxtChat->setAutoFillBackground(false);
// ui->memoTxtChat->setStyleSheet(QString::fromUtf8("background-color: rgb(224, 224, 224);"));
ui->memoTxtChat->setPlaceholderText("Send Message"); ui->memoTxtChat->setPlaceholderText("Send Message");
ui->memoTxtChat->setTextColor(Qt::white); ui->memoTxtChat->setTextColor(Qt::white);
@ -436,11 +435,6 @@ void MainWindow::setupSettingsModal() {
this->slot_change_currency(currency_name); this->slot_change_currency(currency_name);
// Include Avatar
// Setup theme combo // Setup theme combo
int theme_index = settings.comboBoxTheme->findText(Settings::getInstance()->get_theme_name(), Qt::MatchExactly); int theme_index = settings.comboBoxTheme->findText(Settings::getInstance()->get_theme_name(), Qt::MatchExactly);
settings.comboBoxTheme->setCurrentIndex(theme_index); settings.comboBoxTheme->setCurrentIndex(theme_index);
@ -1008,8 +1002,22 @@ void MainWindow::setupTransactionsTab() {
void MainWindow::setupchatTab() { void MainWindow::setupchatTab() {
// Send button // Send button
QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::sendChatButton);
QObject::connect(ui->safeContactRequest, &QPushButton::clicked, this, &MainWindow::ContactRequest); // Is request Contact checked?
if (ui->request->isChecked()) {
QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::ContactRequest);
// qDebug() <<ui->request->isChecked()->text();
}else{
QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::sendChatButton);
}
QObject::connect(ui->safeContactRequest, &QPushButton::clicked, this, &MainWindow::addContact);
///////// Set selected Zaddr for Chat with Doubleklick ///////// Set selected Zaddr for Chat with Doubleklick
@ -1470,26 +1478,6 @@ void MainWindow::slot_change_currency(const QString& currency_name)
} }
} }
void MainWindow::slot_change_avatar(const QString& avatar_name)
{
AddressBook::getInstance()->set_avatar_name(avatar_name);
// Include currency
QString saved_avatar_name;
try
{
saved_avatar_name = AddressBook::getInstance()->get_avatar_name();
}
catch (...)
{
saved_avatar_name = "Yoda";
}
}
void MainWindow::slot_change_theme(const QString& theme_name) void MainWindow::slot_change_theme(const QString& theme_name)

2
src/mainwindow.h

@ -83,7 +83,6 @@ 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);
void slot_change_avatar(const QString& avatarName);
private: private:
void closeEvent(QCloseEvent* event); void closeEvent(QCloseEvent* event);
@ -116,6 +115,7 @@ private:
void cancelButton(); void cancelButton();
void sendButton(); void sendButton();
void sendChatButton(); void sendChatButton();
void addContact();
void ContactRequest(); void ContactRequest();
void addAddressSection(); void addAddressSection();
void maxAmountChecked(int checked); void maxAmountChecked(int checked);

54
src/mainwindow.ui

@ -1334,7 +1334,7 @@
<x>0</x> <x>0</x>
<y>40</y> <y>40</y>
<width>341</width> <width>341</width>
<height>551</height> <height>601</height>
</rect> </rect>
</property> </property>
</widget> </widget>
@ -1342,8 +1342,8 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>20</y>
<width>311</width> <width>341</width>
<height>20</height> <height>20</height>
</rect> </rect>
</property> </property>
@ -1355,9 +1355,9 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>340</x> <x>340</x>
<y>460</y> <y>560</y>
<width>921</width> <width>921</width>
<height>131</height> <height>81</height>
</rect> </rect>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1368,7 +1368,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>1190</x> <x>1190</x>
<y>610</y> <y>650</y>
<width>47</width> <width>47</width>
<height>17</height> <height>17</height>
</rect> </rect>
@ -1396,8 +1396,8 @@
<widget class="QPushButton" name="sendChatButton"> <widget class="QPushButton" name="sendChatButton">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>710</x> <x>720</x>
<y>610</y> <y>640</y>
<width>114</width> <width>114</width>
<height>25</height> <height>25</height>
</rect> </rect>
@ -1418,8 +1418,8 @@
<widget class="QPushButton" name="safeContactRequest"> <widget class="QPushButton" name="safeContactRequest">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>50</x> <x>30</x>
<y>600</y> <y>640</y>
<width>211</width> <width>211</width>
<height>25</height> <height>25</height>
</rect> </rect>
@ -1456,7 +1456,7 @@
<x>340</x> <x>340</x>
<y>40</y> <y>40</y>
<width>921</width> <width>921</width>
<height>421</height> <height>521</height>
</rect> </rect>
</property> </property>
<property name="verticalScrollBarPolicy"> <property name="verticalScrollBarPolicy">
@ -1484,6 +1484,19 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" name="request">
<property name="geometry">
<rect>
<x>340</x>
<y>650</y>
<width>261</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Is this message a contact request?</string>
</property>
</widget>
</widget> </widget>
</widget> </widget>
</item> </item>
@ -1694,5 +1707,22 @@
<resources> <resources>
<include location="../application.qrc"/> <include location="../application.qrc"/>
</resources> </resources>
<connections/> <connections>
<connection>
<sender>request</sender>
<signal>stateChanged(int)</signal>
<receiver>MainWindow</receiver>
<slot>update()</slot>
<hints>
<hint type="sourcelabel">
<x>481</x>
<y>721</y>
</hint>
<hint type="destinationlabel">
<x>636</x>
<y>389</y>
</hint>
</hints>
</connection>
</connections>
</ui> </ui>

Loading…
Cancel
Save