![]() |
LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
Interface for a single tab that may be recovered. More...
#include "ihaverecoverabletabs.h"
Public Member Functions | |
virtual | ~IRecoverableTab () |
virtual QByteArray | GetTabRecoverData () const =0 |
Returns the serialized state of the tab. More... | |
virtual QString | GetTabRecoverName () const =0 |
Returns the user-readable name of the tab. More... | |
virtual QIcon | GetTabRecoverIcon () const =0 |
Returns the icon of this tab. More... | |
Protected Member Functions | |
virtual void | tabRecoverDataChanged ()=0 |
Notifies that tab state's changed. More... | |
Interface for a single tab that may be recovered.
This interface should be implemented by tabs that may be recovered across LeechCraft runs or after closing. For example, a web browser tab with a web page or a chat window may be recovered either on next LeechCraft start or after being closed.
The tab's state should be returned by the GetTabRecoverData() function. Tab name and icon for the restore dialog or menu should be returned by the GetTabRecoverName() and GetTabRecoverIcon() functions respectively. Whenever tab state changes, it should emit the tabRecoverDataChanged() signal to notify tab session managers about the update.
Definition at line 34 of file ihaverecoverabletabs.h.
|
inlinevirtual |
Definition at line 37 of file ihaverecoverabletabs.h.
|
pure virtual |
Returns the serialized state of the tab.
This state will later be passed to the IHaveRecoverableTabs::RecoverTabs() as the LC::TabRecoverInfo::Data_ member.
|
pure virtual |
Returns the icon of this tab.
The return value of this function will be used in the tab restore dialog or tab reopen menu.
For example, a web browser may want to return web site's favicon.
|
pure virtual |
Returns the user-readable name of the tab.
The return value of this function will be used in the tab restore dialog or tab reopen menu.
For example, a web browser may want to return something like "Google — http://google.com".
|
protectedpure virtual |
Notifies that tab state's changed.
This signal should be emitted whenever the tab state changes so that tab session managers could have a chance to update their saved state.