30 #ifndef INTERFACES_IHAVERECOVERABLETABS_H 31 #define INTERFACES_IHAVERECOVERABLETABS_H 66 virtual QByteArray GetTabRecoverData ()
const = 0;
76 virtual QString GetTabRecoverName ()
const = 0;
85 virtual QIcon GetTabRecoverIcon ()
const = 0;
95 virtual void tabRecoverDataChanged () = 0;
187 virtual bool HasSimilarTab (
const QByteArray& data,
213 const auto& thisData = f (data);
214 return std::any_of (existing.begin (), existing.end (),
215 [&thisData, &f] (
const QByteArray& other) {
return thisData == f (other); });
Q_DECLARE_INTERFACE(IRecoverableTab,"org.Deviant.LeechCraft.IRecoverableTab/1.0")
QByteArray Data_
The tab-specific restore data.
static bool StandardSimilarImpl(const QByteArray &data, const QList< QByteArray > &existing, const T &f)
A standard implementation of the HasSimilarTab() function.
QList< QPair< QByteArray, QVariant > > DynPropertiesList_t
Interface for a single tab that may be recovered.
virtual ~IHaveRecoverableTabs()
virtual ~IRecoverableTab()
Interface for plugins that can recover tabs after restart.
Keeps the tab state between runs.
DynPropertiesList_t DynProperties_
Dynamic properties list from other plugins.