BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ProjectLoadWarningDialog.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/InfoWidgets/ProjectLoadWarningDialog.h
6 //! @brief Defines class ProjectLoadWarningDialog
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_COREGUI_VIEWS_INFOWIDGETS_PROJECTLOADWARNINGDIALOG_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_INFOWIDGETS_PROJECTLOADWARNINGDIALOG_H
17 
18 #include <QDialog>
19 #include <QStringList>
20 
21 class MessageService;
22 class QTableWidget;
23 class QLabel;
24 class QLayout;
25 class QTableWidgetItem;
26 
27 //! @class ProjectLoadWarningDialog
28 //! @brief The dialog to inform user about encountered problems during the loading of old project
29 
30 class ProjectLoadWarningDialog : public QDialog {
31  Q_OBJECT
32 
33 public:
34  ProjectLoadWarningDialog(QWidget* parent, const MessageService* messageService = 0,
35  const QString& documentVersion = "");
36 
37 private:
38  QWidget* createTopPanel();
39  QWidget* createModelInfoPanel();
40  QWidget* createExplanationPanel();
41  QWidget* createDetailsPanel();
42  QTableWidget* createTableWidget();
43  QLayout* buttonLayout();
44 
45  int numberOfTableRows() const;
46  QStringList tableHeaderLabels() const;
47  QTableWidgetItem* createTableItem(const QString& name);
48 
49  QString explanationText() const;
50 
53 };
54 
55 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_INFOWIDGETS_PROJECTLOADWARNINGDIALOG_H
The service to collect messages from different senders.
The dialog to inform user about encountered problems during the loading of old project.
QWidget * createModelInfoPanel()
Info panel with summary over warnings in different models.
QStringList tableHeaderLabels() const
Returns labels for table header.
QWidget * createExplanationPanel()
Info panel with explanations what had happened and what to do.
QTableWidgetItem * createTableItem(const QString &name)
const MessageService * m_messageService
ProjectLoadWarningDialog(QWidget *parent, const MessageService *messageService=0, const QString &documentVersion="")
int numberOfTableRows() const
Returns number of rows in table with error messages, each row represents an error message.
QString explanationText() const
Returns explanations what went wrong.
QWidget * createDetailsPanel()
Info panel with table widget containing error messages.
QWidget * createTopPanel()
Top panel with warning icon and the header.
QTableWidget * createTableWidget()
Creates QTableWidget and fills it with error messages.
QString const & name(EShape k)
Definition: particles.cpp:21