2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 Denis Mingulov
|
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
|
2010-07-16 11:18:30 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2010-07-16 11:18:30 +02:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QObject>
|
|
|
|
|
#include <QSharedPointer>
|
|
|
|
|
#include <QStandardItem>
|
2010-07-16 11:18:30 +02:00
|
|
|
|
2022-11-24 15:28:39 +01:00
|
|
|
namespace Utils { class FilePath; }
|
|
|
|
|
|
|
|
|
|
namespace ClassView::Internal {
|
2010-07-16 11:18:30 +02:00
|
|
|
|
2011-07-06 17:40:54 +02:00
|
|
|
class ManagerPrivate;
|
2010-07-16 11:18:30 +02:00
|
|
|
|
|
|
|
|
class Manager : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2018-11-04 22:40:59 +01:00
|
|
|
explicit Manager(QObject *parent = nullptr);
|
|
|
|
|
~Manager() override;
|
2011-07-06 17:40:54 +02:00
|
|
|
static Manager *instance();
|
2010-07-16 11:18:30 +02:00
|
|
|
|
2013-12-04 13:46:12 +01:00
|
|
|
bool canFetchMore(QStandardItem *item, bool skipRoot = false) const;
|
2010-07-16 11:18:30 +02:00
|
|
|
void fetchMore(QStandardItem *item, bool skipRoot = false);
|
2013-12-04 13:46:12 +01:00
|
|
|
bool hasChildren(QStandardItem *item) const;
|
|
|
|
|
|
2022-11-24 15:28:39 +01:00
|
|
|
void gotoLocation(const Utils::FilePath &filePath, int line = 0, int column = 0);
|
2010-07-16 11:18:30 +02:00
|
|
|
void gotoLocations(const QList<QVariant> &locations);
|
|
|
|
|
void setFlatMode(bool flat);
|
|
|
|
|
void onWidgetVisibilityIsChanged(bool visibility);
|
2016-05-29 00:07:28 +03:00
|
|
|
|
2021-02-08 12:22:21 +01:00
|
|
|
signals:
|
|
|
|
|
void treeDataUpdate(QSharedPointer<QStandardItem> result);
|
|
|
|
|
|
|
|
|
|
private:
|
2010-07-16 11:18:30 +02:00
|
|
|
void initialize();
|
|
|
|
|
|
|
|
|
|
inline bool state() const;
|
|
|
|
|
void setState(bool state);
|
|
|
|
|
|
2011-07-06 17:40:54 +02:00
|
|
|
ManagerPrivate *d;
|
2010-07-16 11:18:30 +02:00
|
|
|
};
|
|
|
|
|
|
2022-11-24 15:28:39 +01:00
|
|
|
} // ClassView::Internal
|