diff options
author | Tony Wasserka <neobrainx@gmail.com> | 2015-03-07 15:30:40 +0100 |
---|---|---|
committer | Tony Wasserka <neobrainx@gmail.com> | 2015-03-07 15:30:40 +0100 |
commit | 93e32bce72905ac1bd0a5e75066fda5e6b7bf250 (patch) | |
tree | 4530e9d8db22955416543899b6c0e59abf8b9732 /src/citra_qt/debugger/profiler.h | |
parent | Merge pull request #630 from archshift/swap (diff) | |
parent | Profiler: Implement QPCClock to get better precision on Win32 (diff) | |
download | yuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.tar yuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.tar.gz yuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.tar.bz2 yuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.tar.lz yuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.tar.xz yuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.tar.zst yuzu-93e32bce72905ac1bd0a5e75066fda5e6b7bf250.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; +}; |