1 //******************************************************************************
2 //  Copyright (c) 2005-2013 by Jan Van hijfte
3 //
4 //  See the included file COPYING.TXT for details about the copyright.
5 //
6 //  This program is distributed in the hope that it will be useful,
7 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
8 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 //******************************************************************************
10 
11 
12 #include "qabstractitemdelegate_c.h"
13 
QAbstractItemDelegate_paint(QAbstractItemDelegateH handle,QPainterH painter,const QStyleOptionViewItemH option,const QModelIndexH index)14 void QAbstractItemDelegate_paint(QAbstractItemDelegateH handle, QPainterH painter, const QStyleOptionViewItemH option, const QModelIndexH index)
15 {
16 	((QAbstractItemDelegate *)handle)->paint((QPainter*)painter, *(const QStyleOptionViewItem*)option, *(const QModelIndex*)index);
17 }
18 
QAbstractItemDelegate_sizeHint(QAbstractItemDelegateH handle,PSize retval,const QStyleOptionViewItemH option,const QModelIndexH index)19 void QAbstractItemDelegate_sizeHint(QAbstractItemDelegateH handle, PSize retval, const QStyleOptionViewItemH option, const QModelIndexH index)
20 {
21 	*(QSize *)retval = ((QAbstractItemDelegate *)handle)->sizeHint(*(const QStyleOptionViewItem*)option, *(const QModelIndex*)index);
22 }
23 
QAbstractItemDelegate_createEditor(QAbstractItemDelegateH handle,QWidgetH parent,const QStyleOptionViewItemH option,const QModelIndexH index)24 QWidgetH QAbstractItemDelegate_createEditor(QAbstractItemDelegateH handle, QWidgetH parent, const QStyleOptionViewItemH option, const QModelIndexH index)
25 {
26 	return (QWidgetH) ((QAbstractItemDelegate *)handle)->createEditor((QWidget*)parent, *(const QStyleOptionViewItem*)option, *(const QModelIndex*)index);
27 }
28 
QAbstractItemDelegate_destroyEditor(QAbstractItemDelegateH handle,QWidgetH editor,const QModelIndexH index)29 void QAbstractItemDelegate_destroyEditor(QAbstractItemDelegateH handle, QWidgetH editor, const QModelIndexH index)
30 {
31 	((QAbstractItemDelegate *)handle)->destroyEditor((QWidget*)editor, *(const QModelIndex*)index);
32 }
33 
QAbstractItemDelegate_setEditorData(QAbstractItemDelegateH handle,QWidgetH editor,const QModelIndexH index)34 void QAbstractItemDelegate_setEditorData(QAbstractItemDelegateH handle, QWidgetH editor, const QModelIndexH index)
35 {
36 	((QAbstractItemDelegate *)handle)->setEditorData((QWidget*)editor, *(const QModelIndex*)index);
37 }
38 
QAbstractItemDelegate_setModelData(QAbstractItemDelegateH handle,QWidgetH editor,QAbstractItemModelH model,const QModelIndexH index)39 void QAbstractItemDelegate_setModelData(QAbstractItemDelegateH handle, QWidgetH editor, QAbstractItemModelH model, const QModelIndexH index)
40 {
41 	((QAbstractItemDelegate *)handle)->setModelData((QWidget*)editor, (QAbstractItemModel*)model, *(const QModelIndex*)index);
42 }
43 
QAbstractItemDelegate_updateEditorGeometry(QAbstractItemDelegateH handle,QWidgetH editor,const QStyleOptionViewItemH option,const QModelIndexH index)44 void QAbstractItemDelegate_updateEditorGeometry(QAbstractItemDelegateH handle, QWidgetH editor, const QStyleOptionViewItemH option, const QModelIndexH index)
45 {
46 	((QAbstractItemDelegate *)handle)->updateEditorGeometry((QWidget*)editor, *(const QStyleOptionViewItem*)option, *(const QModelIndex*)index);
47 }
48 
QAbstractItemDelegate_editorEvent(QAbstractItemDelegateH handle,QEventH event,QAbstractItemModelH model,const QStyleOptionViewItemH option,const QModelIndexH index)49 bool QAbstractItemDelegate_editorEvent(QAbstractItemDelegateH handle, QEventH event, QAbstractItemModelH model, const QStyleOptionViewItemH option, const QModelIndexH index)
50 {
51 	return (bool) ((QAbstractItemDelegate *)handle)->editorEvent((QEvent*)event, (QAbstractItemModel*)model, *(const QStyleOptionViewItem*)option, *(const QModelIndex*)index);
52 }
53 
QAbstractItemDelegate_elidedText(PWideString retval,const QFontMetricsH fontMetrics,int width,Qt::TextElideMode mode,PWideString text)54 void QAbstractItemDelegate_elidedText(PWideString retval, const QFontMetricsH fontMetrics, int width, Qt::TextElideMode mode, PWideString text)
55 {
56 	QString t_retval;
57 	QString t_text;
58 	copyPWideStringToQString(text, t_text);
59 	t_retval = QAbstractItemDelegate::elidedText(*(const QFontMetrics*)fontMetrics, width, mode, t_text);
60 	copyQStringToPWideString(t_retval, retval);
61 }
62 
QAbstractItemDelegate_helpEvent(QAbstractItemDelegateH handle,QHelpEventH event,QAbstractItemViewH view,const QStyleOptionViewItemH option,const QModelIndexH index)63 bool QAbstractItemDelegate_helpEvent(QAbstractItemDelegateH handle, QHelpEventH event, QAbstractItemViewH view, const QStyleOptionViewItemH option, const QModelIndexH index)
64 {
65 	return (bool) ((QAbstractItemDelegate *)handle)->helpEvent((QHelpEvent*)event, (QAbstractItemView*)view, *(const QStyleOptionViewItem*)option, *(const QModelIndex*)index);
66 }
67 
68