COPASI API  4.16.103
CQMessageBox.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 // Copyright (C) 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 #ifndef CQMESSAGEBOX_H
16 #define CQMESSAGEBOX_H
17 
18 #include <QtGui/QMessageBox>
19 
20 #include <set>
21 
22 class QTabWidget;
23 class QTextEdit;
24 class QVBoxLayout;
25 class CCopasiObject;
26 
27 class CQMessageBox: public QMessageBox
28 {
29  Q_OBJECT
30 
31 public:
32  CQMessageBox(Icon icon, const QString &title, const QString &text,
33  StandardButtons buttons = NoButton, QWidget *parent = 0,
34  Qt::WindowFlags f = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint);
35 
36  ~CQMessageBox();
37 
38  static StandardButton information(QWidget *parent, const QString &title,
39  const QString &text, StandardButtons buttons = Ok,
40  StandardButton defaultButton = NoButton);
41 
42  static StandardButton question(QWidget *parent, const QString &title,
43  const QString &text, StandardButtons buttons = Ok,
44  StandardButton defaultButton = NoButton);
45 
46  static StandardButton warning(QWidget *parent, const QString &title,
47  const QString &text, StandardButtons buttons = Ok,
48  StandardButton defaultButton = NoButton);
49 
50  static StandardButton critical(QWidget *parent, const QString &title,
51  const QString &text, StandardButtons buttons = Ok,
52  StandardButton defaultButton = NoButton);
53 
54  static StandardButton confirmDelete(QWidget *parent,
55  const QString &objectType, const QString &objects,
56  const std::set< const CCopasiObject * > & deletedObjects);
57 
58  void setText(const QString & text);
59 
60  void setFilteredText(const QString & text);
61 
62 protected:
63  QTabWidget *mpTabWidget;
64  QWidget *mpPage1;
65  QVBoxLayout *mpVerticalLayoutPage1;
66  QTextEdit *mpText1;
67  QWidget *mpPage2;
68  QVBoxLayout *mpVerticalLayoutPage2;
69  QTextEdit *mpText2;
70 };
71 
72 #endif // CQMESSAGEBOX_H
objectType
CQMessageBox(Icon icon, const QString &title, const QString &text, StandardButtons buttons=NoButton, QWidget *parent=0, Qt::WindowFlags f=Qt::Dialog|Qt::MSWindowsFixedSizeDialogHint)
QVBoxLayout * mpVerticalLayoutPage2
Definition: CQMessageBox.h:68
void setFilteredText(const QString &text)
QWidget * mpPage1
Definition: CQMessageBox.h:64
static StandardButton information(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton)
void setText(const QString &text)
QVBoxLayout * mpVerticalLayoutPage1
Definition: CQMessageBox.h:65
static StandardButton warning(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton)
QTabWidget * mpTabWidget
Definition: CQMessageBox.h:63
static StandardButton confirmDelete(QWidget *parent, const QString &objectType, const QString &objects, const std::set< const CCopasiObject * > &deletedObjects)
QTextEdit * mpText1
Definition: CQMessageBox.h:66
QTextEdit * mpText2
Definition: CQMessageBox.h:69
static StandardButton critical(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton)
static StandardButton question(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton)
QWidget * mpPage2
Definition: CQMessageBox.h:67