X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/652d08c9242ed51d86dba3b2afda9d3b2e9a9cd7..fd74aa8e2057158d2eadb835eb61564854c81020:/src/dolphinviewcontainer.h diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h index fe1ad8d6e..8ddc9d059 100644 --- a/src/dolphinviewcontainer.h +++ b/src/dolphinviewcontainer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007 by Peter Penz * + * Copyright (C) 2007 by Peter Penz * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -17,32 +17,25 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ - #ifndef DOLPHINVIEWCONTAINER_H #define DOLPHINVIEWCONTAINER_H -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include -#include -#include -#include -#include -#include +#include +#include #include class FilterBar; class KUrl; -class DolphinModel; class KUrlNavigator; -class DolphinDirLister; class DolphinSearchBox; -class DolphinSortFilterProxyModel; class DolphinStatusBar; /** @@ -113,9 +106,11 @@ public slots: void setUrl(const KUrl& url); /** - * Popups the filter bar above the status bar if \a show is true. + * Popups the filter bar above the status bar if \a visible is true. + * It \a visible is true, it is assured that the filter bar gains + * the keyboard focus. */ - void showFilterBar(bool show); + void setFilterBarVisible(bool visible); signals: /** @@ -130,6 +125,13 @@ signals: */ 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 @@ -146,15 +148,19 @@ private slots: */ void updateStatusBar(); - void initializeProgress(); - void updateProgress(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(); + /** * Assures that the viewport position is restored and updates the * statusbar to reflect the current content. */ - void slotDirListerCompleted(); + void slotFinishedPathLoading(); /** * Handles clicking on an item. If the item is a directory, the @@ -242,12 +248,19 @@ private slots: void startSearching(const QString& text); void closeSearchBox(); + /** + * Stops the loading of a directory. Is connected with the "stopPressed" signal + * from the statusbar. + */ + void stopLoading(); + private: + /** + * @return True if the URL protocol is a search URL (e. g. nepomuksearch:// or filenamesearch://). + */ bool isSearchUrl(const KUrl& url) const; private: - bool m_isFolderWritable; - QVBoxLayout* m_topLayout; KUrlNavigator* m_urlNavigator; DolphinSearchBox* m_searchBox; @@ -257,11 +270,8 @@ private: FilterBar* m_filterBar; DolphinStatusBar* m_statusBar; - QTimer* m_statusBarTimer; - - DolphinModel* m_dolphinModel; - DolphinDirLister* m_dirLister; - DolphinSortFilterProxyModel* m_proxyModel; + QTimer* m_statusBarTimer; // Triggers a delayed update + QElapsedTimer m_statusBarTimestamp; // Time in ms since last update }; inline const DolphinStatusBar* DolphinViewContainer::statusBar() const