diff options
| author | 2018-01-11 19:21:20 -0700 | |
|---|---|---|
| committer | 2018-01-12 19:11:03 -0700 | |
| commit | ebf9a784a9f7f4148a669dbb39e7cd50df779a14 (patch) | |
| tree | d585685a1c0a34b903af1d086d62560bf56bb29f /src/citra_qt/debugger/wait_tree.h | |
| parent | config: Default CPU core to Unicorn. (diff) | |
| download | yuzu-ebf9a784a9f7f4148a669dbb39e7cd50df779a14.tar.gz yuzu-ebf9a784a9f7f4148a669dbb39e7cd50df779a14.tar.xz yuzu-ebf9a784a9f7f4148a669dbb39e7cd50df779a14.zip | |
Massive removal of unused modules
Diffstat (limited to 'src/citra_qt/debugger/wait_tree.h')
| -rw-r--r-- | src/citra_qt/debugger/wait_tree.h | 187 |
1 files changed, 0 insertions, 187 deletions
diff --git a/src/citra_qt/debugger/wait_tree.h b/src/citra_qt/debugger/wait_tree.h deleted file mode 100644 index 4034e909b..000000000 --- a/src/citra_qt/debugger/wait_tree.h +++ /dev/null | |||
| @@ -1,187 +0,0 @@ | |||
| 1 | // Copyright 2016 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <QAbstractItemModel> | ||
| 8 | #include <QDockWidget> | ||
| 9 | #include <QTreeView> | ||
| 10 | #include <boost/container/flat_set.hpp> | ||
| 11 | #include "core/core.h" | ||
| 12 | #include "core/hle/kernel/kernel.h" | ||
| 13 | |||
| 14 | class EmuThread; | ||
| 15 | |||
| 16 | namespace Kernel { | ||
| 17 | class WaitObject; | ||
| 18 | class Event; | ||
| 19 | class Mutex; | ||
| 20 | class ConditionVariable; | ||
| 21 | class Thread; | ||
| 22 | class Timer; | ||
| 23 | } | ||
| 24 | |||
| 25 | class WaitTreeThread; | ||
| 26 | |||
| 27 | class WaitTreeItem : public QObject { | ||
| 28 | Q_OBJECT | ||
| 29 | public: | ||
| 30 | virtual bool IsExpandable() const; | ||
| 31 | virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const; | ||
| 32 | virtual QString GetText() const = 0; | ||
| 33 | virtual QColor GetColor() const; | ||
| 34 | virtual ~WaitTreeItem(); | ||
| 35 | void Expand(); | ||
| 36 | WaitTreeItem* Parent() const; | ||
| 37 | const std::vector<std::unique_ptr<WaitTreeItem>>& Children() const; | ||
| 38 | std::size_t Row() const; | ||
| 39 | static std::vector<std::unique_ptr<WaitTreeThread>> MakeThreadItemList(); | ||
| 40 | |||
| 41 | private: | ||
| 42 | std::size_t row; | ||
| 43 | bool expanded = false; | ||
| 44 | WaitTreeItem* parent = nullptr; | ||
| 45 | std::vector<std::unique_ptr<WaitTreeItem>> children; | ||
| 46 | }; | ||
| 47 | |||
| 48 | class WaitTreeText : public WaitTreeItem { | ||
| 49 | Q_OBJECT | ||
| 50 | public: | ||
| 51 | explicit WaitTreeText(const QString& text); | ||
| 52 | QString GetText() const override; | ||
| 53 | |||
| 54 | private: | ||
| 55 | QString text; | ||
| 56 | }; | ||
| 57 | |||
| 58 | class WaitTreeExpandableItem : public WaitTreeItem { | ||
| 59 | Q_OBJECT | ||
| 60 | public: | ||
| 61 | bool IsExpandable() const override; | ||
| 62 | }; | ||
| 63 | |||
| 64 | class WaitTreeWaitObject : public WaitTreeExpandableItem { | ||
| 65 | Q_OBJECT | ||
| 66 | public: | ||
| 67 | explicit WaitTreeWaitObject(const Kernel::WaitObject& object); | ||
| 68 | static std::unique_ptr<WaitTreeWaitObject> make(const Kernel::WaitObject& object); | ||
| 69 | QString GetText() const override; | ||
| 70 | std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override; | ||
| 71 | |||
| 72 | protected: | ||
| 73 | const Kernel::WaitObject& object; | ||
| 74 | |||
| 75 | static QString GetResetTypeQString(Kernel::ResetType reset_type); | ||
| 76 | }; | ||
| 77 | |||
| 78 | class WaitTreeObjectList : public WaitTreeExpandableItem { | ||
| 79 | Q_OBJECT | ||
| 80 | public: | ||
| 81 | WaitTreeObjectList(const std::vector<Kernel::SharedPtr<Kernel::WaitObject>>& list, | ||
| 82 | bool wait_all); | ||
| 83 | QString GetText() const override; | ||
| 84 | std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override; | ||
| 85 | |||
| 86 | private: | ||
| 87 | const std::vector<Kernel::SharedPtr<Kernel::WaitObject>>& object_list; | ||
| 88 | bool wait_all; | ||
| 89 | }; | ||
| 90 | |||
| 91 | class WaitTreeThread : public WaitTreeWaitObject { | ||
| 92 | Q_OBJECT | ||
| 93 | public: | ||
| 94 | explicit WaitTreeThread(const Kernel::Thread& thread); | ||
| 95 | QString GetText() const override; | ||
| 96 | QColor GetColor() const override; | ||
| 97 | std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override; | ||
| 98 | }; | ||
| 99 | |||
| 100 | class WaitTreeEvent : public WaitTreeWaitObject { | ||
| 101 | Q_OBJECT | ||
| 102 | public: | ||
| 103 | explicit WaitTreeEvent(const Kernel::Event& object); | ||
| 104 | std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override; | ||
| 105 | }; | ||
| 106 | |||
| 107 | class WaitTreeMutex : public WaitTreeWaitObject { | ||
| 108 | Q_OBJECT | ||
| 109 | public: | ||
| 110 | explicit WaitTreeMutex(const Kernel::Mutex& object); | ||
| 111 | std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override; | ||
| 112 | }; | ||
| 113 | |||
| 114 | class WaitTreeConditionVariable : public WaitTreeWaitObject { | ||
| 115 | Q_OBJECT | ||
| 116 | public: | ||
| 117 | explicit WaitTreeConditionVariable(const Kernel::ConditionVariable& object); | ||
| 118 | std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override; | ||
| 119 | }; | ||
| 120 | |||
| 121 | class WaitTreeTimer : public WaitTreeWaitObject { | ||
| 122 | Q_OBJECT | ||
| 123 | public: | ||
| 124 | explicit WaitTreeTimer(const Kernel::Timer& object); | ||
| 125 | std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override; | ||
| 126 | }; | ||
| 127 | |||
| 128 | class WaitTreeMutexList : public WaitTreeExpandableItem { | ||
| 129 | Q_OBJECT | ||
| 130 | public: | ||
| 131 | explicit WaitTreeMutexList( | ||
| 132 | const boost::container::flat_set<Kernel::SharedPtr<Kernel::Mutex>>& list); | ||
| 133 | |||
| 134 | QString GetText() const override; | ||
| 135 | std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override; | ||
| 136 | |||
| 137 | private: | ||
| 138 | const boost::container::flat_set<Kernel::SharedPtr<Kernel::Mutex>>& mutex_list; | ||
| 139 | }; | ||
| 140 | |||
| 141 | class WaitTreeThreadList : public WaitTreeExpandableItem { | ||
| 142 | Q_OBJECT | ||
| 143 | public: | ||
| 144 | explicit WaitTreeThreadList(const std::vector<Kernel::SharedPtr<Kernel::Thread>>& list); | ||
| 145 | QString GetText() const override; | ||
| 146 | std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override; | ||
| 147 | |||
| 148 | private: | ||
| 149 | const std::vector<Kernel::SharedPtr<Kernel::Thread>>& thread_list; | ||
| 150 | }; | ||
| 151 | |||
| 152 | class WaitTreeModel : public QAbstractItemModel { | ||
| 153 | Q_OBJECT | ||
| 154 | |||
| 155 | public: | ||
| 156 | explicit WaitTreeModel(QObject* parent = nullptr); | ||
| 157 | |||
| 158 | QVariant data(const QModelIndex& index, int role) const override; | ||
| 159 | QModelIndex index(int row, int column, const QModelIndex& parent) const override; | ||
| 160 | QModelIndex parent(const QModelIndex& index) const override; | ||
| 161 | int rowCount(const QModelIndex& parent) const override; | ||
| 162 | int columnCount(const QModelIndex& parent) const override; | ||
| 163 | |||
| 164 | void ClearItems(); | ||
| 165 | void InitItems(); | ||
| 166 | |||
| 167 | private: | ||
| 168 | std::vector<std::unique_ptr<WaitTreeThread>> thread_items; | ||
| 169 | }; | ||
| 170 | |||
| 171 | class WaitTreeWidget : public QDockWidget { | ||
| 172 | Q_OBJECT | ||
| 173 | |||
| 174 | public: | ||
| 175 | explicit WaitTreeWidget(QWidget* parent = nullptr); | ||
| 176 | |||
| 177 | public slots: | ||
| 178 | void OnDebugModeEntered(); | ||
| 179 | void OnDebugModeLeft(); | ||
| 180 | |||
| 181 | void OnEmulationStarting(EmuThread* emu_thread); | ||
| 182 | void OnEmulationStopping(); | ||
| 183 | |||
| 184 | private: | ||
| 185 | QTreeView* view; | ||
| 186 | WaitTreeModel* model; | ||
| 187 | }; | ||