Esempio n. 1
0
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);
}
Esempio n. 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());
}
Esempio n. 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();
}