BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ProjectFlags.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/mainwindow/ProjectFlags.h
6 //! @brief Defines class ProjectFlags
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_MAINWINDOW_PROJECTFLAGS_H
16 #define BORNAGAIN_GUI_COREGUI_MAINWINDOW_PROJECTFLAGS_H
17 
18 #include <QFlags>
19 
20 class ProjectFlags {
21 public:
23  STATUS_OK = 0x0001,
24  STATUS_WARNING = 0x0002,
25  STATUS_FAILED = 0x0004,
26  };
27 
28  Q_DECLARE_FLAGS(DocumentStatus, EDocumentStatus)
29 
30  static void setFlag(ProjectFlags::DocumentStatus& flags, EDocumentStatus status)
31  {
32  flags |= status;
33  }
34 };
35 
36 Q_DECLARE_OPERATORS_FOR_FLAGS(ProjectFlags::DocumentStatus)
37 
38 #endif // BORNAGAIN_GUI_COREGUI_MAINWINDOW_PROJECTFLAGS_H
static void setFlag(ProjectFlags::DocumentStatus &flags, EDocumentStatus status)
Definition: ProjectFlags.h:30