File: qobject_c.cpp

package info (click to toggle)
libqtpas 2.6%2B2.0.8%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,860 kB
  • sloc: cpp: 56,595; pascal: 13,727; sh: 44; makefile: 18
file content (186 lines) | stat: -rw-r--r-- 5,240 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
//******************************************************************************
//  Copyright (c) 2005-2013 by Jan Van hijfte
//
//  See the included file COPYING.TXT for details about the copyright.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//******************************************************************************


#include "qobject_c.h"

QObjectH QObject_Create(QObjectH parent)
{
	return (QObjectH) new QObject((QObject*)parent);
}

void QObject_Destroy(QObjectH handle)
{
	delete (QObject *)handle;
}

bool QObject_event(QObjectH handle, QEventH AnonParam1)
{
	return (bool) ((QObject *)handle)->event((QEvent*)AnonParam1);
}

bool QObject_eventFilter(QObjectH handle, QObjectH AnonParam1, QEventH AnonParam2)
{
	return (bool) ((QObject *)handle)->eventFilter((QObject*)AnonParam1, (QEvent*)AnonParam2);
}

void QObject_objectName(QObjectH handle, PWideString retval)
{
	QString t_retval;
	t_retval = ((QObject *)handle)->objectName();
	copyQStringToPWideString(t_retval, retval);
}

void QObject_setObjectName(QObjectH handle, PWideString name)
{
	QString t_name;
	copyPWideStringToQString(name, t_name);
	((QObject *)handle)->setObjectName(t_name);
}

bool QObject_isWidgetType(QObjectH handle)
{
	return (bool) ((QObject *)handle)->isWidgetType();
}

bool QObject_isWindowType(QObjectH handle)
{
	return (bool) ((QObject *)handle)->isWindowType();
}

bool QObject_signalsBlocked(QObjectH handle)
{
	return (bool) ((QObject *)handle)->signalsBlocked();
}

bool QObject_blockSignals(QObjectH handle, bool b)
{
	return (bool) ((QObject *)handle)->blockSignals(b);
}

QThreadH QObject_thread(QObjectH handle)
{
	return (QThreadH) ((QObject *)handle)->thread();
}

void QObject_moveToThread(QObjectH handle, QThreadH thread)
{
	((QObject *)handle)->moveToThread((QThread*)thread);
}

int QObject_startTimer(QObjectH handle, int interval, Qt::TimerType timerType)
{
	return (int) ((QObject *)handle)->startTimer(interval, timerType);
}

void QObject_killTimer(QObjectH handle, int id)
{
	((QObject *)handle)->killTimer(id);
}

void QObject_children(QObjectH handle, PPtrIntArray retval)
{
	QObjectList t_retval;
	t_retval = ((QObject *)handle)->children();
	copyQListTemplateToPtrIntArray(t_retval, retval);
}

void QObject_setParent(QObjectH handle, QObjectH AnonParam1)
{
	((QObject *)handle)->setParent((QObject*)AnonParam1);
}

void QObject_installEventFilter(QObjectH handle, QObjectH AnonParam1)
{
	((QObject *)handle)->installEventFilter((QObject*)AnonParam1);
}

void QObject_removeEventFilter(QObjectH handle, QObjectH AnonParam1)
{
	((QObject *)handle)->removeEventFilter((QObject*)AnonParam1);
}

void QObject_connect(const QObjectH sender, const char* signal, const QObjectH receiver, const char* member, Qt::ConnectionType AnonParam5)
{
	QObject::connect((const QObject*)sender, signal, (const QObject*)receiver, member, AnonParam5);
}

void QObject_connect2(const QObjectH sender, const QMetaMethodH signal, const QObjectH receiver, const QMetaMethodH method, Qt::ConnectionType type)
{
	QObject::connect((const QObject*)sender, *(const QMetaMethod*)signal, (const QObject*)receiver, *(const QMetaMethod*)method, type);
}

void QObject_connect3(QObjectH handle, const QObjectH sender, const char* signal, const char* member, Qt::ConnectionType type)
{
	((QObject *)handle)->connect((const QObject*)sender, signal, member, type);
}

bool QObject_disconnect(const QObjectH sender, const char* signal, const QObjectH receiver, const char* member)
{
	return (bool) QObject::disconnect((const QObject*)sender, signal, (const QObject*)receiver, member);
}

bool QObject_disconnect2(const QObjectH sender, const QMetaMethodH signal, const QObjectH receiver, const QMetaMethodH member)
{
	return (bool) QObject::disconnect((const QObject*)sender, *(const QMetaMethod*)signal, (const QObject*)receiver, *(const QMetaMethod*)member);
}

bool QObject_disconnect4(QObjectH handle, const QObjectH receiver, const char* member)
{
	return (bool) ((QObject *)handle)->disconnect((const QObject*)receiver, member);
}

void QObject_dumpObjectTree(QObjectH handle)
{
	((QObject *)handle)->dumpObjectTree();
}

void QObject_dumpObjectInfo(QObjectH handle)
{
	((QObject *)handle)->dumpObjectInfo();
}

bool QObject_setProperty(QObjectH handle, const char* name, const QVariantH value)
{
	return (bool) ((QObject *)handle)->setProperty(name, *(const QVariant*)value);
}

void QObject_property(QObjectH handle, QVariantH retval, const char* name)
{
	*(QVariant *)retval = ((QObject *)handle)->property(name);
}

uint QObject_registerUserData()
{
	return (uint) QObject::registerUserData();
}

QObjectH QObject_parent(QObjectH handle)
{
	return (QObjectH) ((QObject *)handle)->parent();
}

bool QObject_inherits(QObjectH handle, const char* classname)
{
	return (bool) ((QObject *)handle)->inherits(classname);
}

void QObject_deleteLater(QObjectH handle)
{
	((QObject *)handle)->deleteLater();
}

const QMetaObjectH QObject_metaObject(QObjectH handle)
{
  const QMetaObject *meta = ((QObject *)handle)->metaObject();
  if (!meta)
    return NULL;
  return (const QMetaObjectH) meta;
}