Sharedialog: Add a Share button.

This commit is contained in:
Klaas Freitag 2015-02-25 13:41:44 +01:00
parent 961623d388
commit 201075827f
2 changed files with 23 additions and 11 deletions

View file

@ -33,6 +33,11 @@ ShareDialog::ShareDialog(AccountPtr account, const QString &sharePath, const QSt
_ui->pushButton_copy->setText(tr("Copy Link")); _ui->pushButton_copy->setText(tr("Copy Link"));
connect(_ui->pushButton_copy, SIGNAL(clicked(bool)), SLOT(slotPushButtonCopyLinkPressed())); connect(_ui->pushButton_copy, SIGNAL(clicked(bool)), SLOT(slotPushButtonCopyLinkPressed()));
QPushButton *closeButton = _ui->buttonBox->button(QDialogButtonBox::Close);
if( closeButton ) {
connect( closeButton, SIGNAL(clicked()), this, SLOT(close()) );
}
// the following progress indicator widgets are added to layouts which makes them // the following progress indicator widgets are added to layouts which makes them
// automatically deleted once the dialog dies. // automatically deleted once the dialog dies.
_pi_link = new QProgressIndicator(); _pi_link = new QProgressIndicator();

View file

@ -164,6 +164,19 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_shareLink"> <layout class="QHBoxLayout" name="horizontalLayout_shareLink">
<item> <item>
@ -182,18 +195,12 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="5" column="0">
<spacer name="verticalSpacer"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation"> <property name="standardButtons">
<enum>Qt::Vertical</enum> <set>QDialogButtonBox::Close</set>
</property> </property>
<property name="sizeHint" stdset="0"> </widget>
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item> </item>
</layout> </layout>
</widget> </widget>