#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 updateStatusBar();
- void updateProgress(int percent);
+ 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.
*/
- void slotStartedPathLoading();
+ void slotDirectoryLoadingStarted();
/**
* Assures that the viewport position is restored and updates the
* statusbar to reflect the current content.
*/
- void slotFinishedPathLoading();
+ void slotDirectoryLoadingCompleted();
/**
* Handles clicking on an item. If the item is a directory, the
*/
void slotItemActivated(const KFileItem& item);
- /**
- * Opens a the file \a url by opening the corresponding application.
- * Is connected with the signal urlIsFile() from DolphinDirLister and will
- * get invoked if the user manually has entered a file into the URL navigator.
- */
- void openFile(const KUrl& url);
-
/**
* Shows the information for the item \a item inside the statusbar. If the
* item is null, the default statusbar information is shown.
*/
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();
/**
/**
* Gets the search URL from the searchbox and starts searching.
- * @param text Text the user has entered into the searchbox.
*/
- void startSearching(const QString& text);
+ void startSearching();
void closeSearchBox();
/**
* 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