55#include " guiutil.h"
66#include " qt/pivx/coincontrolzpivdialog.h"
77#include " qt/pivx/denomgenerationdialog.h"
8- #include < QGraphicsDropShadowEffect>
98#include " qt/pivx/defaultdialog.h"
109#include " qt/pivx/furlistrow.h"
1110#include " qt/pivx/txviewholder.h"
@@ -48,29 +47,21 @@ PrivacyWidget::PrivacyWidget(PIVXGUI* _window, QWidget *parent) :
4847 ui->pushRight ->setProperty (" cssClass" , " btn-check-right" );
4948
5049 /* Subtitle */
51-
5250 ui->labelSubtitle1 ->setText (" Minting zPIV anonymizes your PIV by removing\n transaction history, making transactions untraceable " );
5351 ui->labelSubtitle1 ->setProperty (" cssClass" , " text-subtitle" );
5452
5553 ui->labelSubtitle2 ->setText (" Mint new zPIV or convert back to PIV" );
5654 ui->labelSubtitle2 ->setProperty (" cssClass" , " text-subtitle" );
5755 ui->labelSubtitle2 ->setContentsMargins (0 ,2 ,0 ,0 );
5856 /* Amount */
59-
6057 ui->labelSubtitleAmount ->setText (" Enter amount of PIV to mint into zPIV " );
6158 ui->labelSubtitleAmount ->setProperty (" cssClass" , " text-title" );
6259
63- QGraphicsDropShadowEffect* shadowEffect = new QGraphicsDropShadowEffect ();
64- shadowEffect->setColor (QColor (0 , 0 , 0 , 22 ));
65- shadowEffect->setXOffset (0 );
66- shadowEffect->setYOffset (3 );
67- shadowEffect->setBlurRadius (6 );
68-
6960 ui->lineEditAmount ->setPlaceholderText (" 0.00 PIV " );
61+ ui->lineEditAmount ->setValidator (new QRegExpValidator (QRegExp (" [1-9]+" )));
7062 initCssEditLine (ui->lineEditAmount );
7163
7264 /* Denom */
73-
7465 ui->labelTitleDenom1 ->setText (" Denom. with value 1:" );
7566 ui->labelTitleDenom1 ->setProperty (" cssClass" , " text-subtitle" );
7667 ui->labelValueDenom1 ->setText (" 0x1 = 0 zPIV" );
@@ -115,8 +106,6 @@ PrivacyWidget::PrivacyWidget(PIVXGUI* _window, QWidget *parent) :
115106 ui->layoutDenom ->setVisible (false );
116107
117108 // List
118-
119-
120109 ui->labelListHistory ->setText (" Last Zerocoin Movements" );
121110 ui->labelListHistory ->setProperty (" cssClass" , " text-title" );
122111
@@ -127,7 +116,6 @@ PrivacyWidget::PrivacyWidget(PIVXGUI* _window, QWidget *parent) :
127116 ui->labelEmpty ->setProperty (" cssClass" , " text-empty" );
128117
129118 // Buttons
130-
131119 ui->pushButtonSave ->setProperty (" cssClass" , " btn-primary" );
132120 onMintSelected (true );
133121
@@ -171,7 +159,6 @@ PrivacyWidget::PrivacyWidget(PIVXGUI* _window, QWidget *parent) :
171159 ui->listView ->setMinimumHeight (NUM_ITEMS * (DECORATION_SIZE + 2 ));
172160 ui->listView ->setAttribute (Qt::WA_MacShowFocusRect, false );
173161 ui->listView ->setSelectionBehavior (QAbstractItemView::SelectRows);
174-
175162}
176163
177164void PrivacyWidget::loadWalletModel (){
@@ -189,10 +176,9 @@ void PrivacyWidget::loadWalletModel(){
189176 updateDisplayUnit ();
190177 updateDenomsSupply ();
191178
192- if (txModel->size () == 0 ) {
179+ if (! txModel->hasZcTxes () ) {
193180 ui->emptyContainer ->setVisible (true );
194181 ui->listView ->setVisible (false );
195- // TODO: Connect waiting for tx updates..
196182 }else {
197183 // TODO: Use show list method..
198184 ui->emptyContainer ->setVisible (false );
@@ -206,7 +192,6 @@ void PrivacyWidget::loadWalletModel(){
206192}
207193
208194void PrivacyWidget::onMintSelected (bool isMint){
209- // TODO: Complete me..
210195 QString btnText;
211196 if (isMint){
212197 btnText = tr (" Mint zPIV" );
@@ -269,7 +254,7 @@ void PrivacyWidget::onSendClicked(){
269254 &isValid
270255 );
271256
272- if (value <= 0 || !isValid ) {
257+ if (!isValid || value <= 0 ) {
273258 setCssEditLine (ui->lineEditAmount , false , true );
274259 emit message (" " , tr (" Invalid value" ), CClientUIInterface::MSG_INFORMATION_SNACK);
275260 return ;
@@ -282,7 +267,6 @@ void PrivacyWidget::onSendClicked(){
282267 }else {
283268 mint (value);
284269 }
285-
286270}
287271
288272void PrivacyWidget::mint (CAmount value){
0 commit comments