diff options
-rw-r--r-- | Swift/QtUI/QtHighlightEditor.cpp | 6 | ||||
-rw-r--r-- | Swift/QtUI/QtHighlightEditor.h | 6 | ||||
-rw-r--r-- | Swift/QtUI/QtHighlightEditor.ui | 657 |
3 files changed, 436 insertions, 233 deletions
diff --git a/Swift/QtUI/QtHighlightEditor.cpp b/Swift/QtUI/QtHighlightEditor.cpp index d22756a..5ac2857 100644 --- a/Swift/QtUI/QtHighlightEditor.cpp +++ b/Swift/QtUI/QtHighlightEditor.cpp @@ -4,6 +4,12 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2014 Kevin Smith and Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + #include <cassert> #include <Swift/QtUI/QtHighlightEditor.h> diff --git a/Swift/QtUI/QtHighlightEditor.h b/Swift/QtUI/QtHighlightEditor.h index 4aa42ae..c4c008d 100644 --- a/Swift/QtUI/QtHighlightEditor.h +++ b/Swift/QtUI/QtHighlightEditor.h @@ -4,6 +4,12 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2014 Kevin Smith and Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + #pragma once #include <Swift/Controllers/UIInterfaces/HighlightEditorWindow.h> diff --git a/Swift/QtUI/QtHighlightEditor.ui b/Swift/QtUI/QtHighlightEditor.ui index d0ea682..474d384 100644 --- a/Swift/QtUI/QtHighlightEditor.ui +++ b/Swift/QtUI/QtHighlightEditor.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>403</width> - <height>779</height> + <width>742</width> + <height>677</height> </rect> </property> <property name="windowTitle"> @@ -16,237 +16,148 @@ <widget class="QGroupBox" name="groupBox"> <property name="geometry"> <rect> - <x>20</x> - <y>200</y> - <width>376</width> - <height>364</height> + <x>380</x> + <y>230</y> + <width>371</width> + <height>201</height> </rect> </property> <property name="title"> <string>Rule conditions</string> </property> - <layout class="QFormLayout" name="formLayout"> - <property name="fieldGrowthPolicy"> - <enum>QFormLayout::ExpandingFieldsGrow</enum> - </property> - <item row="0" column="0" colspan="2"> - <widget class="QLabel" name="label"> - <property name="text"> - <string>Choose when this rule should be applied. -If you want to provide more than one sender or keyword, input them in separate lines.</string> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="1" column="0" colspan="2"> - <widget class="Line" name="line"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="label_2"> - <property name="text"> - <string>&Apply to:</string> - </property> - <property name="buddy"> - <cstring>applyTo</cstring> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QComboBox" name="applyTo"/> - </item> - <item row="3" column="0"> - <widget class="QLabel" name="label_3"> - <property name="text"> - <string>Sender:</string> - </property> - </widget> - </item> - <item row="4" column="0"> - <widget class="QLabel" name="label_4"> - <property name="text"> - <string>&Keywords:</string> - </property> - <property name="buddy"> - <cstring>keywords</cstring> - </property> - </widget> - </item> - <item row="4" column="1"> - <widget class="QPlainTextEdit" name="keywords"/> - </item> - <item row="5" column="1"> - <widget class="QCheckBox" name="nickIsKeyword"> - <property name="text"> - <string>Treat &nick as a keyword (in MUC)</string> - </property> - </widget> - </item> - <item row="6" column="1"> - <widget class="QCheckBox" name="matchWholeWords"> - <property name="text"> - <string>Match whole &words</string> - </property> - </widget> - </item> - <item row="7" column="1"> - <widget class="QCheckBox" name="matchCase"> - <property name="text"> - <string>Match &case</string> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QLineEdit" name="lineEdit"/> - </item> - </layout> - </widget> - <widget class="QGroupBox" name="groupBox_2"> - <property name="geometry"> - <rect> - <x>20</x> - <y>570</y> - <width>376</width> - <height>142</height> - </rect> - </property> - <property name="title"> - <string>Actions</string> + <property name="checkable"> + <bool>false</bool> </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <item> - <widget class="QCheckBox" name="highlightText"> - <property name="text"> - <string>&Highlight text</string> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>28</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="customColors"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>Custom c&olors:</string> - </property> - </widget> - </item> - <item> - <widget class="Swift::QtColorToolButton" name="foreground"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>&Foreground</string> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - </widget> - </item> - <item> - <widget class="Swift::QtColorToolButton" name="background"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>&Background</string> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QCheckBox" name="playSound"> - <property name="text"> - <string>&Play sound</string> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>28</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="customSound"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>Custom soun&d:</string> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="soundFile"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="soundFileButton"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>...</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> + <widget class="QWidget" name="layoutWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>120</y> + <width>351</width> + <height>74</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QCheckBox" name="nickIsKeyword"> + <property name="text"> + <string>Messages that mention my nickname</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="matchWholeWords_2"> + <property name="text"> + <string>Match keyword within longer words</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="matchCase_2"> + <property name="text"> + <string>Keyword is case sensitive</string> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="layoutWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>30</y> + <width>351</width> + <height>22</height> + </rect> + </property> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Apply to:</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox"> + <property name="text"> + <string>Chats</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_2"> + <property name="text"> + <string>Rooms</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <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> + </widget> + <widget class="QWidget" name="layoutWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>60</y> + <width>351</width> + <height>25</height> + </rect> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QCheckBox" name="checkBox_3"> + <property name="text"> + <string>Sender name:</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="lineEdit"/> + </item> + </layout> + </widget> + <widget class="QWidget" name="layoutWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>90</y> + <width>351</width> + <height>25</height> + </rect> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QCheckBox" name="checkBox_4"> + <property name="text"> + <string>Keyword:</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="lineEdit_2"/> + </item> + </layout> + </widget> </widget> <widget class="QDialogButtonBox" name="buttonBox"> <property name="geometry"> <rect> - <x>120</x> - <y>740</y> - <width>271</width> + <x>480</x> + <y>640</y> + <width>251</width> <height>27</height> </rect> </property> @@ -258,9 +169,9 @@ If you want to provide more than one sender or keyword, input them in separate l <property name="geometry"> <rect> <x>10</x> - <y>710</y> - <width>381</width> - <height>31</height> + <y>621</y> + <width>721</width> + <height>20</height> </rect> </property> <property name="orientation"> @@ -272,8 +183,8 @@ If you want to provide more than one sender or keyword, input them in separate l <rect> <x>10</x> <y>10</y> - <width>381</width> - <height>181</height> + <width>721</width> + <height>191</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout_2"> @@ -304,33 +215,53 @@ If you want to provide more than one sender or keyword, input them in separate l <item> <widget class="QPushButton" name="newButton"> <property name="text"> - <string>New</string> + <string/> + </property> + <property name="icon"> + <iconset theme="list-add"> + <normaloff/> + </iconset> </property> </widget> </item> <item> <widget class="QPushButton" name="deleteButton"> <property name="text"> - <string>Delete</string> + <string/> + </property> + <property name="icon"> + <iconset theme="list-remove"> + <normaloff/> + </iconset> </property> </widget> </item> <item> <widget class="QPushButton" name="moveUpButton"> <property name="text"> - <string>Move up</string> + <string/> + </property> + <property name="icon"> + <iconset theme="up"> + <normaloff/> + </iconset> </property> </widget> </item> <item> <widget class="QPushButton" name="moveDownButton"> <property name="text"> - <string>Move down</string> + <string/> + </property> + <property name="icon"> + <iconset theme="down"> + <normaloff/> + </iconset> </property> </widget> </item> <item> - <spacer name="verticalSpacer_3"> + <spacer name="verticalSpacer"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> @@ -348,6 +279,266 @@ If you want to provide more than one sender or keyword, input them in separate l </item> </layout> </widget> + <widget class="QGroupBox" name="groupBox_3"> + <property name="geometry"> + <rect> + <x>380</x> + <y>430</y> + <width>371</width> + <height>91</height> + </rect> + </property> + <property name="title"> + <string>Highlight Action</string> + </property> + <widget class="QWidget" name="layoutWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>30</y> + <width>351</width> + <height>22</height> + </rect> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <item> + <widget class="QRadioButton" name="radioButton"> + <property name="text"> + <string>No Highlight</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="radioButton_2"> + <property name="text"> + <string>Default Color</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="radioButton_7"> + <property name="text"> + <string>Custom Color</string> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="layoutWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>60</y> + <width>351</width> + <height>23</height> + </rect> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="Swift::QtColorToolButton" name="foreground_2"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>&Foreground</string> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + </widget> + </item> + <item> + <widget class="Swift::QtColorToolButton" name="background"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>&Background</string> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + <widget class="QGroupBox" name="groupBox_4"> + <property name="geometry"> + <rect> + <x>380</x> + <y>520</y> + <width>371</width> + <height>91</height> + </rect> + </property> + <property name="title"> + <string>Sound Action</string> + </property> + <widget class="QWidget" name="layoutWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>30</y> + <width>351</width> + <height>22</height> + </rect> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_7"> + <item> + <widget class="QRadioButton" name="radioButton_4"> + <property name="text"> + <string>No Sound</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="radioButton_5"> + <property name="text"> + <string>Default Sound</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="radioButton_6"> + <property name="text"> + <string>Custom Sound</string> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="layoutWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>60</y> + <width>351</width> + <height>25</height> + </rect> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_8"> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLineEdit" name="soundFile"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="soundFileButton"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + <widget class="Line" name="line_3"> + <property name="geometry"> + <rect> + <x>10</x> + <y>200</y> + <width>721</width> + <height>31</height> + </rect> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + <widget class="QGroupBox" name="groupBox_2"> + <property name="geometry"> + <rect> + <x>10</x> + <y>360</y> + <width>361</width> + <height>261</height> + </rect> + </property> + <property name="title"> + <string>Example Highlights</string> + </property> + <widget class="QTextEdit" name="textEdit"> + <property name="geometry"> + <rect> + <x>0</x> + <y>30</y> + <width>361</width> + <height>221</height> + </rect> + </property> + </widget> + </widget> + <widget class="QGroupBox" name="groupBox_5"> + <property name="geometry"> + <rect> + <x>10</x> + <y>230</y> + <width>361</width> + <height>131</height> + </rect> + </property> + <property name="title"> + <string>Example Highlights</string> + </property> + <widget class="QTextEdit" name="textEdit_2"> + <property name="geometry"> + <rect> + <x>0</x> + <y>30</y> + <width>361</width> + <height>91</height> + </rect> + </property> + <property name="html"> + <string><!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></string> + </property> + </widget> + </widget> </widget> <customwidgets> <customwidget> |