blob: e12a56321e317e83bff2387d701ea892d05e4f1a (
plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
// Copyright (C) 2022 The Qt Company Ltd
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include <debugger/debuggermainwindow.h>
#include <utils/treemodel.h>
namespace Squish {
namespace Internal {
class SquishXmlOutputHandler;
class LocalsItem : public Utils::TreeItem
{
public:
LocalsItem() = default;
LocalsItem(const QString &n, const QString &t, const QString &v) : name(n), type(t), value(v) {}
QVariant data(int column, int role) const override;
QString name;
QString type;
QString value;
bool expanded = false;
};
class SquishPerspective : public Utils::Perspective
{
Q_OBJECT
public:
enum PerspectiveMode { NoMode, Interrupted, Running, Recording, Querying };
enum StepMode { Continue, StepIn, StepOver, StepOut };
SquishPerspective();
void initPerspective();
void setPerspectiveMode(PerspectiveMode mode);
PerspectiveMode perspectiveMode() const { return m_mode; }
void updateStatus(const QString &status);
void showControlBar(SquishXmlOutputHandler *xmlOutputHandler);
void destroyControlBar();
signals:
void stopRequested();
void stopRecordRequested();
void interruptRequested();
void runRequested(SquishPerspective::StepMode mode);
private:
void onStopTriggered();
void onStopRecordTriggered();
void onPausePlayTriggered();
void onLocalsUpdated(const QString &output);
QAction *m_stopRecordAction = nullptr;
QAction *m_pausePlayAction = nullptr;
QAction *m_stepInAction = nullptr;
QAction *m_stepOverAction = nullptr;
QAction *m_stepOutAction = nullptr;
QAction *m_stopAction = nullptr;
QLabel *m_status = nullptr;
class SquishControlBar *m_controlBar = nullptr;
Utils::TreeModel<LocalsItem> m_localsModel;
PerspectiveMode m_mode = NoMode;
friend class SquishControlBar;
};
} // namespace Internal
} // namespace Squish
|