diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e652581..7c8c346 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1666,6 +1666,14 @@ void MainWindow::setupTransactionsTab() { QGuiApplication::clipboard()->setText(url); }); + /* TODO: Decide whether to use this or not. + menu.addAction(tr("Look for new transactions"), [=] () { + QGuiApplication::clipboard()->setText(addr); + ui->statusBar->showMessage(tr("Looking for new transactions"), 3 * 1000); + rpc->watchTxStatus(); + }); + */ + // Payment Request if (!memo.isEmpty() && memo.startsWith("hush:")) { menu.addAction(tr("View Payment Request"), [=] () { diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 6bb14fc..6956d8a 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -22,7 +22,7 @@ - 5 + 1 @@ -385,8 +385,8 @@ 0 0 - 1403 - 619 + 1447 + 860 @@ -395,33 +395,65 @@ Recipient - - - - - + + + + + 0 + + + QLayout::SetDefaultConstraint + + + 0 + + + + + + 0 + 0 + + - Address + - - - - - - Address + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true - - + + + + true + + + + 0 + 0 + + + + + 0 + 0 + + + + + - Address Book + Memo - + @@ -432,6 +464,18 @@ + + + 0 + 0 + + + + + 200 + 0 + + 200 @@ -458,6 +502,9 @@ Max Available + + true + @@ -465,6 +512,9 @@ Qt::Horizontal + + QSizePolicy::MinimumExpanding + 40 @@ -486,36 +536,33 @@ + + + + - - - true + + + Address - - + + + + + + Address + + + + - Memo + Address Book - - - - - 10 - - - - - - - true - - - @@ -915,7 +962,6 @@ - Transactions @@ -933,15 +979,11 @@ - - Peers - - @@ -951,7 +993,6 @@ - @@ -961,8 +1002,7 @@ QAbstractItemView::SelectRows - - + @@ -972,7 +1012,6 @@ - @@ -982,24 +1021,9 @@ QAbstractItemView::SelectRows - - - - - - - Market @@ -1082,42 +1106,6 @@ - hushd @@ -1148,9 +1136,9 @@ - + - + You are currently not mining @@ -1244,15 +1232,6 @@ - @@ -1456,7 +1435,6 @@ - @@ -1478,7 +1456,6 @@ - @@ -1500,7 +1477,6 @@ - @@ -1587,7 +1563,7 @@ 0 0 1487 - 42 + 30 @@ -1764,7 +1740,6 @@ Amount1 Max1 AddressBook1 - MemoBtn1 addAddressButton sendTransactionButton cancelSendButton diff --git a/src/rpc.cpp b/src/rpc.cpp index a0125e3..3f9e33e 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -1050,6 +1050,7 @@ void RPC::refreshTransactions() { } // Update model data, which updates the table view + qDebug() << "refreshTransactions"; transactionsTableModel->addTData(txdata); }); } diff --git a/src/sendtab.cpp b/src/sendtab.cpp index a56b72b..c734d7c 100644 --- a/src/sendtab.cpp +++ b/src/sendtab.cpp @@ -14,7 +14,7 @@ void MainWindow::setupSendTab() { // Create the validator for send to/amount fields - amtValidator = new QRegExpValidator(QRegExp("[0-9]{0,8}\\.?[0-9]{0,8}")); + amtValidator = new QRegExpValidator(QRegExp("[0-9]{0,9}\\.?[0-9]{0,8}")); ui->Amount1->setValidator(amtValidator); @@ -251,51 +251,69 @@ void MainWindow::addAddressSection() { Amount1->setPlaceholderText(tr("Amount")); Amount1->setObjectName(QString("Amount") % QString::number(itemNumber)); Amount1->setBaseSize(QSize(200, 0)); - Amount1->setAlignment(Qt::AlignRight); + Amount1->setMinimumWidth(200); + Amount1->setSizePolicy(QSizePolicy ::Preferred , QSizePolicy ::Preferred ); + Amount1->setAlignment(Qt::AlignRight); + // Create the validator for send to/amount fields Amount1->setValidator(amtValidator); QObject::connect(Amount1, &QLineEdit::textChanged, [=] (auto text) { this->amountChanged(itemNumber, text); }); - horizontalLayout_13->addWidget(Amount1); auto AmtUSD1 = new QLabel(verticalGroupBox); - AmtUSD1->setObjectName(QString("AmtUSD") % QString::number(itemNumber)); + AmtUSD1->setObjectName(QString("AmtUSD") % QString::number(itemNumber)); horizontalLayout_13->addWidget(AmtUSD1); + /* TODO: Fix so it updates amount on correct recipient row...or just remove. Added for UI consistency. + auto Max1 = new QCheckBox(verticalGroupBox); + Max1->setText(tr("Max Available")); + // Connect Max Available checkbox + QObject::connect(Max1, &QCheckBox::stateChanged, [=] () { + this->maxAmountChecked(Max1->checkState()); + }); + horizontalLayout_13->addWidget(Max1); + */ + auto horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); horizontalLayout_13->addItem(horizontalSpacer_4); - auto MemoBtn1 = new QPushButton(verticalGroupBox); - MemoBtn1->setObjectName(QString("MemoBtn") % QString::number(itemNumber)); - MemoBtn1->setText(tr("Memo")); - // Connect Memo Clicked button - QObject::connect(MemoBtn1, &QPushButton::clicked, [=] () { - this->memoButtonClicked(itemNumber); - }); - horizontalLayout_13->addWidget(MemoBtn1); - setMemoEnabled(itemNumber, false); - auto FileBtn = new QPushButton(verticalGroupBox); FileBtn->setObjectName(QString("FileBtn") % QString::number(itemNumber)); - FileBtn->setText(tr("File Upload")); + FileBtn->setText(tr("Upload File")); // Connect File Upload button QObject::connect(FileBtn, &QPushButton::clicked, [=] () { this->fileUploadButtonClicked(itemNumber); }); horizontalLayout_13->addWidget(FileBtn); - sendAddressLayout->addLayout(horizontalLayout_13); + auto horizontalLayout_20 = new QHBoxLayout(); + horizontalLayout_20->setSpacing(6); + horizontalLayout_20->setAlignment(Qt::AlignTop); + auto MemoTxt1 = new QLabel(verticalGroupBox); MemoTxt1->setObjectName(QString("MemoTxt") % QString::number(itemNumber)); + MemoTxt1->setSizePolicy(QSizePolicy ::MinimumExpanding , QSizePolicy ::MinimumExpanding ); QFont font1 = Address1->font(); font1.setPointSize(font1.pointSize()-1); MemoTxt1->setFont(font1); MemoTxt1->setWordWrap(true); - sendAddressLayout->addWidget(MemoTxt1); + horizontalLayout_20->addWidget(MemoTxt1, 0, Qt::AlignTop); + + auto MemoBtn1 = new QPushButton(verticalGroupBox); + MemoBtn1->setObjectName(QString("MemoBtn") % QString::number(itemNumber)); + MemoBtn1->setText(tr("Memo")); + // Connect Memo Clicked button + QObject::connect(MemoBtn1, &QPushButton::clicked, [=] () { + this->memoButtonClicked(itemNumber); + }); + horizontalLayout_20->addWidget(MemoBtn1, 0, Qt::AlignTop); + setMemoEnabled(itemNumber, false); + + sendAddressLayout->addLayout(horizontalLayout_20); ui->sendToLayout->insertWidget(itemNumber-1, verticalGroupBox); diff --git a/src/senttxstore.cpp b/src/senttxstore.cpp index 91bf78a..9b623ee 100644 --- a/src/senttxstore.cpp +++ b/src/senttxstore.cpp @@ -14,6 +14,7 @@ QString SentTxStore::writeableFile() { if (Settings::getInstance()->isTestnet()) { return dir.filePath("testnet-" % filename); } else { + qDebug() << "senttxstore file = " + dir.filePath(filename); return dir.filePath(filename); } }