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); });
219 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