FreeCAD

Форк
0
/
ViewProviderPy.xml 
344 строки · 11.5 Кб
1
<?xml version="1.0" encoding="UTF-8"?>
2
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
3
    <PythonExport
4
        Father="ExtensionContainerPy"
5
        Name="ViewProviderPy"
6
        Twin="ViewProvider"
7
        TwinPointer="ViewProvider"
8
        Include="Gui/ViewProvider.h"
9
        Namespace="Gui"
10
        FatherInclude="App/ExtensionContainerPy.h"
11
        FatherNamespace="App">
12
        <Documentation>
13
            <Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer@users.sourceforge.net" />
14
            <UserDocu>This is the ViewProvider base class</UserDocu>
15
        </Documentation>
16
        <Methode Name="addProperty">
17
            <Documentation>
18
                <UserDocu>addProperty(type, name, group, doc, attr=0, ro=False, hd=False) -> ViewProvider
19

20
Add a generic property.
21

22
type : str
23
    Property type.
24
name : str
25
    Property name. Optional.
26
group : str
27
    Property group. Optional.
28
attr : int
29
    Property attributes.
30
ro : bool
31
    Read only property.
32
hd : bool
33
    Hidden property.</UserDocu>
34
            </Documentation>
35
        </Methode>
36
        <Methode Name="removeProperty">
37
            <Documentation>
38
                <UserDocu>removeProperty(name) -> bool
39

40
Remove a generic property.
41
Only user-defined properties can be removed, not built-in ones.
42

43
name : str
44
    Property name.</UserDocu>
45
            </Documentation>
46
        </Methode>
47
        <Methode Name="supportedProperties">
48
            <Documentation>
49
                <UserDocu>supportedProperties() -> list
50

51
A list of supported property types.</UserDocu>
52
            </Documentation>
53
        </Methode>
54
        <Methode Name="show">
55
            <Documentation>
56
                <UserDocu>show() -> None
57

58
Show the object.</UserDocu>
59
            </Documentation>
60
        </Methode>
61
        <Methode Name="hide">
62
            <Documentation>
63
                <UserDocu>show() -> None
64

65
Hide the object.</UserDocu>
66
            </Documentation>
67
        </Methode>
68
        <Methode Name="isVisible">
69
            <Documentation>
70
                <UserDocu>isVisible() -> bool
71

72
Check if the object is visible.</UserDocu>
73
            </Documentation>
74
        </Methode>
75
        <Methode Name="canDragObject">
76
            <Documentation>
77
                <UserDocu>canDragObject(obj=None) -> bool
78

79
Check whether the child object can be removed by dragging.
80
If 'obj' is not given, check without filter by any particular object.
81

82
obj : App.DocumentObject
83
    Object to be dragged.</UserDocu>
84
            </Documentation>
85
        </Methode>
86
        <Methode Name="dragObject">
87
            <Documentation>
88
                <UserDocu>dragObject(obj) -> None
89

90
Remove a child object by dropping.
91

92
obj : App.DocumentObject
93
    Object to be dragged.</UserDocu>
94
            </Documentation>
95
        </Methode>
96
        <Methode Name="canDropObject" Keyword="true">
97
            <Documentation>
98
                <UserDocu>canDropObject(obj=None, owner=None, subname, elem=None) -> bool
99

100
Check whether the child object can be added by dropping.
101
If 'obj' is not given, check without filter by any particular object.
102

103
obj : App.DocumentObject
104
    Object to be dropped.
105
owner : App.DocumentObject
106
    Parent object of the dropping object.
107
subname : str
108
    Subname reference to the dropping object. Optional.
109
elem : sequence of str
110
    Non-objects subelements selected when the object is
111
    being dropped.</UserDocu>
112
            </Documentation>
113
        </Methode>
114
        <Methode Name="dropObject" Keyword="true">
115
            <Documentation>
116
                <UserDocu>dropObject(obj, owner=None, subname, elem=None) -> str
117

118
Add a child object by dropping.
119

120
obj : App.DocumentObject
121
    Object to be dropped.
122
owner : App.DocumentObject
123
    Parent object of the dropping object.
124
subname : str
125
    Subname reference to the dropping object. Optional.
