X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/da7ccef4886df64913b8a6a4bc14cfdb06067325..d27ee07d:/src/views/dolphinview.h diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index cb8953579..f851724c2 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -225,8 +225,6 @@ public: /** Returns the additional information which should be shown for the items. */ QList visibleRoles() const; - void reload(); - /** * Refreshes the view to get synchronized with the settings (e.g. icons size, * font, ...). @@ -335,7 +333,21 @@ public: */ void hideToolTip(const ToolTipManager::HideBehavior behavior = ToolTipManager::HideBehavior::Later); + /** + * Check if the space key should be handled as a normal key, even if it's + * used as a keyboard shortcut. + * + * See BUG 465489 + */ + bool handleSpaceAsNormalKey() const; + + /** Activates the view if the item list container gets focus. */ + bool eventFilter(QObject *watched, QEvent *event) override; + public Q_SLOTS: + + void reload(); + /** * Changes the directory to \a url. If the current directory is equal to * \a url, nothing will be done (use DolphinView::reload() instead). @@ -426,9 +438,6 @@ public Q_SLOTS: */ void updateViewState(); - /** Activates the view if the item list container gets focus. */ - bool eventFilter(QObject *watched, QEvent *event) override; - Q_SIGNALS: /** * Is emitted if the view has been activated by e. g. a mouse click. @@ -443,6 +452,12 @@ Q_SIGNALS: */ void itemActivated(const KFileItem &item); + /** + * Is emitted when clicking on a file with the middle mouse button. + * @note: This will not be emitted for folders or file archives that will/can be opened like folders. + */ + void fileMiddleClickActivated(const KFileItem &item); + /** * Is emitted when multiple items have been activated by e. g. * context menu open with. @@ -666,7 +681,7 @@ private Q_SLOTS: void slotMouseButtonPressed(int itemIndex, Qt::MouseButtons buttons); void slotRenameDialogRenamingFinished(const QList &urls); void slotSelectedItemTextPressed(int index); - void slotCopyingDone(KIO::Job *, const QUrl &, const QUrl &to); + void slotItemCreatedFromJob(KIO::Job *, const QUrl &, const QUrl &to); void slotIncreaseZoom(); void slotDecreaseZoom(); void slotSwipeUp(); @@ -928,9 +943,11 @@ private: // resolution scroll wheels) int m_controlWheelAccumulatedDelta; - QList m_selectedUrls; // Used for making the view to remember selections after F5 + QList m_selectedUrls; // Used for making the view to remember selections after F5 and file operations bool m_clearSelectionBeforeSelectingNewItems; bool m_markFirstNewlySelectedItemAsCurrent; + /// Decides whether items created by jobs should automatically be selected. + bool m_selectJobCreatedItems; VersionControlObserver *m_versionControlObserver; @@ -940,7 +957,7 @@ private: QTimer *m_showLoadingPlaceholderTimer; /// The information roleIndex of the list column header currently hovered - int m_hoveredColumnHearderRoleIndex; + std::optional m_hoveredColumnHeaderIndex; /// Used for selection mode. @see setSelectionMode() std::unique_ptr m_proxyStyle; @@ -950,6 +967,7 @@ private: friend class DolphinDetailsViewTest; friend class DolphinMainWindowTest; friend class DolphinPart; // Accesses m_model + void updateSelectionState(); }; /// Allow using DolphinView::Mode in QVariant