X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2Fmainwindow.h;h=4d1358ceb0743c5337d97ebddc1436051a1b983a;hb=HEAD;hp=d898f3ca7e04d0b9d3dd9bb292705006155a7296;hpb=2fa1bdedd9b609a72ef70c557b04e928bc000ad7;p=apitrace diff --git a/gui/mainwindow.h b/gui/mainwindow.h index d898f3c..4d1358c 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -29,8 +29,12 @@ class Retracer; class SearchWidget; class ShadersSourceWidget; class TraceProcess; +class TrimProcess; +class ProfileDialog; class VertexDataInterpreter; +namespace trace { struct Profile; } + class MainWindow : public QMainWindow { Q_OBJECT @@ -41,20 +45,27 @@ public: public slots: void loadTrace(const QString &fileName, int callNum = -1); + void setRemoteTarget(const QString &host); + private slots: void callItemSelected(const QModelIndex &index); + void callItemActivated(const QModelIndex &index); void createTrace(); void openTrace(); void replayStart(); + void replayProfile(); void replayStop(); - void replayFinished(const QString &output); + void replayFinished(const QString &message); void replayStateFound(ApiTraceState *state); + void replayProfileFound(trace::Profile *state); void replayThumbnailsFound(const QList &thumbnails); void replayError(const QString &msg); void startedLoadingTrace(); void loadProgess(int percent); void finishedLoadingTrace(); void lookupState(); + void showThumbnails(); + void trim(); void showSettings(); void openHelp(const QUrl &url); void showSurfacesMenu(const QPoint &pos); @@ -64,6 +75,8 @@ private slots: void slotJumpTo(int callNum); void createdTrace(const QString &path); void traceError(const QString &msg); + void createdTrim(const QString &path); + void trimError(const QString &msg); void slotSearch(); void slotSearchNext(const QString &str, Qt::CaseSensitivity sensitivity); void slotSearchPrev(const QString &str, Qt::CaseSensitivity sensitivity); @@ -87,8 +100,10 @@ private slots: private: void initObjects(); void initConnections(); + void updateActionsState(bool traceLoaded, bool stopped = true); void newTraceFile(const QString &fileName); void replayTrace(bool dumpState, bool dumpThumbnails); + void trimEvent(); void fillStateForFrame(); /* there's a difference between selected frame/call and @@ -100,6 +115,8 @@ private: ApiTraceFrame *currentFrame() const; ApiTraceCall *currentCall() const; +protected: + virtual void closeEvent(QCloseEvent * event); private: Ui_MainWindow m_ui; @@ -118,6 +135,8 @@ private: ApiTraceEvent *m_stateEvent; + ApiTraceEvent *m_trimEvent; + Retracer *m_retracer; VertexDataInterpreter *m_vdataInterpreter; @@ -127,9 +146,13 @@ private: TraceProcess *m_traceProcess; + TrimProcess *m_trimProcess; + ArgumentsEditor *m_argsEditor; ApiTraceEvent *m_nonDefaultsLookupEvent; + + ProfileDialog* m_profileDialog; };