LeechCraft  %{LEECHCRAFT_VERSION}
Modular cross-platform feature rich live environment.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
IHaveRecoverableTabs Class Referenceabstract

Interface for plugins that can recover tabs after restart. More...

#include "ihaverecoverabletabs.h"

Public Member Functions

virtual ~IHaveRecoverableTabs ()
 
virtual void RecoverTabs (const QList< LeechCraft::TabRecoverInfo > &infos)=0
 Recovers the tabs according to the infos list. More...
 

Detailed Description

Interface for plugins that can recover tabs after restart.

This interface should be implemented by plugins for which it makes sense to recover tabs in some way: either after restart or un-close, for instance. For example, a web browser or a media player may wish to implement this interface.

First, tabs which wish to be saved between runs should implement the IRecoverableTab interface. If a session manager plugin (like TabSessManager) is installed, then it will query the tabs regarding their state via that interface and save that information.

After restarting LeechCraft (or when requesting reopening a recently closed tab), the RecoverTabs method will be called by a tab session manager plugin to recover the needed tabs.

c

See Also
IRecoverableTab, LeechCraft::TabRecoverInfo, IHaveTabs

Definition at line 151 of file ihaverecoverabletabs.h.

Constructor & Destructor Documentation

virtual IHaveRecoverableTabs::~IHaveRecoverableTabs ( )
inlinevirtual

Definition at line 154 of file ihaverecoverabletabs.h.

Member Function Documentation

virtual void IHaveRecoverableTabs::RecoverTabs ( const QList< LeechCraft::TabRecoverInfo > &  infos)
pure virtual

Recovers the tabs according to the infos list.

This method should recover the tabs according to the information contained in the infos list. That is, for each tab recover info in that list it should create the tab, recover the tab state according to LeechCraft::TabRecoverInfo::Data_, set the dynamic properties of the tab (via QObject::setProperty()) according to LeechCraft::TabRecoverInfo::DynProperties_ list, and only then emit the IHaveTabs::addNewTab() signal.

Note
Please note that it's very important to emit the tab via the addNewTab() signal only after the tab's dynamic properties are restored.

The documentation for this class was generated from the following file: