void setViewPropertiesContext(const QString& context);
QString viewPropertiesContext() const;
+ /**
+ * Checks if the given \a item can be opened as folder (e.g. archives).
+ * This function will also adjust the \a url (e.g. change the protocol).
+ * @return a valid and adjusted url if the item can be opened as folder,
+ * otherwise return an empty url.
+ */
+ static KUrl openItemAsFolderUrl(const KFileItem& item, const bool browseThroughArchives = true);
+
public slots:
/**
* Changes the directory to \a url. If the current directory is equal to
*/
void itemActivated(const KFileItem& item);
+ /**
+ * Is emitted when multiple items have been activated by e. g.
+ * context menu open with.
+ */
+ void itemsActivated(const KFileItemList& items);
+
/**
* Is emitted if items have been added or deleted.
*/
*/
void directoryLoadingCompleted();
+ /**
+ * Is emitted after the directory loading triggered by DolphinView::setUrl()
+ * has been canceled.
+ */
+ void directoryLoadingCanceled();
+
/**
* Is emitted after DolphinView::setUrl() has been invoked and provides
* the information how much percent of the current directory have been loaded.
/** @reimp */
virtual void hideEvent(QHideEvent* event);
+ virtual bool event(QEvent* event);
private slots:
/**
void slotModelChanged(KItemModelBase* current, KItemModelBase* previous);
void slotMouseButtonPressed(int itemIndex, Qt::MouseButtons buttons);
+ /*
+ * Is called when new items get pasted or dropped.
+ */
+ void slotAboutToCreate(const KUrl::List& urls);
+
/**
* Emits the signal \a selectionChanged() with a small delay. This is
* because getting all file items for the selection can be an expensive
*/
void slotDeleteFileFinished(KJob* job);
+ void slotRenamingFailed(const KUrl& oldUrl, const KUrl& newUrl);
+
/**
* Invoked when the file item model has started the loading
* of the directory specified by DolphinView::url().
void slotVisibleRolesChangedByHeader(const QList<QByteArray>& current,
const QList<QByteArray>& previous);
+ void slotRoleEditingCanceled();
void slotRoleEditingFinished(int index, const QByteArray& role, const QVariant& value);
/**
*/
QMimeData* selectionMimeData() const;
- /**
- * Is invoked after a paste operation or a drag & drop
- * operation and URLs from \a mimeData as selected.
- * This allows to select all newly pasted
- * items in restoreViewState().
- */
- void markPastedUrlsAsSelected(const QMimeData* mimeData);
-
/**
* Updates m_isFolderWritable dependent on whether the folder represented by
* the current URL is writable. If the state has changed, the signal
QPoint m_restoredContentsPosition;
QList<KUrl> m_selectedUrls; // Used for making the view to remember selections after F5
+ bool m_clearSelectionBeforeSelectingNewItems;
+ bool m_markFirstNewlySelectedItemAsCurrent;
VersionControlObserver* m_versionControlObserver;
// For unit tests
friend class TestBase;
friend class DolphinDetailsViewTest;
+ friend class DolphinPart; // Accesses m_model
};
/// Allow using DolphinView::Mode in QVariant