pqTimerLogDisplay.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /*=========================================================================
3 
4  Program: ParaView
5  Module: pqTimerLogDisplay.h
6 
7  Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
8  All rights reserved.
9 
10  ParaView is a free software; you can redistribute it and/or modify it
11  under the terms of the ParaView license version 1.2.
12 
13  See License_v1.2.txt for the full ParaView license.
14  A copy of this license can be obtained by contacting
15  Kitware Inc.
16  28 Corporate Drive
17  Clifton Park, NY 12065
18  USA
19 
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
24 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 
32 =========================================================================*/
33 
34 #ifndef pqTimerLogDisplay_h
35 #define pqTimerLogDisplay_h
36 
37 #include "pqComponentsModule.h"
38 #include <QDialog>
39 
40 class pqTimerLogDisplayUi;
41 
43 
44 class PQCOMPONENTS_EXPORT pqTimerLogDisplay : public QDialog
45 {
46  Q_OBJECT
47 
48 public:
49  pqTimerLogDisplay(QWidget* p = nullptr);
50  ~pqTimerLogDisplay() override;
51  typedef QDialog Superclass;
52 
53  float timeThreshold() const;
54  int bufferLength() const;
55  bool isEnabled() const;
56 
57 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
58  void refresh();
59  void clear();
60  void setTimeThreshold(float value);
61  void setBufferLength(int value);
62  void setEnable(bool state);
63  void save();
64  void save(const QString& filename);
65  void save(const QStringList& files);
66 
67  void saveState();
68  void restoreState();
69 
70 protected:
71  virtual void addToLog(const QString& source, vtkPVTimerInformation* timerInfo);
72 
73  void showEvent(QShowEvent*) override;
74  void hideEvent(QHideEvent*) override;
75 
76 protected Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
77  void setTimeThresholdById(int id);
78  void setBufferLengthById(int id);
79 
80 private:
81  Q_DISABLE_COPY(pqTimerLogDisplay)
82 
83  double LogThreshold;
84  pqTimerLogDisplayUi* ui;
85 };
86 
87 #endif // pqTimerLogDisplay_h
#define PQCOMPONENTS_EXPORT
Holds timer log for all processes.
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))