00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef QGLIB_PARAMSPEC_H
00018 #define QGLIB_PARAMSPEC_H
00019
00020 #include "global.h"
00021 #include "refpointer.h"
00022 #include "type.h"
00023 #include "value.h"
00024 #include <QtCore/QString>
00025
00026 namespace QGlib {
00027
00034 class QTGLIB_EXPORT ParamSpec : public RefCountedObject
00035 {
00036 QGLIB_WRAPPER(ParamSpec)
00037 public:
00038 enum ParamFlag {
00039 Readable = 1<<0,
00040 Writable = 1<<1,
00041 ReadWrite = Readable | Writable,
00042 Construct = 1<<2,
00043 ConstructOnly = 1<<3,
00044 LaxValidation = 1<<4,
00045 Deprecated = 1<<31
00046 };
00047 Q_DECLARE_FLAGS(ParamFlags, ParamFlag);
00048
00049 QString name() const;
00050 QString nick() const;
00051 QString description() const;
00052
00053 ParamFlags flags() const;
00054 Type valueType() const;
00055 Type ownerType() const;
00056
00057 void *quarkData(const Quark & quark) const;
00058 void *stealQuarkData(const Quark & quark) const;
00059 void setQuarkData(const Quark & quark, void *data, void (*destroyCallback)(void*) = NULL);
00060
00061 protected:
00062 virtual void ref(bool increaseRef);
00063 virtual void unref();
00064 };
00065
00066 Q_DECLARE_OPERATORS_FOR_FLAGS(ParamSpec::ParamFlags)
00067
00068 }
00069
00070 QGLIB_REGISTER_TYPE(QGlib::ParamSpec)
00071 QGLIB_REGISTER_TYPE(QGlib::ParamSpec::ParamFlags)
00072 QGLIB_REGISTER_WRAPIMPL_FOR_SUBCLASSES_OF(QGlib::ParamSpec, QGlib::Private::wrapParamSpec)
00073
00074
00075
00076 #ifdef INCLUDED_FROM_CODEGEN
00077 # if !GLIB_CHECK_VERSION(2,26,0)
00078 # define G_PARAM_DEPRECATED QGlib::ParamSpec::Deprecated
00079 # endif
00080 #endif //CODEGEN_RUN
00081
00082 #endif