Item delegate that renders a spark-line (miniature inline chart) for cells whose model data contains a series of numeric values.
More...
#include <sparkline_delegate.h>
|
| void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| | Renders the spark-line chart for the cell at index.
|
| |
| QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const |
| | Returns the preferred size for a spark-line cell.
|
| |
| QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| | Suppresses inline editing by returning nullptr.
|
| |
Item delegate that renders a spark-line (miniature inline chart) for cells whose model data contains a series of numeric values.
◆ SparkLineDelegate()
| SparkLineDelegate::SparkLineDelegate |
( |
QWidget * |
parent = 0 | ) |
|
|
inline |
◆ createEditor()
| QWidget * SparkLineDelegate::createEditor |
( |
QWidget * |
parent, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
protected |
Suppresses inline editing by returning nullptr.
Spark-line cells are display-only; no editor widget is created.
- Parameters
-
| parent | Unused parent widget. |
| option | Unused style option. |
| index | Unused model index. |
- Returns
- Always
nullptr.
◆ paint()
| void SparkLineDelegate::paint |
( |
QPainter * |
painter, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
protected |
Renders the spark-line chart for the cell at index.
- Parameters
-
| painter | Painter to draw with. |
| option | Style option providing geometry, palette, and state. |
| index | Model index of the cell being painted. |
◆ sizeHint()
| QSize SparkLineDelegate::sizeHint |
( |
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
protected |
Returns the preferred size for a spark-line cell.
- Parameters
-
| option | Style option providing font metrics and state. |
| index | Model index of the cell being measured. |
- Returns
- Recommended QSize for the cell.
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/models/sparkline_delegate.h
- /builds/wireshark/wireshark/ui/qt/models/sparkline_delegate.cpp