From c4f8b7b06d038473a377c88d0dee54b69f67c77a Mon Sep 17 00:00:00 2001 From: Richard Maudsley Date: Thu, 16 Jan 2014 13:51:17 +0000 Subject: Updated layout. Change-Id: Ic12218449f9acd072c9e5aa78ce9e6dcda3165d0 diff --git a/Swift/QtUI/QtHighlightEditor.cpp b/Swift/QtUI/QtHighlightEditor.cpp index e18ca94..f4ec78f 100644 --- a/Swift/QtUI/QtHighlightEditor.cpp +++ b/Swift/QtUI/QtHighlightEditor.cpp @@ -111,14 +111,7 @@ void QtHighlightEditor::onNewButtonClicked() void QtHighlightEditor::onDeleteButtonClicked() { - //int row = getSelectedRow(); - //assert(row >= 0); -// - //itemModel_->removeRow(row, QModelIndex()); - //if (row == itemModel_->rowCount(QModelIndex())) { - //--row; - //} - //selectRow(row); + delete ui_.listWidget->takeItem(getSelectedRow()); } void QtHighlightEditor::onMoveUpButtonClicked() @@ -177,6 +170,7 @@ void QtHighlightEditor::selectRow(int row) for (int i = 0; i < ui_.listWidget->count(); ++i) { ui_.listWidget->item(i)->setSelected(i == row); } + onCurrentRowChanged(row); } /** Return index of selected row or -1 if none is selected */ diff --git a/Swift/QtUI/QtHighlightEditor.ui b/Swift/QtUI/QtHighlightEditor.ui index c132c29..2b37e3c 100644 --- a/Swift/QtUI/QtHighlightEditor.ui +++ b/Swift/QtUI/QtHighlightEditor.ui @@ -6,338 +6,441 @@ 0 0 - 742 - 677 + 800 + 715 + + + 800 + 715 + + Form - - - - 380 - 230 - 371 - 201 - - - - Rule conditions - - - false - - - - - 0 - 120 - 351 - 74 - - - - - - - Messages that mention my nickname - - - - - - - Match keyword within longer words - - - - - - - Keyword is case sensitive - - - - - - - - - 0 - 30 - 351 - 22 - - - - - - - Apply to: - - - - - - - Chats - - - + + + + + + + + + - + - Rooms + Incoming messages are checked against the following rules. First rule that matches will be executed. - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - 60 - 351 - 25 - - - - - - - Sender name: - - - - - - - - - - - - 0 - 90 - 351 - 25 - - - - - - - Keyword: - - - - - - - - - - - - - 480 - 640 - 251 - 27 - - - - QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - 10 - 621 - 721 - 20 - - - - Qt::Horizontal - - - - - - 380 - 430 - 371 - 91 - - - - Highlight Action - - - - - 0 - 30 - 351 - 22 - - - - - - - No Highlight - - + true - - - Default Color - - - - - - - Custom Color - - - - - - - - - 0 - 60 - 351 - 23 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - false - - - &Foreground - - - Qt::ToolButtonTextBesideIcon - - - - - - - false - - - &Background - - - Qt::ToolButtonTextBesideIcon - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + - - - - - - 380 - 520 - 371 - 91 - - - - Sound Action - - - - - 0 - 30 - 351 - 22 - - - + + + + + Qt::Horizontal + + + + + - - - No Sound - - - true - - + + + + + Rule Description + + + + + + <!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> + + + + + + + + + + Example Highlights + + + + + + + + + - - - Default Sound - - - - - - - Custom Sound - - + + + + + Rule Conditions + + + + + + + + Apply to: + + + + + + + Chats + + + + + + + Rooms + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Sender name: + + + + + + + + + + + + + + Keyword: + + + + + + + + + + + + + + Messages that mention my nickname + + + + + + + Match keyword within longer words + + + + + + + Keyword is case sensitive + + + + + + + + + + + + Highlight Action + + + + + + + + No Highlight + + + true + + + + + + + Default Color + + + + + + + Custom Color + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + + + &Foreground + + + Qt::ToolButtonTextBesideIcon + + + + + + + false + + + &Background + + + Qt::ToolButtonTextBesideIcon + + + + + + + + + + + + Sound Action + + + + + + + + No Sound + + + true + + + + + + + Default Sound + + + + + + + Custom Sound + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + + + true + + + + + + + false + + + ... + + + + + + + + + + + + Qt::Vertical + + + + 268 + 22 + + + + + - - - - - 0 - 60 - 351 - 25 - - - + + + + + Qt::Horizontal + + + + + - + Qt::Horizontal @@ -350,188 +453,17 @@ - - - false - - - true - - - - - - - false - - - ... + + + QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - 10 - 200 - 721 - 31 - - - - Qt::Horizontal - - - - - - 10 - 360 - 361 - 261 - - - - Example Highlights - - - - - 0 - 30 - 361 - 221 - - - - - - - - 10 - 230 - 361 - 131 - - - - Example Highlights - - - - - 0 - 30 - 361 - 91 - - - - <!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> - - - - - - - 10 - 12 - 721 - 191 - - - - - - - Incoming messages are checked against the following rules. First rule that matches will be executed. - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - + + + line_2 + line_3 -- cgit v0.10.2-6-g49f6