1
|
1 /**
|
|
2 *
|
|
3 * Copyright: Copyright QtD Team, 2008-2009
|
|
4 * License: <a href="http://www.boost.org/LICENSE_1_0.txt>Boost License 1.0</a>
|
|
5 *
|
|
6 * Copyright QtD Team, 2008-2009
|
|
7 * Distributed under the Boost Software License, Version 1.0.
|
|
8 * (See accompanying file boost-license-1.0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
9 *
|
|
10 */
|
|
11
|
|
12 #include "qtd_core.h"
|
|
13 #include <iostream>
|
|
14
|
|
15 extern "C" DLL_PUBLIC QModelIndex qtd_to_QModelIndex(QModelIndexAccessor mia)
|
|
16 {
|
|
17 return * (QModelIndex *) (&mia) ;
|
|
18 }
|
|
19
|
|
20 extern "C" DLL_PUBLIC QModelIndexAccessor qtd_from_QModelIndex(const QModelIndex &index)
|
|
21 {
|
|
22 QModelIndexAccessor mia = {
|
|
23 index.row(),
|
|
24 index.column(),
|
|
25 index.internalPointer(),
|
|
26 (QAbstractItemModel *) index.model()
|
|
27 };
|
|
28
|
|
29 return mia;
|
|
30 }
|
|
31
|
247
|
32 extern "C" DLL_PUBLIC const char* qtd_qVersion()
|
|
33 {
|
|
34 return qVersion();
|
|
35 }
|
|
36
|
|
37 extern "C" DLL_PUBLIC bool qtd_qSharedBuild()
|
|
38 {
|
|
39 return qSharedBuild();
|
|
40 }
|
|
41
|
1
|
42 #ifdef CPP_SHARED
|
252
|
43 QTD_EXPORT_VAR(_d_toUtf8)
|
|
44 QTD_EXPORT_VAR(__qtd_dummy)
|
1
|
45
|
252
|
46 extern "C" DLL_PUBLIC void __qtd_qtd_core_initCallBacks(pfunc_abstr d_func, pfunc_abstr dummy) {
|
|
47 QTD_EXPORT_VAR_SET(_d_toUtf8, d_func);
|
|
48 QTD_EXPORT_VAR_SET(__qtd_dummy, dummy);
|
|
49 // std::cout << _d_toUtf8 << "\n";
|
1
|
50 }
|
|
51 #endif
|
57
|
52
|
|
53 extern bool qRegisterResourceData
|
|
54 (int, const unsigned char *, const unsigned char *, const unsigned char *);
|
|
55
|
|
56 extern bool qUnregisterResourceData
|
|
57 (int, const unsigned char *, const unsigned char *, const unsigned char *);
|
|
58
|
|
59 extern "C" DLL_PUBLIC bool qtd_register_resource_data(int version, const unsigned char *tree,
|
|
60 const unsigned char *name, const unsigned char *data)
|
|
61 {
|
|
62 return qRegisterResourceData(version, tree, name, data);
|
|
63 }
|
|
64
|
|
65 extern "C" DLL_PUBLIC bool qtd_unregister_resource_data(int version, const unsigned char *tree,
|
|
66 const unsigned char *name, const unsigned char *data)
|
|
67 {
|
|
68 return qUnregisterResourceData(version, tree, name, data);
|
|
69 }
|