X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a825e1bd74246dc97dde3f48b1d9ead7a214b744..e9bd295b:/src/views/dolphinview.h diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index ab3e86f15..e93ca4fa0 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -206,6 +206,10 @@ public: void setSortFoldersFirst(bool foldersFirst); bool sortFoldersFirst() const; + /** Sets a separate sorting with hidden files and folders last (true) or not (false). */ + void setSortHiddenLast(bool hiddenLast); + bool sortHiddenLast() const; + /** Sets the additional information which should be shown for the items. */ void setVisibleRoles(const QList& roles); @@ -315,7 +319,7 @@ public: */ void hideToolTip(const ToolTipManager::HideBehavior behavior = ToolTipManager::HideBehavior::Later); -public slots: +public Q_SLOTS: /** * Changes the directory to \a url. If the current directory is equal to * \a url, nothing will be done (use DolphinView::reload() instead). @@ -409,7 +413,7 @@ public slots: /** Activates the view if the item list container gets focus. */ bool eventFilter(QObject* watched, QEvent* event) override; -signals: +Q_SIGNALS: /** * Is emitted if the view has been activated by e. g. a mouse click. */ @@ -421,13 +425,13 @@ signals: /** * Is emitted when clicking on an item with the left mouse button. */ - void itemActivated(const KFileItem& item); + 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); + void itemsActivated(const KFileItemList &items); /** * Is emitted if items have been added or deleted. @@ -439,6 +443,16 @@ signals: */ void tabRequested(const QUrl& url); + /** + * Is emitted if a new tab should be opened for the URL \a url and set as active. + */ + void activeTabRequested(const QUrl &url); + + /** + * Is emitted if a new window should be opened for the URL \a url. + */ + void windowRequested(const QUrl &url); + /** * Is emitted if the view mode (IconsView, DetailsView, * PreviewsView) has been changed. @@ -454,7 +468,7 @@ signals: /** Is emitted if the 'grouped sorting' property has been changed. */ void groupedSortingChanged(bool groupedSorting); - /** Is emmited in reaction to a requestStatusBarText() call. + /** Is emitted in reaction to a requestStatusBarText() call. * @see requestStatusBarText() */ void statusBarTextChanged(QString statusBarText); @@ -470,6 +484,11 @@ signals: */ void sortFoldersFirstChanged(bool foldersFirst); + /** + * Is emitted if the sorting of hidden files has been changed. + */ + void sortHiddenLastChanged(bool hiddenLast); + /** Is emitted if the additional information shown for this view has been changed. */ void visibleRolesChanged(const QList& current, const QList& previous); @@ -593,6 +612,8 @@ signals: void goUpRequested(); + void fileItemsChanged(const KFileItemList &changedFileItems); + protected: /** Changes the zoom level if Control is pressed during a wheel event. */ void wheelEvent(QWheelEvent* event) override; @@ -600,7 +621,7 @@ protected: void hideEvent(QHideEvent* event) override; bool event(QEvent* event) override; -private slots: +private Q_SLOTS: /** * Marks the view as active (DolphinView:isActive() will return true) * and emits the 'activated' signal if it is not already active. @@ -608,12 +629,13 @@ private slots: void activate(); void slotItemActivated(int index); - void slotItemsActivated(const KItemSet& indexes); + void slotItemsActivated(const KItemSet &indexes); void slotItemMiddleClicked(int index); void slotItemContextMenuRequested(int index, const QPointF& pos); void slotViewContextMenuRequested(const QPointF& pos); void slotHeaderContextMenuRequested(const QPointF& pos); void slotHeaderColumnWidthChangeFinished(const QByteArray& role, qreal current); + void slotLeadingPaddingWidthChanged(qreal width); void slotItemHovered(int index); void slotItemUnhovered(int index); void slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* event); @@ -677,6 +699,12 @@ private slots: */ void updateSortFoldersFirst(bool foldersFirst); + /** + * Updates the view properties of the current URL to the + * sorting of hidden files given by \a hiddenLast. + */ + void updateSortHiddenLast(bool hiddenLast); + /** * Indicates in the status bar that the delete operation * of the job \a job has been finished. @@ -835,8 +863,11 @@ private: void updatePlaceholderLabel(); + void tryShowNameToolTip(QEvent* event); + private: void updatePalette(); + void showLoadingPlaceholder(); bool m_active; bool m_tabsForFiles; @@ -876,6 +907,7 @@ private: QTimer* m_twoClicksRenamingTimer; QUrl m_twoClicksRenamingItemUrl; QLabel* m_placeholderLabel; + QTimer* m_showLoadingPlaceholderTimer; // For unit tests friend class TestBase;