mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added a "add new link" button, for use the external popup dialog for add a link.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3745 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0e41211f3c
commit
630b46cbfd
@ -48,7 +48,6 @@ AddLinksDialog::AddLinksDialog(QString url, QWidget *parent)
|
||||
|
||||
connect( ui.anonBox, SIGNAL( stateChanged ( int ) ), this, SLOT( load ( void ) ) );
|
||||
|
||||
ui.linkLineEdit->setReadOnly(true);
|
||||
ui.linkLineEdit->setText(url);
|
||||
|
||||
RetroShareLink link(url);
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>614</width>
|
||||
<height>429</height>
|
||||
<height>415</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "LinksDialog.h"
|
||||
#include "RetroShareLink.h"
|
||||
#include "AddLinksDialog.h"
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsrank.h>
|
||||
#include <retroshare/rsfiles.h>
|
||||
@ -67,6 +68,8 @@ LinksDialog::LinksDialog(QWidget *parent)
|
||||
/* add button */
|
||||
connect( ui.addButton, SIGNAL( clicked( void ) ), this, SLOT( addLinkComment( void ) ) );
|
||||
connect( ui.expandButton, SIGNAL( clicked( void ) ), this, SLOT( toggleWindows( void ) ) );
|
||||
|
||||
connect( ui.pushButton, SIGNAL( clicked( ) ), this, SLOT( addNewLink( ) ) );
|
||||
|
||||
connect( ui.linkTreeWidget, SIGNAL( currentItemChanged ( QTreeWidgetItem *, QTreeWidgetItem * ) ),
|
||||
this, SLOT( changedItem ( QTreeWidgetItem *, QTreeWidgetItem * ) ) );
|
||||
@ -1043,3 +1046,13 @@ void LinksDialog::anchorClicked (const QUrl& link )
|
||||
QDesktopServices::openUrl(QUrl(newAddress));
|
||||
}
|
||||
}
|
||||
|
||||
void LinksDialog::addNewLink()
|
||||
{
|
||||
|
||||
AddLinksDialog *nAddLinksDialog = new AddLinksDialog("");
|
||||
|
||||
nAddLinksDialog->show();
|
||||
|
||||
/* window will destroy itself! */
|
||||
}
|
||||
|
@ -66,6 +66,8 @@ private slots:
|
||||
void checkUpdate();
|
||||
|
||||
void anchorClicked (const QUrl &);
|
||||
|
||||
void addNewLink();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -556,6 +556,25 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton:hover {
|
||||
border: 1px solid #CCCCCC;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add new link</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/edit_add24.png</normaloff>:/images/edit_add24.png</iconset>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user