ParaView
pqOutputWindow.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: pqOutputWindow.h
5 
6  Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
7  All rights reserved.
8 
9  ParaView is a free software; you can redistribute it and/or modify it
10  under the terms of the ParaView license version 1.2.
11 
12  See License_v1.2.txt for the full ParaView license.
13  A copy of this license can be obtained by contacting
14  Kitware Inc.
15  28 Corporate Drive
16  Clifton Park, NY 12065
17  USA
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 =========================================================================*/
32 
33 #ifndef _pqOutputWindow_h
34 #define _pqOutputWindow_h
35 
36 #include "pqCoreModule.h"
37 
38 #include <QDialog>
39 
48 class PQCORE_EXPORT pqOutputWindow :
49  public QDialog
50 {
51  typedef QDialog Superclass;
52  Q_OBJECT
53 
54 public:
56  {
60  MESSAGE_TYPE_COUNT
61  };
62 
63  pqOutputWindow(QWidget* Parent);
64  ~pqOutputWindow();
65 
67  static pqOutputWindow* instance();
68 
69 public slots:
70  void onDisplayText(const QString&);
71  void onDisplayErrorText(const QString&);
72  void onDisplayWarningText(const QString&);
73  void onDisplayGenericWarningText(const QString&);
74 
78  void onDisplayTextInWindow(const QString&);
79  void onDisplayErrorTextInWindow(const QString&);
80 
81 private slots:
83  void accept();
84  void reject();
85 
87  void clear();
88 
90  void setConsoleView(int on);
91 
93  void errorToggled(bool checked);
94  void warningToggled(bool checked);
95  void debugToggled(bool checked);
96 
98  void onProgressStartEvent();
99 
100 private:
102  pqOutputWindow& operator=(const pqOutputWindow&);
103 
105  void setupSuppressionExpressions();
106 
108  bool shouldMessageBeSuppressed(const QString& text);
109 
110  void addMessage(int messageType, const QString& text);
111  void addPythonMessages(int messageType, const QString& text);
112 
113  void addMessage(int messageType, const QString& location,
114  const QString& message);
115 
116  virtual void showEvent(QShowEvent*);
117  virtual void hideEvent(QHideEvent*);
118 
119  bool Show[MESSAGE_TYPE_COUNT];
120 
122  int StartEventIndex;
123  struct pqImplementation;
124  const QScopedPointer<pqImplementation> Implementation;
125 };
126 
127 #endif // !_pqOutputWindow_h
Provides an output dialog that will display all VTK/ParaView debug/warning/error output.
ParaViewResources *resource location
ParaView plugins can load gui configuration xmls eg.