File tree Expand file tree Collapse file tree 8 files changed +24
-32
lines changed Expand file tree Collapse file tree 8 files changed +24
-32
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,12 @@ SingleNotificationEditor::SingleNotificationEditor(const Notification& notificat
12
12
m_ui.setupUi (this );
13
13
14
14
m_ui.m_btnBrowseSound ->setIcon (qApp->icons ()->fromTheme (QSL (" document-open" )));
15
- m_ui.m_btnClearSound ->setIcon (qApp->icons ()->fromTheme (QSL (" edit-clear" )));
16
15
m_ui.m_btnPlaySound ->setIcon (qApp->icons ()->fromTheme (QSL (" media-playback-start" )));
17
16
18
17
loadNotification (notification);
19
18
20
19
connect (m_ui.m_btnPlaySound , &QPushButton::clicked, this , &SingleNotificationEditor::playSound);
21
20
connect (m_ui.m_btnBrowseSound , &QPushButton::clicked, this , &SingleNotificationEditor::selectSoundFile);
22
- connect (m_ui.m_btnClearSound , &QPushButton::clicked, m_ui.m_txtSound , &QLineEdit::clear);
23
21
connect (m_ui.m_txtSound , &QLineEdit::textChanged, this , &SingleNotificationEditor::notificationChanged);
24
22
connect (m_ui.m_cbBalloon , &QCheckBox::toggled, this , &SingleNotificationEditor::notificationChanged);
25
23
Original file line number Diff line number Diff line change 36
36
<item row =" 1" column =" 1" >
37
37
<layout class =" QHBoxLayout" name =" horizontalLayout_2" >
38
38
<item >
39
- <widget class =" QLineEdit " name =" m_txtSound" >
39
+ <widget class =" BaseLineEdit " name =" m_txtSound" >
40
40
<property name =" placeholderText" >
41
41
<string >Full path to your WAV sound file</string >
42
42
</property >
43
43
</widget >
44
44
</item >
45
- <item >
46
- <widget class =" QPushButton" name =" m_btnClearSound" >
47
- <property name =" text" >
48
- <string >& Clear</string >
49
- </property >
50
- </widget >
51
- </item >
52
45
<item >
53
46
<widget class =" QPushButton" name =" m_btnBrowseSound" >
54
47
<property name =" text" >
74
67
</item >
75
68
</layout >
76
69
</widget >
70
+ <customwidgets >
71
+ <customwidget >
72
+ <class >BaseLineEdit</class >
73
+ <extends >QLineEdit</extends >
74
+ <header >baselineedit.h</header >
75
+ </customwidget >
76
+ </customwidgets >
77
77
<tabstops >
78
78
<tabstop >m_cbBalloon</tabstop >
79
79
<tabstop >m_txtSound</tabstop >
80
- <tabstop >m_btnClearSound</tabstop >
81
80
<tabstop >m_btnBrowseSound</tabstop >
82
81
<tabstop >m_btnPlaySound</tabstop >
83
82
</tabstops >
Original file line number Diff line number Diff line change 4
4
5
5
#include < QKeyEvent>
6
6
7
- BaseLineEdit::BaseLineEdit (QWidget* parent) : QLineEdit(parent) {}
7
+ BaseLineEdit::BaseLineEdit (QWidget* parent) : QLineEdit(parent) {
8
+ setClearButtonEnabled (true );
9
+ }
8
10
9
11
void BaseLineEdit::submit (const QString& text) {
10
12
setText (text);
Original file line number Diff line number Diff line change 33
33
<item row =" 0" column =" 1" >
34
34
<layout class =" QHBoxLayout" name =" horizontalLayout_7" >
35
35
<item >
36
- <widget class =" QLineEdit " name =" m_txtProxyHost" >
36
+ <widget class =" BaseLineEdit " name =" m_txtProxyHost" >
37
37
<property name =" enabled" >
38
38
<bool >true</bool >
39
39
</property >
84
84
</widget >
85
85
</item >
86
86
<item row =" 1" column =" 1" >
87
- <widget class =" QLineEdit " name =" m_txtProxyUsername" >
87
+ <widget class =" BaseLineEdit " name =" m_txtProxyUsername" >
88
88
<property name =" enabled" >
89
89
<bool >true</bool >
90
90
</property >
107
107
</widget >
108
108
</item >
109
109
<item row =" 2" column =" 1" >
110
- <widget class =" QLineEdit " name =" m_txtProxyPassword" >
110
+ <widget class =" BaseLineEdit " name =" m_txtProxyPassword" >
111
111
<property name =" enabled" >
112
112
<bool >true</bool >
113
113
</property >
193
193
</item >
194
194
</layout >
195
195
</widget >
196
+ <customwidgets >
197
+ <customwidget >
198
+ <class >BaseLineEdit</class >
199
+ <extends >QLineEdit</extends >
200
+ <header >baselineedit.h</header >
201
+ </customwidget >
202
+ </customwidgets >
196
203
<resources />
197
204
<connections />
198
205
</ui >
Original file line number Diff line number Diff line change @@ -12,11 +12,9 @@ SearchTextWidget::SearchTextWidget(QWidget* parent) : QWidget(parent) {
12
12
setFocusProxy (m_ui.m_txtSearch );
13
13
setFixedHeight (28 );
14
14
15
- m_ui.m_btnClear ->setIcon (qApp->icons ()->fromTheme (QSL (" edit-clear" )));
16
15
m_ui.m_btnSearchBackward ->setIcon (qApp->icons ()->fromTheme (QSL (" back" )));
17
16
m_ui.m_btnSearchForward ->setIcon (qApp->icons ()->fromTheme (QSL (" forward" )));
18
17
19
- connect (m_ui.m_btnClear , &QToolButton::clicked, m_ui.m_txtSearch , &QLineEdit::clear);
20
18
connect (m_ui.m_txtSearch , &BaseLineEdit::textChanged, this , &SearchTextWidget::onTextChanged);
21
19
connect (m_ui.m_txtSearch , &BaseLineEdit::submitted, this , [this ]() {
22
20
emit searchForText (m_ui.m_txtSearch ->text (), false );
@@ -42,7 +40,6 @@ void SearchTextWidget::cancelSearch() {
42
40
void SearchTextWidget::onTextChanged (const QString& text) {
43
41
m_ui.m_btnSearchBackward ->setDisabled (text.isEmpty ());
44
42
m_ui.m_btnSearchForward ->setDisabled (text.isEmpty ());
45
- m_ui.m_btnClear ->setDisabled (text.isEmpty ());
46
43
47
44
if (!text.isEmpty ()) {
48
45
emit searchForText (text, false );
Original file line number Diff line number Diff line change 7
7
<x >0</x >
8
8
<y >0</y >
9
9
<width >461</width >
10
- <height >25 </height >
10
+ <height >28 </height >
11
11
</rect >
12
12
</property >
13
13
<layout class =" QHBoxLayout" >
26
26
<property name =" bottomMargin" >
27
27
<number >3</number >
28
28
</property >
29
- <item >
30
- <widget class =" QToolButton" name =" m_btnClear" >
31
- <property name =" toolTip" >
32
- <string >Clear searched phrase</string >
33
- </property >
34
- <property name =" text" >
35
- <string />
36
- </property >
37
- </widget >
38
- </item >
39
29
<item >
40
30
<widget class =" BaseLineEdit" name =" m_txtSearch" >
41
31
<property name =" placeholderText" >
86
76
</customwidget >
87
77
</customwidgets >
88
78
<tabstops >
89
- <tabstop >m_btnClear</tabstop >
90
79
<tabstop >m_txtSearch</tabstop >
91
80
<tabstop >m_btnSearchBackward</tabstop >
92
81
<tabstop >m_btnSearchForward</tabstop >
Original file line number Diff line number Diff line change 264
264
<item row =" 4" column =" 0" colspan =" 2" >
265
265
<widget class =" QCheckBox" name =" m_checkKeppMessagesInTheMiddle" >
266
266
<property name =" text" >
267
- <string >Keep message selection in the middle of the article list viewport</string >
267
+ <string >Keep article selection in the middle of the article list viewport</string >
268
268
</property >
269
269
</widget >
270
270
</item >
Original file line number Diff line number Diff line change 26
26
<item >
27
27
<widget class =" QTabWidget" name =" m_tabUi" >
28
28
<property name =" currentIndex" >
29
- <number >1 </number >
29
+ <number >0 </number >
30
30
</property >
31
31
<widget class =" QWidget" name =" m_tabIconSkin" >
32
32
<attribute name =" title" >
You can’t perform that action at this time.
0 commit comments