Tulip  4.0.0
Better Visualization Through Research
 All Classes Files Functions Variables Enumerations Enumerator Properties Groups Pages
QtOpenGlErrorViewer.h
1 /*
2  *
3  * This file is part of Tulip (www.tulip-software.org)
4  *
5  * Authors: David Auber and the Tulip development Team
6  * from LaBRI, University of Bordeaux 1 and Inria Bordeaux - Sud Ouest
7  *
8  * Tulip is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *
13  * Tulip is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU General Public License for more details.
17  *
18  */
19 ///@cond DOXYGEN_HIDDEN
20 
21 #ifndef Tulip_QTOPENGLERRORVIEWER_H
22 #define Tulip_QTOPENGLERRORVIEWER_H
23 
24 #include <QtGui/QDialog>
25 
26 #include <tulip/OpenGlErrorViewer.h>
27 
28 namespace Ui {
29 class QtOpenGlErrorViewerWithAskAgainDialogData;
30 }
31 
32 namespace tlp {
33 /** \brief Simple class to display OpenGl error is QDialog
34  *
35  * This class is used to display OpenGl error is QDialog
36  */
37 class TLP_QT_SCOPE QtOpenGlErrorViewer : public OpenGlErrorViewer {
38 public :
39  /**
40  * Basic constructor
41  */
42  QtOpenGlErrorViewer(QWidget *parent=NULL):parent(parent) {}
43 
44  /**
45  * Display an error in a QDialog with title : title, and text : errorMsg
46  */
47  virtual void displayError(const std::string &title,const std::string &errorMsg);
48 
49  /**
50  * Display an error in a QDialog with title : title, and text : errorMsg
51  * In this dialog we had a ask again check box
52  */
53  virtual void displayErrorWithAskAgain(const std::string &title,const std::string &errorMsg);
54 
55 protected :
56 
57  QWidget *parent;
58 
59 };
60 
61 /** \brief Simple QDialog with an ask again check box
62  *
63  * This class is used by QtOpenGlErrorViewer to display errors with ask again check box
64  */
65 class TLP_QT_SCOPE QtOpenGlErrorViewerWithAskAgainDialog : public QDialog {
66  friend class QtOpenGlErrorViewer;
67 public :
68  QtOpenGlErrorViewerWithAskAgainDialog(QWidget *parent=NULL);
69 
70 private:
71  Ui::QtOpenGlErrorViewerWithAskAgainDialogData *_ui;
72 };
73 }
74 
75 #endif
76 ///@endcond