#include "panels/information/informationpanel.h"
#endif
+#include <QFutureWatcher>
#include <QIcon>
#include <QList>
#include <QMenu>
*/
void setViewsToHomeIfMountPathOpen(const QString &mountPath);
+ /**
+ * Enables or disables the session autosaving feature.
+ *
+ * @param enable If true, saves the session automatically after a fixed
+ * time interval from the last state change.
+ */
+ void setSessionAutoSaveEnabled(bool enable);
+
bool isFoldersPanelEnabled() const;
bool isInformationPanelEnabled() const;
bool isSplitViewEnabledInCurrentTab() const;
void settingsChanged();
protected:
+ /** @see QObject::event() */
+ bool event(QEvent *event) override;
+
/** @see QWidget::showEvent() */
void showEvent(QShowEvent *event) override;
*/
void openInNewWindow();
+ /**
+ * Opens the selected folder in the other inactive split view, enables split view if necessary.
+ */
+ void openInSplitView(const QUrl &url);
+
/**
* Show the target of the selected symlink
*/
*/
void slotKeyBindings();
+ /**
+ * Saves the session.
+ */
+ void slotSaveSession();
+
private:
/**
* Sets up the various menus and actions and connects them.
/**
* Creates an action for showing/hiding a panel, that is accessible
- * in "Configure toolbars..." and "Configure shortcuts...". This is necessary
- * as the action for toggling the dock visibility is done by Qt which
- * is no KAction instance.
+ * in "Configure toolbars..." and "Configure shortcuts...".
*/
- void createPanelAction(const QIcon &icon, const QKeySequence &shortcut, QAction *dockAction, const QString &actionName);
+ void createPanelAction(const QIcon &icon, const QKeySequence &shortcut, QDockWidget *dockAction, const QString &actionName);
/** Adds "What's This?" texts to many widgets and StandardActions. */
void setupWhatsThis();
QMenu m_searchTools;
KFileItemActions m_fileItemActions;
+ QTimer *m_sessionSaveTimer;
+ QFutureWatcher<void> *m_sessionSaveWatcher;
+ bool m_sessionSaveScheduled;
+
friend class DolphinMainWindowTest;
};