pqLogViewerWidget.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 #ifndef pqLogViewerWidget_h
5 #define pqLogViewerWidget_h
6 
7 #include "pqCoreModule.h"
8 
9 #include <QModelIndex> // for QModelIndex
10 #include <QScopedPointer> // for QScopedPointer
11 #include <QString>
12 #include <QVector>
13 #include <QWidget> // for QWidget
14 
21 class PQCORE_EXPORT pqLogViewerWidget : public QWidget
22 {
23  Q_OBJECT
24  using Superclass = QWidget;
25 
26 public:
27  pqLogViewerWidget(QWidget* parent = nullptr);
28  ~pqLogViewerWidget() override;
29 
33  void setLog(const QString& text);
34 
38  void appendLog(const QString& text);
39 
44  void setFilterWildcard(QString wildcard);
45 
49  void scrollToTime(double time);
50 
57  static QVector<QString> extractLogParts(const QString& txt, bool& is_raw);
58 
62  void updateColumnVisibilities();
63 
64 Q_SIGNALS:
65  // Emitted when the widget is closed
66  void closed();
67 
68  // \brief Emits when the scroll bar value changes, with the time of the current top log.
69  // \param time
70  void scrolled(double time);
71 
72 protected Q_SLOTS:
73  void toggleAdvanced();
74 
75  void exportLog();
76 
77 private:
78  Q_DISABLE_COPY(pqLogViewerWidget);
79 
80  class pqInternals;
81  QScopedPointer<pqInternals> Internals;
82 
83  bool Advanced = false;
84 };
85 
86 #endif
time
Provides a treeview with scoped logs along with a filtering capability to restrict which logs are sho...
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15