#include <KDebug>
-#include "kitemlistviewaccessible.h"
-
/**
* Replaces the default viewport of KItemListContainer by a
* non-scrollable viewport. The scrolling is done in an optimized
event->ignore();
}
-QAccessibleInterface* accessibleContainerFactory(const QString &key, QObject *object)
-{
- Q_UNUSED(key)
- if (KItemListView *view = qobject_cast<KItemListView*>(object))
- return new KItemListViewAccessible(view);
- return 0;
-}
-
KItemListContainer::KItemListContainer(KItemListController* controller, QWidget* parent) :
QAbstractScrollArea(parent),
m_controller(controller),
this, SLOT(slotModelChanged(KItemModelBase*,KItemModelBase*)));
connect(controller, SIGNAL(viewChanged(KItemListView*,KItemListView*)),
this, SLOT(slotViewChanged(KItemListView*,KItemListView*)));
-
- QAccessible::installFactory(accessibleContainerFactory);
}
KItemListContainer::~KItemListContainer()
// the QGraphicsScene might get deleted before the view.
delete m_controller;
m_controller = 0;
-
- QAccessible::removeFactory(accessibleContainerFactory);
}
KItemListController* KItemListContainer::controller() const