Bitcoin unit definitions.  
 More...
#include <bitcoinunits.h>
 | 
| static QString  | removeSpaces (QString text) | 
|   | 
| static CAmount  | maxMoney () | 
|   | Return maximum number of base units (Satoshis)  More...
  | 
|   | 
 | 
Unit conversion and formatting  
 | 
| static QList< Unit >  | availableUnits () | 
|   | Get list of units, for drop-down box.  More...
  | 
|   | 
| static bool  | valid (int unit) | 
|   | Is unit ID valid?  More...
  | 
|   | 
| static QString  | longName (int unit) | 
|   | Long name.  More...
  | 
|   | 
| static QString  | shortName (int unit) | 
|   | Short name.  More...
  | 
|   | 
| static QString  | description (int unit) | 
|   | Longer description.  More...
  | 
|   | 
| static qint64  | factor (int unit) | 
|   | Number of Satoshis (1e-8) per unit.  More...
  | 
|   | 
| static int  | decimals (int unit) | 
|   | Number of decimals left.  More...
  | 
|   | 
| static QString  | format (int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard) | 
|   | Format as string.  More...
  | 
|   | 
| static QString  | formatWithUnit (int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard) | 
|   | Format as string (with unit)  More...
  | 
|   | 
| static QString  | formatHtmlWithUnit (int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard) | 
|   | Format as HTML string (with unit)  More...
  | 
|   | 
| static bool  | parse (int unit, const QString &value, CAmount *val_out) | 
|   | Parse string to coin amount.  More...
  | 
|   | 
| static QString  | getAmountColumnTitle (int unit) | 
|   | Gets title for amount column including current display unit if optionsModel reference available */.  More...
  | 
|   | 
 | 
List model for unit drop-down selection box.  
 | 
| enum   | RoleIndex { UnitRole = Qt::UserRole
 } | 
|   | 
| int  | rowCount (const QModelIndex &parent) const | 
|   | 
| QVariant  | data (const QModelIndex &index, int role) const | 
|   | 
Bitcoin unit definitions. 
Encapsulates parsing and formatting and serves as list model for drop-down selection boxes. 
Definition at line 47 of file bitcoinunits.h.
 
◆ RoleIndex
◆ SeparatorStyle
| Enumerator | 
|---|
| separatorNever  |  | 
| separatorStandard  |  | 
| separatorAlways  |  | 
Definition at line 65 of file bitcoinunits.h.
 
 
◆ Unit
◆ BitcoinUnits()
  
  
      
        
          | BitcoinUnits::BitcoinUnits  | 
          ( | 
          QObject *  | 
          parent | ) | 
           | 
         
       
   | 
  
explicit   | 
  
 
 
◆ availableUnits()
◆ data()
      
        
          | QVariant BitcoinUnits::data  | 
          ( | 
          const QModelIndex &  | 
          index,  | 
        
        
           | 
           | 
          int  | 
          role  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
 
◆ decimals()
  
  
      
        
          | int BitcoinUnits::decimals  | 
          ( | 
          int  | 
          unit | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
◆ description()
  
  
      
        
          | QString BitcoinUnits::description  | 
          ( | 
          int  | 
          unit | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
◆ factor()
  
  
      
        
          | qint64 BitcoinUnits::factor  | 
          ( | 
          int  | 
          unit | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
◆ format()
◆ formatHtmlWithUnit()
◆ formatWithUnit()
◆ getAmountColumnTitle()
  
  
      
        
          | QString BitcoinUnits::getAmountColumnTitle  | 
          ( | 
          int  | 
          unit | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Gets title for amount column including current display unit if optionsModel reference available */. 
Definition at line 195 of file bitcoinunits.cpp.
 
 
◆ longName()
  
  
      
        
          | QString BitcoinUnits::longName  | 
          ( | 
          int  | 
          unit | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
◆ maxMoney()
Return maximum number of base units (Satoshis) 
Definition at line 231 of file bitcoinunits.cpp.
 
 
◆ parse()
  
  
      
        
          | bool BitcoinUnits::parse  | 
          ( | 
          int  | 
          unit,  | 
         
        
           | 
           | 
          const QString &  | 
          value,  | 
         
        
           | 
           | 
          CAmount *  | 
          val_out  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
 
◆ removeSpaces()
  
  
      
        
          | static QString BitcoinUnits::removeSpaces  | 
          ( | 
          QString  | 
          text | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
 
◆ rowCount()
      
        
          | int BitcoinUnits::rowCount  | 
          ( | 
          const QModelIndex &  | 
          parent | ) | 
           const | 
        
      
 
 
◆ shortName()
  
  
      
        
          | QString BitcoinUnits::shortName  | 
          ( | 
          int  | 
          unit | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
◆ valid()
  
  
      
        
          | bool BitcoinUnits::valid  | 
          ( | 
          int  | 
          unit | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
◆ unitlist
The documentation for this class was generated from the following files: