Esempio n. 1
0
QStringList Config::getList() {
	MapSS::iterator i;
	QStringList list;
	QString item;

	//iteruje postupne cez vsetky polozky a uklada ich do zoznamu retazov 
	for (i = _map.begin(); i != _map.end(); ++i) {
		item = QString("%1\t%2").arg(i.key()).arg(i.value());
		list.append(item);
	}
	list.sort();
	return list;
}
Esempio n. 2
0
void Config::saveConfig() {
	MapSS::iterator i;
	QStringList list;
	QString item;
	QFile file("config/config");
	QByteArray ba;
	file.open(QIODevice::WriteOnly);
	//postupne ukladanie do suboru
	for (i = _map.begin(); i != _map.end(); ++i) {
		item = QString("%1=%2\n").arg(i.key()).arg(i.value());
		ba = item.toLatin1();
		file.write(ba.data());
	}
	file.close();
}
void Util::ApplicationConfig::saveConfig()
{
	MapSS::iterator i;
	QStringList list;
	QString item;
	QFile file( "config/config" );
	QByteArray ba;
	file.open( QIODevice::WriteOnly );

	//postupne ukladanie do suboru
	for ( i = _map.begin(); i != _map.end(); ++i ) {
		item = QString( "%1=%2\n" ).arg( i.key() ).arg( i.value() );
		ba = item.toLatin1();
		file.write( ba.data() );
	}
	file.close();

	//GraphMetrics::computeGraphMetrics(Manager::GraphManager::getInstance()->getActiveGraph());
}