Update bitcoinunits.cpp

Adding a name for the smallest possible unit. :>
This commit is contained in:
jwiechers 2014-03-25 00:07:07 +01:00 committed by Jannis Froese
parent e52541309e
commit 1026ca71d3

View file

@ -18,6 +18,7 @@ QList<BitcoinUnits::Unit> BitcoinUnits::availableUnits()
unitlist.append(DOGE);
unitlist.append(mDOGE);
unitlist.append(uDOGE);
unitlist.append(Koinu);
return unitlist;
}
@ -28,6 +29,7 @@ bool BitcoinUnits::valid(int unit)
case DOGE:
case mDOGE:
case uDOGE:
case Koinu:
return true;
default:
return false;
@ -41,6 +43,7 @@ QString BitcoinUnits::name(int unit)
case DOGE: return QString("DOGE");
case mDOGE: return QString("mDOGE");
case uDOGE: return QString::fromUtf8("μDOGE");
case Koinu: return QString("Koinu")
default: return QString("???");
}
}
@ -52,6 +55,7 @@ QString BitcoinUnits::description(int unit)
case DOGE: return QString("Dogecoin");
case mDOGE: return QString("Milli-Dogecoin (1 / 1,000)");
case uDOGE: return QString("Micro-Dogecoin (1 / 1,000,000)");
case Koinu: return QString("Koinu (1 / 100,000,000")
default: return QString("???");
}
}
@ -63,6 +67,7 @@ qint64 BitcoinUnits::factor(int unit)
case DOGE: return 100000000;
case mDOGE: return 100000;
case uDOGE: return 100;
case Koinu: return 1;
default: return 100000000;
}
}
@ -74,6 +79,7 @@ qint64 BitcoinUnits::maxAmount(int unit)
case DOGE: return Q_INT64_C(900000000000); //less than the coin supply until the year 2170
case mDOGE: return Q_INT64_C(900000000000000);
case uDOGE: return Q_INT64_C(900000000000000000);
case Koinu: return Q_INT64_C(90000000000000000000);
default: return 0;
}
}
@ -85,6 +91,7 @@ int BitcoinUnits::amountDigits(int unit)
case DOGE: return 12; // 900,000,000,000 (# digits, without commas)
case mDOGE: return 15; // 900,000,000,000,000
case uDOGE: return 18; // 900,000,000,000,000,000
case Koinu: return 20; // 90,000,000,000,000,000,000
default: return 0;
}
}
@ -96,6 +103,7 @@ int BitcoinUnits::decimals(int unit)
case DOGE: return 8;
case mDOGE: return 5;
case uDOGE: return 2;
case Koinu: return 0;
default: return 0;
}
}