#include <views/dolphinview.h>
class FilterBar;
+class KMessageWidget;
class KUrl;
class KUrlNavigator;
class DolphinSearchBox;
Q_OBJECT
public:
+ enum MessageType
+ {
+ Information,
+ Warning,
+ Error
+ };
+
DolphinViewContainer(const KUrl& url, QWidget* parent);
virtual ~DolphinViewContainer();
void setActive(bool active);
bool isActive() const;
+ /**
+ * If \a grab is set to true, the container automatically grabs the focus
+ * as soon as the URL has been changed. Per default the grabbing
+ * of the focus is enabled.
+ */
+ void setAutoGrabFocus(bool grab);
+ bool autoGrabFocus() const;
+
const DolphinStatusBar* statusBar() const;
DolphinStatusBar* statusBar();
const DolphinView* view() const;
DolphinView* view();
- const DolphinSearchBox* searchBox() const;
- DolphinSearchBox* searchBox();
+ /**
+ * Shows the message \msg with the given type non-modal above
+ * the view-content.
+ */
+ void showMessage(const QString& msg, MessageType type);
/**
* Refreshes the view container to get synchronized with the (updated) Dolphin settings.
*/
void writeStateChanged(bool isFolderWritable);
- /**
- * Is emitted if the search mode has been enabled or disabled.
- * (see DolphinViewContainer::setSearchModeEnabled() and
- * DolphinViewContainer::isSearchModeEnabled())
- */
- void searchModeChanged(bool enabled);
-
private slots:
/**
* Updates the number of items (= number of files + number of
*/
void showItemInfo(const KFileItem& item);
- /** Shows the information \a msg inside the statusbar. */
- void showInfoMessage(const QString& msg);
-
- /** Shows the error message \a msg inside the statusbar. */
- void showErrorMessage(const QString& msg);
-
- /** Shows the "operation completed" message \a msg inside the statusbar. */
- void showOperationCompletedMessage(const QString& msg);
-
void closeFilterBar();
/**
* Stops the loading of a directory. Is connected with the "stopPressed" signal
* from the statusbar.
*/
- void stopLoading();
+ void stopDirectoryLoading();
+
+ void slotStatusBarZoomLevelChanged(int zoomLevel);
+
+ /**
+ * Slot that calls showMessage(msg, Error).
+ */
+ void showErrorMessage(const QString& msg);
private:
/**
QVBoxLayout* m_topLayout;
KUrlNavigator* m_urlNavigator;
DolphinSearchBox* m_searchBox;
+ KMessageWidget* m_messageWidget;
DolphinView* m_view;
DolphinStatusBar* m_statusBar;
QTimer* m_statusBarTimer; // Triggers a delayed update
QElapsedTimer m_statusBarTimestamp; // Time in ms since last update
+ bool m_autoGrabFocus;
};
#endif // DOLPHINVIEWCONTAINER_H