table->setShowGrid(false);
table->horizontalHeaderItem(CoreHighlightSettingsPage::RegExColumn)->setToolTip(
- tr("<b>RegEx</b>: This option determines if the highlight rule should be interpreted as a <b>regular expression</b> or just as a keyword."));
+ tr("<b>RegEx</b>: This option determines if the highlight rule should be "
+ "interpreted as a <b>regular expression</b> or just as a keyword."));
table->horizontalHeaderItem(CoreHighlightSettingsPage::RegExColumn)->setWhatsThis(
- tr("<b>RegEx</b>: This option determines if the highlight rule should be interpreted as a <b>regular expression</b> or just as a keyword."));
+ table->horizontalHeaderItem(CoreHighlightSettingsPage::RegExColumn)->toolTip());
table->horizontalHeaderItem(CoreHighlightSettingsPage::CsColumn)->setToolTip(
- tr("<b>CS</b>: This option determines if the highlight rule should be interpreted <b>case sensitive</b>."));
+ tr("<b>CS</b>: This option determines if the highlight rule should be interpreted "
+ "<b>case sensitive</b>."));
table->horizontalHeaderItem(CoreHighlightSettingsPage::CsColumn)->setWhatsThis(
- tr("<b>CS</b>: This option determines if the highlight rule should be interpreted <b>case sensitive</b>."));
+ table->horizontalHeaderItem(CoreHighlightSettingsPage::CsColumn)->toolTip());
table->horizontalHeaderItem(CoreHighlightSettingsPage::ChanColumn)->setToolTip(
- tr("<b>Channel</b>: This regular expression determines for which <b>channels</b> the highlight rule works. Leave blank to match any channel. Put <b>!</b> in the beginning to negate. Case insensitive."));
+ tr("<p><b>Channel</b>: Semicolon separated list of channel names.</p>"
+ "<p><i>Example:</i><br />"
+ "<i>#quassel*; #foobar; !#quasseldroid</i><br />"
+ "would match on #foobar and on any channel starting with <i>#quassel</i> except "
+ "for <i>#quasseldroid</i><br />"
+ "<p>If only inverted names are specified, it will match anything except for "
+ "what's specified (implicit wildcard).</p>"
+ "<p><i>Example:</i><br />"
+ "<i>!#quassel*; !#foobar</i><br />"
+ "would match anything except for #foobar or any channel starting with "
+ "<i>#quassel</i></p>"));
table->horizontalHeaderItem(CoreHighlightSettingsPage::ChanColumn)->setWhatsThis(
- tr("<b>Channel</b>: This regular expression determines for which <b>channels</b> the highlight rule works. Leave blank to match any channel. Put <b>!</b> 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);
auto *senderItem = new QTableWidgetItem(sender);
+ enableItem->setToolTip(tr("Enable/disable this rule"));
+ nameItem->setToolTip(tr("Phrase to match"));
+ regexItem->setToolTip(
+ tr("<b>RegEx</b>: This option determines if the highlight rule should be "
+ "interpreted as a <b>regular expression</b> or just as a keyword."));
+ csItem->setToolTip(
+ tr("<b>CS</b>: This option determines if the highlight rule should be interpreted "
+ "<b>case sensitive</b>."));
+ senderItem->setToolTip(
+ tr("<b>Sender</b>: This option specifies which sender to match. Leave blank to "
+ "match any nickname."));
+ chanNameItem->setToolTip(
+ tr("<p><b>Channel</b>: Semicolon separated list of channel names.</p>"
+ "<p><i>Example:</i><br />"
+ "<i>#quassel*; #foobar; !#quasseldroid</i><br />"
+ "would match on #foobar and on any channel starting with <i>#quassel</i> except "
+ "for <i>#quasseldroid</i><br />"
+ "<p>If only inverted names are specified, it will match anything except for "
+ "what's specified (implicit wildcard).</p>"
+ "<p><i>Example:</i><br />"
+ "<i>!#quassel*; !#foobar</i><br />"
+ "would match anything except for #foobar or any channel starting with "
+ "<i>#quassel</i></p>"));
+
int lastRow = ui.highlightTable->rowCount() - 1;
ui.highlightTable->setItem(lastRow, CoreHighlightSettingsPage::NameColumn, nameItem);
ui.highlightTable->setItem(lastRow, CoreHighlightSettingsPage::RegExColumn, regexItem);
auto *senderItem = new QTableWidgetItem(sender);
+ enableItem->setToolTip(tr("Enable/disable this rule"));
+ nameItem->setToolTip(tr("Phrase to match"));
+ regexItem->setToolTip(
+ tr("<b>RegEx</b>: This option determines if the highlight rule should be "
+ "interpreted as a <b>regular expression</b> or just as a keyword."));
+ csItem->setToolTip(
+ tr("<b>CS</b>: This option determines if the highlight rule should be interpreted "
+ "<b>case sensitive</b>."));
+ senderItem->setToolTip(
+ tr("<b>Sender</b>: This option specifies which sender nicknames match. Leave "
+ "blank to match any nickname."));
+ chanNameItem->setToolTip(
+ tr("<p><b>Channel</b>: Semicolon separated list of channel names.</p>"
+ "<p><i>Example:</i><br />"
+ "<i>#quassel*; #foobar; !#quasseldroid</i><br />"
+ "would match on #foobar and on any channel starting with <i>#quassel</i> except "
+ "for <i>#quasseldroid</i><br />"
+ "<p>If only inverted names are specified, it will match anything except for "
+ "what's specified (implicit wildcard).</p>"
+ "<p><i>Example:</i><br />"
+ "<i>!#quassel*; !#foobar</i><br />"
+ "would match anything except for #foobar or any channel starting with "
+ "<i>#quassel</i></p>"));
+
int lastRow = ui.ignoredTable->rowCount() - 1;
ui.ignoredTable->setItem(lastRow, CoreHighlightSettingsPage::NameColumn, nameItem);
ui.ignoredTable->setItem(lastRow, CoreHighlightSettingsPage::RegExColumn, regexItem);
</item>
<item>
<widget class="QPushButton" name="highlightImport">
+ <property name="toolTip">
+ <string>Import highlight rules configured in <i>Local Highlights</i></string>
+ </property>
<property name="text">
- <string>Import</string>
+ <string>Import Local</string>
</property>
</widget>
</item>
<attribute name="title">
<string>Highlight Ignore Rules</string>
</attribute>
- <layout class="QVBoxLayout" name="ignoredLayout">
+ <layout class="QVBoxLayout" name="verticalLayout_4">
<item>
- <widget class="QTableWidget" name="ignoredTable">
- <property name="toolTip">
- <string/>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
+ <widget class="QGroupBox" name="ignoresBox">
+ <property name="title">
+ <string>Never Highlight For</string>
</property>
- <column>
- <property name="text">
- <string>Enabled</string>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Rule</string>
- </property>
- </column>
- <column>
- <property name="text">
- <string>RegEx</string>
- </property>
- </column>
- <column>
- <property name="text">
- <string>CS</string>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Sender</string>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Channel</string>
- </property>
- </column>
+ <layout class="QVBoxLayout" name="ignoredLayout">
+ <item>
+ <widget class="QTableWidget" name="ignoredTable">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <column>
+ <property name="text">
+ <string>Enabled</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Rule</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>RegEx</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>CS</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Sender</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Channel</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="ignoredButtonBarLayout">
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QPushButton" name="ignoredAdd">
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="ignoredRemove">
+ <property name="text">
+ <string>Remove</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="ignoredButtonBarSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
</item>
- <item>
- <layout class="QHBoxLayout" name="ignoredButtonBarLayout">
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QPushButton" name="ignoredAdd">
- <property name="text">
- <string>Add</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="ignoredRemove">
- <property name="text">
- <string>Remove</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="ignoredButtonBarSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
</layout>
</widget>
</widget>
ui.highlightTable->verticalHeader()->hide();
ui.highlightTable->setShowGrid(false);
- ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::RegExColumn)->setToolTip("<b>RegEx</b>: This option determines if the highlight rule should be interpreted as a <b>regular expression</b> or just as a keyword.");
- ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::RegExColumn)->setWhatsThis("<b>RegEx</b>: This option determines if the highlight rule should be interpreted as a <b>regular expression</b> or just as a keyword.");
-
- ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::CsColumn)->setToolTip("<b>CS</b>: This option determines if the highlight rule should be interpreted <b>case sensitive</b>.");
- ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::CsColumn)->setWhatsThis("<b>CS</b>: This option determines if the highlight rule should be interpreted <b>case sensitive</b>.");
-
- ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::ChanColumn)->setToolTip("<b>Channel</b>: This regular expression determines for which <b>channels</b> the highlight rule works. Leave blank to match any channel. Put <b>!</b> in the beginning to negate. Case insensitive.");
- ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::ChanColumn)->setWhatsThis("<b>Channel</b>: This regular expression determines for which <b>channels</b> the highlight rule works. Leave blank to match any channel. Put <b>!</b> in the beginning to negate. Case insensitive.");
+ ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::RegExColumn)->setToolTip(
+ tr("<b>RegEx</b>: This option determines if the highlight rule should be "
+ "interpreted as a <b>regular expression</b> or just as a keyword."));
+ ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::RegExColumn)->setWhatsThis(
+ ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::RegExColumn)->toolTip());
+
+ ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::CsColumn)->setToolTip(
+ tr("<b>CS</b>: This option determines if the highlight rule should be interpreted "
+ "<b>case sensitive</b>."));
+ ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::CsColumn)->setWhatsThis(
+ ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::CsColumn)->toolTip());
+
+ ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::ChanColumn)->setToolTip(
+ tr("<p><b>Channel</b>: Semicolon separated list of channel names.</p>"
+ "<p><i>Example:</i><br />"
+ "<i>#quassel*; #foobar; !#quasseldroid</i><br />"
+ "would match on #foobar and on any channel starting with <i>#quassel</i> except "
+ "for <i>#quasseldroid</i><br />"
+ "<p>If only inverted names are specified, it will match anything except for "
+ "what's specified (implicit wildcard).</p>"
+ "<p><i>Example:</i><br />"
+ "<i>!#quassel*; !#foobar</i><br />"
+ "would match anything except for #foobar or any channel starting with "
+ "<i>#quassel</i></p>"));
+ ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::ChanColumn)->setWhatsThis(
+ ui.highlightTable->horizontalHeaderItem(HighlightSettingsPage::ChanColumn)->toolTip());
#if QT_VERSION < 0x050000
ui.highlightTable->horizontalHeader()->setResizeMode(HighlightSettingsPage::NameColumn, QHeaderView::Stretch);
QTableWidgetItem *chanNameItem = new QTableWidgetItem(chanName);
+ enableItem->setToolTip(tr("Enable/disable this rule"));
+ nameItem->setToolTip(tr("Phrase to match"));
+ regexItem->setToolTip(
+ tr("<b>RegEx</b>: This option determines if the highlight rule should be "
+ "interpreted as a <b>regular expression</b> or just as a keyword."));
+ csItem->setToolTip(
+ tr("<b>CS</b>: This option determines if the highlight rule should be interpreted "
+ "<b>case sensitive</b>."));
+ chanNameItem->setToolTip(
+ tr("<p><b>Channel</b>: Semicolon separated list of channel names.</p>"
+ "<p><i>Example:</i><br />"
+ "<i>#quassel*; #foobar; !#quasseldroid</i><br />"
+ "would match on #foobar and on any channel starting with <i>#quassel</i> except "
+ "for <i>#quasseldroid</i><br />"
+ "<p>If only inverted names are specified, it will match anything except for "
+ "what's specified (implicit wildcard).</p>"
+ "<p><i>Example:</i><br />"
+ "<i>!#quassel*; !#foobar</i><br />"
+ "would match anything except for #foobar or any channel starting with "
+ "<i>#quassel</i></p>"));
+
int lastRow = ui.highlightTable->rowCount()-1;
ui.highlightTable->setItem(lastRow, HighlightSettingsPage::EnableColumn, enableItem);
ui.highlightTable->setItem(lastRow, HighlightSettingsPage::NameColumn, nameItem);