Exemplo n.º 1
0
int ApplicationUI::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 1)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 1;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< FriendsService**>(_v) = friendsService(); break;
        case 1: *reinterpret_cast< DialogsService**>(_v) = dialogsService(); break;
        case 2: *reinterpret_cast< UserService**>(_v) = userService(); break;
        case 3: *reinterpret_cast< Http**>(_v) = http(); break;
        case 4: *reinterpret_cast< UIManager**>(_v) = uiManager(); break;
        }
        _id -= 5;
    } else if (_c == QMetaObject::WriteProperty) {
        _id -= 5;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 5;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Exemplo n.º 2
0
void AppEditMenu::objectResolved(const QString &objectTypeName, DbTreeModel::DbTreeNodeType objectType, const QString &schemaName, const QString &objectName, ObjectResolver *resolver)
{
    Q_UNUSED(objectTypeName);

    resolver->deleteLater();

    if(waitingForContextMenuObject != currentAppWidget){
        return;
    }

    QList<QAction*> objectActions = ContextMenuUtil::getActionsForObject(schemaName, objectName, "", objectType, uiManager());

    WidgetHelper::deleteActions(editResolveMenu->actions());

    editResolveMenu->setUpdatesEnabled(false);
    editResolveMenu->addActions(objectActions);
    editResolveMenu->setUpdatesEnabled(true);
}