-
Notifications
You must be signed in to change notification settings - Fork 70
/
WidgetInspector.h
52 lines (40 loc) · 1.22 KB
/
WidgetInspector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include "lib/ObjectProxy.h"
#include <QWidget>
class ObjectInspector;
class ObjectTreeModel;
class ObjectPropertyModel;
class OutOfProcessClipboard;
class RootObjectList;
class WidgetPicker;
class QPushButton;
class QModelIndex;
class QTreeView;
class WidgetInspector : public QWidget
{
Q_OBJECT
public:
WidgetInspector(RootObjectList* rootList, QWidget* parent = 0);
/** Sets the picker used by the 'Pick Widget' button
* to select a widget in the application by clicking on it.
*
* The WidgetInspector takes ownership of the picker.
*/
void setWidgetPicker(WidgetPicker* picker);
static void registerGlobalShortcut(const QKeySequence& key, QWidget* parentWidget);
private Q_SLOTS:
void refreshTree();
void search(const QString& query);
void pickerFinished(ObjectProxy::Pointer widget);
void selectionChanged(const QModelIndex& current, const QModelIndex& previous);
void copyDebuggerReference();
private:
void select(ObjectProxy::Pointer object);
RootObjectList* m_rootList;
ObjectTreeModel* m_objectModel;
QTreeView* m_objectTree;
WidgetPicker* m_picker;
ObjectInspector* m_objectInspector;
OutOfProcessClipboard* m_externalClipboard;
QPushButton* m_pickButton;
};