Files
qt-creator/src/plugins/debugger/watchwindow.h

49 lines
1.3 KiB
C
Raw Normal View History

// Copyright (C) 2016 The Qt Company Ltd.
// 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
#pragma once
2008-12-02 12:01:29 +01:00
#include <utils/basetreeview.h>
2008-12-02 12:01:29 +01:00
namespace Debugger {
2008-12-02 12:01:29 +01:00
namespace Internal {
enum WatchType { LocalsType, InspectType, WatchersType, ReturnType, TooltipType };
class WatchTreeView : public Utils::BaseTreeView
2008-12-02 12:01:29 +01:00
{
Q_OBJECT
public:
explicit WatchTreeView(WatchType type);
WatchType type() const { return m_type; }
void setModel(QAbstractItemModel *model) override;
void reset() override;
static void reexpand(QTreeView *view, const QModelIndex &idx);
void watchExpression(const QString &exp);
void watchExpression(const QString &exp, const QString &name);
void handleItemIsExpanded(const QModelIndex &idx);
2008-12-02 12:01:29 +01:00
signals:
void currentIndexChanged(const QModelIndex &currentIndex);
private:
void resetHelper();
void expandNode(const QModelIndex &idx);
void collapseNode(const QModelIndex &idx);
void updateTimeColumn();
void adjustSlider();
void doItemsLayout() override;
void currentChanged(const QModelIndex &current, const QModelIndex &previous) override;
WatchType m_type;
int m_sliderPosition = 0;
2008-12-02 12:01:29 +01:00
};
} // namespace Internal
} // namespace Debugger