9 #ifndef INTERFACES_IHAVERECOVERABLETABS_H 10 #define INTERFACES_IHAVERECOVERABLETABS_H 45 virtual QByteArray GetTabRecoverData ()
const = 0;
55 virtual QString GetTabRecoverName ()
const = 0;
64 virtual QIcon GetTabRecoverIcon ()
const = 0;
74 virtual void tabRecoverDataChanged () = 0;
166 virtual bool HasSimilarTab (
const QByteArray& data,
192 const auto& thisData =
f (data);
193 return std::any_of (existing.begin (), existing.end (),
194 [&thisData, &
f] (
const QByteArray& other) {
return thisData ==
f (other); });
198 Q_DECLARE_INTERFACE (
IRecoverableTab,
"org.Deviant.LeechCraft.IRecoverableTab/1.0")
static bool StandardSimilarImpl(const QByteArray &data, const QList< QByteArray > &existing, const T &f)
A standard implementation of the HasSimilarTab() function.
Interface for a single tab that may be recovered.
constexpr detail::ExprTree< detail::ExprType::LeafStaticPlaceholder, detail::MemberPtrs< Ptr > > f
virtual ~IHaveRecoverableTabs()
virtual ~IRecoverableTab()
Interface for plugins that can recover tabs after restart.
DynPropertiesList_t DynProperties_
Dynamic properties list from other plugins.
QByteArray Data_
The tab-specific restore data.
Keeps the tab state between runs.
QList< QPair< QByteArray, QVariant > > DynPropertiesList_t