int Q3ActionGroup::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = Q3Action::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: selected((*reinterpret_cast< Q3Action*(*)>(_a[1]))); break;
        case 1: activated((*reinterpret_cast< Q3Action*(*)>(_a[1]))); break;
        case 2: childToggled((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 3: childActivated(); break;
        case 4: childDestroyed(); break;
        case 5: internalComboBoxActivated((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 6: internalComboBoxHighlighted((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 7: internalToggle((*reinterpret_cast< Q3Action*(*)>(_a[1]))); break;
        case 8: objectDestroyed(); break;
        }
        _id -= 9;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< bool*>(_v) = isExclusive(); break;
        case 1: *reinterpret_cast< bool*>(_v) = usesDropDown(); break;
        }
        _id -= 2;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setExclusive(*reinterpret_cast< bool*>(_v)); break;
        case 1: setUsesDropDown(*reinterpret_cast< bool*>(_v)); break;
        }
        _id -= 2;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 2;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 2;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 2;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 2;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 2;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 2;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Ejemplo n.º 2
0
toDocklet::toDocklet(const QString &title,
                     QWidget *parent,
                     toWFlags flags)
    : QDockWidget(title, parent, flags),
      isPopup(false)
{
    setFocusPolicy(Qt::StrongFocus);
    setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);

    connect(this,
            SIGNAL(activated()),
            this,
            SLOT(childActivated()));

    connect(this,
            SIGNAL(dockLocationChanged(Qt::DockWidgetArea)),
            this,
            SLOT(handleDockletLocationChanged(Qt::DockWidgetArea)));
}
Ejemplo n.º 3
0
void KoView::partActivateEvent( KParts::PartActivateEvent *event )
{
  if ( event->part() != (KParts::Part *)koDocument() )
  {
    assert( event->part()->inherits( "KoDocument" ) );

    KoDocumentChild *child = koDocument()->child( (KoDocument *)event->part() );
    if ( child && event->activated() )
    {
      if ( child->isRectangle() && !child->isTransparent() )
      {
        KoViewChild *viewChild = new KoViewChild( child, this );
        d->m_children.append( viewChild );

        QApplication::setOverrideCursor(waitCursor);
        // This is the long operation (due to toolbar layout stuff)
        d->m_manager->setActivePart( child->document(), viewChild->frame()->view() );
        QApplication::restoreOverrideCursor();

        // Now we can move the frame to the right place
        viewChild->setInitialFrameGeometry();
      }
      else
      {
        emit regionInvalidated( child->frameRegion( matrix() ), true );
      }
      emit childActivated( child );
    }
    else if ( child )
    {
      emit regionInvalidated( child->frameRegion( matrix() ), true );
      emit childDeactivated( child );
    }
    else
      emit invalidated();
  }
  else
    emit activated( event->activated() );
}