Example #1
0
QStringList TKeyboard::getKeyboards(TSettings &settings, const QString &section)
{
	QStringList keyboards;

	settings.beginGroup(section);

	if(!settings.contains("keyboard1")) {
		keyboards += settings.getValue("keyboard1", "a b c d e  f g h i j  k l m n o  p q r s t  u v w x y  z SPACE <- CAPS ALT").toString();
		keyboards += settings.getValue("keyboard2", "1 2 3 4 5  6 7 8 9 0  ( ) [ ] {  } + - = _  / % * ! @  $ SPACE <- CAPS ALT").toString();
	} else {
		int i = 1;
		QString num = QString::number(i);

		while(settings.contains("keyboard" + num)) {
			keyboards += settings.getValue("keyboard" + num, "").toString();
			i++;
			num = QString::number(i);
		}
	}

	settings.endGroup();

	int i;
	for(i = 0; i < keyboards.size(); i ++) {
		keyboards[i] = prepareLayoutString(keyboards[i]);
	}

	return keyboards;
}
Example #2
0
void TTileServerDirect::configure(TSettings &settings, const QString &server, const QString &cache)
{
	QStringList serverNames;
	QString defaultServer;
	bool empty;

	settings.beginGroup(server);
	empty = !settings.contains("httpservers");
	settings.endGroup();

	if(empty) {
		defaultServer = TTileHttpName::initDefault(settings);
	}

	settings.beginGroup(server);
	serverNames = settings.getValue("httpservers", defaultServer).toStringList();
	_online = settings.getValue("startonline", true).toBool();
	settings.endGroup();

	_http.configure(settings, serverNames);
	_container.configure(settings, cache);
}