mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-05 12:51:08 -05:00
added Copy link as html format
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2482 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0780e3a09e
commit
3ec3e4f53a
@ -290,7 +290,6 @@ void SharedFilesDialog::copyLink (const QModelIndexList& lst, bool remote)
|
|||||||
|
|
||||||
QClipboard *clipboard = QApplication::clipboard();
|
QClipboard *clipboard = QApplication::clipboard();
|
||||||
clipboard->setText(analyzer.getRetroShareLink ());
|
clipboard->setText(analyzer.getRetroShareLink ());
|
||||||
//QMessageBox::warning(this, tr("RetroShare"), analyzer.getKommuteLink (), QMessageBox::Ok);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SharedFilesDialog::copyLinkRemote()
|
void SharedFilesDialog::copyLinkRemote()
|
||||||
@ -305,6 +304,17 @@ void SharedFilesDialog::copyLinkLocal()
|
|||||||
copyLink (lst, false);
|
copyLink (lst, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SharedFilesDialog::copyLinkhtml( )
|
||||||
|
{
|
||||||
|
copyLinkLocal ();
|
||||||
|
|
||||||
|
QString link = QApplication::clipboard()->text();
|
||||||
|
|
||||||
|
QClipboard *clipboard = QApplication::clipboard();
|
||||||
|
clipboard->setText("<a href='" + link + "'> " + link + "</a>");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void SharedFilesDialog::sendremoteLinkTo()
|
void SharedFilesDialog::sendremoteLinkTo()
|
||||||
{
|
{
|
||||||
copyLinkRemote ();
|
copyLinkRemote ();
|
||||||
@ -324,7 +334,7 @@ void SharedFilesDialog::sendremoteLinkTo()
|
|||||||
nMsgDialog->show();
|
nMsgDialog->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SharedFilesDialog::sendLinkTo( /*std::string rsid*/ )
|
void SharedFilesDialog::sendLinkTo()
|
||||||
{
|
{
|
||||||
copyLinkLocal ();
|
copyLinkLocal ();
|
||||||
|
|
||||||
@ -653,22 +663,25 @@ void SharedFilesDialog::sharedDirTreeWidgetContextMenu( QPoint point )
|
|||||||
}
|
}
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
copylinklocalAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Copy retroshare Link" ), this );
|
copylinklocalAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Copy retroshare Links to Clipboard" ), this );
|
||||||
connect( copylinklocalAct , SIGNAL( triggered() ), this, SLOT( copyLinkLocal() ) );
|
connect( copylinklocalAct , SIGNAL( triggered() ), this, SLOT( copyLinkLocal() ) );
|
||||||
|
|
||||||
|
copylinklocalhtmlAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Copy retroshare Links to Clipboard (HTML)" ), this );
|
||||||
|
connect( copylinklocalhtmlAct , SIGNAL( triggered() ), this, SLOT( copyLinkhtml() ) );
|
||||||
|
|
||||||
sendlinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Link" ), this );
|
sendlinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Links" ), this );
|
||||||
connect( sendlinkAct , SIGNAL( triggered() ), this, SLOT( sendLinkTo( ) ) );
|
connect( sendlinkAct , SIGNAL( triggered() ), this, SLOT( sendLinkTo( ) ) );
|
||||||
|
|
||||||
sendhtmllinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Link (html)" ), this );
|
sendhtmllinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Links (HTML)" ), this );
|
||||||
connect( sendhtmllinkAct , SIGNAL( triggered() ), this, SLOT( sendHtmlLinkTo( ) ) );
|
connect( sendhtmllinkAct , SIGNAL( triggered() ), this, SLOT( sendHtmlLinkTo( ) ) );
|
||||||
|
|
||||||
sendchatlinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Link to Chat" ), this );
|
sendchatlinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Links to Chat" ), this );
|
||||||
connect( sendchatlinkAct , SIGNAL( triggered() ), this, SLOT( sendLinktoChat( ) ) );
|
connect( sendchatlinkAct , SIGNAL( triggered() ), this, SLOT( sendLinktoChat( ) ) );
|
||||||
|
|
||||||
sendlinkCloudAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Link to Cloud" ), this );
|
sendlinkCloudAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Links to Cloud" ), this );
|
||||||
connect( sendlinkCloudAct , SIGNAL( triggered() ), this, SLOT( sendLinkToCloud( ) ) );
|
connect( sendlinkCloudAct , SIGNAL( triggered() ), this, SLOT( sendLinkToCloud( ) ) );
|
||||||
|
|
||||||
addlinkCloudAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Add Link to Cloud" ), this );
|
addlinkCloudAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Add Links to Cloud" ), this );
|
||||||
connect( addlinkCloudAct , SIGNAL( triggered() ), this, SLOT( addLinkToCloud( ) ) );
|
connect( addlinkCloudAct , SIGNAL( triggered() ), this, SLOT( addLinkToCloud( ) ) );
|
||||||
|
|
||||||
openfileAct = new QAction(QIcon(IMAGE_OPENFILE), tr("Open File"), this);
|
openfileAct = new QAction(QIcon(IMAGE_OPENFILE), tr("Open File"), this);
|
||||||
@ -691,6 +704,7 @@ void SharedFilesDialog::sharedDirTreeWidgetContextMenu( QPoint point )
|
|||||||
if(!localModel->isDir( midx ) )
|
if(!localModel->isDir( midx ) )
|
||||||
{
|
{
|
||||||
contextMnu2.addAction( copylinklocalAct);
|
contextMnu2.addAction( copylinklocalAct);
|
||||||
|
contextMnu2.addAction( copylinklocalhtmlAct);
|
||||||
contextMnu2.addAction( sendlinkAct);
|
contextMnu2.addAction( sendlinkAct);
|
||||||
contextMnu2.addAction( sendhtmllinkAct);
|
contextMnu2.addAction( sendhtmllinkAct);
|
||||||
contextMnu2.addAction( sendchatlinkAct);
|
contextMnu2.addAction( sendchatlinkAct);
|
||||||
|
@ -64,6 +64,7 @@ private slots:
|
|||||||
|
|
||||||
void copyLinkRemote();
|
void copyLinkRemote();
|
||||||
void copyLinkLocal();
|
void copyLinkLocal();
|
||||||
|
void copyLinkhtml();
|
||||||
void sendLinkTo();
|
void sendLinkTo();
|
||||||
void sendremoteLinkTo();
|
void sendremoteLinkTo();
|
||||||
void sendHtmlLinkTo();
|
void sendHtmlLinkTo();
|
||||||
@ -116,6 +117,7 @@ private:
|
|||||||
QAction* sendlinkCloudAct;
|
QAction* sendlinkCloudAct;
|
||||||
QAction* addlinkCloudAct;
|
QAction* addlinkCloudAct;
|
||||||
QAction* sendchatlinkAct;
|
QAction* sendchatlinkAct;
|
||||||
|
QAction* copylinklocalhtmlAct;
|
||||||
|
|
||||||
QTreeView *shareddirtreeview;
|
QTreeView *shareddirtreeview;
|
||||||
QMovie *movie;
|
QMovie *movie;
|
||||||
|
Loading…
Reference in New Issue
Block a user