#include <config-nepomuk.h>
-#include <kxmlguiwindow.h>
-#include <ksortablelist.h>
+#include <kfileitemdelegate.h>
#include <konq_undo.h>
+#include <ksortablelist.h>
+#include <kxmlguiwindow.h>
#include <QtCore/QList>
* having a split view setup, the nonactive view
* is usually shown in darker colors.
*/
- inline DolphinViewContainer* activeViewContainer() const;
+ DolphinViewContainer* activeViewContainer() const;
/**
* Returns true, if the main window contains two instances
* of a view container. The active view constainer can be
* accessed by DolphinMainWindow::activeViewContainer().
*/
- inline bool isSplit() const;
+ bool isSplit() const;
/**
* If the main window contains two instances of a view container
void rename(const KUrl& oldUrl, const KUrl& newUrl);
/**
- * Refreshs the views of the main window by recreating them dependent from
+ * Refreshes the views of the main window by recreating them dependent from
* the given Dolphin settings.
*/
void refreshViews();
* Returns the 'Create New...' sub menu which also can be shared
* with other menus (e. g. a context menu).
*/
- inline KNewMenu* newMenu() const;
+ KNewMenu* newMenu() const;
public slots:
/**
/**
* Returns the main window ID used through DBus.
*/
- inline int getId() const;
+ int getId() const;
/**
* Inform all affected dolphin components (sidebars, views) of an URL
/**
* Is emitted if information of an item is requested to be shown e. g. in the sidebar.
- * It the URL is empty, no item information request is pending.
+ * If item is null, no item information request is pending.
*/
- void requestItemInfo(const KUrl& url);
+ void requestItemInfo(const KFileItem& item);
protected:
/** @see QMainWindow::closeEvent */
*/
void invertSelection();
- /** The current active view is switched to the icons mode. */
- void setIconsView();
-
- /** The current active view is switched to the details mode. */
- void setDetailsView();
-
- /** The current active view is switched to the column mode. */
- void setColumnView();
+ /** The current active view is switched to a new view mode. */
+ void setViewMode(QAction *);
/** The sorting of the current view should be done by the name. */
void sortByName();
/** Switches between sorting by categories or not. */
void toggleSortCategorization();
- /**
- * Clears any additional information for an item except for the
- * name and the icon.
- */
- void clearInfo();
-
- /** Shows the MIME type as additional information for the item. */
- void showMimeInfo();
+ /** Switches between showing the MIME type as additional information for the item or not. */
+ void toggleMimeInfo();
- /** Shows the size as additional information for the item. */
- void showSizeInfo();
+ /** Switches between showing the size as additional information for the item or not. */
+ void toggleSizeInfo();
- /** Shows the date as additional information for the item. */
- void showDateInfo();
+ /** Switchtes between showing the date as additional information for the item or not. */
+ void toggleDateInfo();
/**
* Switches between one and two views:
void slotSortOrderChanged(Qt::SortOrder order);
/** Updates the state of the 'Additional Information' actions. */
- void slotAdditionalInfoChanged(KFileItemDelegate::AdditionalInformation info);
+ void slotAdditionalInfoChanged(KFileItemDelegate::InformationList info);
/**
* Updates the state of the 'Edit' menu actions and emits
void slotSelectionChanged(const KFileItemList& selection);
/** Emits the signal requestItemInfo(). */
- void slotRequestItemInfo(const KUrl& url);
+ void slotRequestItemInfo(const KFileItem&);
/**
* Updates the state of the 'Back' and 'Forward' menu
/**
* Updates the text of the split action:
- * If \a isSplit is true, the text is set to "Split",
+ * If two views are shown, the text is set to "Split",
* otherwise the text is set to "Join". The icon
- * is updated to match with the text.
+ * is updated to match with the text and the currently active view.
+ */
+ void updateSplitAction();
+
+ /**
+ * Helper method for the slots toggleDateInfo(), toggleSizeInfo()
+ * and toggleMimeInfo(). Applies \a info dependent from the current
+ * checked state of the action \a actionName to the file item delegate.
*/
- void updateSplitAction(bool isSplit);
+ void toggleAdditionalInfo(const char* actionName,
+ KFileItemDelegate::Information info);
private:
/**
QList<KonqUndoManager::CommandType> m_undoCommandTypes;
};
-DolphinViewContainer* DolphinMainWindow::activeViewContainer() const
+inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const
{
return m_activeViewContainer;
}
-bool DolphinMainWindow::isSplit() const
+inline bool DolphinMainWindow::isSplit() const
{
return m_viewContainer[SecondaryView] != 0;
}
-KNewMenu* DolphinMainWindow::newMenu() const
+inline KNewMenu* DolphinMainWindow::newMenu() const
{
return m_newMenu;
}
-int DolphinMainWindow::getId() const
+inline int DolphinMainWindow::getId() const
{
return m_id;
}