#include <kfileitemdelegate.h>
#include <kio/job.h>
-#include <urlnavigator.h>
+#include <kurlnavigator.h>
#include <QDropEvent>
#include <QLinkedList>
class KFileItemDelegate;
class KUrl;
class KDirModel;
-class UrlNavigator;
+class KUrlNavigator;
class DolphinColumnView;
class DolphinDetailsView;
class DolphinDirLister;
* @see DolphinIconsView
* @see DolphinDetailsView
* @see DolphinColumnView
- * @see UrlNavigator
+ * @see KUrlNavigator
* @see DolphinStatusBar
*/
class DolphinView : public QWidget
Q_OBJECT
public:
- /**
- * Defines the view mode for a directory. The view mode
- * can be defined when constructing a DolphinView. The
- * view mode is automatically updated if the directory itself
- * defines a view mode (see class ViewProperties for details).
- */
+ /**
+ * Defines the view mode for a directory. The view mode
+ * can be defined when constructing a DolphinView. The
+ * view mode is automatically updated if the directory itself
+ * defines a view mode (see class ViewProperties for details).
+ */
enum Mode
{
/**
/**
* Sets the current active URL.
- * The signals UrlNavigator::urlChanged() and UrlNavigator::historyChanged()
+ * The signals KUrlNavigator::urlChanged() and KUrlNavigator::historyChanged()
* are emitted.
*/
void setUrl(const KUrl& url);
void setShowHiddenFiles(bool show);
bool showHiddenFiles() const;
+ /**
+ * Summarizes all sorted items by their category \a categorized
+ * is true.
+ * If the view properties should be remembered for each directory
+ * (GeneralSettings::globalViewProps() returns false), then the
+ * categorized sorting setting will be be stored automatically.
+ */
+ void setCategorizedSorting(bool categorized);
+ bool categorizedSorting() const;
+
+ /**
+ * Returns true, if the categorized sorting is supported by the current
+ * used mode (see DolphinView::setMode()). Currently only DolphinView::IconsView
+ * supports categorizations. To check whether the categorized
+ * sorting is set, use DolphinView::categorizedSorting().
+ */
+ bool supportsCategorizedSorting() const;
+
/**
* Triggers the renaming of the currently selected items, where
* the user must input a new name for the items.
/**
* Goes back one step in the URL history. The signals
- * UrlNavigator::urlChanged() and UrlNavigator::historyChanged()
+ * KUrlNavigator::urlChanged() and KUrlNavigator::historyChanged()
* are submitted.
*/
void goBack();
/**
* Goes forward one step in the Url history. The signals
- * UrlNavigator::urlChanged() and UrlNavigator::historyChanged()
+ * KUrlNavigator::urlChanged() and KUrlNavigator::historyChanged()
* are submitted.
*/
void goForward();
/**
* Goes up one step of the Url path. The signals
- * UrlNavigator::urlChanged() and UrlNavigator::historyChanged()
+ * KUrlNavigator::urlChanged() and KUrlNavigator::historyChanged()
* are submitted.
*/
void goUp();
/**
- * Goes to the home URL. The signals UrlNavigator::urlChanged()
- * and UrlNavigator::historyChanged() are submitted.
+ * Goes to the home URL. The signals KUrlNavigator::urlChanged()
+ * and KUrlNavigator::historyChanged() are submitted.
*/
void goHome();
/**
* Returns true, if the URL shown by the navigation bar is editable.
- * @see UrlNavigator
+ * @see KUrlNavigator
*/
bool isUrlEditable() const;
/** Returns the additional information which should be shown for the items. */
KFileItemDelegate::AdditionalInformation additionalInfo() const;
- /** Returns the UrlNavigator of the view for read access. */
- const UrlNavigator* urlNavigator() const { return m_urlNavigator; }
+ /** Returns the KUrlNavigator of the view for read access. */
+ const KUrlNavigator* urlNavigator() const
+ {
+ return m_urlNavigator;
+ }
/**
* Triggers to request user information for the item given
/** Is emitted if the 'show hidden files' property has been changed. */
void showHiddenFilesChanged();
+ /** Is emitted if the 'categorized sorting' property has been changed. */
+ void categorizedSortingChanged();
+
/** Is emitted if the sorting by name, size or date has been changed. */
void sortingChanged(DolphinView::Sorting sorting);
virtual void mouseReleaseEvent(QMouseEvent* event);
private slots:
- void loadDirectory(const KUrl& kurl);
+ void changeDirectory(const KUrl& url);
void triggerItem(const QModelIndex& index);
void updateProgress(int percent);
* requires some special handling for iterating through directories,
* this method has been introduced for convenience.
*/
- bool isColumnViewActive() const { return m_columnView != 0; }
+ bool isColumnViewActive() const
+ {
+ return m_columnView != 0;
+ }
private:
/**
* Remembers the original pixmap for an item before
* the cut effect is applied.
*/
- struct CutItem {
+ struct CutItem
+ {
KUrl url;
QPixmap pixmap;
};
DolphinMainWindow* m_mainWindow;
QVBoxLayout* m_topLayout;
- UrlNavigator* m_urlNavigator;
+ KUrlNavigator* m_urlNavigator;
DolphinController* m_controller;
DolphinIconsView* m_iconsView;