10
10
#ifndef SEARCHCSEARCHANALYSISSCENE_H
11
11
#define SEARCHCSEARCHANALYSISSCENE_H
13
#include "csearchanalysisitem.h"
15
class CSwordModuleInfo;
18
13
#include <QGraphicsScene>
18
#include "frontend/searchdialog/analysis/csearchanalysisitem.h"
21
class CSwordModuleInfo;
25
25
class CSearchAnalysisLegendItem;
28
@author The BibleTime team <info@bibletime.info>
28
@author The BibleTime team <info@bibletime.info>
30
30
class CSearchAnalysisScene : public QGraphicsScene {
33
CSearchAnalysisScene(QObject* parent);
35
virtual ~CSearchAnalysisScene() {}
38
* Starts the analysis of the search result.
39
* This should be called only once because
40
* QCanvas handles the updates automatically.
42
void analyse(QList<CSwordModuleInfo*> modules);
44
* This function returns a color for each module
45
* @return The color at position index in the list
47
static QColor getColor(int index);
49
* This function returns a pointer to the list of AnalysisItems
51
QHash<QString, CSearchAnalysisItem*>* getSearchAnalysisItemList();
54
* resize the height of the scene
56
void resizeHeight(int height);
61
protected slots: // Protected slots
68
void setModules(QList<CSwordModuleInfo*> modules);
72
* Returns the count of the book in the module
74
unsigned int getCount( const QString book, CSwordModuleInfo* module );
76
QList<CSwordModuleInfo*> m_moduleList;
77
QHash<QString, CSearchAnalysisItem*> m_itemList;
78
QMap<CSwordModuleInfo*,unsigned int> m_lastPosList;
81
CSearchAnalysisLegendItem* m_legend;
33
CSearchAnalysisScene(QObject* parent);
35
virtual ~CSearchAnalysisScene() {}
38
* Starts the analysis of the search result.
39
* This should be called only once because
40
* QCanvas handles the updates automatically.
42
void analyse(QList<CSwordModuleInfo*> modules);
44
* This function returns a color for each module
45
* @return The color at position index in the list
47
static QColor getColor(int index);
49
* This function returns a pointer to the list of AnalysisItems
51
QHash<QString, CSearchAnalysisItem*>* getSearchAnalysisItemList();
54
* resize the height of the scene
56
void resizeHeight(int height);
61
protected slots: // Protected slots
68
void setModules(QList<CSwordModuleInfo*> modules);
72
* Returns the count of the book in the module
74
unsigned int getCount( const QString book, CSwordModuleInfo* module );
76
QList<CSwordModuleInfo*> m_moduleList;
77
QHash<QString, CSearchAnalysisItem*> m_itemList;
78
QMap<CSwordModuleInfo*, unsigned int> m_lastPosList;
81
CSearchAnalysisLegendItem* m_legend;