126
elem : sequence of str
127
    Non-objects subelements selected when the object is
128
    being dropped.</UserDocu>
129
</Documentation>
130
        </Methode>
131
        <Methode Name="canDragAndDropObject">
132
            <Documentation>
133
                <UserDocu>canDragAndDropObject(obj) -> bool
134

135
Check whether the child object can be removed from
136
other parent and added here by drag and drop.
137

138
obj : App.DocumentObject
139
    Object to be dragged and dropped.</UserDocu>
140
            </Documentation>
141
        </Methode>
142
        <Methode Name="replaceObject">
143
            <Documentation>
144
                <UserDocu>replaceObject(oldObj, newObj) -> int
145

146
Replace a child object.
147
Returns 1 if succeeded, 0 if not found, -1 if not supported.
148

149
oldObj : App.DocumentObject
150
    Old object.
151
newObj : App.DocumentObject
152
    New object.</UserDocu>
153
            </Documentation>
154
        </Methode>
155
        <Methode Name="doubleClicked">
156
            <Documentation>
157
                <UserDocu>doubleClicked() -> bool
158

159
Trigger double clicking the corresponding tree item of this view object.</UserDocu>
160
            </Documentation>
161
        </Methode>
162
        <Methode Name="addDisplayMode">
163
            <Documentation>
164
                <UserDocu>addDisplayMode(obj, mode) -> None
165

166
Add a new display mode to the view provider.
167

168
obj : coin.SoNode
169
    Display mode.
170
mode : str
171
    Name of the display mode.</UserDocu>
172
            </Documentation>
173
        </Methode>
174
        <Methode Name="listDisplayModes">
175
            <Documentation>
176
                <UserDocu>listDisplayModes() -> list
177

178
Show a list of all display modes.</UserDocu>
179
            </Documentation>
180
        </Methode>
181
        <Methode Name="toString">
182
            <Documentation>
183
                <UserDocu>toString() -> str
184

185
Return a string representation of the Inventor node.</UserDocu>
186
            </Documentation>
187
        </Methode>
188
        <Methode Name="setTransformation">
189
            <Documentation>
190
                <UserDocu>setTransformation(trans) -> None
191

192
Set a transformation on the Inventor node.
193

194
trans : Base.Placement, Base.Matrix</UserDocu>
195
            </Documentation>
196
        </Methode>
197
        <Methode Name="claimChildren" Const="true">
198
            <Documentation>
199
                <UserDocu>claimChildren() -> list
200

201
Returns list of objects that are to be grouped in tree under this object.</UserDocu>
202
            </Documentation>
203
        </Methode>
204
        <Methode Name="claimChildrenRecursive" Const="true">
205
            <Documentation>
206
                <UserDocu>claimChildrenRecursive() -> list
207

208
Returns list of objects that are to be grouped in tree under this object recursively.</UserDocu>
209
            </Documentation>
210
        </Methode>
211
        <Methode Name="partialRender">
212
            <Documentation>
213
                <UserDocu>partialRender(sub=None, clear=False) -> int
214

215
Render only part of the object.
216

217
sub: None, str, sequence of str
218
    Refer to the subelement. If it is None then reset the partial rendering.
219
clear: bool
220
    True to add, or False to remove the subelement(s) for rendering.</UserDocu>
221
            </Documentation>
222
        </Methode>
223
        <Methode Name="getElementColors">
224
            <Documentation>
225
                <UserDocu>getElementColors(elementName) -> dict
226

227
Get a dictionary of the form {elementName : (r,g,b,a)}.
228
If no element name is given a dictionary with all the elements is returned.
229

230
elementName : str
231
    Name of the element. Optional.</UserDocu>
232
            </Documentation>
233
        </Methode>
234
        <Methode Name="setElementColors">
235
            <Documentation>
236
                <UserDocu>setElementColors(colors) -> None
237

238
Set element colors.
239

240
colors: dict
241
    Color dictionary of the form {elementName:(r,g,b,a)}.</UserDocu>
242
            </Documentation>
243
        </Methode>
244
        <Methode Name="getElementPicked" Const="true">
245
            <Documentation>
246
                <UserDocu>getElementPicked(pickPoint) -> str
247

248
Return the picked subelement.
249

