##// END OF EJS Templates
added QObject tr decorator...
florianlink -
r68:544aa98d116b
parent child
Show More
@@ -42,7 +42,7
42 42 #include "PythonQtStdDecorators.h"
43 43 #include "PythonQt.h"
44 44 #include "PythonQtClassInfo.h"
45
45 #include <QCoreApplication>
46 46
47 47 bool PythonQtStdDecorators::connect(QObject* sender, const QByteArray& signal, PyObject* callable)
48 48 {
@@ -153,3 +153,9 QVariantList PythonQtStdDecorators::children(QObject* o)
153 153 }
154 154 return v;
155 155 }
156
157 QString PythonQtStdDecorators::tr(QObject* obj, const QByteArray& text, const QByteArray& ambig, int n)
158 {
159 return QCoreApplication::translate(obj->metaObject()->className(), text.constData(), ambig.constData(), QCoreApplication::CodecForTr, n);
160 }
161
@@ -91,6 +91,8 public slots:
91 91 int static_Qt_qrand() { return qrand(); }
92 92 void static_Qt_qsrand(uint a) { qsrand(a); }
93 93
94 QString tr(QObject* obj, const QByteArray& text, const QByteArray& text = QByteArray(), int n = -1);
95
94 96 QByteArray static_Qt_SIGNAL(const QByteArray& s) { return QByteArray("2") + s; }
95 97 QByteArray static_Qt_SLOT(const QByteArray& s) { return QByteArray("1") + s; }
96 98
General Comments 0
You need to be logged in to leave comments. Login now