QVBoxLayout *vbox = new QVBoxLayout();
transactionView = new TransactionView(this);
- connect(transactionView, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(transactionDetails(const QModelIndex&)));
+ connect(transactionView, SIGNAL(doubleClicked(const QModelIndex&)), transactionView, SLOT(transactionDetails()));
vbox->addWidget(transactionView);
transactionsPage = new QWidget(this);
connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked()));
connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
connect(openBitcoinAction, SIGNAL(triggered()), this, SLOT(show()));
- connect(exportAction, SIGNAL(triggered()), this, SLOT(exportClicked()));
}
void BitcoinGUI::setClientModel(ClientModel *clientModel)
connect(walletModel, SIGNAL(error(QString,QString)), this, SLOT(error(QString,QString)));
// Put transaction list in tabs
- transactionView->setModel(walletModel->getTransactionTableModel());
+ transactionView->setModel(walletModel);
addressBookPage->setModel(walletModel->getAddressTableModel());
receiveCoinsPage->setModel(walletModel->getAddressTableModel());
default: icon = ":/icons/connect_4"; break;
}
labelConnections->setTextFormat(Qt::RichText);
- labelConnections->setText("<img src=\""+icon+"\">" + tr("%n connection(s)", "", count));
+ labelConnections->setText("<img src=\""+icon+"\"> " + tr("%n connection(s)", "", count));
}
void BitcoinGUI::setNumBlocks(int count)
*payFee = (retval == QMessageBox::Yes);
}
-void BitcoinGUI::transactionDetails(const QModelIndex& idx)
-{
- // A transaction is doubleclicked
- TransactionDescDialog dlg(idx);
- dlg.exec();
-}
-
void BitcoinGUI::incomingTransaction(const QModelIndex & parent, int start, int end)
{
TransactionTableModel *ttm = walletModel->getTransactionTableModel();
{
overviewAction->setChecked(true);
centralWidget->setCurrentWidget(overviewPage);
+
exportAction->setEnabled(false);
+ disconnect(exportAction, SIGNAL(triggered()), 0, 0);
}
void BitcoinGUI::gotoHistoryPage()
{
historyAction->setChecked(true);
centralWidget->setCurrentWidget(transactionsPage);
+
exportAction->setEnabled(true);
+ disconnect(exportAction, SIGNAL(triggered()), 0, 0);
+ connect(exportAction, SIGNAL(triggered()), transactionView, SLOT(exportClicked()));
}
void BitcoinGUI::gotoAddressBookPage()
{
addressBookAction->setChecked(true);
centralWidget->setCurrentWidget(addressBookPage);
- exportAction->setEnabled(false); // TODO
+
+ exportAction->setEnabled(true);
+ disconnect(exportAction, SIGNAL(triggered()), 0, 0);
+ connect(exportAction, SIGNAL(triggered()), addressBookPage, SLOT(exportClicked()));
}
void BitcoinGUI::gotoReceiveCoinsPage()
{
receiveCoinsAction->setChecked(true);
centralWidget->setCurrentWidget(receiveCoinsPage);
- exportAction->setEnabled(false); // TODO
+
+ exportAction->setEnabled(true);
+ disconnect(exportAction, SIGNAL(triggered()), 0, 0);
+ connect(exportAction, SIGNAL(triggered()), receiveCoinsPage, SLOT(exportClicked()));
}
void BitcoinGUI::gotoSendCoinsPage()
sendCoinsAction->setChecked(true);
sendCoinsPage->clear();
centralWidget->setCurrentWidget(sendCoinsPage);
- exportAction->setEnabled(false);
-}
-void BitcoinGUI::exportClicked()
-{
- // Redirect to the right view, as soon as export for other views
- // (such as address book) is implemented.
- transactionView->exportClicked();
+ exportAction->setEnabled(false);
+ disconnect(exportAction, SIGNAL(triggered()), 0, 0);
}