- 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()));
+ m_searchBox = new DolphinSearchBox(this);
+ m_searchBox->hide();
+ connect(m_searchBox, SIGNAL(closeRequest()), this, SLOT(closeSearchBox()));
+ connect(m_searchBox, SIGNAL(search(QString)), this, SLOT(startSearching(QString)));
+ connect(m_searchBox, SIGNAL(returnPressed(QString)), this, SLOT(requestFocus()));
+
+ m_view = new DolphinView(url, this);
+ connect(m_view, SIGNAL(urlChanged(const KUrl&)), m_urlNavigator, SLOT(setUrl(const KUrl&)));
+ connect(m_view, SIGNAL(writeStateChanged(bool)), this, SIGNAL(writeStateChanged(bool)));
+ 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(itemTriggered(KFileItem)), this, SLOT(slotItemTriggered(KFileItem)));
+ connect(m_view, SIGNAL(redirection(KUrl, KUrl)), this, SLOT(redirect(KUrl, KUrl)));
+ connect(m_view, SIGNAL(startedPathLoading(KUrl)), this, SLOT(slotStartedPathLoading()));
+ connect(m_view, SIGNAL(finishedPathLoading(KUrl)), this, SLOT(slotFinishedPathLoading()));
+ connect(m_view, SIGNAL(itemCountChanged()), this, SLOT(delayedStatusBarUpdate()));
+ connect(m_view, SIGNAL(pathLoadingProgress(int)), this, SLOT(updateProgress(int)));
+ connect(m_view, SIGNAL(infoMessage(const QString&)), this, SLOT(showInfoMessage(const QString&)));
+ connect(m_view, SIGNAL(errorMessage(const QString&)), this, SLOT(showErrorMessage(const QString&)));
+ connect(m_view, SIGNAL(urlIsFileError(const KUrl&)), this, SLOT(openFile(const KUrl&)));
+ connect(m_view, SIGNAL(selectionChanged(const KFileItemList&)), this, SLOT(delayedStatusBarUpdate()));
+ connect(m_view, SIGNAL(operationCompletedMessage(const QString&)), this, SLOT(showOperationCompletedMessage(const QString&)));