mirror of
				https://git.wownero.com/wowlet/wowlet.git
				synced 2024-08-15 01:03:14 +00:00 
			
		
		
		
	SeedDialog: show restore height for 25 word seeds
This commit is contained in:
		
							parent
							
								
									edad1928ab
								
							
						
					
					
						commit
						d4dbc748c8
					
				
					 3 changed files with 99 additions and 28 deletions
				
			
		| 
						 | 
					@ -68,9 +68,7 @@ HelpLabel::HelpLabel(QWidget *parent) : QLabel(parent)
 | 
				
			||||||
void HelpLabel::mouseReleaseEvent(QMouseEvent *event)
 | 
					void HelpLabel::mouseReleaseEvent(QMouseEvent *event)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    Q_UNUSED(event)
 | 
					    Q_UNUSED(event)
 | 
				
			||||||
    QMessageBox msgBox(QApplication::activeWindow());
 | 
					    QMessageBox::information(this, "Help", this->help_text);
 | 
				
			||||||
    msgBox.setText(this->help_text);
 | 
					 | 
				
			||||||
    msgBox.exec();
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void HelpLabel::enterEvent(QEvent *event)
 | 
					void HelpLabel::enterEvent(QEvent *event)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,6 +11,8 @@ SeedDialog::SeedDialog(Wallet *wallet, QWidget *parent)
 | 
				
			||||||
    ui->setupUi(this);
 | 
					    ui->setupUi(this);
 | 
				
			||||||
    ui->label_seedIcon->setPixmap(QPixmap(":/assets/images/seed.png").scaledToWidth(64, Qt::SmoothTransformation));
 | 
					    ui->label_seedIcon->setPixmap(QPixmap(":/assets/images/seed.png").scaledToWidth(64, Qt::SmoothTransformation));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ui->label_restoreHeight->setText(QString::number(wallet->getWalletCreationHeight()));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QString seed_14_words = wallet->getCacheAttribute("feather.seed");
 | 
					    QString seed_14_words = wallet->getCacheAttribute("feather.seed");
 | 
				
			||||||
    QString seed_25_words = wallet->getSeed();
 | 
					    QString seed_25_words = wallet->getSeed();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,10 +21,16 @@ SeedDialog::SeedDialog(Wallet *wallet, QWidget *parent)
 | 
				
			||||||
        this->setSeed(seed_25_words);
 | 
					        this->setSeed(seed_25_words);
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        this->setSeed(seed_14_words);
 | 
					        this->setSeed(seed_14_words);
 | 
				
			||||||
 | 
					        ui->widgetRestoreHeight->setVisible(false);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    connect(ui->check_toggleSeedType, &QCheckBox::toggled, [this, seed_25_words, seed_14_words](bool toggled){
 | 
					    connect(ui->check_toggleSeedType, &QCheckBox::toggled, [this, seed_25_words, seed_14_words](bool toggled){
 | 
				
			||||||
        this->setSeed(toggled ? seed_25_words : seed_14_words);
 | 
					        this->setSeed(toggled ? seed_25_words : seed_14_words);
 | 
				
			||||||
 | 
					        ui->widgetRestoreHeight->setVisible(toggled);
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    }
 | 
					
 | 
				
			||||||
 | 
					    ui->label_restoreHeightHelp->setHelpText("Should you restore your wallet in the future, "
 | 
				
			||||||
 | 
					                                             "specifying this block number will recover your wallet quicker.");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this->adjustSize();
 | 
					    this->adjustSize();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,8 +6,8 @@
 | 
				
			||||||
   <rect>
 | 
					   <rect>
 | 
				
			||||||
    <x>0</x>
 | 
					    <x>0</x>
 | 
				
			||||||
    <y>0</y>
 | 
					    <y>0</y>
 | 
				
			||||||
    <width>542</width>
 | 
					    <width>590</width>
 | 
				
			||||||
    <height>259</height>
 | 
					    <height>346</height>
 | 
				
			||||||
   </rect>
 | 
					   </rect>
 | 
				
			||||||
  </property>
 | 
					  </property>
 | 
				
			||||||
  <property name="windowTitle">
 | 
					  <property name="windowTitle">
 | 
				
			||||||
| 
						 | 
					@ -33,6 +33,8 @@
 | 
				
			||||||
       </property>
 | 
					       </property>
 | 
				
			||||||
      </widget>
 | 
					      </widget>
 | 
				
			||||||
     </item>
 | 
					     </item>
 | 
				
			||||||
 | 
					     <item>
 | 
				
			||||||
 | 
					      <layout class="QVBoxLayout" name="verticalLayout_2">
 | 
				
			||||||
       <item>
 | 
					       <item>
 | 
				
			||||||
        <widget class="QPlainTextEdit" name="seed">
 | 
					        <widget class="QPlainTextEdit" name="seed">
 | 
				
			||||||
         <property name="enabled">
 | 
					         <property name="enabled">
 | 
				
			||||||
| 
						 | 
					@ -44,10 +46,16 @@
 | 
				
			||||||
           <verstretch>0</verstretch>
 | 
					           <verstretch>0</verstretch>
 | 
				
			||||||
          </sizepolicy>
 | 
					          </sizepolicy>
 | 
				
			||||||
         </property>
 | 
					         </property>
 | 
				
			||||||
 | 
					         <property name="minimumSize">
 | 
				
			||||||
 | 
					          <size>
 | 
				
			||||||
 | 
					           <width>0</width>
 | 
				
			||||||
 | 
					           <height>125</height>
 | 
				
			||||||
 | 
					          </size>
 | 
				
			||||||
 | 
					         </property>
 | 
				
			||||||
         <property name="maximumSize">
 | 
					         <property name="maximumSize">
 | 
				
			||||||
          <size>
 | 
					          <size>
 | 
				
			||||||
           <width>16777215</width>
 | 
					           <width>16777215</width>
 | 
				
			||||||
         <height>125</height>
 | 
					           <height>300</height>
 | 
				
			||||||
          </size>
 | 
					          </size>
 | 
				
			||||||
         </property>
 | 
					         </property>
 | 
				
			||||||
         <property name="readOnly">
 | 
					         <property name="readOnly">
 | 
				
			||||||
| 
						 | 
					@ -55,6 +63,56 @@
 | 
				
			||||||
         </property>
 | 
					         </property>
 | 
				
			||||||
        </widget>
 | 
					        </widget>
 | 
				
			||||||
       </item>
 | 
					       </item>
 | 
				
			||||||
 | 
					       <item>
 | 
				
			||||||
 | 
					        <widget class="QWidget" name="widgetRestoreHeight" native="true">
 | 
				
			||||||
 | 
					         <layout class="QHBoxLayout" name="horizontalLayout_4">
 | 
				
			||||||
 | 
					          <property name="leftMargin">
 | 
				
			||||||
 | 
					           <number>0</number>
 | 
				
			||||||
 | 
					          </property>
 | 
				
			||||||
 | 
					          <property name="topMargin">
 | 
				
			||||||
 | 
					           <number>0</number>
 | 
				
			||||||
 | 
					          </property>
 | 
				
			||||||
 | 
					          <property name="rightMargin">
 | 
				
			||||||
 | 
					           <number>0</number>
 | 
				
			||||||
 | 
					          </property>
 | 
				
			||||||
 | 
					          <property name="bottomMargin">
 | 
				
			||||||
 | 
					           <number>0</number>
 | 
				
			||||||
 | 
					          </property>
 | 
				
			||||||
 | 
					          <item>
 | 
				
			||||||
 | 
					           <widget class="HelpLabel" name="label_restoreHeightHelp">
 | 
				
			||||||
 | 
					            <property name="text">
 | 
				
			||||||
 | 
					             <string>Restore height:</string>
 | 
				
			||||||
 | 
					            </property>
 | 
				
			||||||
 | 
					           </widget>
 | 
				
			||||||
 | 
					          </item>
 | 
				
			||||||
 | 
					          <item>
 | 
				
			||||||
 | 
					           <widget class="QLabel" name="label_restoreHeight">
 | 
				
			||||||
 | 
					            <property name="text">
 | 
				
			||||||
 | 
					             <string>TextLabel</string>
 | 
				
			||||||
 | 
					            </property>
 | 
				
			||||||
 | 
					            <property name="textInteractionFlags">
 | 
				
			||||||
 | 
					             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
 | 
				
			||||||
 | 
					            </property>
 | 
				
			||||||
 | 
					           </widget>
 | 
				
			||||||
 | 
					          </item>
 | 
				
			||||||
 | 
					          <item>
 | 
				
			||||||
 | 
					           <spacer name="horizontalSpacer">
 | 
				
			||||||
 | 
					            <property name="orientation">
 | 
				
			||||||
 | 
					             <enum>Qt::Horizontal</enum>
 | 
				
			||||||
 | 
					            </property>
 | 
				
			||||||
 | 
					            <property name="sizeHint" stdset="0">
 | 
				
			||||||
 | 
					             <size>
 | 
				
			||||||
 | 
					              <width>40</width>
 | 
				
			||||||
 | 
					              <height>20</height>
 | 
				
			||||||
 | 
					             </size>
 | 
				
			||||||
 | 
					            </property>
 | 
				
			||||||
 | 
					           </spacer>
 | 
				
			||||||
 | 
					          </item>
 | 
				
			||||||
 | 
					         </layout>
 | 
				
			||||||
 | 
					        </widget>
 | 
				
			||||||
 | 
					       </item>
 | 
				
			||||||
 | 
					      </layout>
 | 
				
			||||||
 | 
					     </item>
 | 
				
			||||||
    </layout>
 | 
					    </layout>
 | 
				
			||||||
   </item>
 | 
					   </item>
 | 
				
			||||||
   <item>
 | 
					   <item>
 | 
				
			||||||
| 
						 | 
					@ -86,6 +144,13 @@
 | 
				
			||||||
   </item>
 | 
					   </item>
 | 
				
			||||||
  </layout>
 | 
					  </layout>
 | 
				
			||||||
 </widget>
 | 
					 </widget>
 | 
				
			||||||
 | 
					 <customwidgets>
 | 
				
			||||||
 | 
					  <customwidget>
 | 
				
			||||||
 | 
					   <class>HelpLabel</class>
 | 
				
			||||||
 | 
					   <extends>QLabel</extends>
 | 
				
			||||||
 | 
					   <header>components.h</header>
 | 
				
			||||||
 | 
					  </customwidget>
 | 
				
			||||||
 | 
					 </customwidgets>
 | 
				
			||||||
 <resources/>
 | 
					 <resources/>
 | 
				
			||||||
 <connections>
 | 
					 <connections>
 | 
				
			||||||
  <connection>
 | 
					  <connection>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue