BibleTime
csearchanalysisitem.h
Go to the documentation of this file.
1/*********
2*
3* In the name of the Father, and of the Son, and of the Holy Spirit.
4*
5* This file is part of BibleTime's source code, https://bibletime.info/
6*
7* Copyright 1999-2025 by the BibleTime developers.
8* The BibleTime source code is licensed under the GNU General Public License
9* version 2.0.
10*
11**********/
12
13#pragma once
14
15#include <QGraphicsRectItem>
16
17#include <cstddef>
18#include <QPixmap>
19#include <QString>
20#include <QVector>
21#include <memory>
22
23
24class QPainter;
25class QStyleOptionGraphicsItem;
26class QWidget;
27
28namespace Search {
29
31 public:
32 CSearchAnalysisItem(QString bookname, int numModules);
33
34 auto const & bookName() const noexcept { return m_bookName; }
35 auto & counts() noexcept { return m_counts; }
36 auto const & counts() const noexcept { return m_counts; }
37
38 int width() const;
39
40 void setScaleFactor(double value) noexcept { m_scaleFactor = value; }
41
42 private:
43 void paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) override;
44
45 private: // fields:
46 double m_scaleFactor = 0.0;
47 QString const m_bookName;
48 QVector<std::size_t> m_counts;
49 std::unique_ptr<QPixmap> m_bufferPixmap;
50
51};
52
53}
std::unique_ptr< QPixmap > m_bufferPixmap
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
auto const & bookName() const noexcept
auto const & counts() const noexcept
QVector< std::size_t > m_counts
void setScaleFactor(double value) noexcept