12 class ZblLogReclinkData;
15 class ZblLogSearchParams;
72 const QString& searchPhrase,
74 QList<int> searchRoles,
75 ZblLogSearch::TextSearchDirections directions,
92 Q_PROPERTY(QString searchPhrase READ
getPhrase)
215 static QString
getSearchmarkName(QString searchPhrase,
int searchType, QList<int> searchRoles);
284 void searchRowMatched(
287 QList<int> modelRoles);
312 QList<int> modelRoles);
347 bool isSearch(
const QString& searchPhrase,
int searchType, QList<int> searchRoles)
const;
540 int appendModelRoles(
ZTableModel* model,
int nextRole);
548 void appendModelData(
549 const MarkNode& logMark,
686 #endif // ZBLLOGSEARCH_H searchState getSearchState() const
QObject * linkModel()
Obtain a list model containing an item for each log record represented in the ZLogSearchMark's result...
void notifyActive(bool newValue)
ZLogMap m_searchArea
Links in this map represent areas of the log file that have already been searched.
Encapsulates information necessary to locate a collection of log records in a log file...
TextSearchDirections getSearchDirections() const
void notifySearchBackward(bool newValue)
void addSearchRole(int roleNumber)
Adds the specified role to the set of roles that will be scanned during a text search.
textSearchType m_searchType
The type of search: case sensitive/insensitive or regular expression.
void resume()
Resume the background search operation.
QList< int > getSearchRoles() const
Returns the set of roles in the log file data model that will be scanned by the text search engine wh...
bool search(int direction, qint64 startPos)
Scans the log file for text matching the current search criteria.
void onSearchRowsMatched(ZblLogSearchList rowsFound)
Called when the search engine has found target records in the log file.
ZblLogBkSearch * getSearcher()
Obtain the background searcher object associated with this search.
bool m_saved
True is search is saved, false if unsaved.
A QML type that manages reading JSON formatted Zuble log files. QML programs create using Zbl...
void clearRolesFound()
Removes all roles from the set of search result roles.
qint64 m_endSize
The file size at the successful conclusion of the search operation.
void pause()
Pause the background search operation.
void clearSearchRoles()
Removes all roles from the set of search result roles.
bool isSearch(const QString &searchPhrase, int searchType, QList< int > searchRoles) const
Determines if this object contains results from searching for the specified search phrase and type...
bool getSearchBackward() const
int getSearchType() const
void onSearchRowMatched(qint64 recordID, qint64 seekPosition, QList< int > modelRoles)
Called when the search engine has found a target record in the log file.
This class allows Zuble log file viewer text search operations to pass parameters between threads...
Maintains a list of log record links pertaining to a specific log file.
void setSearchDirections(ZblLogSearch::TextSearchDirections directions)
void invalidate()
Sent when a request to delete this object requires all references to be released. ...
bool m_active
True if search is active, false if inactive.
void abort()
Resume the background search operation.
ZblLogSearchParams getSearchParameters()
Obtain parameters for this search.
static QThread * m_searcherThread
A single background thread services all ZblLogBkSearch objects.
QWeakPointer< ZblLogReclinkData > m_linkModel
A log record link data model that is shared by all ZLogReclinkModel objects created by this ZlogSearc...
static QString getSearchmarkName(QString searchPhrase, int searchType, QList< int > searchRoles)
Creates a unique name string for a given set of search parameters.
bool containsSearchRoles(QList< int > searchRoles) const
Determine if the set of roles to scan when processing this searchmark contains the specified roles...
TextSearchDirection
Specify search direction from initial log file position at start of search.
virtual int logMapType()
Returns log map type. Override of ZLogBookmark::logMapType().
void populateLinkModel(ZblLogReclinkData &linkModel)
Creates an expanded data model of this ZLogSearch object's log record links in the specified object...
void onLinkTextComplete(QVariant linkList)
Called by ZblLogReader when loadRecordLinkMessageText has completed.
ZLogReader * m_reader
The log file reader that created this search object.
bool equalsSearchRoles(QList< int > searchRoles) const
Determine if the set of roles to scan when processing this searchmark contains exactly the specified ...
Performs log file searches in a background thread.
void setSearchForward(bool forward)
void setSearchBackward(bool backward)
void addRolesFound(QList< int > rolesFound)
Adds the specified roles to the set of roles where search results were found.
void addSearchRoles(QList< int > rolesToSearch)
Adds the specified roles to the set of roles that will be scanned during a text search.
ZblLogSearch(const QString &searchPhrase, int searchType, QList< int > searchRoles, ZblLogSearch::TextSearchDirections directions, qint64 startPosition, ZLogReader *reader)
QSet< int > m_rolesSearched
The log record rolls that are searched.
void notifyCompletionFileSize(qint64 newValue)
Explicitly shared data object encapsulates a list of log record links.
QString getPhrase() const
This two dimensional table model is used to store and manipulate data.
textSearchType
Specifies search case sensitivity.
QSharedPointer< ZblLogSearch > zblLogSearchPtr
bool isNull()
Determine if this search is null.
bool validateReader(ZLogReader *reader)
Determine if the specified background file reader is connected to this search object.
bool getSearchForward() const
static void dismiss(QObject *search)
QSharedPointer deleter method called when last strong reference has gone out of scope; sends detach()...
void notifySaved(bool newValue)
qint64 m_startPosition
File seek position of the log record from which to start the search operation.
QSet< int > m_rolesFound
The roles in which a search result was found.
searchState
States of a search.
TextSearchDirections m_searchDirection
Specifies direction of search from active viewport location.
QList< int > getRolesFound() const
Returns the set of roles for which search results were found.
searchState m_searchState
Tracks the state of a search operation.
qint64 getCompletionFileSize() const
This class allows Zuble log file viewer text search operations to pass search results between threads...
ZblLogBkSearch * m_searcher
A background searcher object to service foreground log file search requests.
void notifySearchForward(bool newValue)
static void zInit()
Initializes search engine. Must be called only once before constructing the first ZblLogSearch object...
void addRoleFound(int roleNumber)
Adds the specified role to the set of roles where search results were found.
void notifySearchState(int newValue)
static QString getSearchRolesName(QList< int > searchRoles)
Returns a name concatenated from the specified search role list.
This object encapsulates search operation parameters, results, and steady state.
QString m_searchPhrase
The search phrase used to generate these search results.
QList< QVariant > ZDataRow
Represents a single row (or column for column headers) of data cell values for a single role...
static void deleteReclinkData(ZblLogReclinkData *data)
calls deleteLater() method of the specified ZblLogReclinkData object.
void setSearchRoles(QList< int > rolesToSearch)
Replaces the current set of roles to scan during a text search with the specified roles...