| Hi, an enhancement for the FB dialog (and one more string) Best Robert |
From 6b16a4fa0fbaa24b64cd313d42c5b71eb6523384 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" <[email protected]> Date: Mon, 2 Feb 2015 13:43:48 +0100 Subject: [PATCH] Add extra text field to facebook dialog
When any of the boxes in the facebook post dialog are changed, any user edits to the text field get lost. This patch makes the text field read only and adds an extra textfield for ad lib comments (that do not get lost upon changing check marks). Signed-off-by: Robert C. Helling <[email protected]> --- qt-ui/socialnetworks.cpp | 2 + qt-ui/socialnetworksdialog.ui | 153 +++++++++++++++++++++++++++++------------- 2 files changed, 110 insertions(+), 45 deletions(-) diff --git a/qt-ui/socialnetworks.cpp b/qt-ui/socialnetworks.cpp index 21ccf93..63a8d69 100644 --- a/qt-ui/socialnetworks.cpp +++ b/qt-ui/socialnetworks.cpp @@ -281,6 +281,7 @@ SocialNetworkDialog::SocialNetworkDialog(QWidget *parent) : QDialog(parent) connect(ui->Location, SIGNAL(clicked()), this, SLOT(selectionChanged())); connect(ui->Notes, SIGNAL(clicked()), this, SLOT(selectionChanged())); connect(ui->album, SIGNAL(textChanged(QString)), this, SLOT(albumChanged())); + connect(ui->extraText, SIGNAL(textChanged()), this, SLOT(selectionChanged())); } void SocialNetworkDialog::albumChanged() @@ -313,6 +314,7 @@ void SocialNetworkDialog::selectionChanged() if (ui->Notes->isChecked()) { fullText += tr("\n%1").arg(d->notes); } + fullText += ui->extraText->toPlainText(); ui->text->setPlainText(fullText); } diff --git a/qt-ui/socialnetworksdialog.ui b/qt-ui/socialnetworksdialog.ui index e8953d1..5ec9af6 100644 --- a/qt-ui/socialnetworksdialog.ui +++ b/qt-ui/socialnetworksdialog.ui @@ -38,7 +38,7 @@ <height>361</height> </rect> </property> - <layout class="QGridLayout" name="gridLayout" rowstretch="0,1,0,0,0,0,0,0,0,0,0"> + <layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,0,0,0,0,0,0,0"> <property name="leftMargin"> <number>1</number> </property> @@ -51,44 +51,100 @@ <property name="bottomMargin"> <number>1</number> </property> - <item row="1" column="0" colspan="2"> - <widget class="QLabel" name="label_4"> - <property name="text"> - <string>The text to the right will be posted as the description with your profile picture to Facebook. The album name is required (the profile picture will be posted to that album).</string> + <item row="2" column="1" rowspan="9"> + <widget class="QPlainTextEdit" name="text"> + <property name="palette"> + <palette> + <active> + <colorrole role="Base"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>236</red> + <green>229</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + </active> + <inactive> + <colorrole role="Base"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>236</red> + <green>229</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + </inactive> + <disabled> + <colorrole role="Base"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>237</red> + <green>237</green> + <blue>237</blue> + </color> + </brush> + </colorrole> + </disabled> + </palette> </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> </property> - <property name="wordWrap"> + <property name="acceptDrops"> + <bool>false</bool> + </property> + <property name="autoFillBackground"> <bool>true</bool> </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + <property name="textInteractionFlags"> + <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> + </property> </widget> </item> - <item row="2" column="0"> - <widget class="QLabel" name="label_2"> + <item row="0" column="0" colspan="2"> + <widget class="QLabel" name="label"> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> <property name="text"> - <string>Album</string> + <string>Facebook post preview</string> </property> </widget> </item> - <item row="3" column="0"> - <widget class="QLineEdit" name="album"> - <property name="toolTip"> - <string>The profile picture will be posted in this album (required)</string> + <item row="10" column="0"> + <widget class="QCheckBox" name="Notes"> + <property name="text"> + <string>Notes</string> </property> </widget> </item> - <item row="4" column="0"> - <widget class="QLabel" name="label_3"> + <item row="9" column="0"> + <widget class="QCheckBox" name="Buddy"> <property name="text"> - <string>Include</string> + <string>Buddy</string> </property> </widget> </item> - <item row="5" column="0"> - <widget class="QCheckBox" name="date"> + <item row="8" column="0"> + <widget class="QCheckBox" name="Divemaster"> <property name="text"> - <string>Date and time</string> + <string>Divemaster</string> + </property> + </widget> + </item> + <item row="7" column="0"> + <widget class="QCheckBox" name="Location"> + <property name="text"> + <string>Location</string> </property> </widget> </item> @@ -99,49 +155,56 @@ </property> </widget> </item> - <item row="7" column="0"> - <widget class="QCheckBox" name="Location"> + <item row="5" column="0"> + <widget class="QCheckBox" name="date"> <property name="text"> - <string>Location</string> + <string>Date and time</string> </property> </widget> </item> - <item row="8" column="0"> - <widget class="QCheckBox" name="Divemaster"> + <item row="2" column="0"> + <widget class="QLabel" name="label_2"> <property name="text"> - <string>Divemaster</string> + <string>Album</string> </property> </widget> </item> - <item row="9" column="0"> - <widget class="QCheckBox" name="Buddy"> + <item row="4" column="0"> + <widget class="QLabel" name="label_3"> <property name="text"> - <string>Buddy</string> + <string>Include</string> </property> </widget> </item> - <item row="10" column="0"> - <widget class="QCheckBox" name="Notes"> - <property name="text"> - <string>Notes</string> + <item row="3" column="0"> + <widget class="QLineEdit" name="album"> + <property name="toolTip"> + <string>The profile picture will be posted in this album (required)</string> </property> </widget> </item> - <item row="0" column="0" colspan="2"> - <widget class="QLabel" name="label"> - <property name="font"> - <font> - <weight>75</weight> - <bold>true</bold> - </font> - </property> + <item row="1" column="0" colspan="2"> + <widget class="QLabel" name="label_4"> <property name="text"> - <string>Facebook post preview</string> + <string>The text to the right will be posted as the description with your profile picture to Facebook. The album name is required (the profile picture will be posted to that album).</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + <property name="wordWrap"> + <bool>true</bool> </property> </widget> </item> - <item row="2" column="1" rowspan="9"> - <widget class="QPlainTextEdit" name="text"/> + <item row="11" column="1"> + <widget class="QPlainTextEdit" name="extraText"/> + </item> + <item row="11" column="0"> + <widget class="QLabel" name="label_5"> + <property name="text"> + <string>Extra text</string> + </property> + </widget> </item> </layout> </widget> -- 1.9.3 (Apple Git-50)
-- .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO Robert C. Helling Elite Master Course Theoretical and Mathematical Physics Scientific Coordinator Ludwig Maximilians Universitaet Muenchen, Dept. Physik Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339 http://www.atdotde.de Enhance your privacy, use cryptography! My PGP keys have fingerprints A9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D and DCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F |
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
