Mantid
Loading...
Searching...
No Matches
TrackedAction.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include "DllOption.h"
10#include <QAction>
11
12namespace MantidQt {
13namespace MantidWidgets {
14
19 Q_OBJECT
20public:
21 TrackedAction(QObject *parent);
22 TrackedAction(const QString &text, QObject *parent);
23 TrackedAction(const QIcon &icon, const QString &text, QObject *parent);
24 virtual ~TrackedAction() = default;
25
26 void setTrackingName(const std::vector<std::string> &name);
27 std::vector<std::string> getTrackingName() const;
28
29 void setIsTracking(const bool enableTracking);
30 bool getIsTracking() const;
31
32protected:
33 virtual std::vector<std::string> generateTrackingName() const;
34 virtual void registerUsage(const std::vector<std::string> &name);
35
36private:
37 void setupTracking();
39 mutable std::vector<std::string> m_trackingName;
40
41public slots:
42 void trackActivation(const bool checked);
43};
44
45} // namespace MantidWidgets
46} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition: DllOption.h:15
TrackedAction : This is a version of QAction that tracks usage through the Mantid usage service.
Definition: TrackedAction.h:18
std::vector< std::string > m_trackingName
Definition: TrackedAction.h:39
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...