1 // This defines the interfaces to the Q_ENUM, Q_ENUMS, Q_FLAG and Q_FLAGS
2 // support.
3 //
4 // Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
5 //
6 // This file is part of PyQt5.
7 //
8 // This file may be used under the terms of the GNU General Public License
9 // version 3.0 as published by the Free Software Foundation and appearing in
10 // the file LICENSE included in the packaging of this file.  Please review the
11 // following information to ensure the GNU General Public License version 3.0
12 // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
13 //
14 // If you do not wish to use this file under the terms of the GPL version 3.0
15 // then you may purchase a commercial license.  For more information contact
16 // info@riverbankcomputing.com.
17 //
18 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
19 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 
21 
22 #ifndef _QPYCORE_ENUMS_FLAGS_H
23 #define _QPYCORE_ENUMS_FLAGS_H
24 
25 
26 #include <QByteArray>
27 #include <QHash>
28 #include <QList>
29 
30 
31 struct EnumFlag
32 {
EnumFlagEnumFlag33     EnumFlag(const char *name_, bool isFlag_) : name(name_), isFlag(isFlag_), isScoped(false)
34     {
35     }
36 
37     QByteArray name;
38     bool isFlag;
39     bool isScoped;
40     QHash<QByteArray, int> keys;
41 };
42 
43 
44 QList<EnumFlag> qpycore_get_enums_flags_list();
45 
46 
47 #endif
48