blob: 4c9bf8b8fd8d73912bc2ed1a0d81731d243068d9 (
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
|
// 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 <coreplugin/inavigationwidgetfactory.h>
#include <utils/navigationtreeview.h>
QT_BEGIN_NAMESPACE
class QToolButton;
QT_END_NAMESPACE
namespace Squish {
namespace Internal {
class SquishTestTreeModel;
class SquishTestTreeSortModel;
class SquishTestTreeView;
class SquishNavigationWidget : public QWidget
{
Q_OBJECT
public:
explicit SquishNavigationWidget(QWidget *parent = nullptr);
~SquishNavigationWidget() override;
void contextMenuEvent(QContextMenuEvent *event) override;
static QList<QToolButton *> createToolButtons();
private:
void onItemActivated(const QModelIndex &idx);
void onExpanded(const QModelIndex &idx);
void onCollapsed(const QModelIndex &idx);
void onRowsInserted(const QModelIndex &parent, int, int);
void onRowsRemoved(const QModelIndex &parent, int, int);
void onRemoveSharedFolderTriggered(int row, const QModelIndex &parent);
void onRemoveAllSharedFolderTriggered();
SquishTestTreeView *m_view;
SquishTestTreeModel *m_model; // not owned
SquishTestTreeSortModel *m_sortModel;
};
class SquishNavigationWidgetFactory : public Core::INavigationWidgetFactory
{
Q_OBJECT
public:
SquishNavigationWidgetFactory();
private:
Core::NavigationView createWidget() override;
};
} // namespace Internal
} // namespace Squish
|