Creates QFlags types at runtime.

This commit is contained in:
Hugo Parente Lima 2011-10-14 14:00:18 -03:00
commit b50186e9f3
2 changed files with 42 additions and 2 deletions

View file

@ -24,10 +24,10 @@
#define PYSIDE_QFLAGS_H
#include <sbkpython.h>
#include <pysidemacros.h>
#include "pysidemacros.h"
extern "C"
extern "C"
{
struct PYSIDE_API PySideQFlagsObject {
PyObject_HEAD
@ -43,7 +43,17 @@ namespace PySide
{
namespace QFlags
{
/**
* Creates a new QFlags type.
*/
PYSIDE_API PyTypeObject* create(const char* name, PyNumberMethods* numberMethods);
/**
* Creates a new QFlags instance of type \p type and value \p value.
*/
PYSIDE_API PySideQFlagsObject* newObject(long value, PyTypeObject* type);
/**
* Returns the value held by a QFlag.
*/
PYSIDE_API long getValue(PySideQFlagsObject* self);
}
}