add activate(), since QGraphicsLayout often does it at rather inopportune times and requires manual intervention

svn path=/trunk/KDE/kdebase/runtime/; revision=1181766
This commit is contained in:
Aaron J. Seigo 2010-10-02 02:09:38 +00:00
parent a421a1bd6a
commit 92dce059a1
3 changed files with 21 additions and 2 deletions

View File

@ -105,10 +105,16 @@ BEGIN_DECLARE_METHOD(QGraphicsAnchorLayout, addAnchors) {
return eng->undefinedValue(); return eng->undefinedValue();
} END_DECLARE_METHOD } END_DECLARE_METHOD
BEGIN_DECLARE_METHOD(QGraphicsItem, toString) { BEGIN_DECLARE_METHOD(QGraphicsAnchorLayout, toString) {
return QScriptValue(eng, "QGraphicsAnchorLayout"); return QScriptValue(eng, "QGraphicsAnchorLayout");
} END_DECLARE_METHOD } END_DECLARE_METHOD
BEGIN_DECLARE_METHOD(QGraphicsAnchorLayout, activate) {
self->activate();
return eng->undefinedValue();
} END_DECLARE_METHOD
/////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
class PrototypeAnchorLayout : public QGraphicsAnchorLayout class PrototypeAnchorLayout : public QGraphicsAnchorLayout
@ -139,6 +145,7 @@ QScriptValue constructAnchorLayoutClass(QScriptEngine *eng)
ADD_METHOD(proto, addAnchors); ADD_METHOD(proto, addAnchors);
ADD_METHOD(proto, addCornerAnchors); ADD_METHOD(proto, addCornerAnchors);
ADD_METHOD(proto, toString); ADD_METHOD(proto, toString);
ADD_METHOD(proto, activate);
QScript::registerPointerMetaType<QGraphicsAnchorLayout>(eng, proto); QScript::registerPointerMetaType<QGraphicsAnchorLayout>(eng, proto);

View File

@ -118,10 +118,15 @@ BEGIN_DECLARE_METHOD(QGraphicsGridLayout, addItem) {
return eng->undefinedValue(); return eng->undefinedValue();
} END_DECLARE_METHOD } END_DECLARE_METHOD
BEGIN_DECLARE_METHOD(QGraphicsItem, toString) { BEGIN_DECLARE_METHOD(QGraphicsGridLayout, toString) {
return QScriptValue(eng, "QGraphicsGridLayout"); return QScriptValue(eng, "QGraphicsGridLayout");
} END_DECLARE_METHOD } END_DECLARE_METHOD
BEGIN_DECLARE_METHOD(QGraphicsGridLayout, activate) {
self->activate();
return eng->undefinedValue();
} END_DECLARE_METHOD
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
class PrototypeGridLayout : public QGraphicsGridLayout class PrototypeGridLayout : public QGraphicsGridLayout
@ -168,6 +173,7 @@ QScriptValue constructGridLayoutClass(QScriptEngine *eng)
ADD_METHOD(proto, setContentsMargins); ADD_METHOD(proto, setContentsMargins);
ADD_METHOD(proto, addItem); ADD_METHOD(proto, addItem);
ADD_METHOD(proto, toString); ADD_METHOD(proto, toString);
ADD_METHOD(proto, activate);
QScript::registerPointerMetaType<QGraphicsGridLayout>(eng, proto); QScript::registerPointerMetaType<QGraphicsGridLayout>(eng, proto);

View File

@ -200,6 +200,11 @@ BEGIN_DECLARE_METHOD(QGraphicsLinearLayout, spacing) {
return QScriptValue(eng, self->spacing()); return QScriptValue(eng, self->spacing());
} END_DECLARE_METHOD } END_DECLARE_METHOD
BEGIN_DECLARE_METHOD(QGraphicsLinearLayout, activate) {
self->activate();
return eng->undefinedValue();
} END_DECLARE_METHOD
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
QScriptValue constructLinearLayoutClass(QScriptEngine *eng) QScriptValue constructLinearLayoutClass(QScriptEngine *eng)
@ -228,6 +233,7 @@ QScriptValue constructLinearLayoutClass(QScriptEngine *eng)
ADD_METHOD(proto, removeItem); ADD_METHOD(proto, removeItem);
ADD_METHOD(proto, insertItem); ADD_METHOD(proto, insertItem);
ADD_METHOD(proto, toString); ADD_METHOD(proto, toString);
ADD_METHOD(proto, activate);
QScript::registerPointerMetaType<QGraphicsLinearLayout>(eng, proto); QScript::registerPointerMetaType<QGraphicsLinearLayout>(eng, proto);