diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-02-05 17:53:25 +0100 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-03-02 01:47:13 +0100 |
commit | cd1fbfcf1b70e365d81480ec0f56db19ed02454f (patch) | |
tree | b220b105d1b8016bb258047683bf2d03795c8881 /src/citra_qt/debugger/profiler.h | |
parent | Merge pull request #616 from archshift/5551 (diff) | |
download | yuzu-cd1fbfcf1b70e365d81480ec0f56db19ed02454f.tar yuzu-cd1fbfcf1b70e365d81480ec0f56db19ed02454f.tar.gz yuzu-cd1fbfcf1b70e365d81480ec0f56db19ed02454f.tar.bz2 yuzu-cd1fbfcf1b70e365d81480ec0f56db19ed02454f.tar.lz yuzu-cd1fbfcf1b70e365d81480ec0f56db19ed02454f.tar.xz yuzu-cd1fbfcf1b70e365d81480ec0f56db19ed02454f.tar.zst yuzu-cd1fbfcf1b70e365d81480ec0f56db19ed02454f.zip |
Diffstat (limited to 'src/citra_qt/debugger/profiler.h')
-rw-r--r-- | src/citra_qt/debugger/profiler.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/citra_qt/debugger/profiler.h b/src/citra_qt/debugger/profiler.h new file mode 100644 index 000000000..a6d87aa0f --- /dev/null +++ b/src/citra_qt/debugger/profiler.h @@ -0,0 +1,50 @@ +// Copyright 2015 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <QAbstractItemModel> +#include <QDockWidget> +#include <QTimer> +#include "ui_profiler.h" + +#include "common/profiler_reporting.h" + +class ProfilerModel : public QAbstractItemModel +{ + Q_OBJECT + +public: + ProfilerModel(QObject* parent); + + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override; + QModelIndex parent(const QModelIndex& child) const override; + int columnCount(const QModelIndex& parent = QModelIndex()) const override; + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; + +public slots: + void updateProfilingInfo(); + +private: + Common::Profiling::AggregatedFrameResult results; +}; + +class ProfilerWidget : public QDockWidget +{ + Q_OBJECT + +public: + ProfilerWidget(QWidget* parent = 0); + +private slots: + void setProfilingInfoUpdateEnabled(bool enable); + +private: + Ui::Profiler ui; + ProfilerModel* model; + + QTimer update_timer; +}; |