add bindings for QGraphicsSceneDragDropEvent
[qtscriptgenerator.git] / generator / typesystem_gui-qtscript.xml
blobe6139528aede33ef1e8ac84c097ac5e063ad304b
1 <?xml version="1.0"?>
2 <typesystem package="com.trolltech.qt.gui">
4   <rejection class="QAbstractTextDocumentLayout"/>
5   <rejection class="QColormap"/>
6   <rejection class="QFontDatabase"/>
7   <rejection class="QIconEngineV2"/>
8   <rejection class="QInputMethodEvent"/>
9   <rejection class="QPainterPath::Element"/>
10   <rejection class="QTextBlock::iterator"/>
11   <rejection class="QTextEdit::ExtraSelection"/>
12   <rejection class="QTextFrame::iterator"/>
13   <rejection class="QTextLayout::FormatRange"/>
14   <rejection class="QTreeWidgetItemIterator"/>
16   <!-- ### the generator uses the java name -->
17   <rejection class="QAccessibleFactoryInterface"/>
18   <rejection class="QIconEngineFactoryInterfaceV2"/>
19   <rejection class="QImageIOHandlerFactoryInterface"/>  
20   <rejection class="QInputContextFactoryInterface"/>
21   <rejection class="QStyleFactoryInterface"/>
22   <rejection class="QPictureFormatInterface"/>
24   <!-- ### these don't compile -->
25   <rejection class="QAbstractProxyModel"/>
26   <rejection class="QSortFilterProxyModel"/>
27   <rejection class="QDirModel"/>
28   <rejection class="QFileSystemModel"/>
29   <rejection class="QPrinterInfo"/>
30   <rejection class="QProxyModel"/>
31   <rejection class="QPrinterInfo"/> <!-- ### constructor takes QPrinter&, must become QPrinter* -->
32   <rejection class="QTextOption"/> <!-- ### nested class QTextOption::Tab -->
34   <value-type name="QTextFormat">
35     <modify-function signature="setProperty(int,QVector&lt;QTextLength&gt;)" rename="setLengthVectorProperty"/>
36     <inject-code class="native" position="constructor">
37     if ((context-&gt;argumentCount() == 1) &amp;&amp; (qMetaTypeId&lt;QTextFormat&gt;() == context-&gt;argument(0).toVariant().userType())) {
38         QTextFormat _q_arg0 = qscriptvalue_cast&lt;QTextFormat&gt;(context->argument(0));
39         QTextFormat _q_cpp_result(_q_arg0);
40         QScriptValue _q_result = context-&gt;engine()-&gt;newVariant(context-&gt;thisObject(), qVariantFromValue(_q_cpp_result));
41         return _q_result;
42     }
43     </inject-code>
44   </value-type>
46   <value-type name="QBrush">
47     <modify-function signature="QBrush(QGradient)">
48       <modify-argument index="1">
49         <replace-type modified-type="QGradient*"/>
50         <conversion-rule class="native">
51         QGradient &amp; %out% = *qscriptvalue_cast&lt;QGradient*&gt;(%in%);
52         </conversion-rule>            
53       </modify-argument>
54     </modify-function>
55   </value-type>
57   <interface-type name="QGraphicsItem">
58     <modify-function signature="supportsExtension(QGraphicsItem::Extension)const" remove="all"/>
59     <modify-function signature="setExtension(QGraphicsItem::Extension,QVariant)" remove="all"/>
60   </interface-type>
62   <object-type name="QGraphicsItemAnimation">
63     <extra-includes>
64         <include file-name="QPair" location="global"/>
65     </extra-includes>
66   </object-type>
68   <value-type name="QFontInfo">
69     <modify-function signature="QFontInfo(QFontInfo)">
70       <modify-argument index="1">
71         <replace-type modified-type="QFontInfo*"/>
72         <conversion-rule class="native">
73         QFontInfo &amp; %out% = *qscriptvalue_cast&lt;QFontInfo*&gt;(%in%);
74         </conversion-rule>            
75       </modify-argument>
76     </modify-function>
77   </value-type>
79   <!-- ### QFontMetrics and QFontMetricsF are value-typed but don't have default constructor -->
80   <value-type name="QFontMetrics">
81     <modify-function signature="QFontMetrics(QFontMetrics)" remove="all"/>
82     <modify-function signature="operator==(QFontMetrics)const" remove="all"/>
83     <modify-function signature="operator!=(QFontMetrics)const" remove="all"/>
84   </value-type>
85   <value-type name="QFontMetricsF">
86     <modify-function signature="QFontMetricsF(QFontMetricsF)" remove="all"/>
87     <modify-function signature="QFontMetricsF(QFontMetrics)" remove="all"/>
88     <modify-function signature="operator==(QFontMetricsF)const" remove="all"/>
89     <modify-function signature="operator!=(QFontMetricsF)const" remove="all"/>
90   </value-type>
92   <object-type name="QFontDialog">
93     <inject-code class="native" position="beginning">
94     Q_DECLARE_METATYPE(QScriptValue)
95     </inject-code>
96     <modify-function signature="getFont(bool*,QWidget*)">
97         <modify-argument index="1">
98           <remove-argument/>
99           <conversion-rule class="native">
100           <insert-template name="core.prepare_removed_bool*_argument"/>
101           </conversion-rule>            
102         </modify-argument>
103         <modify-argument index="return">
104           <conversion-rule class="native">
105           <insert-template name="core.convert_to_null_or_wrap"/>
106           </conversion-rule>
107         </modify-argument>
108     </modify-function>
110     <modify-function signature="getFont(bool*,QFont,QWidget*)">
111         <modify-argument index="1">
112           <remove-argument/>
113           <conversion-rule class="native">
114           <insert-template name="core.prepare_removed_bool*_argument"/>
115           </conversion-rule>            
116         </modify-argument>
117         <modify-argument index="return">
118           <conversion-rule class="native">
119           <insert-template name="core.convert_to_null_or_wrap"/>
120           </conversion-rule>
121         </modify-argument>
122     </modify-function>
124     <modify-function signature="getFont(bool*,QFont,QWidget*,QString)">
125         <modify-argument index="1">
126           <remove-argument/>
127           <conversion-rule class="native">
128           <insert-template name="core.prepare_removed_bool*_argument"/>
129           </conversion-rule>            
130         </modify-argument>
131         <modify-argument index="return">
132           <conversion-rule class="native">
133           <insert-template name="core.convert_to_null_or_wrap"/>
134           </conversion-rule>
135         </modify-argument>
136     </modify-function>
137   </object-type>
139   <value-type name="QImage">
140     <modify-function signature="QImage(const char**)" remove="all"/>
141     <modify-function signature="QImage(const uchar *,int,int,QImage::Format)" remove="all"/>
142     <modify-function signature="QImage(const uchar *,int,int,int,QImage::Format)" remove="all"/>
143     <modify-function signature="QImage(uchar *,int,int,QImage::Format)" remove="all"/>
144     <modify-function signature="QImage(uchar *,int,int,int,QImage::Format)" remove="all"/>
145     <modify-function signature="setColorTable(const QVector&lt;uint&gt;)" remove="all"/>
146     <modify-function signature="loadFromData(const uchar *,int,const char *)" remove="all"/>
147     <modify-function signature="fromData(const uchar *,int,const char *)" remove="all"/>
148     <modify-function signature="bits()" remove="all"/>
149     <modify-function signature="scanLine(int)" remove="all"/>
151     <modify-function signature="QImage(QString,const char*)">
152       <modify-argument index="2">
153         <replace-type modified-type="QString"/>
154         <conversion-rule class="native">
155           <insert-template name="core.convert_string_arg_to_char*"/>
156         </conversion-rule>            
157       </modify-argument>
158     </modify-function>
160     <modify-function signature="fromData(QByteArray,const char*)">
161       <modify-argument index="2">
162         <replace-type modified-type="QString"/>
163         <conversion-rule class="native">
164           <insert-template name="core.convert_string_arg_to_char*"/>
165         </conversion-rule>            
166       </modify-argument>
167     </modify-function>
169     <modify-function signature="load(QString,const char*)">
170       <modify-argument index="2">
171         <replace-type modified-type="QString"/>
172         <conversion-rule class="native">
173           <insert-template name="core.convert_string_arg_to_char*"/>
174         </conversion-rule>            
175       </modify-argument>
176     </modify-function>
178     <modify-function signature="load(QIODevice*,const char*)">
179       <modify-argument index="2">
180         <replace-type modified-type="QString"/>
181         <conversion-rule class="native">
182           <insert-template name="core.convert_string_arg_to_char*"/>
183         </conversion-rule>            
184       </modify-argument>
185     </modify-function>
187     <modify-function signature="loadFromData(QByteArray,const char*)">
188       <modify-argument index="2">
189         <replace-type modified-type="QString"/>
190         <conversion-rule class="native">
191           <insert-template name="core.convert_string_arg_to_char*"/>
192         </conversion-rule>            
193       </modify-argument>
194     </modify-function>
196     <modify-function signature="save(QString,const char*,int)const">
197       <modify-argument index="2">
198         <replace-type modified-type="QString"/>
199         <conversion-rule class="native">
200           <insert-template name="core.convert_string_arg_to_char*"/>
201         </conversion-rule>            
202       </modify-argument>
203     </modify-function>
205     <modify-function signature="save(QIODevice*,const char*,int)const">
206       <modify-argument index="2">
207         <replace-type modified-type="QString"/>
208         <conversion-rule class="native">
209           <insert-template name="core.convert_string_arg_to_char*"/>
210         </conversion-rule>            
211       </modify-argument>
212     </modify-function>
214   </value-type>
216   <object-type name="QInputDialog">
217     <inject-code class="native" position="beginning">
218     Q_DECLARE_METATYPE(QScriptValue)
219     </inject-code>
220     <modify-function signature="getDouble(QWidget *, const QString &amp;, const QString &amp;, double, double, double, int, bool *, QFlags&lt;Qt::WindowType&gt;)">
221         <modify-argument index="8">
222           <remove-argument/>
223           <conversion-rule class="native">
224           <insert-template name="core.prepare_removed_bool*_argument"/>
225           </conversion-rule>            
226         </modify-argument>
227         <modify-argument index="return">
228           <conversion-rule class="native">
229           <insert-template name="core.convert_to_null_or_primitive"/>
230           </conversion-rule>
231         </modify-argument>
232     </modify-function>
233     
234     <modify-function signature="getInteger(QWidget *, const QString &amp;, const QString &amp;, int, int, int, int, bool *, QFlags&lt;Qt::WindowType&gt;)">
235         <modify-argument index="8">
236           <remove-argument/>
237           <conversion-rule class="native">
238           <insert-template name="core.prepare_removed_bool*_argument"/>
239           </conversion-rule>            
240         </modify-argument>
241         <modify-argument index="return">
242           <conversion-rule class="native">
243           <insert-template name="core.convert_to_null_or_primitive"/>
244           </conversion-rule>
245         </modify-argument>
246     </modify-function>
247       
248     <modify-function signature="getItem(QWidget *, const QString &amp;, const QString &amp;, const QStringList&lt;QString&gt; &amp;, int, bool, bool *, QFlags&lt;Qt::WindowType&gt;)">
249         <modify-argument index="7">
250           <remove-argument/>
251           <conversion-rule class="native">
252           <insert-template name="core.prepare_removed_bool*_argument"/>
253           </conversion-rule>            
254         </modify-argument>
255         <modify-argument index="return">
256           <conversion-rule class="native">
257           <insert-template name="core.convert_to_null_or_primitive"/>
258           </conversion-rule>
259         </modify-argument>
260     </modify-function>
261    
262     <modify-function signature="getText(QWidget *, const QString &amp;, const QString &amp;, QLineEdit::EchoMode, const QString &amp;, bool *, QFlags&lt;Qt::WindowType&gt;)">
263         <modify-argument index="6">
264           <remove-argument/>
265           <conversion-rule class="native">
266           <insert-template name="core.prepare_removed_bool*_argument"/>
267           </conversion-rule>            
268         </modify-argument>
269         <modify-argument index="return">
270           <conversion-rule class="native">
271           <insert-template name="core.convert_to_null_or_primitive"/>
272           </conversion-rule>
273         </modify-argument>
274     </modify-function>
275   </object-type>
277   <object-type name="QListWidgetItem">
278     <modify-function signature="read(QDataStream &amp;)" remove="all"/>
279     <modify-function signature="write(QDataStream &amp;)const" remove="all"/>
280     <modify-function signature="QListWidgetItem(QListWidgetItem)" remove="all"/>
281     <modify-function signature="operator=(QListWidgetItem)" remove="all"/>
282     <modify-function signature="operator&lt;(QListWidgetItem)const" remove="all"/>
283   </object-type>
285   <object-type name="QTableWidgetItem">
286     <modify-function signature="read(QDataStream &amp;)" remove="all"/>
287     <modify-function signature="write(QDataStream &amp;)const" remove="all"/>
288     <modify-function signature="QTableWidgetItem(QTableWidgetItem)" remove="all"/>
289     <modify-function signature="operator=(QTableWidgetItem)" remove="all"/>
290     <modify-function signature="operator&lt;(QTableWidgetItem)const" remove="all"/>
291   </object-type>
293   <object-type name="QTreeWidgetItem">
294     <modify-function signature="read(QDataStream &amp;)" remove="all"/>
295     <modify-function signature="write(QDataStream &amp;)const" remove="all"/>
296     <modify-function signature="QTreeWidgetItem(QTreeWidgetItem)" remove="all"/>
297     <modify-function signature="operator=(QTreeWidgetItem)" remove="all"/>
298     <modify-function signature="operator&lt;(QTreeWidgetItem)const" remove="all"/>
299   </object-type>
301   <object-type name="QStandardItem">
302     <modify-function signature="read(QDataStream &amp;)" remove="all"/>
303     <modify-function signature="write(QDataStream &amp;)const" remove="all"/>
304     <modify-function signature="operator=(QStandardItem)" remove="all"/>
305     <modify-function signature="operator&lt;(QStandardItem)const" remove="all"/>
306   </object-type>
308   <object-type name="QPainter">
309     <modify-function signature="fontInfo()const" remove="all"/>
310     <modify-function signature="fontMetrics()const" remove="all"/>
311     <modify-function signature="QPainter(QPaintDevice*)" remove="all"/>
313     <modify-function signature="begin(QPaintDevice*)">
314       <modify-argument index="1">
315         <conversion-rule class="native">
316         <insert-template name="core.convert_pointer_arg_and_check_null">
317           <replace from="%TYPE%" to="QPaintDevice*"/>
318           <replace from="%CLASS_NAME%" to="QPainter"/>
319           <replace from="%FUNCTION_NAME%" to="begin"/>
320         </insert-template>
321         </conversion-rule>            
322       </modify-argument>
323     </modify-function>
324   </object-type>
326   <object-type name="QPrinter">
327     <extra-includes>
328         <include file-name="QPrinterInfo" location="global"/>
329     </extra-includes>
330   </object-type>
332   <object-type name="QStyle">
333     <modify-function signature="itemTextRect(QFontMetrics,QRect,int,bool,QString)const" remove="all"/>
334   </object-type>
336   <object-type name="QWidget">
337     <modify-function signature="fontInfo()const" remove="all"/>
338     <modify-function signature="fontMetrics()const" remove="all"/>
339     <modify-function signature="sizeHint()const" rename="getSizeHint"/>
340     <modify-function signature="minimumSizeHint()const" rename="getMinimumSizeHint"/>
341     <modify-function signature="setVisible(bool)" remove="all"/>
342   </object-type>
344   <!-- FIXME -->
345   <object-type name="QCalendarWidget">
346       <modify-function signature="sizeHint()const" rename="getSizeHint"/>
347       <modify-function signature="minimumSizeHint()const" rename="getMinimumSizeHint"/>
348   </object-type>
350   <object-type name="QAbstractItemView">
351     <!-- ### because the CursorAction enum is protected -->
352     <modify-function signature="moveCursor(QAbstractItemView::CursorAction,QFlags&lt;Qt::KeyboardModifier&gt;)" remove="all"/>
353     <inject-code class="shell-declaration">
354     QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers)
355     { return QModelIndex(); }
356     </inject-code>
357   </object-type>
359   <object-type name="QAbstractSlider">
360     <modify-function signature="sliderChange(QAbstractSlider::SliderChange)" remove="all"/>
361   </object-type>
363   <object-type name="QListWidget">
364     <modify-function signature="mimeData(const QList&lt;QListWidgetItem*&gt;)const" remove="all"/>
365   </object-type>
367   <object-type name="QTableWidget">
368     <modify-function signature="mimeData(const QList&lt;QTableWidgetItem*&gt;)const" remove="all"/>
369   </object-type>
371   <object-type name="QTreeWidget">
372     <modify-function signature="mimeData(const QList&lt;QTreeWidgetItem*&gt;)const" remove="all"/>
373   </object-type>
375   <object-type name="QApplication">
376     <modify-function signature="QApplication(int&amp;,char**,QApplication::Type,int)" remove="all"/>
377     <modify-function signature="QApplication(int&amp;,char**,bool,int)" remove="all"/>
378     <modify-function signature="QApplication(int&amp;,char**,int)" remove="all"/>
379     <modify-function signature="commitData(QSessionManager&amp;)" remove="all"/>
380     <modify-function signature="saveState(QSessionManager&amp;)" remove="all"/>
381     <modify-function signature="fontMetrics()" remove="all"/>
382     <modify-function signature="setFont(QFont,const char*)">
383       <modify-argument index="2">
384         <replace-type modified-type="QString"/>
385         <conversion-rule class="native">
386           <insert-template name="core.convert_string_arg_to_char*"/>
387         </conversion-rule>            
388       </modify-argument>
389     </modify-function>
390     <modify-function signature="setPalette(QPalette,const char*)">
391       <modify-argument index="2">
392         <replace-type modified-type="QString"/>
393         <conversion-rule class="native">
394           <insert-template name="core.convert_string_arg_to_char*"/>
395         </conversion-rule>            
396       </modify-argument>
397     </modify-function>
398   </object-type>
400   <value-type name="QPicture">
401     <modify-function signature="setData(const char*,uint)" remove="all"/>
403     <modify-function signature="load(QIODevice*,const char*)">
404       <modify-argument index="2">
405         <replace-type modified-type="QString"/>
406         <conversion-rule class="native">
407           <insert-template name="core.convert_string_arg_to_char*"/>
408         </conversion-rule>            
409       </modify-argument>
410     </modify-function>
412     <modify-function signature="load(QString,const char*)">
413       <modify-argument index="2">
414         <replace-type modified-type="QString"/>
415         <conversion-rule class="native">
416           <insert-template name="core.convert_string_arg_to_char*"/>
417         </conversion-rule>            
418       </modify-argument>
419     </modify-function>
421     <modify-function signature="save(QIODevice*,const char*)">
422       <modify-argument index="2">
423         <replace-type modified-type="QString"/>
424         <conversion-rule class="native">
425           <insert-template name="core.convert_string_arg_to_char*"/>
426         </conversion-rule>            
427       </modify-argument>
428     </modify-function>
430     <modify-function signature="save(QString,const char*)">
431       <modify-argument index="2">
432         <replace-type modified-type="QString"/>
433         <conversion-rule class="native">
434           <insert-template name="core.convert_string_arg_to_char*"/>
435         </conversion-rule>            
436       </modify-argument>
437     </modify-function>
438   </value-type>
440   <object-type name="QPictureIO">
441     <modify-function signature="QPictureIO(QIODevice*,const char*)">
442       <modify-argument index="2">
443         <replace-type modified-type="QString"/>
444         <conversion-rule class="native">
445           <insert-template name="core.convert_string_arg_to_char*"/>
446         </conversion-rule>            
447       </modify-argument>
448     </modify-function>
450     <modify-function signature="QPictureIO(QString,const char*)">
451       <modify-argument index="2">
452         <replace-type modified-type="QString"/>
453         <conversion-rule class="native">
454           <insert-template name="core.convert_string_arg_to_char*"/>
455         </conversion-rule>            
456       </modify-argument>
457     </modify-function>
459     <modify-function signature="setFormat(const char*)">
460       <modify-argument index="1">
461         <replace-type modified-type="QString"/>
462         <conversion-rule class="native">
463           <insert-template name="core.convert_string_arg_to_char*"/>
464         </conversion-rule>            
465       </modify-argument>
466     </modify-function>
468     <modify-function signature="setParameters(const char*)">
469       <modify-argument index="1">
470         <replace-type modified-type="QString"/>
471         <conversion-rule class="native">
472           <insert-template name="core.convert_string_arg_to_char*"/>
473         </conversion-rule>            
474       </modify-argument>
475     </modify-function>
476   </object-type>
478   <value-type name="QPixmap">
479     <modify-function signature="loadFromData(const uchar *,uint,const char *,QFlags&lt;Qt::ImageConversionFlag&gt;)" remove="all"/>
481     <modify-function signature="QPixmap(QString,const char*,QFlags&lt;Qt::ImageConversionFlag&gt;)">
482       <modify-argument index="2">
483         <replace-type modified-type="QString"/>
484         <conversion-rule class="native">
485           <insert-template name="core.convert_string_arg_to_char*"/>
486         </conversion-rule>            
487       </modify-argument>
488     </modify-function>
490     <modify-function signature="load(QString,const char*,QFlags&lt;Qt::ImageConversionFlag&gt;)">
491       <modify-argument index="2">
492         <replace-type modified-type="QString"/>
493         <conversion-rule class="native">
494           <insert-template name="core.convert_string_arg_to_char*"/>
495         </conversion-rule>            
496       </modify-argument>
497     </modify-function>
499     <modify-function signature="loadFromData(QByteArray,const char*,QFlags&lt;Qt::ImageConversionFlag&gt;)">
500       <modify-argument index="2">
501         <replace-type modified-type="QString"/>
502         <conversion-rule class="native">
503           <insert-template name="core.convert_string_arg_to_char*"/>
504         </conversion-rule>            
505       </modify-argument>
506     </modify-function>
508     <modify-function signature="save(QIODevice*,const char*,int)const">
509       <modify-argument index="2">
510         <replace-type modified-type="QString"/>
511         <conversion-rule class="native">
512           <insert-template name="core.convert_string_arg_to_char*"/>
513         </conversion-rule>            
514       </modify-argument>
515     </modify-function>
517     <modify-function signature="save(QString,const char*,int)const">
518       <modify-argument index="2">
519         <replace-type modified-type="QString"/>
520         <conversion-rule class="native">
521           <insert-template name="core.convert_string_arg_to_char*"/>
522         </conversion-rule>            
523       </modify-argument>
524     </modify-function>
525   </value-type>
527   <value-type name="QBitmap">
528     <modify-function signature="fromData(QSize,const uchar*,QImage::Format)" remove="all"/>
530     <modify-function signature="QBitmap(QString,const char*)">
531       <modify-argument index="2">
532         <replace-type modified-type="QString"/>
533         <conversion-rule class="native">
534           <insert-template name="core.convert_string_arg_to_char*"/>
535         </conversion-rule>            
536       </modify-argument>
537     </modify-function>
538   </value-type>
540   <value-type name="QMatrix">
541       <modify-function signature="inverted(bool*)const">
542         <modify-argument index="1">
543             <remove-argument/>
544         </modify-argument>
545       </modify-function>
546   </value-type>
548   <value-type name="QTransform">
549       <modify-function signature="inverted(bool*)const">
550         <modify-argument index="1">
551             <remove-argument/>
552         </modify-argument>
553       </modify-function>
554   </value-type>
556   <suppress-warning text="WARNING(MetaJavaBuilder) :: Rejected enum has no alternative...: QPalette::NColorRoles" />
557   <suppress-warning text="WARNING(MetaJavaBuilder) :: Cannot find enum constant for value 'DragMove' in 'QDragMoveEvent' or any of its super classes" />
559 </typesystem>