18 zCritical() <<
"Programming error: reader parameter must be non-null!";
26 zCritical() <<
"Programming error: reader parameter must be a pointer to a ZLogReader object!";
36 qmlRegisterUncreatableType<ZLogMap>
37 (
"org.zuble.qml", 1, 0,
"ZLogMap",
38 "Use ZLogViewport or ZLogReader to create ZLogMap objects.");
82 QObject* ZLogMap::getMarkModel()
86 createMapModel(model);
88 QMap<qint64, MarkNode>::const_iterator it =
m_map.begin();
92 while(it !=
m_map.end())
96 data.append(it->m_recordID);
98 data.append(it->m_seekPos);
113 bool ZLogMap::initializeFromModel(QObject* mapModel)
120 zWarning() <<
"Programming error: You must pass a ZTableModel " 121 "object to this method.";
133 for(
int row=0; row < rowCount; row++)
139 m_map.insert(firstID, MarkNode(firstID, lastID, seekPos));
151 zDebug() <<
"Insert mark, recordID: " << recordID
152 <<
", lastRecordID: " << lastRecordID
153 <<
", seekPosition: " << seekPosition;
173 zDebug() <<
"Remove mark, recordID: " << recordID
174 <<
", lastRecordID: " << lastRecordID;
bool hasMark(qint64 recordID)
Determine if the log map contains a mark for the specified log record.
Q_INVOKABLE void appendCells(QVariant data, bool truncateModel=false)
Asynchronously converts an array of cell data into one or more rows of model data and appends it to t...
MarkType getMapType()
returns this log map's mark type
bool clear()
Removes all marks from the log map.
A QML type that manages reading JSON formatted Zuble log files. QML programs create using Zbl...
ZLogReader * getZReader() const
Returns the foreground log file reader object for this search.
void insertMark(qint64 recordID, qint64 lastRecordID, qint64 seekPosition)
Creates a new log mark in the database.
Maintains a list of log record links pertaining to a specific log file.
bool removeMark(qint64 recordID, qint64 lastRecordID)
Removes the specified mark from the log map.
#define ZBL_REGISTER_LOGGED_OBJECT
bool hasMark(qint64 recordID)
Determine if the log map contains a mark for the specified log record.
Q_INVOKABLE QVariant getValue(int role, int row)
Obtains the value of the specified data cell.
ZLogReader * m_reader
The log file reader that created this search object.
static void registerType()
Registers ZLogMap as a QML type.
#define ZBL_DEFINE_LOGGED_OBJECT(class_name)
void clear()
Removes all marks from the log map.
This two dimensional table model is used to store and manipulate data.
MarkType
Types of log maps: Invalid, Selection, Search, Bookmark.
bool removeMark(qint64 recordID, qint64 lastRecordID)
Removes the specified mark from the log map.
Q_INVOKABLE void clearRoles()
Removes all roles, role names and data from the model.
ZBL_DECLARE_LOGGED_OBJECT ZblLogMap m_map
Create the m_tag object that presents a Javascript interface to constant integer values.
virtual int logMapType()
Returns log map type. Subclasses override this to return their map type.
void selectionUpdated()
Sent whenever the ZLogMap state has been changed.
bool insertMark(qint64 recordID, qint64 lastRecordID, qint64 seekPosition)
Creates a new log mark in the database.
Q_INVOKABLE void setColumnCount(int count)
Sets the number of columns the table will contain. This method may block the current thread...
Q_INVOKABLE int modelRowCount() const
Returns the number of rows in the data set. This method may block the current thread.
Q_INVOKABLE QObject * getReader() const
Returns the foreground log file reader object for this log map.
qint64 findNextMark(qint64 startID, bool forward=true) const
Search forward or backward for the next mark from a specified starting position.
Q_INVOKABLE bool addRole(int roleNumber)
Adds the specified role to the data model. This method may block the current thread.
qint64 findNextMark(qint64 startID, bool forward=true) const
Search forward or backward for the next mark from a specified starting position.
QList< QVariant > ZDataRow
Represents a single row (or column for column headers) of data cell values for a single role...