2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2008-12-02 15:08:31 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2014-06-04 13:21:02 +02:00
|
|
|
#include <utils/basetreeview.h>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-06-16 11:08:54 +02:00
|
|
|
namespace Debugger {
|
2008-12-02 12:01:29 +01:00
|
|
|
namespace Internal {
|
|
|
|
|
|
2014-06-02 10:43:26 +02:00
|
|
|
enum WatchType { LocalsType, InspectType, WatchersType, ReturnType, TooltipType };
|
|
|
|
|
|
2014-06-04 13:21:02 +02:00
|
|
|
class WatchTreeView : public Utils::BaseTreeView
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2014-06-04 14:45:10 +02:00
|
|
|
explicit WatchTreeView(WatchType type);
|
2014-06-02 10:43:26 +02:00
|
|
|
WatchType type() const { return m_type; }
|
2014-06-03 11:34:52 +02:00
|
|
|
|
2018-05-07 15:06:53 +02:00
|
|
|
void setModel(QAbstractItemModel *model) override;
|
|
|
|
|
void reset() override;
|
2010-01-29 21:33:57 +01:00
|
|
|
|
2014-07-10 18:10:56 +02:00
|
|
|
static void reexpand(QTreeView *view, const QModelIndex &idx);
|
2014-04-15 18:13:03 +02:00
|
|
|
|
2010-11-05 19:38:40 +01:00
|
|
|
void watchExpression(const QString &exp);
|
2012-08-31 11:34:27 +02:00
|
|
|
void watchExpression(const QString &exp, const QString &name);
|
2012-05-18 02:28:41 +02:00
|
|
|
void handleItemIsExpanded(const QModelIndex &idx);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2012-10-05 13:42:14 +02:00
|
|
|
signals:
|
|
|
|
|
void currentIndexChanged(const QModelIndex ¤tIndex);
|
|
|
|
|
|
2015-01-29 23:55:10 +01:00
|
|
|
private:
|
2014-04-15 18:13:03 +02:00
|
|
|
void resetHelper();
|
|
|
|
|
void expandNode(const QModelIndex &idx);
|
|
|
|
|
void collapseNode(const QModelIndex &idx);
|
2019-04-09 08:23:24 +02:00
|
|
|
void updateTimeColumn();
|
2016-04-19 22:49:23 +02:00
|
|
|
void adjustSlider();
|
2014-04-15 18:13:03 +02:00
|
|
|
|
2018-05-07 15:06:53 +02:00
|
|
|
void doItemsLayout() override;
|
|
|
|
|
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous) override;
|
2009-04-29 12:20:10 +02:00
|
|
|
|
2014-06-02 10:43:26 +02:00
|
|
|
WatchType m_type;
|
2018-07-23 22:28:49 +02:00
|
|
|
int m_sliderPosition = 0;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Debugger
|