Falkon Develop
Cross-platform Qt-based web browser
HistoryModel Class Reference

#include <historymodel.h>

Inheritance diagram for HistoryModel:

Public Types

enum  Roles {
  IdRole = Qt::UserRole + 1 , TitleRole = Qt::UserRole + 2 , UrlRole = Qt::UserRole + 3 , UrlStringRole = Qt::UserRole + 4 ,
  IconRole = Qt::UserRole + 5 , IsTopLevelRole = Qt::UserRole + 7 , TimestampStartRole = Qt::UserRole + 8 , TimestampEndRole = Qt::UserRole + 9 ,
  MaxRole = TimestampEndRole
}
 

Public Member Functions

 HistoryModel (History *history)
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role) override
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
QModelIndex parent (const QModelIndex &child) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
bool canFetchMore (const QModelIndex &parent) const override
 
void fetchMore (const QModelIndex &parent) override
 
bool hasChildren (const QModelIndex &parent) const override
 
HistoryItemitemFromIndex (const QModelIndex &index) const
 
void removeTopLevelIndexes (const QList< QPersistentModelIndex > &indexes)
 

Detailed Description

Definition at line 32 of file historymodel.h.

Member Enumeration Documentation

◆ Roles

Enumerator
IdRole 
TitleRole 
UrlRole 
UrlStringRole 
IconRole 
IsTopLevelRole 
TimestampStartRole 
TimestampEndRole 
MaxRole 

Definition at line 36 of file historymodel.h.

Constructor & Destructor Documentation

◆ HistoryModel()

HistoryModel::HistoryModel ( History history)
explicit

Definition at line 38 of file historymodel.cpp.

Member Function Documentation

◆ canFetchMore()

bool HistoryModel::canFetchMore ( const QModelIndex &  parent) const
override

Definition at line 275 of file historymodel.cpp.

◆ columnCount()

int HistoryModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 207 of file historymodel.cpp.

◆ data()

QVariant HistoryModel::data ( const QModelIndex &  index,
int  role 
) const
override

Definition at line 70 of file historymodel.cpp.

◆ fetchMore()

void HistoryModel::fetchMore ( const QModelIndex &  parent)
override

Definition at line 282 of file historymodel.cpp.

◆ flags()

Qt::ItemFlags HistoryModel::flags ( const QModelIndex &  index) const
override

Definition at line 187 of file historymodel.cpp.

◆ hasChildren()

bool HistoryModel::hasChildren ( const QModelIndex &  parent) const
override

Definition at line 214 of file historymodel.cpp.

◆ headerData()

QVariant HistoryModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
override

Definition at line 52 of file historymodel.cpp.

◆ index()

QModelIndex HistoryModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
override

Definition at line 159 of file historymodel.cpp.

◆ itemFromIndex()

HistoryItem * HistoryModel::itemFromIndex ( const QModelIndex &  index) const

Definition at line 225 of file historymodel.cpp.

◆ parent()

QModelIndex HistoryModel::parent ( const QModelIndex &  child) const
override

Definition at line 171 of file historymodel.cpp.

◆ removeTopLevelIndexes()

void HistoryModel::removeTopLevelIndexes ( const QList< QPersistentModelIndex > &  indexes)

Definition at line 238 of file historymodel.cpp.

◆ rowCount()

int HistoryModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 196 of file historymodel.cpp.

◆ setData()

bool HistoryModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
)
override

Definition at line 142 of file historymodel.cpp.


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