2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2014-12-18 15:02:07 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2014-12-18 15:02:07 +01:00
|
|
|
|
2020-07-07 10:57:38 +02:00
|
|
|
#include "itemdatacache.h"
|
2016-06-15 12:29:24 +02:00
|
|
|
|
2014-12-18 15:02:07 +01:00
|
|
|
#include <coreplugin/inavigationwidgetfactory.h>
|
|
|
|
|
|
|
|
|
|
#include <utils/navigationtreeview.h>
|
|
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QAction;
|
|
|
|
|
class QMenu;
|
2015-02-17 14:45:26 +01:00
|
|
|
class QTimer;
|
2014-12-18 15:02:07 +01:00
|
|
|
class QToolButton;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2015-02-17 14:45:26 +01:00
|
|
|
namespace Utils {
|
|
|
|
|
class ProgressIndicator;
|
|
|
|
|
}
|
|
|
|
|
|
2014-12-18 15:02:07 +01:00
|
|
|
namespace Autotest {
|
2020-07-07 10:57:38 +02:00
|
|
|
|
|
|
|
|
class TestTreeModel;
|
|
|
|
|
|
2019-08-19 10:55:32 +02:00
|
|
|
namespace Internal {
|
|
|
|
|
|
2020-10-09 13:07:55 +02:00
|
|
|
class TestRunner;
|
2020-07-07 10:57:38 +02:00
|
|
|
class TestTreeSortFilterModel;
|
2014-12-18 15:02:07 +01:00
|
|
|
class TestTreeView;
|
|
|
|
|
|
|
|
|
|
class TestNavigationWidget : public QWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2018-07-11 15:44:51 +02:00
|
|
|
explicit TestNavigationWidget(QWidget *parent = nullptr);
|
2016-09-29 12:15:43 +02:00
|
|
|
void contextMenuEvent(QContextMenuEvent *event) override;
|
2014-12-18 15:02:07 +01:00
|
|
|
QList<QToolButton *> createToolButtons();
|
|
|
|
|
|
2020-06-17 13:04:44 +02:00
|
|
|
void updateExpandedStateCache();
|
2014-12-18 15:02:07 +01:00
|
|
|
|
2016-06-28 22:38:54 +03:00
|
|
|
private:
|
2014-12-18 15:02:07 +01:00
|
|
|
void onItemActivated(const QModelIndex &index);
|
|
|
|
|
void onSortClicked();
|
|
|
|
|
void onFilterMenuTriggered(QAction *action);
|
2015-02-17 14:45:26 +01:00
|
|
|
void onParsingStarted();
|
|
|
|
|
void onParsingFinished();
|
2014-12-18 15:02:07 +01:00
|
|
|
void initializeFilterMenu();
|
2017-09-05 13:57:22 +02:00
|
|
|
void onRunThisTestTriggered(TestRunMode runMode);
|
2020-06-17 13:04:44 +02:00
|
|
|
void reapplyCachedExpandedState();
|
2014-12-18 15:02:07 +01:00
|
|
|
|
|
|
|
|
TestTreeModel *m_model;
|
|
|
|
|
TestTreeSortFilterModel *m_sortFilterModel;
|
|
|
|
|
TestTreeView *m_view;
|
|
|
|
|
QToolButton *m_sort;
|
|
|
|
|
QToolButton *m_filterButton;
|
|
|
|
|
QMenu *m_filterMenu;
|
|
|
|
|
bool m_sortAlphabetically;
|
2015-02-17 14:45:26 +01:00
|
|
|
Utils::ProgressIndicator *m_progressIndicator;
|
|
|
|
|
QTimer *m_progressTimer;
|
2016-06-08 12:56:25 +02:00
|
|
|
QFrame *m_missingFrameworksWidget;
|
2020-06-18 12:32:48 +02:00
|
|
|
ItemDataCache<bool> m_expandedStateCache;
|
2014-12-18 15:02:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class TestNavigationWidgetFactory : public Core::INavigationWidgetFactory
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
TestNavigationWidgetFactory();
|
|
|
|
|
|
|
|
|
|
private:
|
2016-09-29 12:15:43 +02:00
|
|
|
Core::NavigationView createWidget() override;
|
2014-12-18 15:02:07 +01:00
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Autotest
|