X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/f588a7d48b7cef5351d8b0f030a6ec5e76229976..d953875b60ca372f37d896de955da6e7cf42654c:/src/dolphinviewcontainer.h diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h index 60c9b90d1..55d00a3b8 100644 --- a/src/dolphinviewcontainer.h +++ b/src/dolphinviewcontainer.h @@ -14,14 +14,18 @@ #include #include +#include #include #include #include #include +namespace Admin +{ +class Bar; +} class FilterBar; -class KMessageWidget; class QAction; class QGridLayout; class QUrl; @@ -49,8 +53,6 @@ class DolphinViewContainer : public QWidget Q_OBJECT public: - enum MessageType { Information, Warning, Error }; - DolphinViewContainer(const QUrl &url, QWidget *parent); ~DolphinViewContainer() override; @@ -147,10 +149,9 @@ public: bool isSelectionModeEnabled() const; /** - * Shows the message \msg with the given type non-modal above - * the view-content. + * Shows the message \message with the given type \messageType non-modal above the view-content. */ - void showMessage(const QString &msg, MessageType type); + void showMessage(const QString &message, KMessageWidget::MessageType messageType); /** * Refreshes the view container to get synchronized with the (updated) Dolphin settings. @@ -279,10 +280,6 @@ private Q_SLOTS: */ void updateStatusBar(); - void updateDirectoryLoadingProgress(int percent); - - void updateDirectorySortingProgress(int percent); - /** * Updates the statusbar to show an undetermined progress with the correct * context information whether a searching or a directory loading is done. @@ -331,6 +328,11 @@ private Q_SLOTS: */ void showItemInfo(const KFileItem &item); + /** + * Sets the Admin::Bar visible or invisible based on whether \a url is an admin url. + */ + void updateAdminBarVisibility(const QUrl &url); + void closeFilterBar(); /** @@ -388,9 +390,9 @@ private Q_SLOTS: void slotStatusBarZoomLevelChanged(int zoomLevel); /** - * Slot that calls showMessage(msg, Error). + * Slot that calls showMessage(message, KMessageWidget::Error). */ - void showErrorMessage(const QString &msg); + void showErrorMessage(const QString &message); /** * Is invoked when a KFilePlacesModel has been changed @@ -447,6 +449,9 @@ private: DolphinSearchBox *m_searchBox; bool m_searchModeEnabled; + /// A bar shown at the top of the view to signify that the view is currently viewed and acted on with elevated privileges. + Admin::Bar *m_adminBar; + KMessageWidget *m_messageWidget; /// A bar shown at the top of the view to signify that selection mode is currently active.