Merge pull request #3094 from Diapolo/btcamountfield

make BitcoinAmountField::setReadOnly() usable
This commit is contained in:
Gavin Andresen 2013-10-15 22:12:55 -07:00
commit 03db5c6112
3 changed files with 5 additions and 9 deletions

View File

@ -130,9 +130,10 @@ void BitcoinAmountField::setValue(qint64 value)
setText(BitcoinUnits::format(currentUnit, value)); setText(BitcoinUnits::format(currentUnit, value));
} }
void BitcoinAmountField::setReadOnly(bool fReadeOnly) void BitcoinAmountField::setReadOnly(bool fReadOnly)
{ {
// TODO ... amount->setReadOnly(fReadOnly);
unit->setEnabled(!fReadOnly);
} }
void BitcoinAmountField::unitChanged(int idx) void BitcoinAmountField::unitChanged(int idx)

View File

@ -621,7 +621,7 @@
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
<property name="buddy"> <property name="buddy">
<cstring>payAmount</cstring> <cstring>payAmount_s</cstring>
</property> </property>
</widget> </widget>
</item> </item>
@ -640,15 +640,9 @@
</item> </item>
<item row="5" column="2"> <item row="5" column="2">
<widget class="BitcoinAmountField" name="payAmount_s"> <widget class="BitcoinAmountField" name="payAmount_s">
<property name="enabled">
<bool>false</bool>
</property>
<property name="acceptDrops"> <property name="acceptDrops">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item row="3" column="2"> <item row="3" column="2">

View File

@ -174,6 +174,7 @@ void SendCoinsEntry::setValue(const SendCoinsRecipient &value)
ui->payTo_s->setText(recipient.authenticatedMerchant); ui->payTo_s->setText(recipient.authenticatedMerchant);
ui->memoTextLabel_s->setText(QString::fromStdString(details.memo())); ui->memoTextLabel_s->setText(QString::fromStdString(details.memo()));
ui->payAmount_s->setValue(recipient.amount); ui->payAmount_s->setValue(recipient.amount);
ui->payAmount_s->setReadOnly(true);
setCurrentWidget(ui->SendCoinsSecure); setCurrentWidget(ui->SendCoinsSecure);
} }
} }