QStringListitems={"No vanity (instant)","Direct ICAP address","Two pairs first (a few seconds)","Two pairs first and second (a few minutes)","Three pairs first (a few minutes)","Four pairs first (several hours)","Specific hex string"};
unsignedv=items.QList<QString>::indexOf(QInputDialog::getItem(this,"Vanity Key?","Would you a vanity key? This could take several hours.",items,1,false,&ok));
if(!ok)
return;
bytesbs;
if(v==StringMatch)
{
QStrings=QInputDialog::getText(this,"Vanity Beginning?","Enter some hex digits that it should begin with.\nNOTE: The more you enter, the longer generation will take.",QLineEdit::Normal,QString(),&ok);
QStrings=QInputDialog::getText(this,"Create Account","Enter this account's name");
if(QMessageBox::question(this,"Create Account","Would you like to use additional security for this key? This lets you protect it with a different password to other keys, but also means you must re-enter the key's password every time you wish to use the account.",QMessageBox::Yes,QMessageBox::No)==QMessageBox::Yes)
{
boolok=false;
std::stringhint;
std::stringpassword=getPassword("Create Account","Enter the password you would like to use for this key. Don't forget it!",&hint,&ok);
QStringListitems={"No vanity (instant)","Direct ICAP address","Two pairs first (a few seconds)","Two pairs first and second (a few minutes)","Three pairs first (a few minutes)","Four pairs first (several hours)","Specific hex string"};