/** Returns the current used sort order (Qt::Ascending or Qt::Descending). */
Qt::SortOrder sortOrder() const;
+ /** Sets a separate sorting with folders first (true) or a mixed sorting of files and folders (false). */
+ void setSortFoldersFirst(bool foldersFirst);
+
+ /** Returns if files and folders are sorted separately or not. */
+ bool sortFoldersFirst() const;
+
/** Sets the additional information which should be shown for the items. */
void setAdditionalInfo(KFileItemDelegate::InformationList info);
/** Switches between an ascending and descending sorting order. */
void toggleSortOrder();
+ /** Switches between a separate sorting (with folders first) and a mixed sorting of files and folders. */
+ void toggleSortFoldersFirst();
+
/**
* Switches on or off the displaying of additional information
* as specified by \a action.
/** Is emitted if the sort order (ascending or descending) has been changed. */
void sortOrderChanged(Qt::SortOrder order);
+ /** Is emitted if the sorting of files and folders (separate with folders first or mixed) has been changed. */
+ void sortFoldersFirstChanged(bool foldersFirst);
+
/** Is emitted if the additional information shown for this view has been changed. */
void additionalInfoChanged();
*/
void updateSortOrder(Qt::SortOrder order);
+ /**
+ * Updates the view properties of the current URL to the
+ * sorting of files and folders (separate with folders first or mixed) given by \a foldersFirst.
+ */
+ void updateSortFoldersFirst(bool foldersFirst);
+
/**
* Updates the view properties of the current URL to the
* additional information given by \a info.
*/
void selectAndScrollToCreatedItem();
+ /**
+ * Restore selection after view refresh.
+ */
+ void restoreSelection();
+
private:
void loadDirectory(const KUrl& url, bool reload = false);
KUrl m_rootUrl;
KUrl m_currentItemUrl;
KUrl m_createdItemUrl; // URL for a new item that got created by the "Create New..." menu
+ KFileItemList m_selectedItems; //this is used for making the View to remember selections after F5
QAbstractItemView* m_expandedDragSource;
};