WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. Zuble QML Types   |  Zuble C++ Classes   |  Zuble Overview
Zuble  0.1
Zuble Framework C++/QML extension API
Public Slots | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
Zbl::ZLogReclinkModel Class Reference

A data model containing a list of log record links. This is used for displaying a ZLogMap object. More...

#include <ZLogReclinkModel.h>

Inheritance diagram for Zbl::ZLogReclinkModel:
Inheritance graph
[legend]
Collaboration diagram for Zbl::ZLogReclinkModel:
Collaboration graph
[legend]

Public Slots

QVariant getData (int index, int role)
 
QVariantMap roleMap () const
 
QVariant getValue (int role, int row)
 Obtains the value of the specified data cell. More...
 
QVariant getValue (int role, int row, int column)
 Obtains the value of the specified data cell. More...
 
void invalidateModel ()
 Sends begin and end reset signals to the model forcing views to refetch data from the entire model. More...
 

Public Member Functions

 ZLogReclinkModel (QSharedPointer< ZblLogReclinkData > data, QObject *parent=0)
 
virtual ~ZLogReclinkModel ()
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 Obtains the embedded data model. More...
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 QAbstractTableModel override. More...
 
virtual QHash< int, QByteArray > roleNames () const
 QAbstractTableModel override. More...
 

Static Public Member Functions

static void registerLoggedObject ()
 

Private Attributes

QSharedPointer< ZblLogReclinkDatam_d
 

Static Private Attributes

static bool m_initialized = false
 Used to optimize logging initializer. More...
 

Detailed Description

A data model containing a list of log record links. This is used for displaying a ZLogMap object.

ZLogReclinkModel encapsulates a data model representing the log record links in a ZLogMap object. ZLogMap objects contain compressed log links where consecutive log records are represented as a single data item to reduce the size of ZLogMap objects in memory. ZLogReclinkModel expands the compressed links from ZLogMap into one item per log record for display purposes.

Each ZLogReclinkModel object is synchronized with its source search or bookmark so that changes to the source are propagated to the data model automatically. The data model encapsulated by ZLogReclinkModel objects is implicitly shared. When all references to the shared, synchronized data model are gone it is automatically destroyed.

Definition at line 31 of file ZLogReclinkModel.h.

Constructor & Destructor Documentation

◆ ZLogReclinkModel()

Zbl::ZLogReclinkModel::ZLogReclinkModel ( QSharedPointer< ZblLogReclinkData data,
QObject *  parent = 0 
)
explicit

Definition at line 14 of file ZLogReclinkModel.cpp.

◆ ~ZLogReclinkModel()

Zbl::ZLogReclinkModel::~ZLogReclinkModel ( )
virtual

Definition at line 24 of file ZLogReclinkModel.cpp.

Member Function Documentation

◆ data()

QVariant Zbl::ZLogReclinkModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual

Obtains the embedded data model.

Returns
QAbstractTableModel override

Definition at line 93 of file ZLogReclinkModel.cpp.

Referenced by ZLogReclinkModel().

◆ getData

QVariant Zbl::ZLogReclinkModel::getData ( int  index,
int  role 
)
slot

Definition at line 135 of file ZLogReclinkModel.cpp.

◆ getValue [1/2]

QVariant Zbl::ZLogReclinkModel::getValue ( int  role,
int  row 
)
slot

Obtains the value of the specified data cell.

Parameters
rolethe role whose value to return
rowthe cell's zero-based row number
Returns
the value stored in the specified cell

Definition at line 182 of file ZLogReclinkModel.cpp.

Referenced by getValue().

◆ getValue [2/2]

QVariant Zbl::ZLogReclinkModel::getValue ( int  role,
int  row,
int  column 
)
slot

Obtains the value of the specified data cell.

This method is provided for compatibility with ZTableModel. It ignores the third dimension parameter 'column'.

Parameters
rolethe role whose value to return
rowthe cell's zero-based row number
columnthis parameter is ignored
Returns
the value stored in the specified cell

Definition at line 210 of file ZLogReclinkModel.cpp.

◆ invalidateModel

void Zbl::ZLogReclinkModel::invalidateModel ( )
slot

Sends begin and end reset signals to the model forcing views to refetch data from the entire model.

Definition at line 240 of file ZLogReclinkModel.cpp.

◆ registerLoggedObject()

void Zbl::ZLogReclinkModel::registerLoggedObject ( )
static

Definition at line 31 of file ZLogReclinkModel.cpp.

Referenced by ZLogReclinkModel().

◆ roleMap

QVariantMap Zbl::ZLogReclinkModel::roleMap ( ) const
slot

Definition at line 148 of file ZLogReclinkModel.cpp.

◆ roleNames()

QHash< int, QByteArray > Zbl::ZLogReclinkModel::roleNames ( ) const
virtual

QAbstractTableModel override.

Definition at line 124 of file ZLogReclinkModel.cpp.

Referenced by roleMap().

◆ rowCount()

int Zbl::ZLogReclinkModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

QAbstractTableModel override.

Definition at line 74 of file ZLogReclinkModel.cpp.

Referenced by data().

Member Data Documentation

◆ m_d

QSharedPointer<ZblLogReclinkData> Zbl::ZLogReclinkModel::m_d
private

Definition at line 142 of file ZLogReclinkModel.h.

Referenced by data(), getData(), getValue(), roleNames(), rowCount(), and ZLogReclinkModel().

◆ m_initialized

bool Zbl::ZLogReclinkModel::m_initialized = false
staticprivate

Used to optimize logging initializer.

Definition at line 148 of file ZLogReclinkModel.h.

Referenced by registerLoggedObject().


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