#include <KFileItem>
#include <KIO/Job>
+#include <KMessageWidget>
#include <KUrlNavigator>
#include <QElapsedTimer>
#include <QPushButton>
#include <QWidget>
+#include <initializer_list>
+
namespace Admin
{
class Bar;
}
class FilterBar;
-class KMessageWidget;
class QAction;
class QGridLayout;
class QUrl;
Q_OBJECT
public:
- enum MessageType { Information, Warning, Error };
-
DolphinViewContainer(const QUrl &url, QWidget *parent);
~DolphinViewContainer() override;
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.
+ * \buttonActions defines actions which the user can trigger as a response to this message. They are presented as buttons below the \message.
*/
- void showMessage(const QString &msg, MessageType type);
+ void showMessage(const QString &message, KMessageWidget::MessageType messageType, std::initializer_list<QAction *> buttonActions = {});
/**
* Refreshes the view container to get synchronized with the (updated) Dolphin settings.
*/
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();
/**
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