/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel IRC Team *
+ * Copyright (C) 2005-09 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
HighlightSettingsPage::HighlightSettingsPage(QWidget *parent)
- : SettingsPage(tr("Behaviour"), tr("Highlight"), parent) {
+ : SettingsPage(tr("Interface"), tr("Highlight"), parent) {
ui.setupUi(this);
ui.highlightTable->verticalHeader()->hide();
ui.highlightTable->setShowGrid(false);
void HighlightSettingsPage::defaults() {
ui.highlightCurrentNick->setChecked(true);
- ui.nicksCaseSensitive->setChecked(true);
+ ui.nicksCaseSensitive->setChecked(false);
emptyTable();
widgetHasChanged();
ui.highlightTable->setItem(lastRow, HighlightSettingsPage::EnableColumn, enableItem);
QVariantMap highlightRule;
- highlightRule["name"] = name;
- highlightRule["regex"] = regex;
- highlightRule["cs"] = cs;
- highlightRule["enable"] = enable;
+ highlightRule["Name"] = name;
+ highlightRule["RegEx"] = regex;
+ highlightRule["CS"] = cs;
+ highlightRule["Enable"] = enable;
highlightList.append(highlightRule);
}
case HighlightSettingsPage::NameColumn:
if(item->text() == "")
item->setText(tr("this shouldn't be empty"));
- highlightRule["name"] = item->text();
+ highlightRule["Name"] = item->text();
break;
case HighlightSettingsPage::RegExColumn:
- highlightRule["regex"] = (item->checkState() == Qt::Checked);
+ highlightRule["RegEx"] = (item->checkState() == Qt::Checked);
break;
case HighlightSettingsPage::CsColumn:
- highlightRule["cs"] = (item->checkState() == Qt::Checked);
+ highlightRule["CS"] = (item->checkState() == Qt::Checked);
break;
case HighlightSettingsPage::EnableColumn:
- highlightRule["enable"] = (item->checkState() == Qt::Checked);
+ highlightRule["Enable"] = (item->checkState() == Qt::Checked);
break;
}
highlightList[item->row()] = highlightRule;
foreach(QVariant highlight, notificationSettings.highlightList()) {
QVariantMap highlightRule = highlight.toMap();
- QString name = highlightRule["name"].toString();
- bool regex = highlightRule["regex"].toBool();
- bool cs = highlightRule["cs"].toBool();
- bool enable = highlightRule["enable"].toBool();
+ QString name = highlightRule["Name"].toString();
+ bool regex = highlightRule["RegEx"].toBool();
+ bool cs = highlightRule["CS"].toBool();
+ bool enable = highlightRule["Enable"].toBool();
addNewRow(name, regex, cs, enable);
}