void MobileSettingsWindow::update(const qutim_sdk_0_3::SettingsItemList& settings)
{
	foreach (SettingsItem *item, (p->items.values().toSet() -= settings.toSet()))
		item->clearWidget();
	p->items.clear();
	loadSettings(settings);
}
Exemple #2
0
void XSettingsWindow::update(const qutim_sdk_0_3::SettingsItemList& settings)
{
	foreach (SettingsItem *item, (p->items.values().toSet() -= settings.toSet()))
		item->clearWidget();
	p->items.clear();
	loadSettings(settings);
	onCurrentItemChanged(p->listWidget->currentItem());
}
Exemple #3
0
void QuickSettingsModel::setItems(const qutim_sdk_0_3::SettingsItemList &items, QObject *controller)
{
	m_controller = controller;
	if (!m_items.isEmpty()) {
		beginRemoveRows(QModelIndex(), 0, m_items.size());
		m_items.clear();
		endRemoveRows();
	}
	beginInsertRows(QModelIndex(), 0, items.size());
	m_items = items;
	qSort(m_items.begin(), m_items.end(), itemLessThen);
	endInsertRows();
}