X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2Fargumentseditor.h;h=7671d71bcd0264f720e2fbeac506bf8b71293328;hb=f682e19bee94eb69a5cfc8b2db17d7f1ebb10c2b;hp=4454e003cb312ae4e93378564acd8c5658b3e843;hpb=fb23ba1af4bf0f9f86f251226b4bddecfcfc090e;p=apitrace diff --git a/gui/argumentseditor.h b/gui/argumentseditor.h index 4454e00..7671d71 100644 --- a/gui/argumentseditor.h +++ b/gui/argumentseditor.h @@ -1,7 +1,9 @@ #ifndef ARGUMENTSEDITOR_H #define ARGUMENTSEDITOR_H +#include "apitracecall.h" #include "ui_argumentseditor.h" + #include #include #include @@ -35,16 +37,27 @@ public: ~ArgumentsEditor(); + virtual void accept(); + void setCall(ApiTraceCall *call); ApiTraceCall *call() const; private slots: void currentSourceChanged(int idx); void sourceChanged(); + void revert(); private: void init(); void setupCall(); - void setupShaderEditor(const QList &sources); + void setupShaderEditor(const QVector &sources); + QVariant valueForName(const QString &name, + const QVariant &orignalValue, + bool *changed) const; + QVariant arrayFromIndex(const QModelIndex &index, + const ApiArray &array, + bool *changed) const; + QVariant arrayFromEditor(const ApiArray &origArray, + bool *changed) const; private: Ui_ArgumentsEditor m_ui; QStandardItemModel *m_model;