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
|
|
32 #ifdef CPP_SHARED
|
|
33 QTD_EXPORT_VAR(_d_toUtf8)
|
|
34 QTD_EXPORT_VAR(__qtd_dummy)
|
|
35
|
|
36 extern "C" DLL_PUBLIC void __qtd_qtd_core_initCallBacks(pfunc_abstr d_func, pfunc_abstr dummy) {
|
|
37 QTD_EXPORT_VAR_SET(_d_toUtf8, d_func);
|
|
38 QTD_EXPORT_VAR_SET(__qtd_dummy, dummy);
|
|
39 // std::cout << _d_toUtf8 << "\n";
|
|
40 }
|
|
41 #endif
|