void Plugin::RecoverTabs (const QList<TabRecoverInfo>& infos) { Q_FOREACH (const auto& info, infos) { auto tab = new DocumentTab (DocTabInfo_, this); Q_FOREACH (const auto& pair, info.DynProperties_) tab->setProperty (pair.first, pair.second); EmitTab (tab); tab->RecoverState (info.Data_); }
void Plugin::TabOpenRequested (const QByteArray& tcId, const DynPropertiesList_t& list, QDataStream *recover) { if (tcId == PhotosTabTC_.TabClass_) { auto tab = new PhotosTab (AccountsMgr_, PhotosTabTC_, this, Proxy_); for (const auto& prop : list) tab->setProperty (prop.first, prop.second); connect (tab, SIGNAL (removeTab (QWidget*)), this, SIGNAL (removeTab (QWidget*))); emit addNewTab (PhotosTabTC_.VisibleName_, tab); emit raiseTab (tab); if (recover) tab->RecoverState (*recover); }