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
|
Performs log file searches in a background thread. More...
#include <ZblLogBkSearch.h>
Public Slots | |
void | markupViewport (QObject *viewport) |
Updates the markup column (1) of the specified viewport's data model by scanning the data column (0) of the model, applying this object's search criteria. More... | |
void | markupViewport (QObject *viewport, ZblLogSearchParams params) |
Updates the markup column (1) of the specified viewport's data model by scanning the data column (0) of the model, applying the specified search criteria. More... | |
void | markupViewport (QObject *viewport, ZblLogSearchParams *params) |
Updates the markup column (1) of the specified viewport's data model by scanning the data column (0) of the model, applying the specified search criteria. More... | |
void | startSearch () |
Starts a text search of the log file for log records that satisfiy the search criteria. Search direction can be forward or backward or both. More... | |
void | scanForward () |
Scans a viewport for strings matching the search parameters. More... | |
void | onLoadComplete (bool eof, QString errorMsg, QVariantMap context) |
Called when the forward scanning viewport has been loaded and is ready. More... | |
void | onMoveComplete (qint64 rowsFound, qint64 rowsStored, bool endOfData, QString errorMsg) |
Called when the backward scanning viewport has been moved and is ready. More... | |
Signals | |
void | searchRowsMatched (ZblLogSearchList rowsFound) |
Sent when log records matching the search criteria have been located. More... | |
void | searchRowsScanned (qint64 firstID, qint64 lastID) |
Sent when log records have been scanned for matching text. More... | |
void | markupUpdated (ZLogViewport *viewport, ZblLogSearchList rowsFound) |
Sent when a viewport's markeup data (model column 1) has been updated. More... | |
Public Member Functions | |
ZblLogBkSearch (qint64 startPosition, ZblLogSearchParams params, ZblLogReader *reader) | |
Constructs a ZblLogBkSearch object. More... | |
~ZblLogBkSearch () | |
destructor More... | |
Static Public Member Functions | |
static void | zInit () |
Initializes search engine. Must be called only once before calling newLogSearcher() the first time. More... | |
static ZblLogBkSearch * | newLogSearcher () |
Constructs a ZblLogBkSearch object and moves it to the search thread. More... | |
Protected Attributes | |
ZBL_DECLARE_LOGGED_OBJECT ZblLogSearchParams | m_params |
Search parameters for this search object. More... | |
ZblLogReader * | m_reader |
Background log reader object. More... | |
ZLogViewport * | m_vpUp |
A viewport for scanning the file in the reverse direction. More... | |
ZLogViewport * | m_vpDown |
A viewport for scanning the file in the forward direction. More... | |
qint64 | m_startPosition |
The starting file position of the search;. More... | |
qint64 | m_upPosition |
The current file position of the reverse scan;. More... | |
qint64 | m_downPosition |
The current file position of the forward scan;. More... | |
Performs log file searches in a background thread.
Definition at line 23 of file ZblLogBkSearch.h.
|
explicit |
Constructs a ZblLogBkSearch object.
parent | optional parent of the object |
Definition at line 17 of file ZblLogBkSearch.cpp.
Zbl::ZblLogBkSearch::~ZblLogBkSearch | ( | ) |
destructor
Definition at line 38 of file ZblLogBkSearch.cpp.
|
signal |
Sent when a viewport's markeup data (model column 1) has been updated.
viewport | the viewport whose data model was updated |
rowsFound | A list of links to records in the viewport that matched the search criteria |
Referenced by Zbl::ZLogViewport::markupText(), markupViewport(), and Zbl::ZLogViewport::setCurrentSearch().
|
slot |
Updates the markup column (1) of the specified viewport's data model by scanning the data column (0) of the model, applying this object's search criteria.
Previous contents of data model markup column are overwritten.
viewport | The log file viewport on which to begin the search. |
Definition at line 54 of file ZblLogBkSearch.cpp.
Referenced by markupViewport().
|
slot |
Updates the markup column (1) of the specified viewport's data model by scanning the data column (0) of the model, applying the specified search criteria.
If the params object is invalid the search parameters for this object are used. Previous contents of data model markup column are overwritten.
viewport | The log file viewport on which to begin the search. |
params | A ZblSearchParams object containing search parameters to use for markup |
Definition at line 59 of file ZblLogBkSearch.cpp.
|
slot |
Updates the markup column (1) of the specified viewport's data model by scanning the data column (0) of the model, applying the specified search criteria.
If the params object is invalid the search parameters for this object are used. Previous contents of data model markup column are overwritten.
viewport | The log file viewport on which to begin the search. |
params | A pointer to a ZblSearchParams object containing search parameters to use for markup |
Definition at line 64 of file ZblLogBkSearch.cpp.
|
static |
Constructs a ZblLogBkSearch object and moves it to the search thread.
Definition at line 212 of file ZblLogBkSearch.cpp.
|
slot |
Called when the forward scanning viewport has been loaded and is ready.
eof | true if end of file was reached during load |
errorMsg | Reports any error encountered |
contextMap | An opaque QVariantMap object |
Definition at line 141 of file ZblLogBkSearch.cpp.
Referenced by ZblLogBkSearch().
|
slot |
Called when the backward scanning viewport has been moved and is ready.
rowsFound | The number of rows that were encountered in the file |
rowsStored | The number of rows that were stored in the viewport's data model |
endOfData | True if end of data was encountered during the move operation |
errorMsg | A message indicating errors that were encountered. An empty string if no errors were encountered. |
Definition at line 183 of file ZblLogBkSearch.cpp.
Referenced by ZblLogBkSearch().
|
slot |
Scans a viewport for strings matching the search parameters.
Definition at line 116 of file ZblLogBkSearch.cpp.
|
signal |
Sent when log records matching the search criteria have been located.
searchList | A list of rows that matched the search parameters. |
Referenced by Zbl::ZblLogSearch::ZblLogSearch().
|
signal |
Sent when log records have been scanned for matching text.
This allows a progress indicator to be displayed.
searchList | A list of rows that matched the search parameters. |
|
slot |
Starts a text search of the log file for log records that satisfiy the search criteria. Search direction can be forward or backward or both.
Definition at line 93 of file ZblLogBkSearch.cpp.
|
static |
Initializes search engine. Must be called only once before calling newLogSearcher() the first time.
Definition at line 45 of file ZblLogBkSearch.cpp.
Referenced by Zbl::ZLogReader::registerType().
|
protected |
The current file position of the forward scan;.
Definition at line 288 of file ZblLogBkSearch.h.
Referenced by onLoadComplete(), and scanForward().
|
protected |
Search parameters for this search object.
Definition at line 254 of file ZblLogBkSearch.h.
Referenced by markupViewport(), onLoadComplete(), and scanForward().
|
protected |
Background log reader object.
Definition at line 260 of file ZblLogBkSearch.h.
Referenced by scanForward().
|
protected |
The starting file position of the search;.
Definition at line 276 of file ZblLogBkSearch.h.
|
protected |
The current file position of the reverse scan;.
Definition at line 282 of file ZblLogBkSearch.h.
Referenced by startSearch().
|
protected |
A viewport for scanning the file in the forward direction.
Definition at line 270 of file ZblLogBkSearch.h.
Referenced by onLoadComplete(), and scanForward().
|
protected |
A viewport for scanning the file in the reverse direction.
Definition at line 265 of file ZblLogBkSearch.h.
Zuble documentation copyright © 2019 Bob Dinitto. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Zuble is a derivative work of Qt version 5. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.