~ubuntu-branches/ubuntu/natty/pyside/natty

« back to all changes in this revision

Viewing changes to libpyside/pysideproperty_p.h

  • Committer: Bazaar Package Importer
  • Author(s): Didier Raboud
  • Date: 2011-02-18 18:01:00 UTC
  • mfrom: (1.1.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20110218180100-y8aqmcdbcbd6gpeh
Tags: upstream-1.0.0~rc1
ImportĀ upstreamĀ versionĀ 1.0.0~rc1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of the PySide project.
 
3
 *
 
4
 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 
5
 *
 
6
 * Contact: PySide team <contact@pyside.org>
 
7
 *
 
8
 * This library is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU Lesser General Public
 
10
 * License as published by the Free Software Foundation; either
 
11
 * version 2.1 of the License, or (at your option) any later version.
 
12
 *
 
13
 * This library is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 * Lesser General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU Lesser General Public
 
19
 * License along with this library; if not, write to the Free Software
 
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
21
 */
 
22
 
 
23
#ifndef PYSIDE_QPROPERTY_P_H
 
24
#define PYSIDE_QPROPERTY_P_H
 
25
 
 
26
#include <Python.h>
 
27
#include <QMetaObject>
 
28
#include "pysideproperty.h"
 
29
 
 
30
struct PySideProperty;
 
31
 
 
32
extern "C"
 
33
{
 
34
 
 
35
struct PySidePropertyPrivate {
 
36
    char* typeName;
 
37
    PySide::Property::MetaCallHandler metaCallHandler;
 
38
    PyObject* fget;
 
39
    PyObject* fset;
 
40
    PyObject* freset;
 
41
    PyObject* fdel;
 
42
    PyObject* notify;
 
43
    char* notifySignature;
 
44
    char* doc;
 
45
    bool designable;
 
46
    bool scriptable;
 
47
    bool stored;
 
48
    bool user;
 
49
    bool constant;
 
50
    bool final;
 
51
    void* userData;
 
52
};
 
53
 
 
54
} // extern "C"
 
55
 
 
56
namespace PySide { namespace Property {
 
57
 
 
58
/**
 
59
 * Init PySide QProperty support system
 
60
 */
 
61
void init(PyObject* module);
 
62
 
 
63
/**
 
64
 * This function call reset property function
 
65
 * This function does not check the property object type
 
66
 *
 
67
 * @param   self The property object
 
68
 * @param   source The QObject witch has the property
 
69
 * @return  Return 0 if ok or -1 if this function fail
 
70
 **/
 
71
int reset(PySideProperty* self, PyObject* source);
 
72
 
 
73
 
 
74
/**
 
75
 * This function return the property type
 
76
 * This function does not check the property object type
 
77
 *
 
78
 * @param   self The property object
 
79
 * @return  Return the property type name
 
80
 **/
 
81
const char* getTypeName(const PySideProperty* self);
 
82
 
 
83
/**
 
84
 * This function check if property has read function
 
85
 * This function does not check the property object type
 
86
 *
 
87
 * @param   self The property object
 
88
 * @return  Return a boolean value
 
89
 **/
 
90
bool isReadable(const PySideProperty* self);
 
91
 
 
92
/**
 
93
 * This function check if property has write function
 
94
 * This function does not check the property object type
 
95
 *
 
96
 * @param   self The property object
 
97
 * @return  Return a boolean value
 
98
 **/
 
99
bool isWritable(const PySideProperty* self);
 
100
 
 
101
/**
 
102
 * This function check if property has reset function
 
103
 * This function does not check the property object type
 
104
 *
 
105
 * @param   self The property object
 
106
 * @return  Return a boolean value
 
107
 **/
 
108
bool hasReset(const PySideProperty* self);
 
109
 
 
110
/**
 
111
 * This function check if property has the flag DESIGNABLE setted
 
112
 * This function does not check the property object type
 
113
 *
 
114
 * @param   self The property object
 
115
 * @return  Return a boolean value
 
116
 **/
 
117
bool isDesignable(const PySideProperty* self);
 
118
 
 
119
/**
 
120
 * This function check if property has the flag SCRIPTABLE setted
 
121
 * This function does not check the property object type
 
122
 *
 
123
 * @param   self The property object
 
124
 * @return  Return a boolean value
 
125
 **/
 
126
bool isScriptable(const PySideProperty* self);
 
127
 
 
128
/**
 
129
 * This function check if property has the flag STORED setted
 
130
 * This function does not check the property object type
 
131
 *
 
132
 * @param   self The property object
 
133
 * @return  Return a boolean value
 
134
 **/
 
135
bool isStored(const PySideProperty* self);
 
136
 
 
137
/**
 
138
 * This function check if property has the flag USER setted
 
139
 * This function does not check the property object type
 
140
 *
 
141
 * @param   self The property object
 
142
 * @return  Return a boolean value
 
143
 **/
 
144
bool isUser(const PySideProperty* self);
 
145
 
 
146
/**
 
147
 * This function check if property has the flag CONSTANT setted
 
148
 * This function does not check the property object type
 
149
 *
 
150
 * @param   self The property object
 
151
 * @return  Return a boolean value
 
152
 **/
 
153
bool isConstant(const PySideProperty* self);
 
154
 
 
155
/**
 
156
 * This function check if property has the flag FINAL setted
 
157
 * This function does not check the property object type
 
158
 *
 
159
 * @param   self The property object
 
160
 * @return  Return a boolean value
 
161
 **/
 
162
bool isFinal(const PySideProperty* self);
 
163
 
 
164
} // namespace Property
 
165
} // namespace PySide
 
166
 
 
167
#endif