@@ -345,6 +345,7 bool ShellGenerator::isBuiltIn(const QString& name) { | |||
|
345 | 345 | builtIn.insert("QPixmap"); |
|
346 | 346 | builtIn.insert("QBrush"); |
|
347 | 347 | builtIn.insert("QBitArray"); |
|
348 | builtIn.insert("QByteArray"); | |
|
348 | 349 | builtIn.insert("QPalette"); |
|
349 | 350 | builtIn.insert("QPen"); |
|
350 | 351 | builtIn.insert("QIcon"); |
@@ -293,9 +293,8 void ShellHeaderGenerator::write(QTextStream &s, const AbstractMetaClass *meta_c | |||
|
293 | 293 | } |
|
294 | 294 | } |
|
295 | 295 | |
|
296 |
|
|
|
296 | writeInjectedCode(s, meta_class); | |
|
297 | 297 | |
|
298 | // s << endl << " QScriptValue __qtscript_self;" << endl; | |
|
299 | 298 | |
|
300 | 299 |
|
|
301 | 300 | << "#endif // " << include_block << endl; |
@@ -306,7 +305,7 void ShellHeaderGenerator::writeInjectedCode(QTextStream &s, const AbstractMetaC | |||
|
306 | 305 | { |
|
307 | 306 | CodeSnipList code_snips = meta_class->typeEntry()->codeSnips(); |
|
308 | 307 | foreach (const CodeSnip &cs, code_snips) { |
|
309 |
if (cs.language == TypeSystem:: |
|
|
308 | if (cs.language == TypeSystem::PyWrapperDeclaration) { | |
|
310 | 309 | s << cs.code() << endl; |
|
311 | 310 | } |
|
312 | 311 | } |
@@ -301,13 +301,15 void ShellImplGenerator::write(QTextStream &s, const AbstractMetaClass *meta_cla | |||
|
301 | 301 | s << "}" << endl << endl; |
|
302 | 302 | } |
|
303 | 303 | |
|
304 | writeInjectedCode(s, meta_class); | |
|
305 | ||
|
304 | 306 | } |
|
305 | 307 | |
|
306 | 308 | void ShellImplGenerator::writeInjectedCode(QTextStream &s, const AbstractMetaClass *meta_class) |
|
307 | 309 | { |
|
308 | 310 | CodeSnipList code_snips = meta_class->typeEntry()->codeSnips(); |
|
309 | 311 | foreach (const CodeSnip &cs, code_snips) { |
|
310 |
if (cs.language == TypeSystem:: |
|
|
312 | if (cs.language == TypeSystem::PyWrapperCode) { | |
|
311 | 313 | s << cs.code() << endl; |
|
312 | 314 | } |
|
313 | 315 | } |
@@ -1278,6 +1278,8 bool Handler::startElement(const QString &, const QString &n, | |||
|
1278 | 1278 | languageNames["destructor-function"] = TypeSystem::DestructorFunction; |
|
1279 | 1279 | languageNames["constructors"] = TypeSystem::Constructors; |
|
1280 | 1280 | languageNames["interface"] = TypeSystem::Interface; |
|
1281 | languageNames["pywrap-cpp"] = TypeSystem::PyWrapperCode; | |
|
1282 | languageNames["pywrap-h"] = TypeSystem::PyWrapperDeclaration; | |
|
1281 | 1283 | } |
|
1282 | 1284 | |
|
1283 | 1285 | QString className = attributes["class"].toLower(); |
@@ -101,6 +101,8 namespace TypeSystem { | |||
|
101 | 101 | DestructorFunction = 0x0020, |
|
102 | 102 | Constructors = 0x0040, |
|
103 | 103 | Interface = 0x0080, |
|
104 | PyWrapperCode = 0x0100, | |
|
105 | PyWrapperDeclaration = 0x0200, | |
|
104 | 106 | |
|
105 | 107 | // masks |
|
106 | 108 | All = TargetLangCode |
@@ -31,6 +31,8 | |||
|
31 | 31 | <rejection class="" enum-name="QtValidLicenseForScriptToolsModule" /> |
|
32 | 32 | <rejection class="" enum-name="QtValidLicenseForMultimediaModule" /> |
|
33 | 33 | <rejection class="" enum-name="QtValidLicenseForOpenVGModule" /> |
|
34 | <rejection class="" enum-name="QtValidLicenseForDeclarativeModule" /> | |
|
35 | ||
|
34 | 36 | |
|
35 | 37 | <rejection class="QtConcurrent" enum-name="enum_1" /> |
|
36 | 38 | <rejection class="QtConcurrent" function-name="operator|" /> |
@@ -898,10 +900,8 | |||
|
898 | 900 | <modify-function signature="operator[](uint)" remove="all"/> |
|
899 | 901 | <modify-function signature="operator[](uint)const" remove="all"/> |
|
900 | 902 | <modify-function signature="push_back(char)" remove="all"/> |
|
901 | <modify-function signature="push_back(const QByteArray&)" remove="all"/> | |
|
902 | 903 | <modify-function signature="push_back(const char*)" remove="all"/> |
|
903 | 904 | <modify-function signature="push_front(char)" remove="all"/> |
|
904 | <modify-function signature="push_front(const QByteArray&)" remove="all"/> | |
|
905 | 905 | <modify-function signature="push_front(const char*)" remove="all"/> |
|
906 | 906 | <modify-function signature="setNum(uint,int)" remove="all"/> |
|
907 | 907 | <modify-function signature="setNum(unsigned long long,int)" remove="all"/> |
@@ -915,7 +915,6 | |||
|
915 | 915 | |
|
916 | 916 | <!-- functions made private... --> |
|
917 | 917 | <modify-function signature="operator=(QByteArray)" access="private"/> |
|
918 | <modify-function signature="operator+=(QByteArray)" remove="all"/> | |
|
919 | 918 | <modify-function signature="operator+=(QString)" remove="all"/> |
|
920 | 919 | <modify-function signature="operator+=(char)" remove="all"/> |
|
921 | 920 | </value-type> |
@@ -350,21 +350,23 | |||
|
350 | 350 | </object-type> |
|
351 | 351 | |
|
352 | 352 | <value-type name="QByteArray"> |
|
353 | <inject-code class="pywrap-h"> | |
|
354 | PyObject* data(QByteArray* b) { | |
|
355 | if (b->data()) { | |
|
356 | return PyString_FromStringAndSize(b->data(), b->size()); | |
|
357 | } else { | |
|
358 | Py_INCREF(Py_None); | |
|
359 | return Py_None; | |
|
360 | } | |
|
361 | } | |
|
362 | </inject-code> | |
|
353 | 363 | |
|
354 | 364 | <inject-code class="native" position="beginning"> |
|
355 | 365 | Q_DECLARE_METATYPE(QScriptValue) |
|
356 | 366 | </inject-code> |
|
357 | 367 | |
|
358 | <modify-function signature="QByteArray(const char*)"> | |
|
359 | <modify-argument index="1"> | |
|
360 | <replace-type modified-type="QString"/> | |
|
361 | <conversion-rule class="native"> | |
|
362 | <insert-template name="core.convert_string_arg_to_char*"/> | |
|
363 | </conversion-rule> | |
|
364 | </modify-argument> | |
|
365 | </modify-function> | |
|
366 | ||
|
367 | 368 | <modify-function signature="QByteArray(const char*,int)" remove="all"/> |
|
369 | <modify-function signature="QByteArray(const char*)" remove="all"/> | |
|
368 | 370 | |
|
369 | 371 | <modify-function signature="at(int)const"> |
|
370 | 372 | <modify-argument index="1"> |
@@ -63,6 +63,8 | |||
|
63 | 63 | <rejection class="" enum-name="QtValidLicenseForScriptToolsModule"/> |
|
64 | 64 | <rejection class="" enum-name="QtValidLicenseForMultimediaModule"/> |
|
65 | 65 | <rejection class="" enum-name="QtValidLicenseForOpenVGModule"/> |
|
66 | <rejection class="" enum-name="QtValidLicenseForDeclarativeModule"/> | |
|
67 | ||
|
66 | 68 | |
|
67 | 69 | <rejection class="QtConcurrent" enum-name="enum_1"/> |
|
68 | 70 | <rejection class="QtConcurrent" function-name="operator|"/> |
@@ -1138,10 +1140,8 | |||
|
1138 | 1140 | <modify-function signature="operator[](uint)" remove="all"/> |
|
1139 | 1141 | <modify-function signature="operator[](uint)const" remove="all"/> |
|
1140 | 1142 | <modify-function signature="push_back(char)" remove="all"/> |
|
1141 | <modify-function signature="push_back(const QByteArray&)" remove="all"/> | |
|
1142 | 1143 | <modify-function signature="push_back(const char*)" remove="all"/> |
|
1143 | 1144 | <modify-function signature="push_front(char)" remove="all"/> |
|
1144 | <modify-function signature="push_front(const QByteArray&)" remove="all"/> | |
|
1145 | 1145 | <modify-function signature="push_front(const char*)" remove="all"/> |
|
1146 | 1146 | <modify-function signature="setNum(uint,int)" remove="all"/> |
|
1147 | 1147 | <modify-function signature="setNum(unsigned long long,int)" remove="all"/> |
@@ -1155,25 +1155,26 | |||
|
1155 | 1155 | |
|
1156 | 1156 | <!-- functions made private... --> |
|
1157 | 1157 | <modify-function signature="operator=(QByteArray)" access="private"/> |
|
1158 | <modify-function signature="operator+=(QByteArray)" remove="all"/> | |
|
1159 | 1158 | <modify-function signature="operator+=(QString)" remove="all"/> |
|
1160 | 1159 | <modify-function signature="operator+=(char)" remove="all"/> |
|
1161 | 1160 | |
|
1161 | <inject-code class="pywrap-h"> | |
|
1162 | PyObject* data(QByteArray* b) { | |
|
1163 | if (b->data()) { | |
|
1164 | return PyString_FromStringAndSize(b->data(), b->size()); | |
|
1165 | } else { | |
|
1166 | Py_INCREF(Py_None); | |
|
1167 | return Py_None; | |
|
1168 | } | |
|
1169 | } | |
|
1170 | </inject-code> | |
|
1162 | 1171 | |
|
1163 | 1172 | <inject-code class="native" position="beginning"> |
|
1164 | 1173 | Q_DECLARE_METATYPE(QScriptValue) |
|
1165 | 1174 | </inject-code> |
|
1166 | 1175 | |
|
1167 | <modify-function signature="QByteArray(const char*)"> | |
|
1168 | <modify-argument index="1"> | |
|
1169 | <replace-type modified-type="QString"/> | |
|
1170 | <conversion-rule class="native"> | |
|
1171 | <insert-template name="core.convert_string_arg_to_char*"/> | |
|
1172 | </conversion-rule> | |
|
1173 | </modify-argument> | |
|
1174 | </modify-function> | |
|
1175 | ||
|
1176 | 1176 | <modify-function signature="QByteArray(const char*,int)" remove="all"/> |
|
1177 | <modify-function signature="QByteArray(const char*)" remove="all"/> | |
|
1177 | 1178 | |
|
1178 | 1179 | <modify-function signature="at(int)const"> |
|
1179 | 1180 | <modify-argument index="1"> |
@@ -1829,17 +1829,6 | |||
|
1829 | 1829 | </modify-function> |
|
1830 | 1830 | </object-type> |
|
1831 | 1831 | <object-type name="QMenu"> |
|
1832 | <modify-function signature="addAction(QAction *)" remove="all"/> | |
|
1833 | <modify-function signature="addMenu(QMenu*)"> | |
|
1834 | <modify-argument index="1"> | |
|
1835 | <reference-count action="add" variable-name="__rcMenus"/> | |
|
1836 | </modify-argument> | |
|
1837 | </modify-function> | |
|
1838 | <modify-function signature="insertMenu(QAction*,QMenu*)"> | |
|
1839 | <modify-argument index="2"> | |
|
1840 | <reference-count action="add" variable-name="__rcMenus"/> | |
|
1841 | </modify-argument> | |
|
1842 | </modify-function> | |
|
1843 | 1832 | <modify-function signature="insertSeparator(QAction*)"> |
|
1844 | 1833 | <modify-argument index="1"> |
|
1845 | 1834 | <reference-count action="ignore"/> |
@@ -1858,47 +1847,10 | |||
|
1858 | 1847 | <modify-function signature="setNoReplayFor(QWidget*)"> |
|
1859 | 1848 | <remove/> |
|
1860 | 1849 | </modify-function> |
|
1861 | <modify-function signature="initStyleOption(QStyleOptionMenuItem*,const QAction*)const"> | |
|
1862 | <access modifier="private"/> | |
|
1863 | </modify-function> | |
|
1864 | ||
|
1865 | <modify-function signature="addAction(QString,const QObject*,const char*,QKeySequence)"> | |
|
1866 | <remove/> | |
|
1867 | </modify-function> | |
|
1868 | ||
|
1869 | <modify-function signature="addAction(QIcon,QString,const QObject*,const char*,QKeySequence)"> | |
|
1870 | <remove/> | |
|
1871 | </modify-function> | |
|
1872 | 1850 | </object-type> |
|
1873 | 1851 | |
|
1874 | 1852 | <object-type name="QMenuBar"> |
|
1875 | <modify-function signature="addAction(QAction *)" remove="all"/> | |
|
1876 | <modify-function signature="addAction(QString,const QObject*,const char*)"> | |
|
1877 | <remove/> | |
|
1878 | </modify-function> | |
|
1879 | 1853 | |
|
1880 | <modify-function signature="initStyleOption(QStyleOptionMenuItem*,const QAction*)const"> | |
|
1881 | <access modifier="private"/> | |
|
1882 | </modify-function> | |
|
1883 | ||
|
1884 | <modify-function signature="addMenu(QMenu*)"> | |
|
1885 | <modify-argument index="1"> | |
|
1886 | <reference-count action="add" variable-name="__rcMenus"/> | |
|
1887 | </modify-argument> | |
|
1888 | </modify-function> | |
|
1889 | <modify-function signature="insertMenu(QAction*,QMenu*)"> | |
|
1890 | <modify-argument index="1"> | |
|
1891 | <reference-count action="ignore"/> | |
|
1892 | </modify-argument> | |
|
1893 | <modify-argument index="2"> | |
|
1894 | <reference-count action="add" variable-name="__rcMenus"/> | |
|
1895 | </modify-argument> | |
|
1896 | </modify-function> | |
|
1897 | <modify-function signature="insertSeparator(QAction*)"> | |
|
1898 | <modify-argument index="1"> | |
|
1899 | <reference-count action="ignore"/> | |
|
1900 | </modify-argument> | |
|
1901 | </modify-function> | |
|
1902 | 1854 | <modify-function signature="setActiveAction(QAction*)"> |
|
1903 | 1855 | <modify-argument index="1"> |
|
1904 | 1856 | <reference-count action="ignore"/> |
@@ -4458,16 +4410,6 | |||
|
4458 | 4410 | </object-type> |
|
4459 | 4411 | |
|
4460 | 4412 | <object-type name="QToolBar"> |
|
4461 | <modify-function signature="addAction(QAction *)" remove="all"/> | |
|
4462 | <modify-function signature="initStyleOption(QStyleOptionToolBar*)const"> | |
|
4463 | <access modifier="private"/> | |
|
4464 | </modify-function> | |
|
4465 | <modify-function signature="addAction(QIcon,QString,const QObject*,const char*)"> | |
|
4466 | <remove/> | |
|
4467 | </modify-function> | |
|
4468 | <modify-function signature="addAction(QString,const QObject*,const char*)"> | |
|
4469 | <remove/> | |
|
4470 | </modify-function> | |
|
4471 | 4413 | <modify-function signature="addWidget(QWidget*)"> |
|
4472 | 4414 | <modify-argument index="1"> |
|
4473 | 4415 | <define-ownership class="java" owner="c++"/> |
@@ -553,6 +553,56 | |||
|
553 | 553 | </modify-function> |
|
554 | 554 | </value-type> |
|
555 | 555 | |
|
556 | <object-type name="QMenu"> | |
|
557 | <inject-code class="pywrap-h"> | |
|
558 | QAction* addAction (QMenu* menu, const QString & text, PyObject* callable, const QKeySequence & shortcut = 0) { | |
|
559 | QAction* a = menu->addAction(text); | |
|
560 | a->setShortcut(shortcut); | |
|
561 | PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable); | |
|
562 | return a; | |
|
563 | } | |
|
564 | ||
|
565 | QAction* addAction (QMenu* menu, const QIcon& icon, const QString& text, PyObject* callable, const QKeySequence& shortcut = 0) | |
|
566 | { | |
|
567 | QAction* a = menu->addAction(text); | |
|
568 | a->setIcon(icon); | |
|
569 | a->setShortcut(shortcut); | |
|
570 | PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable); | |
|
571 | return a; | |
|
572 | } | |
|
573 | </inject-code> | |
|
574 | </object-type> | |
|
575 | ||
|
576 | <object-type name="QMenuBar"> | |
|
577 | <inject-code class="pywrap-h"> | |
|
578 | QAction* addAction (QMenuBar* menu, const QString & text, PyObject* callable) | |
|
579 | { | |
|
580 | QAction* a = menu->addAction(text); | |
|
581 | PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable); | |
|
582 | return a; | |
|
583 | } | |
|
584 | </inject-code> | |
|
585 | </object-type> | |
|
586 | ||
|
587 | <object-type name="QToolBar"> | |
|
588 | <inject-code class="pywrap-h"> | |
|
589 | QAction* addAction (QToolBar* menu, const QString & text, PyObject* callable) | |
|
590 | { | |
|
591 | QAction* a = menu->addAction(text); | |
|
592 | PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable); | |
|
593 | return a; | |
|
594 | } | |
|
595 | ||
|
596 | QAction* addAction (QToolBar* menu, const QIcon& icon, const QString& text, PyObject* callable) | |
|
597 | { | |
|
598 | QAction* a = menu->addAction(text); | |
|
599 | a->setIcon(icon); | |
|
600 | PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable); | |
|
601 | return a; | |
|
602 | } | |
|
603 | </inject-code> | |
|
604 | </object-type> | |
|
605 | ||
|
556 | 606 | <suppress-warning text="WARNING(MetaJavaBuilder) :: Rejected enum has no alternative...: QPalette::NColorRoles" /> |
|
557 | 607 | <suppress-warning text="WARNING(MetaJavaBuilder) :: Cannot find enum constant for value 'DragMove' in 'QDragMoveEvent' or any of its super classes" /> |
|
558 | 608 |
@@ -2110,17 +2110,6 | |||
|
2110 | 2110 | </modify-function> |
|
2111 | 2111 | </object-type> |
|
2112 | 2112 | <object-type name="QMenu"> |
|
2113 | <modify-function signature="addAction(QAction *)" remove="all"/> | |
|
2114 | <modify-function signature="addMenu(QMenu*)"> | |
|
2115 | <modify-argument index="1"> | |
|
2116 | <reference-count action="add" variable-name="__rcMenus"/> | |
|
2117 | </modify-argument> | |
|
2118 | </modify-function> | |
|
2119 | <modify-function signature="insertMenu(QAction*,QMenu*)"> | |
|
2120 | <modify-argument index="2"> | |
|
2121 | <reference-count action="add" variable-name="__rcMenus"/> | |
|
2122 | </modify-argument> | |
|
2123 | </modify-function> | |
|
2124 | 2113 | <modify-function signature="insertSeparator(QAction*)"> |
|
2125 | 2114 | <modify-argument index="1"> |
|
2126 | 2115 | <reference-count action="ignore"/> |
@@ -2139,47 +2128,28 | |||
|
2139 | 2128 | <modify-function signature="setNoReplayFor(QWidget*)"> |
|
2140 | 2129 | <remove/> |
|
2141 | 2130 | </modify-function> |
|
2142 | <modify-function signature="initStyleOption(QStyleOptionMenuItem*,const QAction*)const"> | |
|
2143 | <access modifier="private"/> | |
|
2144 | </modify-function> | |
|
2145 | 2131 | |
|
2146 | <modify-function signature="addAction(QString,const QObject*,const char*,QKeySequence)"> | |
|
2147 | <remove/> | |
|
2148 | </modify-function> | |
|
2132 | <inject-code class="pywrap-h"> | |
|
2133 | QAction* addAction (QMenu* menu, const QString & text, PyObject* callable, const QKeySequence & shortcut = 0) { | |
|
2134 | QAction* a = menu->addAction(text); | |
|
2135 | a->setShortcut(shortcut); | |
|
2136 | PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable); | |
|
2137 | return a; | |
|
2138 | } | |
|
2149 | 2139 | |
|
2150 | <modify-function signature="addAction(QIcon,QString,const QObject*,const char*,QKeySequence)"> | |
|
2151 | <remove/> | |
|
2152 | </modify-function> | |
|
2140 | QAction* addAction (QMenu* menu, const QIcon& icon, const QString& text, PyObject* callable, const QKeySequence& shortcut = 0) | |
|
2141 | { | |
|
2142 | QAction* a = menu->addAction(text); | |
|
2143 | a->setIcon(icon); | |
|
2144 | a->setShortcut(shortcut); | |
|
2145 | PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable); | |
|
2146 | return a; | |
|
2147 | } | |
|
2148 | </inject-code> | |
|
2153 | 2149 | </object-type> |
|
2154 | 2150 | |
|
2155 | 2151 | <object-type name="QMenuBar"> |
|
2156 | <modify-function signature="addAction(QAction *)" remove="all"/> | |
|
2157 | <modify-function signature="addAction(QString,const QObject*,const char*)"> | |
|
2158 | <remove/> | |
|
2159 | </modify-function> | |
|
2160 | 2152 | |
|
2161 | <modify-function signature="initStyleOption(QStyleOptionMenuItem*,const QAction*)const"> | |
|
2162 | <access modifier="private"/> | |
|
2163 | </modify-function> | |
|
2164 | ||
|
2165 | <modify-function signature="addMenu(QMenu*)"> | |
|
2166 | <modify-argument index="1"> | |
|
2167 | <reference-count action="add" variable-name="__rcMenus"/> | |
|
2168 | </modify-argument> | |
|
2169 | </modify-function> | |
|
2170 | <modify-function signature="insertMenu(QAction*,QMenu*)"> | |
|
2171 | <modify-argument index="1"> | |
|
2172 | <reference-count action="ignore"/> | |
|
2173 | </modify-argument> | |
|
2174 | <modify-argument index="2"> | |
|
2175 | <reference-count action="add" variable-name="__rcMenus"/> | |
|
2176 | </modify-argument> | |
|
2177 | </modify-function> | |
|
2178 | <modify-function signature="insertSeparator(QAction*)"> | |
|
2179 | <modify-argument index="1"> | |
|
2180 | <reference-count action="ignore"/> | |
|
2181 | </modify-argument> | |
|
2182 | </modify-function> | |
|
2183 | 2153 | <modify-function signature="setActiveAction(QAction*)"> |
|
2184 | 2154 | <modify-argument index="1"> |
|
2185 | 2155 | <reference-count action="ignore"/> |
@@ -2190,6 +2160,15 | |||
|
2190 | 2160 | <reference-count action="ignore"/> |
|
2191 | 2161 | </modify-argument> |
|
2192 | 2162 | </modify-function> |
|
2163 | ||
|
2164 | <inject-code class="pywrap-h"> | |
|
2165 | QAction* addAction (QMenuBar* menu, const QString & text, PyObject* callable) | |
|
2166 | { | |
|
2167 | QAction* a = menu->addAction(text); | |
|
2168 | PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable); | |
|
2169 | return a; | |
|
2170 | } | |
|
2171 | </inject-code> | |
|
2193 | 2172 | </object-type> |
|
2194 | 2173 | <object-type name="QMotifStyle"> |
|
2195 | 2174 | <modify-function signature="standardPixmap(QStyle::StandardPixmap, const QStyleOption*, const QWidget*)const" remove="all"/> <!--### Obsolete in 4.3--> |
@@ -4874,16 +4853,6 | |||
|
4874 | 4853 | </object-type> |
|
4875 | 4854 | |
|
4876 | 4855 | <object-type name="QToolBar"> |
|
4877 | <modify-function signature="addAction(QAction *)" remove="all"/> | |
|
4878 | <modify-function signature="initStyleOption(QStyleOptionToolBar*)const"> | |
|
4879 | <access modifier="private"/> | |
|
4880 | </modify-function> | |
|
4881 | <modify-function signature="addAction(QIcon,QString,const QObject*,const char*)"> | |
|
4882 | <remove/> | |
|
4883 | </modify-function> | |
|
4884 | <modify-function signature="addAction(QString,const QObject*,const char*)"> | |
|
4885 | <remove/> | |
|
4886 | </modify-function> | |
|
4887 | 4856 | <modify-function signature="addWidget(QWidget*)"> |
|
4888 | 4857 | <modify-argument index="1"> |
|
4889 | 4858 | <define-ownership class="java" owner="c++"/> |
@@ -4902,6 +4871,23 | |||
|
4902 | 4871 | <reference-count action="ignore"/> |
|
4903 | 4872 | </modify-argument> |
|
4904 | 4873 | </modify-function> |
|
4874 | ||
|
4875 | <inject-code class="pywrap-h"> | |
|
4876 | QAction* addAction (QToolBar* menu, const QString & text, PyObject* callable) | |
|
4877 | { | |
|
4878 | QAction* a = menu->addAction(text); | |
|
4879 | PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable); | |
|
4880 | return a; | |
|
4881 | } | |
|
4882 | ||
|
4883 | QAction* addAction (QToolBar* menu, const QIcon& icon, const QString& text, PyObject* callable) | |
|
4884 | { | |
|
4885 | QAction* a = menu->addAction(text); | |
|
4886 | a->setIcon(icon); | |
|
4887 | PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable); | |
|
4888 | return a; | |
|
4889 | } | |
|
4890 | </inject-code> | |
|
4905 | 4891 | </object-type> |
|
4906 | 4892 | |
|
4907 | 4893 | <object-type name="QPaintEngine"> |
General Comments 0
You need to be logged in to leave comments.
Login now