fixed #438 and related stuff
This commit is contained in:
parent
628ebae611
commit
505af2c9f2
@ -12,14 +12,12 @@ SingleNotificationEditor::SingleNotificationEditor(const Notification& notificat
|
||||
m_ui.setupUi(this);
|
||||
|
||||
m_ui.m_btnBrowseSound->setIcon(qApp->icons()->fromTheme(QSL("document-open")));
|
||||
m_ui.m_btnClearSound->setIcon(qApp->icons()->fromTheme(QSL("edit-clear")));
|
||||
m_ui.m_btnPlaySound->setIcon(qApp->icons()->fromTheme(QSL("media-playback-start")));
|
||||
|
||||
loadNotification(notification);
|
||||
|
||||
connect(m_ui.m_btnPlaySound, &QPushButton::clicked, this, &SingleNotificationEditor::playSound);
|
||||
connect(m_ui.m_btnBrowseSound, &QPushButton::clicked, this, &SingleNotificationEditor::selectSoundFile);
|
||||
connect(m_ui.m_btnClearSound, &QPushButton::clicked, m_ui.m_txtSound, &QLineEdit::clear);
|
||||
connect(m_ui.m_txtSound, &QLineEdit::textChanged, this, &SingleNotificationEditor::notificationChanged);
|
||||
connect(m_ui.m_cbBalloon, &QCheckBox::toggled, this, &SingleNotificationEditor::notificationChanged);
|
||||
|
||||
|
@ -36,19 +36,12 @@
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_txtSound">
|
||||
<widget class="BaseLineEdit" name="m_txtSound">
|
||||
<property name="placeholderText">
|
||||
<string>Full path to your WAV sound file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_btnClearSound">
|
||||
<property name="text">
|
||||
<string>&Clear</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_btnBrowseSound">
|
||||
<property name="text">
|
||||
@ -74,10 +67,16 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BaseLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>baselineedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>m_cbBalloon</tabstop>
|
||||
<tabstop>m_txtSound</tabstop>
|
||||
<tabstop>m_btnClearSound</tabstop>
|
||||
<tabstop>m_btnBrowseSound</tabstop>
|
||||
<tabstop>m_btnPlaySound</tabstop>
|
||||
</tabstops>
|
||||
|
@ -4,7 +4,9 @@
|
||||
|
||||
#include <QKeyEvent>
|
||||
|
||||
BaseLineEdit::BaseLineEdit(QWidget* parent) : QLineEdit(parent) {}
|
||||
BaseLineEdit::BaseLineEdit(QWidget* parent) : QLineEdit(parent) {
|
||||
setClearButtonEnabled(true);
|
||||
}
|
||||
|
||||
void BaseLineEdit::submit(const QString& text) {
|
||||
setText(text);
|
||||
|
@ -33,7 +33,7 @@
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="m_txtProxyHost">
|
||||
<widget class="BaseLineEdit" name="m_txtProxyHost">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -84,7 +84,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="m_txtProxyUsername">
|
||||
<widget class="BaseLineEdit" name="m_txtProxyUsername">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -107,7 +107,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="m_txtProxyPassword">
|
||||
<widget class="BaseLineEdit" name="m_txtProxyPassword">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -193,6 +193,13 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BaseLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>baselineedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -12,11 +12,9 @@ SearchTextWidget::SearchTextWidget(QWidget* parent) : QWidget(parent) {
|
||||
setFocusProxy(m_ui.m_txtSearch);
|
||||
setFixedHeight(28);
|
||||
|
||||
m_ui.m_btnClear->setIcon(qApp->icons()->fromTheme(QSL("edit-clear")));
|
||||
m_ui.m_btnSearchBackward->setIcon(qApp->icons()->fromTheme(QSL("back")));
|
||||
m_ui.m_btnSearchForward->setIcon(qApp->icons()->fromTheme(QSL("forward")));
|
||||
|
||||
connect(m_ui.m_btnClear, &QToolButton::clicked, m_ui.m_txtSearch, &QLineEdit::clear);
|
||||
connect(m_ui.m_txtSearch, &BaseLineEdit::textChanged, this, &SearchTextWidget::onTextChanged);
|
||||
connect(m_ui.m_txtSearch, &BaseLineEdit::submitted, this, [this]() {
|
||||
emit searchForText(m_ui.m_txtSearch->text(), false);
|
||||
@ -42,7 +40,6 @@ void SearchTextWidget::cancelSearch() {
|
||||
void SearchTextWidget::onTextChanged(const QString& text) {
|
||||
m_ui.m_btnSearchBackward->setDisabled(text.isEmpty());
|
||||
m_ui.m_btnSearchForward->setDisabled(text.isEmpty());
|
||||
m_ui.m_btnClear->setDisabled(text.isEmpty());
|
||||
|
||||
if (!text.isEmpty()) {
|
||||
emit searchForText(text, false);
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>461</width>
|
||||
<height>25</height>
|
||||
<height>28</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout">
|
||||
@ -26,16 +26,6 @@
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QToolButton" name="m_btnClear">
|
||||
<property name="toolTip">
|
||||
<string>Clear searched phrase</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="BaseLineEdit" name="m_txtSearch">
|
||||
<property name="placeholderText">
|
||||
@ -86,7 +76,6 @@
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>m_btnClear</tabstop>
|
||||
<tabstop>m_txtSearch</tabstop>
|
||||
<tabstop>m_btnSearchBackward</tabstop>
|
||||
<tabstop>m_btnSearchForward</tabstop>
|
||||
|
@ -264,7 +264,7 @@
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="m_checkKeppMessagesInTheMiddle">
|
||||
<property name="text">
|
||||
<string>Keep message selection in the middle of the article list viewport</string>
|
||||
<string>Keep article selection in the middle of the article list viewport</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="m_tabUi">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="m_tabIconSkin">
|
||||
<attribute name="title">
|
||||
|
Loading…
x
Reference in New Issue
Block a user