void ServiceWidget::restoreSettings(const qt_gui_cpp::Settings& pluginSettings, const qt_gui_cpp::Settings& instanceSettings) { if(instanceSettings.contains("tableViewState")) m_view->horizontalHeader()->restoreState(instanceSettings.value("tableViewState").toByteArray()); if(instanceSettings.contains("connection")) m_connectionBox->addItem(instanceSettings.value("connection").toString()); }
void BandwidthGui::restoreSettings(const qt_gui_cpp::Settings& pluginSettings, const qt_gui_cpp::Settings& instanceSettings) { if(instanceSettings.contains("connection")) m_connectionBox->addItem(instanceSettings.value("connection").toString()); if(instanceSettings.contains("groups")) { m_grpYamlString = instanceSettings.value("groups").toString(); GroupMap groupMap; if(m_grpYamlString.isEmpty()) m_grpYamlString = QString::fromStdString(DEFAULT_GROUPS); if(!groupFromYaml(m_grpYamlString.toStdString(), &groupMap)) { m_grpYamlString = ""; return; } m_groupMap = groupMap; } }