Delegate for drawing a percentage bar in an item view.
More...
#include <percent_bar_delegate.h>
|
| void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| | Renders the percentage bar using the given painter and style option.
|
| |
| QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const |
| | Returns the size hint for the percentage bar item.
|
| |
Delegate for drawing a percentage bar in an item view.
◆ PercentBarDelegate()
| PercentBarDelegate::PercentBarDelegate |
( |
QWidget * |
parent = 0 | ) |
|
|
inline |
◆ displayText()
| virtual QString PercentBarDelegate::displayText |
( |
const QVariant & |
, |
|
|
const QLocale & |
|
|
) |
| const |
|
inlinevirtual |
Return empty string to ensure QStyledItemDelegate::paint doesn't draw any text.
- Returns
- An empty string.
◆ paint()
| void PercentBarDelegate::paint |
( |
QPainter * |
painter, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
protected |
Renders the percentage bar using the given painter and style option.
- Parameters
-
| painter | The painter to use. |
| option | The style options for the item. |
| index | The model index of the item to paint. |
◆ sizeHint()
| QSize PercentBarDelegate::sizeHint |
( |
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
protected |
Returns the size hint for the percentage bar item.
- Parameters
-
| option | The style options for the item. |
| index | The model index of the item. |
- Returns
- The recommended size.
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/percent_bar_delegate.h
- /builds/wireshark/wireshark/ui/qt/models/percent_bar_delegate.cpp