mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-06 02:15:52 +00:00
Add tests and UI fields for #118
This commit is contained in:
@ -144,6 +144,7 @@ int ExtNetworkRequest::showConfiguration(const QVariant args)
|
||||
ui->lineEdit_url->setText(stringUrl());
|
||||
ui->checkBox_active->setCheckState(isActive() ? Qt::Checked
|
||||
: Qt::Unchecked);
|
||||
ui->lineEdit_socket->setText(socket());
|
||||
ui->spinBox_interval->setValue(interval());
|
||||
|
||||
int ret = exec();
|
||||
@ -155,6 +156,7 @@ int ExtNetworkRequest::showConfiguration(const QVariant args)
|
||||
setApiVersion(AW_EXTNETREQUEST_API);
|
||||
setStringUrl(ui->lineEdit_url->text());
|
||||
setActive(ui->checkBox_active->checkState() == Qt::Checked);
|
||||
setSocket(ui->lineEdit_socket->text());
|
||||
setInterval(ui->spinBox_interval->value());
|
||||
|
||||
writeConfiguration();
|
||||
@ -219,5 +221,6 @@ void ExtNetworkRequest::translate()
|
||||
ui->label_number->setText(i18n("Tag"));
|
||||
ui->label_url->setText(i18n("URL"));
|
||||
ui->checkBox_active->setText(i18n("Active"));
|
||||
ui->label_socket->setText(i18n("Socket"));
|
||||
ui->label_interval->setText(i18n("Interval"));
|
||||
}
|
||||
|
@ -134,6 +134,29 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_socket">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_socket">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Socket</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_socket"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_interval">
|
||||
<item>
|
||||
|
@ -153,6 +153,7 @@ int ExtQuotes::showConfiguration(const QVariant args)
|
||||
ui->lineEdit_ticker->setText(ticker());
|
||||
ui->checkBox_active->setCheckState(isActive() ? Qt::Checked
|
||||
: Qt::Unchecked);
|
||||
ui->lineEdit_socket->setText(socket());
|
||||
ui->spinBox_interval->setValue(interval());
|
||||
|
||||
int ret = exec();
|
||||
@ -164,6 +165,7 @@ int ExtQuotes::showConfiguration(const QVariant args)
|
||||
setApiVersion(AW_EXTQUOTES_API);
|
||||
setTicker(ui->lineEdit_ticker->text());
|
||||
setActive(ui->checkBox_active->checkState() == Qt::Checked);
|
||||
setSocket(ui->lineEdit_socket->text());
|
||||
setInterval(ui->spinBox_interval->value());
|
||||
|
||||
writeConfiguration();
|
||||
@ -284,5 +286,6 @@ get quotes for the instrument. Refer to <a href=\"http://finance.yahoo.com/\">\
|
||||
</span></a></p></body></html>"));
|
||||
ui->label_ticker->setText(i18n("Ticker"));
|
||||
ui->checkBox_active->setText(i18n("Active"));
|
||||
ui->label_socket->setText(i18n("Socket"));
|
||||
ui->label_interval->setText(i18n("Interval"));
|
||||
}
|
||||
|
@ -150,6 +150,29 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_socket">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_socket">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Socket</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_socket"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_interval">
|
||||
<item>
|
||||
|
@ -303,6 +303,7 @@ int ExtScript::showConfiguration(const QVariant args)
|
||||
ui->checkBox_active->setCheckState(isActive() ? Qt::Checked
|
||||
: Qt::Unchecked);
|
||||
ui->comboBox_redirect->setCurrentIndex(static_cast<int>(redirect()));
|
||||
ui->lineEdit_socket->setText(socket());
|
||||
ui->spinBox_interval->setValue(interval());
|
||||
// filters
|
||||
ui->checkBox_colorFilter->setCheckState(
|
||||
@ -323,6 +324,7 @@ int ExtScript::showConfiguration(const QVariant args)
|
||||
setPrefix(ui->lineEdit_prefix->text());
|
||||
setActive(ui->checkBox_active->checkState() == Qt::Checked);
|
||||
setRedirect(static_cast<Redirect>(ui->comboBox_redirect->currentIndex()));
|
||||
setSocket(ui->lineEdit_socket->text());
|
||||
setInterval(ui->spinBox_interval->value());
|
||||
// filters
|
||||
updateFilter(QString("color"),
|
||||
@ -415,6 +417,7 @@ void ExtScript::translate()
|
||||
ui->label_prefix->setText(i18n("Prefix"));
|
||||
ui->checkBox_active->setText(i18n("Active"));
|
||||
ui->label_redirect->setText(i18n("Redirect"));
|
||||
ui->label_socket->setText(i18n("Socket"));
|
||||
ui->label_interval->setText(i18n("Interval"));
|
||||
ui->groupBox_filters->setTitle(i18n("Additional filters"));
|
||||
ui->checkBox_colorFilter->setText(i18n("Wrap colors"));
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>420</width>
|
||||
<height>424</height>
|
||||
<height>442</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -195,6 +195,29 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_socket">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_socket">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Socket</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_socket"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_interval">
|
||||
<item>
|
||||
|
@ -172,6 +172,7 @@ int ExtUpgrade::showConfiguration(const QVariant args)
|
||||
ui->checkBox_active->setCheckState(isActive() ? Qt::Checked
|
||||
: Qt::Unchecked);
|
||||
ui->spinBox_null->setValue(null());
|
||||
ui->lineEdit_socket->setText(socket());
|
||||
ui->spinBox_interval->setValue(interval());
|
||||
|
||||
int ret = exec();
|
||||
@ -185,6 +186,7 @@ int ExtUpgrade::showConfiguration(const QVariant args)
|
||||
setFilter(ui->lineEdit_filter->text());
|
||||
setActive(ui->checkBox_active->checkState() == Qt::Checked);
|
||||
setNull(ui->spinBox_null->value());
|
||||
setSocket(ui->lineEdit_socket->text());
|
||||
setInterval(ui->spinBox_interval->value());
|
||||
|
||||
writeConfiguration();
|
||||
@ -255,4 +257,5 @@ void ExtUpgrade::translate()
|
||||
ui->checkBox_active->setText(i18n("Active"));
|
||||
ui->label_null->setText(i18n("Null"));
|
||||
ui->label_interval->setText(i18n("Interval"));
|
||||
ui->label_socket->setText(i18n("Socket"));
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>420</width>
|
||||
<height>301</height>
|
||||
<height>321</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -181,6 +181,29 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_socket">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_socket">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Socket</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_socket"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_interval">
|
||||
<item>
|
||||
|
@ -299,6 +299,7 @@ int ExtWeather::showConfiguration(const QVariant args)
|
||||
ui->checkBox_image->setCheckState(image() ? Qt::Checked : Qt::Unchecked);
|
||||
ui->checkBox_active->setCheckState(isActive() ? Qt::Checked
|
||||
: Qt::Unchecked);
|
||||
ui->lineEdit_socket->setText(socket());
|
||||
ui->spinBox_interval->setValue(interval());
|
||||
|
||||
int ret = exec();
|
||||
@ -314,6 +315,7 @@ int ExtWeather::showConfiguration(const QVariant args)
|
||||
setTs(ui->spinBox_timestamp->value());
|
||||
setImage(ui->checkBox_image->checkState() == Qt::Checked);
|
||||
setActive(ui->checkBox_active->checkState() == Qt::Checked);
|
||||
setSocket(ui->lineEdit_socket->text());
|
||||
setInterval(ui->spinBox_interval->value());
|
||||
|
||||
writeConfiguration();
|
||||
@ -411,5 +413,6 @@ void ExtWeather::translate()
|
||||
ui->label_timestamp->setText(i18n("Timestamp"));
|
||||
ui->checkBox_image->setText(i18n("Use images"));
|
||||
ui->checkBox_active->setText(i18n("Active"));
|
||||
ui->label_socket->setText(i18n("Socket"));
|
||||
ui->label_interval->setText(i18n("Interval"));
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>420</width>
|
||||
<height>333</height>
|
||||
<height>382</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -248,6 +248,29 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_socket">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_socket">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Socket</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_socket"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_interval">
|
||||
<item>
|
||||
|
Reference in New Issue
Block a user