transactionView(0)
{
// Build filter row
+ setContentsMargins(0,0,0,0);
+
QHBoxLayout *hlayout = new QHBoxLayout();
- hlayout->setContentsMargins(QMargins(0,0,0,0));
+ hlayout->setContentsMargins(0,0,0,0);
hlayout->setSpacing(0);
hlayout->addSpacing(23);
dateWidget->addItem(tr("Today"), Today);
dateWidget->addItem(tr("This week"), ThisWeek);
dateWidget->addItem(tr("This month"), ThisMonth);
+ dateWidget->addItem(tr("Last month"), LastMonth);
dateWidget->addItem(tr("This year"), ThisYear);
dateWidget->addItem(tr("Range..."), Range);
hlayout->addWidget(dateWidget);
typeWidget->addItem(tr("Sent to"), TransactionFilterProxy::TYPE(TransactionRecord::SendToAddress) |
TransactionFilterProxy::TYPE(TransactionRecord::SendToIP));
typeWidget->addItem(tr("To yourself"), TransactionFilterProxy::TYPE(TransactionRecord::SendToSelf));
- typeWidget->addItem(tr("Generated"), TransactionFilterProxy::TYPE(TransactionRecord::Generated));
+ typeWidget->addItem(tr("Mined"), TransactionFilterProxy::TYPE(TransactionRecord::Generated));
typeWidget->addItem(tr("Other"), TransactionFilterProxy::TYPE(TransactionRecord::Other));
hlayout->addWidget(typeWidget);
addressWidget = new QLineEdit(this);
+#if QT_VERSION >= 0x040700
addressWidget->setPlaceholderText("Enter address or label to search");
+#endif
hlayout->addWidget(addressWidget);
amountWidget = new QLineEdit(this);
+#if QT_VERSION >= 0x040700
amountWidget->setPlaceholderText("Min amount");
- amountWidget->setMaximumWidth(79);
- amountWidget->setMinimumWidth(79);
+#endif
+ amountWidget->setMaximumWidth(100);
+ amountWidget->setMinimumWidth(100);
amountWidget->setValidator(new QDoubleValidator(0, 1e20, 8, this));
hlayout->addWidget(amountWidget);
QVBoxLayout *vlayout = new QVBoxLayout(this);
+ vlayout->setContentsMargins(0,0,0,0);
+ vlayout->setSpacing(0);
QTableView *view = new QTableView(this);
vlayout->addLayout(hlayout);
transactionView->horizontalHeader()->setResizeMode(
TransactionTableModel::ToAddress, QHeaderView::Stretch);
transactionView->horizontalHeader()->resizeSection(
- TransactionTableModel::Amount, 79);
+ TransactionTableModel::Amount, 100);
}
QDateTime(QDate(current.year(), current.month(), 1)),
TransactionFilterProxy::MAX_DATE);
break;
+ case LastMonth:
+ transactionProxyModel->setDateRange(
+ QDateTime(QDate(current.year(), current.month()-1, 1)),
+ QDateTime(QDate(current.year(), current.month(), 1)));
+ break;
case ThisYear:
transactionProxyModel->setDateRange(
QDateTime(QDate(current.year(), 1, 1)),
void TransactionView::changedAmount(const QString &amount)
{
- qint64 amount_parsed;
+ qint64 amount_parsed = 0;
if(GUIUtil::parseMoney(amount, &amount_parsed))
{
transactionProxyModel->setMinAmount(amount_parsed);