#include <kwicmodels.h>
Inherits QAbstractTableModel.
Inheritance diagram for KwicTableModel:


Public Member Functions | |
| KwicTableModel (QObject *parent, PhraseHunter::ContextReader *reader) | |
| ~KwicTableModel () | |
| void | setData (PhraseHunter::TokenPtr token) |
| void | setData (const PhraseHunter::TokenVector &token) |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| QVariant | headerData (int, Qt::Orientation, int) const |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| QVariant | getContextString (PhraseHunter::TokenContextPtr, const QModelIndex &) const |
| PhraseHunter::TokenContextPtr | getContext (const QModelIndex &index) const |
| void | setContextWidth (unsigned int width) |
Private Attributes | |
| PhraseHunter::ContextReader * | m_reader |
| std::vector< PhraseHunter::TokenContextPtr > | entries |
| unsigned int | m_width |
Definition at line 30 of file kwicmodels.h.
| KwicTableModel::KwicTableModel | ( | QObject * | parent, | |
| PhraseHunter::ContextReader * | reader | |||
| ) |
Definition at line 49 of file kwicmodels.cpp.
| KwicTableModel::~KwicTableModel | ( | ) | [inline] |
Definition at line 34 of file kwicmodels.h.
| void KwicTableModel::setData | ( | PhraseHunter::TokenPtr | token | ) |
Definition at line 116 of file kwicmodels.cpp.
References addAllOccurrences(), and entries.
Referenced by SearchTab::search().
| void KwicTableModel::setData | ( | const PhraseHunter::TokenVector & | token | ) |
| int KwicTableModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
Definition at line 75 of file kwicmodels.cpp.
| int KwicTableModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
| QVariant KwicTableModel::headerData | ( | int | , | |
| Qt::Orientation | , | |||
| int | ||||
| ) | const |
Definition at line 54 of file kwicmodels.cpp.
| QVariant KwicTableModel::data | ( | const QModelIndex & | index, | |
| int | role = Qt::DisplayRole | |||
| ) | const |
| QVariant KwicTableModel::getContextString | ( | PhraseHunter::TokenContextPtr | , | |
| const QModelIndex & | ||||
| ) | const |
Definition at line 85 of file kwicmodels.cpp.
References PhraseHunter::ContextReader::fillContext(), icuToQString(), m_reader, and m_width.
Referenced by data().
| PhraseHunter::TokenContextPtr KwicTableModel::getContext | ( | const QModelIndex & | index | ) | const [inline] |
Definition at line 46 of file kwicmodels.h.
References entries.
Referenced by SearchTab::emitDocumentRequested().
| void KwicTableModel::setContextWidth | ( | unsigned int | width | ) | [inline] |
Definition at line 53 of file kwicmodels.h.
References m_width.
Referenced by SearchTab::enableSearch(), and SearchTab::setContextWidth().
std::vector<PhraseHunter::TokenContextPtr> KwicTableModel::entries [private] |
Definition at line 61 of file kwicmodels.h.
Referenced by data(), getContext(), rowCount(), and setData().
unsigned int KwicTableModel::m_width [private] |
Definition at line 63 of file kwicmodels.h.
Referenced by getContextString(), and setContextWidth().
1.5.1