BibleTime
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Search::CSearchAnalysisItem Class Reference

#include <csearchanalysisitem.h>

Inheritance diagram for Search::CSearchAnalysisItem:

Public Member Functions

auto const & bookName () const noexcept
 
auto const & counts () const noexcept
 
auto & counts () noexcept
 
 CSearchAnalysisItem (QString bookname, int numModules)
 
void setScaleFactor (double value) noexcept
 
int width () const
 

Private Member Functions

void paint (QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
 

Private Attributes

QString const m_bookName
 
std::unique_ptr< QPixmap > m_bufferPixmap
 
QVector< std::size_t > m_counts
 
double m_scaleFactor = 0.0
 

Detailed Description

Definition at line 30 of file csearchanalysisitem.h.

Constructor & Destructor Documentation

◆ CSearchAnalysisItem()

Search::CSearchAnalysisItem::CSearchAnalysisItem ( QString  bookname,
int  numModules 
)

Definition at line 36 of file csearchanalysisitem.cpp.

Member Function Documentation

◆ bookName()

auto const& Search::CSearchAnalysisItem::bookName ( ) const
inlinenoexcept

Definition at line 34 of file csearchanalysisitem.h.

References m_bookName.

◆ counts() [1/2]

auto const& Search::CSearchAnalysisItem::counts ( ) const
inlinenoexcept

Definition at line 36 of file csearchanalysisitem.h.

References m_counts.

◆ counts() [2/2]

auto& Search::CSearchAnalysisItem::counts ( )
inlinenoexcept

Definition at line 35 of file csearchanalysisitem.h.

References m_counts.

Referenced by Search::CSearchAnalysisScene::CSearchAnalysisScene().

◆ paint()

void Search::CSearchAnalysisItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  ,
QWidget  
)
overrideprivate

Reimplementation. Draws the content of this item.

We have to paint so many bars as we have modules available (we use moduleCount) We paint inside the area which is given by height and width of this rectangle item

Definition at line 42 of file csearchanalysisitem.cpp.

References Search::BAR_DELTAX, Search::BAR_DELTAY, Search::BAR_LOWER_BORDER, Search::BAR_WIDTH, Search::CSearchAnalysisScene::getColor(), Search::ITEM_TEXT_SIZE, m_bookName, m_bufferPixmap, m_counts, m_scaleFactor, r(), S, and width().

◆ setScaleFactor()

void Search::CSearchAnalysisItem::setScaleFactor ( double  value)
inlinenoexcept

Definition at line 40 of file csearchanalysisitem.h.

References m_scaleFactor.

◆ width()

int Search::CSearchAnalysisItem::width ( ) const

Returns the width of this item.

Definition at line 101 of file csearchanalysisitem.cpp.

References Search::BAR_DELTAX, Search::BAR_WIDTH, and m_counts.

Referenced by paint().

Member Data Documentation

◆ m_bookName

QString const Search::CSearchAnalysisItem::m_bookName
private

Definition at line 47 of file csearchanalysisitem.h.

Referenced by bookName(), and paint().

◆ m_bufferPixmap

std::unique_ptr<QPixmap> Search::CSearchAnalysisItem::m_bufferPixmap
private

Definition at line 49 of file csearchanalysisitem.h.

Referenced by paint().

◆ m_counts

QVector<std::size_t> Search::CSearchAnalysisItem::m_counts
private

Definition at line 48 of file csearchanalysisitem.h.

Referenced by counts(), paint(), and width().

◆ m_scaleFactor

double Search::CSearchAnalysisItem::m_scaleFactor = 0.0
private

Definition at line 46 of file csearchanalysisitem.h.

Referenced by paint(), and setScaleFactor().


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