Wladimir J. van der Laan
14 years ago
10 changed files with 187 additions and 22 deletions
@ -0,0 +1,63 @@
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<ui version="4.0"> |
||||
<class>OverviewPage</class> |
||||
<widget class="QWidget" name="OverviewPage"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>552</width> |
||||
<height>342</height> |
||||
</rect> |
||||
</property> |
||||
<property name="windowTitle"> |
||||
<string>Form</string> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout_2"> |
||||
<item> |
||||
<widget class="QFrame" name="frame"> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::StyledPanel</enum> |
||||
</property> |
||||
<property name="frameShadow"> |
||||
<enum>QFrame::Raised</enum> |
||||
</property> |
||||
<layout class="QFormLayout" name="formLayout_2"> |
||||
<property name="fieldGrowthPolicy"> |
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum> |
||||
</property> |
||||
<item row="0" column="0"> |
||||
<widget class="QLabel" name="label"> |
||||
<property name="text"> |
||||
<string>Balance</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item row="0" column="1"> |
||||
<widget class="QLabel" name="labelBalance"> |
||||
<property name="text"> |
||||
<string>123.456 BTC</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<spacer name="verticalSpacer"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Vertical</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>20</width> |
||||
<height>40</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<resources/> |
||||
<connections/> |
||||
</ui> |
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
#include "overviewpage.h" |
||||
#include "ui_overviewpage.h" |
||||
|
||||
#include "guiutil.h" |
||||
|
||||
OverviewPage::OverviewPage(QWidget *parent) : |
||||
QWidget(parent), |
||||
ui(new Ui::OverviewPage) |
||||
{ |
||||
ui->setupUi(this); |
||||
|
||||
// Balance: <balance>
|
||||
ui->labelBalance->setFont(QFont("Monospace", -1, QFont::Bold)); |
||||
ui->labelBalance->setToolTip(tr("Your current balance")); |
||||
ui->labelBalance->setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard); |
||||
|
||||
// Overview page should show:
|
||||
// Balance
|
||||
// Unconfirmed balance
|
||||
// Last received transaction(s)
|
||||
// Last sent transaction(s)
|
||||
} |
||||
|
||||
OverviewPage::~OverviewPage() |
||||
{ |
||||
delete ui; |
||||
} |
||||
|
||||
void OverviewPage::setBalance(qint64 balance) |
||||
{ |
||||
ui->labelBalance->setText(GUIUtil::formatMoney(balance) + QString(" BTC")); |
||||
} |
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
#ifndef OVERVIEWPAGE_H |
||||
#define OVERVIEWPAGE_H |
||||
|
||||
#include <QWidget> |
||||
|
||||
namespace Ui { |
||||
class OverviewPage; |
||||
} |
||||
|
||||
class OverviewPage : public QWidget |
||||
{ |
||||
Q_OBJECT |
||||
|
||||
public: |
||||
explicit OverviewPage(QWidget *parent = 0); |
||||
~OverviewPage(); |
||||
|
||||
public slots: |
||||
void setBalance(qint64 balance); |
||||
|
||||
private: |
||||
Ui::OverviewPage *ui; |
||||
|
||||
}; |
||||
|
||||
#endif // OVERVIEWPAGE_H
|
After Width: | Height: | Size: 746 B |
After Width: | Height: | Size: 6.9 KiB |
Loading…
Reference in new issue