v2.0.0
Loading...
Searching...
No Matches
DISPLIB::FrequencySpectrumDelegate Class Reference

QAbstractItemDelegate painting one SpectrumView row as a horizontal frequency band. More...

#include <frequencyspectrumdelegate.h>

Public Member Functions

 FrequencySpectrumDelegate (QTableView *m_pTableView, QObject *parent=0)
void setScaleType (qint8 ScaleType)
virtual void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
virtual QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const
void rcvMouseLoc (int row, int x, int y, QRect visRect)

Detailed Description

QAbstractItemDelegate painting one SpectrumView row as a horizontal frequency band.

Maps the per-row FFT amplitudes through a Hot / Jet colour table and draws the resulting pixel strip plus the lower / upper frequency cursors during paint().

Definition at line 69 of file frequencyspectrumdelegate.h.

Inheritance diagram for DISPLIB::FrequencySpectrumDelegate:
Inheritance graph

Constructor & Destructor Documentation

◆ FrequencySpectrumDelegate()

FrequencySpectrumDelegate::FrequencySpectrumDelegate ( QTableView * m_pTableView,
QObject * parent = 0 )

Creates a new abstract item delegate with the given parent.

Parameters
[in]parentParent of the delegate.

Definition at line 44 of file frequencyspectrumdelegate.cpp.

Member Function Documentation

◆ paint()

void FrequencySpectrumDelegate::paint ( QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
virtual

Use the painter and style option to render the item specified by the item index.

(sizeHint() must be implemented also)

Parameters
[in]painterLow-level painting on widgets and other paint devices.
[in]optionDescribes the parameters used to draw an item in a view widget.
[in]indexUsed to locate data in a data model.

Definition at line 67 of file frequencyspectrumdelegate.cpp.

◆ rcvMouseLoc()

void FrequencySpectrumDelegate::rcvMouseLoc ( int row,
int x,
int y,
QRect visRect )

Receive Mouse location

Parameters
[in]rowThe select row of tableview.
[in]xmouse x pos.
[in]ymouse y pos.
[in]visRectvisual rect of row_tableview.

Definition at line 173 of file frequencyspectrumdelegate.cpp.

◆ setScaleType()

void FrequencySpectrumDelegate::setScaleType ( qint8 ScaleType)

Set scale type.

Parameters
[in]ScaleType.

Definition at line 60 of file frequencyspectrumdelegate.cpp.

◆ sizeHint()

QSize FrequencySpectrumDelegate::sizeHint ( const QStyleOptionViewItem & option,
const QModelIndex & index ) const
virtual

Item size

Parameters
[in]optionDescribes the parameters used to draw an item in a view widget.
[in]indexUsed to locate data in a data model.

Definition at line 151 of file frequencyspectrumdelegate.cpp.


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