250
pickPoint : coin.SoPickedPoint</UserDocu>
251
            </Documentation>
252
        </Methode>
253
        <Methode Name="getDetailPath" Const="true">
254
            <Documentation>
255
                <UserDocu>getDetailPath(subelement, path, append=True) -> coin.SoDetail or None
256

257
Return Coin detail and path of an subelement.
258

259
subname: str
260
    Dot separated string reference to the sub element.
261
pPath: coin.SoPath
262
    Output coin path leading to the returned element detail.
263
append: bool
264
    If True, path will be first appended with the root node and the mode
265
    switch node of this view provider.</UserDocu>
266
            </Documentation>
267
        </Methode>
268
        <Methode Name="signalChangeIcon" Const="true">
269
            <Documentation>
270
                <UserDocu>signalChangeIcon() -> None
271

272
Trigger icon changed signal.</UserDocu>
273
            </Documentation>
274
        </Methode>
275
        <Methode Name="getBoundingBox">
276
            <Documentation>
277
                <UserDocu>getBoundingBox(subName, transform=True, view) -> Base.BoundBox
278

279
Obtain the bounding box of this view object.
280

281
subName : str
282
    Name referring a sub-object. Optional.
283
transform: bool
284
    Whether to apply the transformation matrix of this view provider.
285
view: View3DInventorPy
286
    Default to active view. Optional.</UserDocu>
287
            </Documentation>
288
        </Methode>
289
        <Attribute Name="Annotation" ReadOnly="false">
290
            <Documentation>
291
                <UserDocu>A pivy Separator to add a custom scenegraph to this ViewProvider.</UserDocu>
292
            </Documentation>
293
            <Parameter Name="Annotation" Type="Object" />
294
        </Attribute>
295
    <Attribute Name="Icon" ReadOnly="true">
296
      <Documentation>
297
        <UserDocu>The icon of this ViewProvider.</UserDocu>
298
      </Documentation>
299
      <Parameter Name="Icon" Type="Object" />
300
    </Attribute>
301
    <Attribute Name="RootNode" ReadOnly="false">
302
      <Documentation>
303
        <UserDocu>A pivy Separator with the root of this ViewProvider.</UserDocu>
304
      </Documentation>
305
      <Parameter Name="RootNode" Type="Object" />
306
    </Attribute>
307
    <Attribute Name="SwitchNode" ReadOnly="false">
308
      <Documentation>
309
        <UserDocu>A pivy SoSwitch for the display mode switch of this ViewProvider.</UserDocu>
310
      </Documentation>
311
      <Parameter Name="SwitchNode" Type="Object" />
312
    </Attribute>
313
    <Attribute Name="DefaultMode" ReadOnly="false">
314
      <Documentation>
315
        <UserDocu>Get/Set the default display mode in turns of coin node index.</UserDocu>
316
      </Documentation>
317
      <Parameter Name="DefaultNode" Type="Int" />
318
    </Attribute>
319
    <Attribute Name="IV" ReadOnly="true">
320
      <Documentation>
321
        <UserDocu>Represents the whole ViewProvider as an Inventor string.</UserDocu>
322
      </Documentation>
323
      <Parameter Name="IV" Type="String" />
324
    </Attribute>
325
    <Attribute Name="CanRemoveChildrenFromRoot" ReadOnly="true">
326
      <Documentation>
327
        <UserDocu>Tells the tree view whether to remove the children item from root or not.</UserDocu>
328
      </Documentation>
329
      <Parameter Name="CanRemoveChildrenFromRoot" Type="Boolean" />
330
    </Attribute>
331
    <Attribute Name="LinkVisibility">
332
      <Documentation>
333
          <UserDocu>Get/set visibilities of all links to this view object.</UserDocu>
334
      </Documentation>
335
      <Parameter Name="LinkVisibility" Type="Boolean" />
336
    </Attribute>
337
    <Attribute Name="DropPrefix" ReadOnly="true" >
338
      <Documentation>
339
          <UserDocu>Subname referencing the sub-object for holding dropped object.</UserDocu>
340
      </Documentation>
341
      <Parameter Name="DropPrefix" Type="String" />
342
    </Attribute>
343
  </PythonExport>
344
</GenerateModel>
345

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.