X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fcorehighlightsettingspage.cpp;h=55266d0560af7a7960614670428567529794a0d3;hp=444afd1c2c6f29afe016454a4acd3d249fd7a4da;hb=0eb413175783a04999ce04c5db8a9b9132ea0d8c;hpb=777d91165d4548099d63f5ed216a2c457fee4029 diff --git a/src/qtui/settingspages/corehighlightsettingspage.cpp b/src/qtui/settingspages/corehighlightsettingspage.cpp index 444afd1c..55266d05 100644 --- a/src/qtui/settingspages/corehighlightsettingspage.cpp +++ b/src/qtui/settingspages/corehighlightsettingspage.cpp @@ -101,19 +101,31 @@ void CoreHighlightSettingsPage::setupRuleTable(QTableWidget *table) const table->setShowGrid(false); table->horizontalHeaderItem(CoreHighlightSettingsPage::RegExColumn)->setToolTip( - tr("RegEx: This option determines if the highlight rule should be interpreted as a regular expression or just as a keyword.")); + tr("RegEx: This option determines if the highlight rule should be " + "interpreted as a regular expression or just as a keyword.")); table->horizontalHeaderItem(CoreHighlightSettingsPage::RegExColumn)->setWhatsThis( - tr("RegEx: This option determines if the highlight rule should be interpreted as a regular expression or just as a keyword.")); + table->horizontalHeaderItem(CoreHighlightSettingsPage::RegExColumn)->toolTip()); table->horizontalHeaderItem(CoreHighlightSettingsPage::CsColumn)->setToolTip( - tr("CS: This option determines if the highlight rule should be interpreted case sensitive.")); + tr("CS: This option determines if the highlight rule should be interpreted " + "case sensitive.")); table->horizontalHeaderItem(CoreHighlightSettingsPage::CsColumn)->setWhatsThis( - tr("CS: This option determines if the highlight rule should be interpreted case sensitive.")); + table->horizontalHeaderItem(CoreHighlightSettingsPage::CsColumn)->toolTip()); table->horizontalHeaderItem(CoreHighlightSettingsPage::ChanColumn)->setToolTip( - tr("Channel: This regular expression determines for which channels the highlight rule works. Leave blank to match any channel. Put ! in the beginning to negate. Case insensitive.")); + tr("

Channel: Semicolon separated list of channel names.

" + "

Example:
" + "#quassel*; #foobar; !#quasseldroid
" + "would match on #foobar and on any channel starting with #quassel except " + "for #quasseldroid
" + "

If only inverted names are specified, it will match anything except for " + "what's specified (implicit wildcard).

" + "

Example:
" + "!#quassel*; !#foobar
" + "would match anything except for #foobar or any channel starting with " + "#quassel

")); table->horizontalHeaderItem(CoreHighlightSettingsPage::ChanColumn)->setWhatsThis( - tr("Channel: This regular expression determines for which channels the highlight rule works. Leave blank to match any channel. Put ! in the beginning to negate. Case insensitive.")); + table->horizontalHeaderItem(CoreHighlightSettingsPage::ChanColumn)->toolTip()); #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) table->horizontalHeader()->setResizeMode(CoreHighlightSettingsPage::EnableColumn, QHeaderView::ResizeToContents); @@ -193,6 +205,30 @@ void CoreHighlightSettingsPage::addNewHighlightRow(bool enable, const QString &n auto *senderItem = new QTableWidgetItem(sender); + enableItem->setToolTip(tr("Enable/disable this rule")); + nameItem->setToolTip(tr("Phrase to match")); + regexItem->setToolTip( + tr("RegEx: This option determines if the highlight rule should be " + "interpreted as a regular expression or just as a keyword.")); + csItem->setToolTip( + tr("CS: This option determines if the highlight rule should be interpreted " + "case sensitive.")); + senderItem->setToolTip( + tr("Sender: This option specifies which sender to match. Leave blank to " + "match any nickname.")); + chanNameItem->setToolTip( + tr("

Channel: Semicolon separated list of channel names.

" + "

Example:
" + "#quassel*; #foobar; !#quasseldroid
" + "would match on #foobar and on any channel starting with #quassel except " + "for #quasseldroid
" + "

If only inverted names are specified, it will match anything except for " + "what's specified (implicit wildcard).

" + "

Example:
" + "!#quassel*; !#foobar
" + "would match anything except for #foobar or any channel starting with " + "#quassel

")); + int lastRow = ui.highlightTable->rowCount() - 1; ui.highlightTable->setItem(lastRow, CoreHighlightSettingsPage::NameColumn, nameItem); ui.highlightTable->setItem(lastRow, CoreHighlightSettingsPage::RegExColumn, regexItem); @@ -239,6 +275,30 @@ void CoreHighlightSettingsPage::addNewIgnoredRow(bool enable, const QString &nam auto *senderItem = new QTableWidgetItem(sender); + enableItem->setToolTip(tr("Enable/disable this rule")); + nameItem->setToolTip(tr("Phrase to match")); + regexItem->setToolTip( + tr("RegEx: This option determines if the highlight rule should be " + "interpreted as a regular expression or just as a keyword.")); + csItem->setToolTip( + tr("CS: This option determines if the highlight rule should be interpreted " + "case sensitive.")); + senderItem->setToolTip( + tr("Sender: This option specifies which sender nicknames match. Leave " + "blank to match any nickname.")); + chanNameItem->setToolTip( + tr("

Channel: Semicolon separated list of channel names.

" + "

Example:
" + "#quassel*; #foobar; !#quasseldroid
" + "would match on #foobar and on any channel starting with #quassel except " + "for #quasseldroid
" + "

If only inverted names are specified, it will match anything except for " + "what's specified (implicit wildcard).

" + "

Example:
" + "!#quassel*; !#foobar
" + "would match anything except for #foobar or any channel starting with " + "#quassel

")); + int lastRow = ui.ignoredTable->rowCount() - 1; ui.ignoredTable->setItem(lastRow, CoreHighlightSettingsPage::NameColumn, nameItem); ui.ignoredTable->setItem(lastRow, CoreHighlightSettingsPage::RegExColumn, regexItem);