pqTimerLogDisplay.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
5 #ifndef pqTimerLogDisplay_h
6 #define pqTimerLogDisplay_h
7 
8 #include "pqComponentsModule.h"
9 #include <QDialog>
10 
11 class pqTimerLogDisplayUi;
12 
14 
15 class PQCOMPONENTS_EXPORT pqTimerLogDisplay : public QDialog
16 {
17  Q_OBJECT
18 
19 public:
20  pqTimerLogDisplay(QWidget* p = nullptr);
21  ~pqTimerLogDisplay() override;
22  typedef QDialog Superclass;
23 
24  float timeThreshold() const;
25  int bufferLength() const;
26  bool isEnabled() const;
27 
28 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
29  void refresh();
30  void clear();
31  void setTimeThreshold(float value);
32  void setBufferLength(int value);
33  void setEnable(bool state);
34  void save();
35  void save(const QString& filename);
36  void save(const QStringList& files);
37 
38  void saveState();
39  void restoreState();
40 
41 protected:
42  virtual void addToLog(const QString& source, vtkPVTimerInformation* timerInfo);
43 
44  void showEvent(QShowEvent*) override;
45  void hideEvent(QHideEvent*) override;
46 
47 protected Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
48  void setTimeThresholdById(int id);
49  void setBufferLengthById(int id);
50 
51 private:
52  Q_DISABLE_COPY(pqTimerLogDisplay)
53 
54  double LogThreshold;
55  pqTimerLogDisplayUi* ui;
56 };
57 
58 #endif // pqTimerLogDisplay_h
#define PQCOMPONENTS_EXPORT
Holds timer log for all processes.
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))