LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
IRecoverableTab Class Referenceabstract

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...
 

Detailed Description

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.

See also
IHaveRecoverableTabs

Definition at line 34 of file ihaverecoverabletabs.h.

Constructor & Destructor Documentation

◆ ~IRecoverableTab()

virtual IRecoverableTab::~IRecoverableTab ( )
inlinevirtual

Definition at line 37 of file ihaverecoverabletabs.h.

Member Function Documentation

◆ GetTabRecoverData()

virtual QByteArray IRecoverableTab::GetTabRecoverData ( ) const
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.

◆ GetTabRecoverIcon()

virtual QIcon IRecoverableTab::GetTabRecoverIcon ( ) const
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.

◆ GetTabRecoverName()

virtual QString IRecoverableTab::GetTabRecoverName ( ) const
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".

◆ tabRecoverDataChanged()

virtual void IRecoverableTab::tabRecoverDataChanged ( )
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.

Note
This function is expected to be a signal.

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