diff --git a/saoritootwidget.cpp b/saoritootwidget.cpp index b2e518d..3224ae3 100644 --- a/saoritootwidget.cpp +++ b/saoritootwidget.cpp @@ -59,6 +59,8 @@ { if (result == QNetworkReply::NoError) { ui->textEdit_toot->clear(); + ui->lineEdit_cw->clear(); + ui->checkBox_cw->setChecked(false); } } @@ -82,6 +84,9 @@ default: break; } + if (ui->checkBox_cw->isChecked()) { + result += "&spoiler_text=" + ui->lineEdit_cw->text().toUtf8().toPercentEncoding(); + } return result; } diff --git a/saoritootwidget.ui b/saoritootwidget.ui index f3b71e8..80b56e9 100644 --- a/saoritootwidget.ui +++ b/saoritootwidget.ui @@ -23,15 +23,22 @@ <attribute name="title"> <string>Text</string> </attribute> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <item> - <widget class="QLabel" name="label_account"> + <layout class="QFormLayout" name="formLayout"> + <item row="1" column="0"> + <widget class="QCheckBox" name="checkBox_cw"> <property name="text"> - <string>Toot</string> + <string>CW:</string> </property> </widget> </item> - <item> + <item row="1" column="1"> + <widget class="QLineEdit" name="lineEdit_cw"> + <property name="enabled"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="2" column="0" colspan="2"> <widget class="QTextEdit" name="textEdit_toot"> <property name="sizePolicy"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> @@ -44,6 +51,13 @@ </property> </widget> </item> + <item row="0" column="0" colspan="2"> + <widget class="QLabel" name="label_account"> + <property name="text"> + <string>Toot</string> + </property> + </widget> + </item> </layout> </widget> </widget> @@ -157,5 +171,21 @@ </hint> </hints> </connection> + <connection> + <sender>checkBox_cw</sender> + <signal>toggled(bool)</signal> + <receiver>lineEdit_cw</receiver> + <slot>setEnabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>44</x> + <y>81</y> + </hint> + <hint type="destinationlabel"> + <x>227</x> + <y>82</y> + </hint> + </hints> + </connection> </connections> </ui> diff --git a/saoriviewentry.cpp b/saoriviewentry.cpp index 49785ae..87a2a67 100644 --- a/saoriviewentry.cpp +++ b/saoriviewentry.cpp @@ -109,7 +109,6 @@ result += "<body>"; result += imageReplacer(); result += "</body>"; - qDebug() << result; return result; }