@@ -75,8 +75,12 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
7575 toolbar->addAction (receiveCoins);
7676 toolbar->addAction (addressbook);
7777
78- overviewPage = new OverviewPage ();
78+ QToolBar *toolbar2 = addToolBar (" Transactions toolbar" );
79+ toolbar2->setToolButtonStyle (Qt::ToolButtonTextBesideIcon);
80+ toolbar2->addAction (exportAction);
7981
82+ // Overview page
83+ overviewPage = new OverviewPage ();
8084 QVBoxLayout *vbox = new QVBoxLayout ();
8185
8286 transactionView = new TransactionView (this );
@@ -146,8 +150,10 @@ void BitcoinGUI::createActions()
146150 receiveCoins->setToolTip (tr (" Show the list of addresses for receiving payments" ));
147151 options = new QAction (QIcon (" :/icons/options" ), tr (" &Options..." ), this );
148152 options->setToolTip (tr (" Modify configuration options for bitcoin" ));
149- openBitcoin = new QAction (QIcon (" :/icons/bitcoin" ), " Open &Bitcoin" , this );
153+ openBitcoin = new QAction (QIcon (" :/icons/bitcoin" ), tr ( " Open &Bitcoin" ) , this );
150154 openBitcoin->setToolTip (tr (" Show the Bitcoin window" ));
155+ exportAction = new QAction (QIcon (" :/icons/export" ), tr (" &Export..." ), this );
156+ exportAction->setToolTip (tr (" Export data in current view to a file" ));
151157
152158 connect (quit, SIGNAL (triggered ()), qApp, SLOT (quit ()));
153159 connect (sendCoins, SIGNAL (triggered ()), this , SLOT (sendCoinsClicked ()));
@@ -156,6 +162,7 @@ void BitcoinGUI::createActions()
156162 connect (options, SIGNAL (triggered ()), this , SLOT (optionsClicked ()));
157163 connect (about, SIGNAL (triggered ()), this , SLOT (aboutClicked ()));
158164 connect (openBitcoin, SIGNAL (triggered ()), this , SLOT (show ()));
165+ connect (exportAction, SIGNAL (triggered ()), this , SLOT (exportClicked ()));
159166}
160167
161168void BitcoinGUI::setClientModel (ClientModel *clientModel)
@@ -410,10 +417,20 @@ void BitcoinGUI::gotoOverviewTab()
410417{
411418 overviewAction->setChecked (true );
412419 centralWidget->setCurrentWidget (overviewPage);
420+ exportAction->setEnabled (false );
413421}
414422
415423void BitcoinGUI::gotoHistoryTab ()
416424{
417425 historyAction->setChecked (true );
418426 centralWidget->setCurrentWidget (transactionsPage);
427+ exportAction->setEnabled (true );
428+ }
429+
430+ void BitcoinGUI::exportClicked ()
431+ {
432+ // Redirect to the right view, as soon as export for other views
433+ // (such as address book) is implemented.
434+ transactionView->exportClicked ();
419435}
436+
0 commit comments