summaryrefslogtreecommitdiff
path: root/gui/apitrace.h
diff options
context:
space:
mode:
authorZack Rusin <zack@kde.org>2011-09-11 18:21:29 -0400
committerZack Rusin <zack@kde.org>2011-09-12 01:50:45 -0400
commit8f98c3a529e7ef88e4111ef22cf8411916a9a065 (patch)
tree63f1ee81c4fb2c472ad0ec9fcbce9fda3c04f1f0 /gui/apitrace.h
parentec36d834b6cf8b71ef0ade0650be073f68103e17 (diff)
Implement find next for the on-demand-loaded files.
Find next now works. Find previous hasn't been implemented yet but the entire infrastructure is there.
Diffstat (limited to 'gui/apitrace.h')
-rw-r--r--gui/apitrace.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/gui/apitrace.h b/gui/apitrace.h
index d01e7a0c..3edffef7 100644
--- a/gui/apitrace.h
+++ b/gui/apitrace.h
@@ -20,6 +20,12 @@ public:
FrameMarker_Finish,
FrameMarker_Clear
};
+ enum SearchResult {
+ SearchNotFound,
+ SearchFound,
+ SearchWrapped
+ };
+
static bool isCallAFrameMarker(const ApiTraceCall *call,
FrameMarker marker);
public:
@@ -59,6 +65,15 @@ public slots:
void setFrameMarker(FrameMarker marker);
void save();
void loadFrame(ApiTraceFrame *frame);
+ void findNext(ApiTraceFrame *frame,
+ ApiTraceCall *call,
+ const QString &str,
+ Qt::CaseSensitivity sensitivity);
+ void findPrev(ApiTraceFrame *frame,
+ ApiTraceCall *call,
+ const QString &str,
+ Qt::CaseSensitivity sensitivity);
+
signals:
void loadTrace(const QString &name);
@@ -71,6 +86,8 @@ signals:
void changed(ApiTraceCall *call);
void startedSaving();
void saved();
+ void findResult(ApiTrace::SearchResult result,
+ ApiTraceCall *call);
void beginAddingFrames(int oldCount, int numAdded);
void endAddingFrames();
@@ -78,11 +95,24 @@ signals:
void beginLoadingFrame(ApiTraceFrame *frame, int numAdded);
void endLoadingFrame(ApiTraceFrame *frame);
+
+signals:
+ void loaderSearchNext(int startFrame,
+ const QString &str,
+ Qt::CaseSensitivity sensitivity);
+ void loaderSearchPrev(int startFrame,
+ const QString &str,
+ Qt::CaseSensitivity sensitivity);
+
private slots:
void addFrames(const QList<ApiTraceFrame*> &frames);
void slotSaved();
void finishedParsing();
- void frameLoadFinished(ApiTraceFrame *frame);
+ void loaderFrameLoaded(ApiTraceFrame *frame,
+ const QVector<ApiTraceCall*> &calls,
+ quint64 binaryDataSize);
+ void loaderSearchResult(ApiTrace::SearchResult result,
+ ApiTraceCall *call);
private:
void detectFrames();