From 63ced97ecbd91cb73f91cd8571bdf49ef9f36988 Mon Sep 17 00:00:00 2001 From: Richard Maudsley Date: Tue, 21 Jan 2014 14:25:50 +0000 Subject: Tweaks to highlight UI. Change-Id: Ifc0b93a58c612482e234248fea0e41308a4e509c diff --git a/Swift/QtUI/QtHighlightEditor.cpp b/Swift/QtUI/QtHighlightEditor.cpp index d4e8899..fcc0ef8 100644 --- a/Swift/QtUI/QtHighlightEditor.cpp +++ b/Swift/QtUI/QtHighlightEditor.cpp @@ -266,7 +266,7 @@ void QtHighlightEditor::onCurrentRowChanged(int currentRow) if (currentRow != -1) { HighlightRule rule = highlightManager_->getRule(currentRow); ruleToDialog(rule); - ui_.ruleDescription->setText(P2QSTRING(formatLongDescription(rule))); + //ui_.ruleDescription->setText(P2QSTRING(formatLongDescription(rule))); if (ui_.listWidget->currentItem()) { ui_.listWidget->currentItem()->setText(P2QSTRING(formatShortDescription(rule))); } @@ -341,7 +341,7 @@ void QtHighlightEditor::widgetClick() setChildWidgetStates(); HighlightRule rule = ruleFromDialog(); - ui_.ruleDescription->setText(P2QSTRING(formatLongDescription(rule))); + //ui_.ruleDescription->setText(P2QSTRING(formatLongDescription(rule))); if (ui_.listWidget->currentItem()) { ui_.listWidget->currentItem()->setText(P2QSTRING(formatShortDescription(rule))); diff --git a/Swift/QtUI/QtHighlightEditor.h b/Swift/QtUI/QtHighlightEditor.h index 52414a6..f5f4038 100644 --- a/Swift/QtUI/QtHighlightEditor.h +++ b/Swift/QtUI/QtHighlightEditor.h @@ -20,6 +20,7 @@ namespace Swift { class QtSettingsProvider; class QtSuggestingJIDInput; + class QtWebKitChatView; class QtHighlightEditor : public QWidget, public HighlightEditorWindow { Q_OBJECT @@ -51,6 +52,7 @@ namespace Swift { private: void populateList(); + void updateChatPreview(); void selectRow(int row); int getSelectedRow() const; HighlightRule ruleFromDialog(); diff --git a/Swift/QtUI/QtHighlightEditor.ui b/Swift/QtUI/QtHighlightEditor.ui index cded649..ad93ef9 100644 --- a/Swift/QtUI/QtHighlightEditor.ui +++ b/Swift/QtUI/QtHighlightEditor.ui @@ -6,14 +6,14 @@ 0 0 - 800 - 715 + 453 + 750 - 800 - 715 + 450 + 750 @@ -86,55 +86,170 @@ - + - - - - - Rule Description - - + + + Apply Rule To + + + + + + Chats + + + true + + + + + + + Rooms + + + + + + + Qt::Horizontal + + + + 246 + 20 + + + + + + + + + + + Rule Conditions + + + + + + Apply to all messages + + + true + + + + + + + Only messages mentioning me + + + + + - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This rule will match messages either in chats or in rooms if the sender is called 'Admin', and the message contains 'Urgent' (not case sensitive) as a part of any word.</p></body></html> + + + Messages from this sender: + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 18 + 20 + + + + + + + + + - - - - - - Example Highlights - - + + + - + + + Messages containing this keyword: + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 18 + 20 + + + + + + + + + + + + + Match keyword within longer words + + + + + + + Keyword is case sensitive + + + + + + - - - + + + - - - - - Apply Rule To - - + + + Highlight Action + + + + - + - Chats + No Highlight true @@ -142,321 +257,166 @@ p, li { white-space: pre-wrap; } - + + + Default Color + + + + + - Rooms + Custom Color - + Qt::Horizontal - 246 + 40 20 - - - - - - Rule Conditions - - + + + - + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + - Apply to all messages + &Text - - true + + Qt::ToolButtonTextBesideIcon - + + + false + - Only messages mentioning me + &Background + + + Qt::ToolButtonTextBesideIcon + + + + + + + + + Sound Action + + + + - - - - - Messages from this sender: - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 18 - 20 - - - - - - - - - - + + + No Sound + + + true + + - - - - - Messages containing this keyword: - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 18 - 20 - - - - - - - - - - - - - Match keyword within longer words - - - - - - - Keyword is case sensitive - - - - - - - - + + + Default Sound + + - - - - - - - Highlight Action - - - - - - - No Highlight - - - true - - - - - - - Default Color - - - - - - - Custom Color - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + Custom Sound + + - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - false - - - &Text - - - Qt::ToolButtonTextBesideIcon - - - - - - - false - - - &Background - - - Qt::ToolButtonTextBesideIcon - - - - + + + Qt::Horizontal + + + + 40 + 20 + + + - - - - - - Sound Action - - + + + - - - - - No Sound - - - true - - - - - - - Default Sound - - - - - - - Custom Sound - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + Qt::Horizontal + + + + 40 + 20 + + + - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - false - - - false - - - - - - - false - - - ... - - - - + + + false + + + false + + + + + + + false + + + ... + + - - - + + + -- cgit v0.10.2-6-g49f6