- m_dirLister = new DolphinDirLister();
- m_dirLister->setAutoUpdate(true);
- m_dirLister->setMainWindow(window());
- m_dirLister->setDelayedMimeTypes(true);
-
- m_dolphinModel = new DolphinModel(this);
- m_dolphinModel->setDirLister(m_dirLister);
- m_dolphinModel->setDropsAllowed(DolphinModel::DropOnDirectory);
-
- m_proxyModel = new DolphinSortFilterProxyModel(this);
- m_proxyModel->setSourceModel(m_dolphinModel);
- m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
-
- connect(m_dirLister, SIGNAL(clear()),
- this, SLOT(delayedStatusBarUpdate()));
- connect(m_dirLister, SIGNAL(percent(int)),
- this, SLOT(updateProgress(int)));
- connect(m_dirLister, SIGNAL(itemsDeleted(const KFileItemList&)),
- this, SLOT(delayedStatusBarUpdate()));
- connect(m_dirLister, SIGNAL(completed()),
- this, SLOT(slotDirListerCompleted()));
- connect(m_dirLister, SIGNAL(infoMessage(const QString&)),
- this, SLOT(showInfoMessage(const QString&)));
- connect(m_dirLister, SIGNAL(errorMessage(const QString&)),
- this, SLOT(showErrorMessage(const QString&)));
- connect(m_dirLister, SIGNAL(urlIsFileError(const KUrl&)),
- this, SLOT(openFile(const KUrl&)));
-
- m_view = new DolphinView(this,
- url,
- m_dirLister,
- m_dolphinModel,
- m_proxyModel);
- connect(m_view, SIGNAL(urlChanged(const KUrl&)),
- m_urlNavigator, SLOT(setUrl(const KUrl&)));
- connect(m_view, SIGNAL(requestContextMenu(KFileItem, const KUrl&, const QList<QAction*>&)),
- this, SLOT(openContextMenu(KFileItem, const KUrl&, const QList<QAction*>&)));
- connect(m_view, SIGNAL(contentsMoved(int, int)),
- this, SLOT(saveContentsPos(int, int)));
- connect(m_view, SIGNAL(requestItemInfo(KFileItem)),
- this, SLOT(showItemInfo(KFileItem)));
- connect(m_view, SIGNAL(errorMessage(const QString&)),
- this, SLOT(showErrorMessage(const QString&)));
- connect(m_view, SIGNAL(infoMessage(const QString&)),
- this, SLOT(showInfoMessage(const QString&)));
- connect(m_view, SIGNAL(operationCompletedMessage(const QString&)),
- this, SLOT(showOperationCompletedMessage(const QString&)));
- connect(m_view, SIGNAL(itemTriggered(KFileItem)),
- this, SLOT(slotItemTriggered(KFileItem)));
- connect(m_view, SIGNAL(startedPathLoading(const KUrl&)),
- this, SLOT(saveRootUrl(const KUrl&)));
- connect(m_view, SIGNAL(redirection(KUrl, KUrl)),
- this, SLOT(redirect(KUrl, KUrl)));
- connect(m_view, SIGNAL(selectionChanged(const KFileItemList&)),
- this, SLOT(delayedStatusBarUpdate()));
-
- connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
- this, SLOT(restoreView(const KUrl&)));
+ m_searchBox = new DolphinSearchBox(this);
+ m_searchBox->hide();
+ connect(m_searchBox, SIGNAL(activated()), this, SLOT(activate()));
+ connect(m_searchBox, SIGNAL(closeRequest()), this, SLOT(closeSearchBox()));
+ connect(m_searchBox, SIGNAL(searchRequest()), this, SLOT(startSearching()));
+ connect(m_searchBox, SIGNAL(returnPressed(QString)), this, SLOT(requestFocus()));
+
+ m_messageWidget = new KMessageWidget(this);
+ m_messageWidget->setCloseButtonVisible(true);
+ m_messageWidget->hide();
+
+ m_view = new DolphinView(url, this);
+ connect(m_view, SIGNAL(urlChanged(KUrl)), m_urlNavigator, SLOT(setUrl(KUrl)));
+ connect(m_view, SIGNAL(urlChanged(KUrl)), m_messageWidget, SLOT(hide()));
+ connect(m_view, SIGNAL(directoryLoadingCompleted()), m_messageWidget, SLOT(hide()));
+ connect(m_view, SIGNAL(writeStateChanged(bool)), this, SIGNAL(writeStateChanged(bool)));
+ connect(m_view, SIGNAL(requestItemInfo(KFileItem)), this, SLOT(showItemInfo(KFileItem)));
+ connect(m_view, SIGNAL(itemActivated(KFileItem)), this, SLOT(slotItemActivated(KFileItem)));
+ connect(m_view, SIGNAL(itemsActivated(KFileItemList)), this, SLOT(slotItemsActivated(KFileItemList)));
+ connect(m_view, SIGNAL(redirection(KUrl,KUrl)), this, SLOT(redirect(KUrl,KUrl)));
+ connect(m_view, SIGNAL(directoryLoadingStarted()), this, SLOT(slotDirectoryLoadingStarted()));
+ connect(m_view, SIGNAL(directoryLoadingCompleted()), this, SLOT(slotDirectoryLoadingCompleted()));
+ connect(m_view, SIGNAL(directoryLoadingCanceled()), this, SLOT(slotDirectoryLoadingCanceled()));
+ connect(m_view, SIGNAL(itemCountChanged()), this, SLOT(delayedStatusBarUpdate()));
+ connect(m_view, SIGNAL(directoryLoadingProgress(int)), this, SLOT(updateDirectoryLoadingProgress(int)));
+ connect(m_view, SIGNAL(directorySortingProgress(int)), this, SLOT(updateDirectorySortingProgress(int)));
+ connect(m_view, SIGNAL(selectionChanged(KFileItemList)), this, SLOT(delayedStatusBarUpdate()));
+ connect(m_view, SIGNAL(urlAboutToBeChanged(KUrl)), this, SLOT(slotViewUrlAboutToBeChanged(KUrl)));
+ connect(m_view, SIGNAL(errorMessage(QString)), this, SLOT(showErrorMessage(QString)));
+ connect(m_view, SIGNAL(urlIsFileError(KUrl)), this, SLOT(slotUrlIsFileError(KUrl)));
+ connect(m_view, SIGNAL(activated()), this, SLOT(activate()));
+
+ connect(m_urlNavigator, SIGNAL(urlAboutToBeChanged(KUrl)),
+ this, SLOT(slotUrlNavigatorLocationAboutToBeChanged(KUrl)));
+ connect(m_urlNavigator, SIGNAL(urlChanged(KUrl)),
+ this, SLOT(slotUrlNavigatorLocationChanged(KUrl)));