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