mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-22 12:56:11 +00:00
a3e140bf4d
* Added wrappers for dpt and dpt= * Added ThreadsWidget used for thread monitoring during debugging * Updated r2 for dpt, dpt= and drrj fixes * Convert r2's pid status letters to more informative strings * Replaced cmdj with cmd and ensure the thread's data is synced * Moved viewThreas to threadsWidget.ui, switched from onDoubleClick to Activated and added a column cleanup * Add old row cleanup to BacktraceWidget * Clean up * Added sorting and filters * Modified ThreadsWidget for Qt5.3 compatibility
50 lines
1001 B
C++
50 lines
1001 B
C++
#pragma once
|
|
|
|
#include <QJsonObject>
|
|
#include <memory>
|
|
#include <QStandardItem>
|
|
#include <QTableView>
|
|
#include <QSortFilterProxyModel>
|
|
|
|
#include "core/Cutter.h"
|
|
#include "CutterDockWidget.h"
|
|
|
|
class MainWindow;
|
|
|
|
namespace Ui {
|
|
class ThreadsWidget;
|
|
}
|
|
|
|
class ThreadsFilterModel : public QSortFilterProxyModel
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
ThreadsFilterModel(QObject *parent = nullptr);
|
|
|
|
protected:
|
|
bool filterAcceptsRow(int row, const QModelIndex &parent) const override;
|
|
};
|
|
|
|
class ThreadsWidget : public CutterDockWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ThreadsWidget(MainWindow *main, QAction *action = nullptr);
|
|
~ThreadsWidget();
|
|
|
|
private slots:
|
|
void updateContents();
|
|
void setThreadsGrid();
|
|
void fontsUpdatedSlot();
|
|
void onActivated(const QModelIndex &index);
|
|
|
|
private:
|
|
QString translateStatus(QString status);
|
|
std::unique_ptr<Ui::ThreadsWidget> ui;
|
|
QStandardItemModel *modelThreads;
|
|
ThreadsFilterModel *modelFilter;
|
|
RefreshDeferrer *refreshDeferrer;
|
|
};
|