BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
SessionFlags.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Support/Data/SessionFlags.h
6 //! @brief Defines class SessionFlags
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_SUPPORT_DATA_SESSIONFLAGS_H
16 #define BORNAGAIN_GUI_SUPPORT_DATA_SESSIONFLAGS_H
17 
18 #include <qnamespace.h>
19 
20 //! Collection of flags for SessionModel and SessionItem.
21 
22 class SessionFlags {
23 public:
24  // SessionModel columns
26  Q_DECLARE_FLAGS(ModelColumn, EColumn)
27 
28  // SessionItem data roles
29  enum ERoles {
30  ModelTypeRole = Qt::UserRole + 1,
36  obsolete_CustomEditorRole, // don't remove -> keep numbering (is serialized!)
38  };
39  Q_DECLARE_FLAGS(ItemDataRole, ERoles)
40 
41  // SessionItem appearance
42  enum EAppearance { VISIBLE = 0x001, ENABLED = 0x002, EDITABLE = 0x004 };
43  Q_DECLARE_FLAGS(ItemAppearance, EAppearance)
44 };
45 
46 Q_DECLARE_OPERATORS_FOR_FLAGS(SessionFlags::ModelColumn)
47 Q_DECLARE_OPERATORS_FOR_FLAGS(SessionFlags::ItemDataRole)
48 Q_DECLARE_OPERATORS_FOR_FLAGS(SessionFlags::ItemAppearance)
49 
50 #endif // BORNAGAIN_GUI_SUPPORT_DATA_SESSIONFLAGS_H
Collection of flags for SessionModel and SessionItem.
Definition: SessionFlags.h:22
@ obsolete_CustomEditorRole
Definition: SessionFlags.h:36