mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-26 09:41:29 -05: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 ) ) );
|
connect( ui.anonBox, SIGNAL( stateChanged ( int ) ), this, SLOT( load ( void ) ) );
|
||||||
|
|
||||||
ui.linkLineEdit->setReadOnly(true);
|
|
||||||
ui.linkLineEdit->setText(url);
|
ui.linkLineEdit->setText(url);
|
||||||
|
|
||||||
RetroShareLink link(url);
|
RetroShareLink link(url);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>614</width>
|
<width>614</width>
|
||||||
<height>429</height>
|
<height>415</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "LinksDialog.h"
|
#include "LinksDialog.h"
|
||||||
#include "RetroShareLink.h"
|
#include "RetroShareLink.h"
|
||||||
|
#include "AddLinksDialog.h"
|
||||||
#include <retroshare/rspeers.h>
|
#include <retroshare/rspeers.h>
|
||||||
#include <retroshare/rsrank.h>
|
#include <retroshare/rsrank.h>
|
||||||
#include <retroshare/rsfiles.h>
|
#include <retroshare/rsfiles.h>
|
||||||
@ -68,6 +69,8 @@ LinksDialog::LinksDialog(QWidget *parent)
|
|||||||
connect( ui.addButton, SIGNAL( clicked( void ) ), this, SLOT( addLinkComment( void ) ) );
|
connect( ui.addButton, SIGNAL( clicked( void ) ), this, SLOT( addLinkComment( void ) ) );
|
||||||
connect( ui.expandButton, SIGNAL( clicked( void ) ), this, SLOT( toggleWindows( 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 * ) ),
|
connect( ui.linkTreeWidget, SIGNAL( currentItemChanged ( QTreeWidgetItem *, QTreeWidgetItem * ) ),
|
||||||
this, SLOT( changedItem ( QTreeWidgetItem *, QTreeWidgetItem * ) ) );
|
this, SLOT( changedItem ( QTreeWidgetItem *, QTreeWidgetItem * ) ) );
|
||||||
|
|
||||||
@ -1043,3 +1046,13 @@ void LinksDialog::anchorClicked (const QUrl& link )
|
|||||||
QDesktopServices::openUrl(QUrl(newAddress));
|
QDesktopServices::openUrl(QUrl(newAddress));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LinksDialog::addNewLink()
|
||||||
|
{
|
||||||
|
|
||||||
|
AddLinksDialog *nAddLinksDialog = new AddLinksDialog("");
|
||||||
|
|
||||||
|
nAddLinksDialog->show();
|
||||||
|
|
||||||
|
/* window will destroy itself! */
|
||||||
|
}
|
||||||
|
@ -67,6 +67,8 @@ private slots:
|
|||||||
|
|
||||||
void anchorClicked (const QUrl &);
|
void anchorClicked (const QUrl &);
|
||||||
|
|
||||||
|
void addNewLink();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void updateComments(std::string rid, std::string pid);
|
void updateComments(std::string rid, std::string pid);
|
||||||
|
@ -556,6 +556,25 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user