30 #include <QObjectCleanupHandler> 150 Q_INVOKABLE
bool hasSearch(const QString& searchPhrase,
int searchType, QList<
int> searchRoles);
174 Q_INVOKABLE QObject*
getSearch(const QString& searchPhrase,
int searchType, QList<
int> searchRoles);
221 void loadComplete(QObject* viewport, QString errorMsg);
270 void openLogFile(
const QString& filePath);
291 void onBackgroundLoadIndexComplete(
294 QVariantMap contextMap);
302 void openFile(
const QString& filePath);
373 bool updateLogmark(
const QObject* logMark,
const QString& name = QString());
443 QMap<qint64, QStringList>
getBookmarkSet(qint64 firstID, qint64 lastID);
493 int getMarkTypes(qint64 recordID);
503 QList<QObject*> getMarks(qint64 recordID,
int markTypes);
590 #endif // ZLOGREADER_H Q_INVOKABLE QObject * getSearchModel()
Obtain a pointer to the data model containing search objects for this log file.
QMap< qint64, QStringList > zMarkSet
virtual ~ZLogReader()
Virtual object destructor.
QObject * getBookmark(const QString &name)
Obtains the bookmark or searchmark with the given name.
static void registerType()
Registers ZLogReader as a QML type.
bool deleteBookmark(const QString &name)
Remove the specified bookmark or searchmark by name.
#define ZBL_DECLARE_LOGGED_OBJECT
void openFile(const QString &filePath)
Opens the log file in a background thread concurrently but does not load it. Sends the openComplete s...
This class performs log file I/O operations and JSON parsing in a background thread on behalf of a ZL...
ZLogBookmark::zLogBookmarkList m_bookmarks
A central repository for log file marks. This is the definitive mark list for the log file...
bool setLogmapParameters(const QObject *parameters, const QString &name)
Updates the specified logmark parameters (note, search type) for the bookmark with the specified name...
A QML type that manages reading JSON formatted Zuble log files. QML programs create using Zbl...
ZblLogReader * getBackgroundReader()
Obtains a pointer to the background reader object that services this log file.
ZLogReader(QObject *parent=0)
Object constructor.
QMap< qint64, QStringList > getBookmarkSet(qint64 firstID, qint64 lastID)
Returns a map containing log mark information for the specified set of log records.
ZBL_DECLARE_LOGGED_OBJECT ZblLogReader * m_reader
A log reader worker object to perform log file input and parsing operations in a background thread...
void onBackgroundOpenComplete(bool success, QString errorMsg, QVariantMap contextMap)
Called by the background thread when file has been opened.
void closeAlert()
Sent when the close() function has been called.
void bookmarksUpdated()
Sent when the master log mark database has been updated.
bool m_ready
true when when log file is opened and ready to be used, false otherwise.
Q_INVOKABLE zblLogSearchPtr getZSearch(const QString &searchPhrase, int searchType, QList< int > searchRoles)
Obtains or creates a search mark with the given search parameters.
bool getReady()
Obtains the state of the ready flag..
void notifyFileSize(qint64 fileSize)
Periodically signals the current log file size.
QObject * newBookmark(const QString &name)
Creates a new ZLogBookmark object and returns it.
QObject * newViewport()
Obtains a new empty foreground ZLogViewport object on the log file.
void appendSearchModel(zblLogSearchPtr search)
bool hasSearchMap(const QString &searchName)
QStringList getBookmarkNames(qint64 recordID)
Obtains a list of bookmark names for the specified log record.
void releaseSearchReferences(QString searchObjectName)
Sent when a request to delete a ZLogSearch object has been received.
bool ready
true when the log file is opened and ready to be used, false otherwise
This two dimensional table model is used to store and manipulate data.
QSharedPointer< ZblLogSearch > zblLogSearchPtr
Q_INVOKABLE QObject * getSearch(const QString &searchPhrase, int searchType, QList< int > searchRoles)
Obtains or creates the searchmark with the given search parameters.
void removeSearchModel(ZblLogSearch *search)
void close()
Close the log file input object and release resources.
Q_INVOKABLE bool hasSearch(const QString &searchPhrase, int searchType, QList< int > searchRoles)
Determine if a specific search object exists.
QString filePath
Path to the log file being read by this object.
void searchCreated(QObject *searchObject)
Sent when a new search object has been created.
bool hasBookmark(const QString &name)
QString m_filePath
Path to log file being read.
QString getFilePath()
Obtains the path to the log file.
ZTableModel * m_model
A data model used to display search objects.
QMap< QString, QWeakPointer< ZblLogSearch > > m_searchmarks
A central repository for log file marks. This is the definitive mark list for the log file...
This object encapsulates search operation parameters, results, and steady state.
QMap< qint64, QStringList > getSearchmarkSet(qint64 firstID, qint64 lastID)
Returns a map containing log mark information for the specified set of log records.
bool deleteSearch(QObject *search)
Remove the specified search object from the search map and model.
void openComplete(QString filePath, bool success, QString errorMsg)
Sent when an openFile() operation has completed;.
QList< ZLogBookmark * > zLogBookmarkList