this, SLOT(slotMessage(QString)));
connect(m_view, SIGNAL(errorMessage(QString)),
this, SLOT(slotErrorMessage(QString)));
- connect(m_view, SIGNAL(itemTriggered(KFileItem)),
- this, SLOT(slotItemTriggered(KFileItem)));
+ connect(m_view, SIGNAL(itemActivated(KFileItem)),
+ this, SLOT(slotItemActivated(KFileItem)));
connect(m_view, SIGNAL(tabRequested(KUrl)),
this, SLOT(createNewWindow(KUrl)));
connect(m_view, SIGNAL(requestContextMenu(KFileItem,KUrl,QList<QAction*>)),
}
}
-void DolphinPart::slotItemTriggered(const KFileItem& item)
+void DolphinPart::slotItemActivated(const KFileItem& item)
{
KParts::OpenUrlArguments args;
// Forget about the known mimetype if a target URL is used.
void DolphinPart::createNewWindow(const KUrl& url)
{
// TODO: Check issue N176832 for the missing QAIV signal; task 177399 - maybe this code
- // should be moved into DolphinPart::slotItemTriggered()
+ // should be moved into DolphinPart::slotItemActivated()
emit m_extension->createNewWindow(url);
}
/**
* Handles clicking on an item
*/
- void slotItemTriggered(const KFileItem& item);
+ void slotItemActivated(const KFileItem& item);
/**
* Creates a new window showing the content of \a url.
*/
connect(m_searchBox, SIGNAL(returnPressed(QString)), this, SLOT(requestFocus()));
m_view = new DolphinView(url, this);
- connect(m_view, SIGNAL(urlChanged(KUrl)), m_urlNavigator, SLOT(setUrl(KUrl)));
+ connect(m_view, SIGNAL(urlChanged(KUrl)), m_urlNavigator, SLOT(setUrl(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(QString)), this, SLOT(showErrorMessage(QString)));
- connect(m_view, SIGNAL(infoMessage(QString)), this, SLOT(showInfoMessage(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(errorMessage(QString)), this, SLOT(showErrorMessage(QString)));
+ connect(m_view, SIGNAL(infoMessage(QString)), this, SLOT(showInfoMessage(QString)));
+ connect(m_view, SIGNAL(itemActivated(KFileItem)), this, SLOT(slotItemActivated(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(QString)), this, SLOT(showInfoMessage(QString)));
- connect(m_view, SIGNAL(errorMessage(QString)), this, SLOT(showErrorMessage(QString)));
- connect(m_view, SIGNAL(urlIsFileError(KUrl)), this, SLOT(openFile(KUrl)));
+ connect(m_view, SIGNAL(infoMessage(QString)), this, SLOT(showInfoMessage(QString)));
+ connect(m_view, SIGNAL(errorMessage(QString)), this, SLOT(showErrorMessage(QString)));
+ connect(m_view, SIGNAL(urlIsFileError(KUrl)), this, SLOT(openFile(KUrl)));
connect(m_view, SIGNAL(selectionChanged(KFileItemList)), this, SLOT(delayedStatusBarUpdate()));
connect(m_view, SIGNAL(operationCompletedMessage(QString)), this, SLOT(showOperationCompletedMessage(QString)));
connect(m_view, SIGNAL(urlAboutToBeChanged(KUrl)), this, SLOT(slotViewUrlAboutToBeChanged(KUrl)));
}
}
-void DolphinViewContainer::slotItemTriggered(const KFileItem& item)
+void DolphinViewContainer::slotItemActivated(const KFileItem& item)
{
KUrl url = item.targetUrl();
void DolphinViewContainer::openFile(const KUrl& url)
{
const KFileItem item(KFileItem::Unknown, KFileItem::Unknown, url);
- slotItemTriggered(item);
+ slotItemActivated(item);
}
void DolphinViewContainer::showItemInfo(const KFileItem& item)
* directory is opened in the view. If the item is a file, the file
* gets started by the corresponding application.
*/
- void slotItemTriggered(const KFileItem& item);
+ void slotItemActivated(const KFileItem& item);
/**
* Opens a the file \a url by opening the corresponding application.
m_pressedMousePos(),
m_oldSelection()
{
- connect(m_keyboardManager, SIGNAL(requestItemActivation(QString,bool)), this, SLOT(slotKeyboardActivationRequested(QString,bool)));
+ connect(m_keyboardManager, SIGNAL(changeCurrentItem(QString,bool)),
+ this, SLOT(slotChangeCurrentItem(QString,bool)));
}
KItemListController::~KItemListController()
return true;
}
-void KItemListController::slotKeyboardActivationRequested(const QString& text, bool searchFromNextItem)
+void KItemListController::slotChangeCurrentItem(const QString& text, bool searchFromNextItem)
{
if (!m_model) {
return;
*/
void slotRubberBandChanged();
- void slotKeyboardActivationRequested(const QString& text, bool searchFromNextItem);
+ void slotChangeCurrentItem(const QString& text, bool searchFromNextItem);
private:
/**
const bool searchFromNextItem = m_searchedString.isEmpty();
if (!keys.isEmpty()) {
m_searchedString.append(keys);
- emit requestItemActivation(m_searchedString, searchFromNextItem);
+ emit changeCurrentItem(m_searchedString, searchFromNextItem);
}
m_keyboardInputTime.start();
}
void addKeys(const QString& keys);
signals:
-
/**
- * Is emitted when a text is to be searched.
- * @param searchFromNextItem if true, start searching
- * from item next to current item. Otherwise, search from
- * current item.
+ * Is emitted if the current item should be changed corresponding
+ * to \a text.
+ * @param searchFromNextItem If true start searching from item next to the
+ * current item. Otherwise, search from the
+ * current item.
*/
- void requestItemActivation(const QString& string, bool searchFromNextItem);
+ // TODO: Think about getting rid of the bool parameter
+ // (see http://doc.qt.nokia.com/qq/qq13-apis.html#thebooleanparametertrap)
+ void changeCurrentItem(const QString& string, bool searchFromNextItem);
private:
QString m_searchedString;
this, SLOT(updateSortFoldersFirst(bool)));
connect(m_dolphinViewController, SIGNAL(additionalInfoChanged(QList<DolphinView::AdditionalInfo>)),
this, SLOT(updateAdditionalInfo(QList<DolphinView::AdditionalInfo>)));*/
- //connect(m_dolphinViewController, SIGNAL(itemTriggered(KFileItem)),
+ //connect(m_dolphinViewController, SIGNAL(itemActivated(KFileItem)),
// this, SLOT(triggerItem(KFileItem)));
//connect(m_dolphinViewController, SIGNAL(tabRequested(KUrl)),
// this, SIGNAL(tabRequested(KUrl)));
if (selectedItems.isEmpty())
return;
if (selectedItems.count() == 1) {
- emit itemTriggered(fileItemModel()->fileItem(index)); // caught by DolphinViewContainer or DolphinPart
+ emit itemActivated(fileItemModel()->fileItem(index)); // caught by DolphinViewContainer or DolphinPart
}
else {
foreach (int i, selectedItems) {
if (fileItem.isDir()) {
emit tabRequested(fileItem.url());
} else {
- emit itemTriggered(fileItem);
+ emit itemActivated(fileItem);
}
}
}
void DolphinView::slotContextMenuRequested(int index, const QPointF& pos)
{
+ Q_UNUSED(pos);
if (GeneralSettings::showToolTips()) {
m_toolTipManager->hideToolTip();
}
/**
* Is emitted when clicking on an item with the left mouse button.
*/
- void itemTriggered(const KFileItem& item);
+ void itemActivated(const KFileItem& item);
/**
* Is emitted if items have been added or deleted.