+ m_dirLister = new DolphinDirLister(this);
+ m_dirLister->setAutoUpdate(true);
+ m_dirLister->setDelayedMimeTypes(true);
+
+ connect(m_dirLister, SIGNAL(redirection(KUrl,KUrl)), this, SLOT(slotRedirection(KUrl,KUrl)));
+ connect(m_dirLister, SIGNAL(started(KUrl)), this, SLOT(slotDirListerStarted(KUrl)));
+ connect(m_dirLister, SIGNAL(refreshItems(QList<QPair<KFileItem,KFileItem> >)),
+ this, SLOT(slotRefreshItems()));
+
+ connect(m_dirLister, SIGNAL(clear()), this, SIGNAL(itemCountChanged()));
+ connect(m_dirLister, SIGNAL(newItems(KFileItemList)), this, SIGNAL(itemCountChanged()));
+ connect(m_dirLister, SIGNAL(infoMessage(QString)), this, SIGNAL(infoMessage(QString)));
+ connect(m_dirLister, SIGNAL(errorMessage(QString)), this, SIGNAL(infoMessage(QString)));
+ connect(m_dirLister, SIGNAL(percent(int)), this, SIGNAL(pathLoadingProgress(int)));
+ connect(m_dirLister, SIGNAL(urlIsFileError(KUrl)), this, SIGNAL(urlIsFileError(KUrl)));
+ connect(m_dirLister, SIGNAL(itemsDeleted(KFileItemList)), this, SIGNAL(itemCountChanged()));
+
+ m_container = new DolphinItemListContainer(m_dirLister, this);
+ m_container->setVisibleRoles(QList<QByteArray>() << "name");
+ m_container->installEventFilter(this);
+ setFocusProxy(m_container);
+ connect(m_container->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(hideToolTip()));
+ connect(m_container->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(hideToolTip()));
+
+ KItemListController* controller = m_container->controller();
+ controller->setSelectionBehavior(KItemListController::MultiSelection);
+ connect(controller, SIGNAL(itemActivated(int)), this, SLOT(slotItemActivated(int)));
+ connect(controller, SIGNAL(itemsActivated(QSet<int>)), this, SLOT(slotItemsActivated(QSet<int>)));
+ connect(controller, SIGNAL(itemMiddleClicked(int)), this, SLOT(slotItemMiddleClicked(int)));
+ connect(controller, SIGNAL(itemContextMenuRequested(int,QPointF)), this, SLOT(slotItemContextMenuRequested(int,QPointF)));
+ connect(controller, SIGNAL(viewContextMenuRequested(QPointF)), this, SLOT(slotViewContextMenuRequested(QPointF)));
+ connect(controller, SIGNAL(headerContextMenuRequested(QPointF)), this, SLOT(slotHeaderContextMenuRequested(QPointF)));
+ connect(controller, SIGNAL(mouseButtonPressed(int,Qt::MouseButtons)), this, SLOT(slotMouseButtonPressed(int,Qt::MouseButtons)));
+ connect(controller, SIGNAL(itemHovered(int)), this, SLOT(slotItemHovered(int)));
+ connect(controller, SIGNAL(itemUnhovered(int)), this, SLOT(slotItemUnhovered(int)));
+ connect(controller, SIGNAL(itemDropEvent(int,QGraphicsSceneDragDropEvent*)), this, SLOT(slotItemDropEvent(int,QGraphicsSceneDragDropEvent*)));
+ connect(controller, SIGNAL(modelChanged(KItemModelBase*,KItemModelBase*)), this, SLOT(slotModelChanged(KItemModelBase*,KItemModelBase*)));
+
+ KFileItemModel* model = fileItemModel();
+ if (model) {
+ connect(model, SIGNAL(loadingCompleted()), this, SLOT(slotLoadingCompleted()));
+ }
+
+ KItemListView* view = controller->view();
+ view->installEventFilter(this);
+ connect(view, SIGNAL(sortOrderChanged(Qt::SortOrder,Qt::SortOrder)),
+ this, SLOT(slotSortOrderChangedByHeader(Qt::SortOrder,Qt::SortOrder)));
+ connect(view, SIGNAL(sortRoleChanged(QByteArray,QByteArray)),
+ this, SLOT(slotSortRoleChangedByHeader(QByteArray,QByteArray)));
+ connect(view, SIGNAL(visibleRolesChanged(QList<QByteArray>,QList<QByteArray>)),
+ this, SLOT(slotVisibleRolesChangedByHeader(QList<QByteArray>,QList<QByteArray>)));
+ connect(view->header(), SIGNAL(columnWidthChanged(QByteArray,qreal,qreal)),
+ this, SLOT(slotHeaderColumnWidthChanged(QByteArray,qreal,qreal)));
+
+ KItemListSelectionManager* selectionManager = controller->selectionManager();
+ connect(selectionManager, SIGNAL(selectionChanged(QSet<int>,QSet<int>)),
+ this, SLOT(slotSelectionChanged(QSet<int>,QSet<int>)));
+
+ m_toolTipManager = new ToolTipManager(this);
+
+ m_versionControlObserver = new VersionControlObserver(this);
+ m_versionControlObserver->setModel(model);
+ connect(m_versionControlObserver, SIGNAL(infoMessage(QString)), this, SIGNAL(infoMessage(QString)));
+ connect(m_versionControlObserver, SIGNAL(errorMessage(QString)), this, SIGNAL(errorMessage(QString)));
+ connect(m_versionControlObserver, SIGNAL(operationCompletedMessage(QString)), this, SIGNAL(operationCompletedMessage(QString)));
+