Raven Core  3.0.0
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
AssetViewDelegate Class Reference
Inheritance diagram for AssetViewDelegate:
[legend]
Collaboration diagram for AssetViewDelegate:
[legend]

Public Member Functions

 AssetViewDelegate (const PlatformStyle *_platformStyle, QObject *parent=nullptr)
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const
 

Public Attributes

int unit
 
const PlatformStyleplatformStyle
 

Detailed Description

Definition at line 138 of file overviewpage.cpp.

Constructor & Destructor Documentation

◆ AssetViewDelegate()

AssetViewDelegate::AssetViewDelegate ( const PlatformStyle _platformStyle,
QObject *  parent = nullptr 
)
inlineexplicit

Definition at line 142 of file overviewpage.cpp.

Member Function Documentation

◆ paint()

void AssetViewDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
inline

Get the icon for the administrator of the asset

Need to know the heigh to the pixmap. If it is 0 we don't we dont own this asset so dont have room for the icon

Get basic padding and half height

Create the three main rectangles (Icon, Name, Amount)

Draw asset administrator icon

Create the font that is used for painting the asset name

Create the font that is used for painting the asset amount

Get the name and formatted amount from the data

Start Concatenation of Asset Name

Paint the asset name

Paint the amount

Definition at line 149 of file overviewpage.cpp.

Here is the call graph for this function:

◆ sizeHint()

QSize AssetViewDelegate::sizeHint ( const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
inline

Definition at line 269 of file overviewpage.cpp.

Member Data Documentation

◆ platformStyle

const PlatformStyle* AssetViewDelegate::platformStyle

Definition at line 275 of file overviewpage.cpp.

◆ unit

int AssetViewDelegate::unit

Definition at line 274 of file overviewpage.cpp.


The documentation for this class was generated from the following file: