mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
changed the usage of "QMenu*" to a local "QMenu"
removed usage of "new QMouseEvent", it was a memory leak cleaned some includes git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2910 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e49cc6552c
commit
c3c6480f4b
30 changed files with 68 additions and 297 deletions
|
@ -19,12 +19,6 @@
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QContextMenuEvent>
|
|
||||||
#include <QCursor>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QPoint>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
@ -143,7 +137,6 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
||||||
}
|
}
|
||||||
|
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
postchannelAct = new QAction(QIcon(":/images/mail_reply.png"), tr( "Post to Channel" ), this );
|
postchannelAct = new QAction(QIcon(":/images/mail_reply.png"), tr( "Post to Channel" ), this );
|
||||||
connect( postchannelAct , SIGNAL( triggered() ), this, SLOT( createMsg() ) );
|
connect( postchannelAct , SIGNAL( triggered() ), this, SLOT( createMsg() ) );
|
||||||
|
@ -157,8 +150,6 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
||||||
channeldetailsAct = new QAction(QIcon(":/images/info16.png"), tr( "Show Channel Details" ), this );
|
channeldetailsAct = new QAction(QIcon(":/images/info16.png"), tr( "Show Channel Details" ), this );
|
||||||
connect( channeldetailsAct , SIGNAL( triggered() ), this, SLOT( showChannelDetails() ) );
|
connect( channeldetailsAct , SIGNAL( triggered() ), this, SLOT( showChannelDetails() ) );
|
||||||
|
|
||||||
contextMnu.clear();
|
|
||||||
|
|
||||||
if (ci.channelFlags & RS_DISTRIB_PUBLISH)
|
if (ci.channelFlags & RS_DISTRIB_PUBLISH)
|
||||||
{
|
{
|
||||||
contextMnu.addAction( postchannelAct );
|
contextMnu.addAction( postchannelAct );
|
||||||
|
@ -178,9 +169,7 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
||||||
contextMnu.addAction( channeldetailsAct );
|
contextMnu.addAction( channeldetailsAct );
|
||||||
}
|
}
|
||||||
|
|
||||||
contextMnu.exec( mevent->globalPos() );
|
contextMnu.exec(QCursor::pos());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelFeed::createChannel()
|
void ChannelFeed::createChannel()
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QCursor>
|
#include <QCursor>
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QModelIndex>
|
#include <QModelIndex>
|
||||||
|
|
|
@ -34,20 +34,6 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <QContextMenuEvent>
|
|
||||||
#include <QCursor>
|
|
||||||
#include <QDateTime>
|
|
||||||
#include <QFile>
|
|
||||||
#include <QFileInfo>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QPoint>
|
|
||||||
#include <QPrintDialog>
|
|
||||||
#include <QPrinter>
|
|
||||||
#include <QHeaderView>
|
|
||||||
#include <QTimer>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
|
||||||
/* Images for context menu icons */
|
/* Images for context menu icons */
|
||||||
|
@ -176,7 +162,6 @@ ForumsDialog::ForumsDialog(QWidget *parent)
|
||||||
void ForumsDialog::forumListCustomPopupMenu( QPoint point )
|
void ForumsDialog::forumListCustomPopupMenu( QPoint point )
|
||||||
{
|
{
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
QAction *subForumAct = new QAction(QIcon(IMAGE_SUBSCRIBE), tr( "Subscribe to Forum" ), this );
|
QAction *subForumAct = new QAction(QIcon(IMAGE_SUBSCRIBE), tr( "Subscribe to Forum" ), this );
|
||||||
subForumAct->setDisabled (true);
|
subForumAct->setDisabled (true);
|
||||||
|
@ -210,19 +195,18 @@ void ForumsDialog::forumListCustomPopupMenu( QPoint point )
|
||||||
detailsForumAct->setEnabled (true);
|
detailsForumAct->setEnabled (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
contextMnu.clear();
|
|
||||||
contextMnu.addAction( subForumAct );
|
contextMnu.addAction( subForumAct );
|
||||||
contextMnu.addAction( unsubForumAct );
|
contextMnu.addAction( unsubForumAct );
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction( newForumAct );
|
contextMnu.addAction( newForumAct );
|
||||||
contextMnu.addAction( detailsForumAct );
|
contextMnu.addAction( detailsForumAct );
|
||||||
contextMnu.exec( mevent->globalPos() );
|
|
||||||
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ForumsDialog::threadListCustomPopupMenu( QPoint point )
|
void ForumsDialog::threadListCustomPopupMenu( QPoint point )
|
||||||
{
|
{
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
QAction *replyAct = new QAction(QIcon(IMAGE_MESSAGEREPLY), tr( "Reply" ), this );
|
QAction *replyAct = new QAction(QIcon(IMAGE_MESSAGEREPLY), tr( "Reply" ), this );
|
||||||
replyAct->setDisabled (true);
|
replyAct->setDisabled (true);
|
||||||
|
@ -250,14 +234,14 @@ void ForumsDialog::threadListCustomPopupMenu( QPoint point )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contextMnu.clear();
|
|
||||||
contextMnu.addAction( replyAct);
|
contextMnu.addAction( replyAct);
|
||||||
contextMnu.addAction( viewAct);
|
contextMnu.addAction( viewAct);
|
||||||
contextMnu.addAction( replyauthorAct);
|
contextMnu.addAction( replyauthorAct);
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction( expandAll);
|
contextMnu.addAction( expandAll);
|
||||||
contextMnu.addAction( collapseAll);
|
contextMnu.addAction( collapseAll);
|
||||||
contextMnu.exec( mevent->globalPos() );
|
|
||||||
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ForumsDialog::togglefileview()
|
void ForumsDialog::togglefileview()
|
||||||
|
|
|
@ -30,13 +30,6 @@
|
||||||
#include <QtCore/QFile>
|
#include <QtCore/QFile>
|
||||||
#include <QtCore/QTextStream>
|
#include <QtCore/QTextStream>
|
||||||
|
|
||||||
#include <QContextMenuEvent>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QCursor>
|
|
||||||
#include <QPoint>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
|
||||||
|
|
||||||
/* Images for context menu icons */
|
/* Images for context menu icons */
|
||||||
#define IMAGE_DOWNLOAD ":/images/start.png"
|
#define IMAGE_DOWNLOAD ":/images/start.png"
|
||||||
|
|
||||||
|
|
|
@ -29,13 +29,6 @@
|
||||||
#include <QtCore/QFile>
|
#include <QtCore/QFile>
|
||||||
#include <QtCore/QTextStream>
|
#include <QtCore/QTextStream>
|
||||||
|
|
||||||
#include <QContextMenuEvent>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QCursor>
|
|
||||||
#include <QPoint>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
|
||||||
|
|
||||||
/* Images for context menu icons */
|
/* Images for context menu icons */
|
||||||
#define IMAGE_DOWNLOAD ":/images/start.png"
|
#define IMAGE_DOWNLOAD ":/images/start.png"
|
||||||
|
|
||||||
|
|
|
@ -38,14 +38,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <QContextMenuEvent>
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QCursor>
|
|
||||||
#include <QPoint>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QHeaderView>
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
/* Images for context menu icons */
|
/* Images for context menu icons */
|
||||||
|
@ -144,7 +137,6 @@ void LinksDialog::linkTreeWidgetCostumPopupMenu( QPoint point )
|
||||||
{
|
{
|
||||||
|
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
voteupAct = new QAction(QIcon(IMAGE_EXPORTFRIEND), tr( "Share Link Anonymously" ), this );
|
voteupAct = new QAction(QIcon(IMAGE_EXPORTFRIEND), tr( "Share Link Anonymously" ), this );
|
||||||
connect( voteupAct , SIGNAL( triggered() ), this, SLOT( voteup_anon() ) );
|
connect( voteupAct , SIGNAL( triggered() ), this, SLOT( voteup_anon() ) );
|
||||||
|
@ -172,14 +164,13 @@ void LinksDialog::linkTreeWidgetCostumPopupMenu( QPoint point )
|
||||||
downloadAct = new QAction(QIcon(IMAGE_DOWNLOAD), tr("Download"), this);
|
downloadAct = new QAction(QIcon(IMAGE_DOWNLOAD), tr("Download"), this);
|
||||||
connect(downloadAct, SIGNAL(triggered()), this, SLOT(downloadSelected()));
|
connect(downloadAct, SIGNAL(triggered()), this, SLOT(downloadSelected()));
|
||||||
|
|
||||||
contextMnu.clear();
|
|
||||||
contextMnu.addAction(voteupAct);
|
contextMnu.addAction(voteupAct);
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addMenu(voteMenu);
|
contextMnu.addMenu(voteMenu);
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction(downloadAct);
|
contextMnu.addAction(downloadAct);
|
||||||
|
|
||||||
contextMnu.exec( mevent->globalPos() );
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void LinksDialog::changedSortRank( int index )
|
void LinksDialog::changedSortRank( int index )
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QCursor>
|
#include <QCursor>
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QPrintDialog>
|
#include <QPrintDialog>
|
||||||
#include <QPrinter>
|
#include <QPrinter>
|
||||||
|
@ -246,9 +245,6 @@ int MessagesDialog::getSelectedMsgCount ()
|
||||||
void MessagesDialog::messageslistWidgetCostumPopupMenu( QPoint point )
|
void MessagesDialog::messageslistWidgetCostumPopupMenu( QPoint point )
|
||||||
{
|
{
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
contextMnu.clear();
|
|
||||||
|
|
||||||
/** Defines the actions for the context menu */
|
/** Defines the actions for the context menu */
|
||||||
QAction* newmsgAct = NULL;
|
QAction* newmsgAct = NULL;
|
||||||
|
@ -300,17 +296,16 @@ void MessagesDialog::messageslistWidgetCostumPopupMenu( QPoint point )
|
||||||
removemsgAct->setDisabled(true);
|
removemsgAct->setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
contextMnu.exec( mevent->globalPos() );
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MessagesDialog::msgfilelistWidgetCostumPopupMenu( QPoint point )
|
void MessagesDialog::msgfilelistWidgetCostumPopupMenu( QPoint point )
|
||||||
{
|
{
|
||||||
QAction* getRecAct = NULL;
|
QAction* getRecAct = NULL;
|
||||||
QAction* getAllRecAct = NULL;
|
// QAction* getAllRecAct = NULL;
|
||||||
|
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
getRecAct = new QAction(QIcon(IMAGE_DOWNLOAD), tr( "Download" ), this );
|
getRecAct = new QAction(QIcon(IMAGE_DOWNLOAD), tr( "Download" ), this );
|
||||||
connect( getRecAct , SIGNAL( triggered() ), this, SLOT( getcurrentrecommended() ) );
|
connect( getRecAct , SIGNAL( triggered() ), this, SLOT( getcurrentrecommended() ) );
|
||||||
|
@ -318,10 +313,9 @@ void MessagesDialog::msgfilelistWidgetCostumPopupMenu( QPoint point )
|
||||||
// getAllRecAct = new QAction(QIcon(IMAGE_DOWNLOADALL), tr( "Download" ), this );
|
// getAllRecAct = new QAction(QIcon(IMAGE_DOWNLOADALL), tr( "Download" ), this );
|
||||||
// connect( getAllRecAct , SIGNAL( triggered() ), this, SLOT( getallrecommended() ) );
|
// connect( getAllRecAct , SIGNAL( triggered() ), this, SLOT( getallrecommended() ) );
|
||||||
|
|
||||||
contextMnu.clear();
|
|
||||||
contextMnu.addAction( getRecAct);
|
contextMnu.addAction( getRecAct);
|
||||||
// contextMnu.addAction( getAllRecAct);
|
// contextMnu.addAction( getAllRecAct);
|
||||||
contextMnu.exec( mevent->globalPos() );
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessagesDialog::newmessage()
|
void MessagesDialog::newmessage()
|
||||||
|
|
|
@ -31,17 +31,6 @@
|
||||||
#include "rsiface/rsfiles.h"
|
#include "rsiface/rsfiles.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <QContextMenuEvent>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QCursor>
|
|
||||||
#include <QPoint>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QPrintDialog>
|
|
||||||
#include <QPrinter>
|
|
||||||
#include <QDateTime>
|
|
||||||
#include <QHeaderView>
|
|
||||||
|
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
MessagesPopupDialog::MessagesPopupDialog(QWidget* parent, Qt::WFlags flags)
|
MessagesPopupDialog::MessagesPopupDialog(QWidget* parent, Qt::WFlags flags)
|
||||||
|
|
|
@ -49,14 +49,6 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <QContextMenuEvent>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QCursor>
|
|
||||||
#include <QPoint>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QHeaderView>
|
|
||||||
|
|
||||||
/* Images for context menu icons */
|
/* Images for context menu icons */
|
||||||
#define IMAGE_REMOVEFRIEND ":/images/removefriend16.png"
|
#define IMAGE_REMOVEFRIEND ":/images/removefriend16.png"
|
||||||
#define IMAGE_EXPIORTFRIEND ":/images/exportpeers_16x16.png"
|
#define IMAGE_EXPIORTFRIEND ":/images/exportpeers_16x16.png"
|
||||||
|
@ -175,7 +167,6 @@ void MessengerWindow::messengertreeWidgetCostumPopupMenu( QPoint point )
|
||||||
}
|
}
|
||||||
|
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
QAction* expandAll = new QAction(tr( "Expand all" ), this );
|
QAction* expandAll = new QAction(tr( "Expand all" ), this );
|
||||||
connect( expandAll , SIGNAL( triggered() ), ui.messengertreeWidget, SLOT (expandAll()) );
|
connect( expandAll , SIGNAL( triggered() ), ui.messengertreeWidget, SLOT (expandAll()) );
|
||||||
|
@ -239,7 +230,6 @@ void MessengerWindow::messengertreeWidgetCostumPopupMenu( QPoint point )
|
||||||
QWidgetAction *widgetAction = new QWidgetAction(this);
|
QWidgetAction *widgetAction = new QWidgetAction(this);
|
||||||
widgetAction->setDefaultWidget(widget);
|
widgetAction->setDefaultWidget(widget);
|
||||||
|
|
||||||
contextMnu.clear();
|
|
||||||
contextMnu.addAction( widgetAction);
|
contextMnu.addAction( widgetAction);
|
||||||
contextMnu.addAction( chatAct);
|
contextMnu.addAction( chatAct);
|
||||||
contextMnu.addAction( sendMessageAct);
|
contextMnu.addAction( sendMessageAct);
|
||||||
|
@ -254,7 +244,7 @@ void MessengerWindow::messengertreeWidgetCostumPopupMenu( QPoint point )
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction( expandAll);
|
contextMnu.addAction( expandAll);
|
||||||
contextMnu.addAction( collapseAll);
|
contextMnu.addAction( collapseAll);
|
||||||
contextMnu.exec( mevent->globalPos() );
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessengerWindow::updateMessengerDisplay()
|
void MessengerWindow::updateMessengerDisplay()
|
||||||
|
|
|
@ -49,7 +49,6 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QCursor>
|
#include <QCursor>
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
|
|
||||||
|
@ -205,8 +204,6 @@ void NetworkDialog::connecttreeWidgetCostumPopupMenu( QPoint point )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
contextMnu.clear();
|
|
||||||
|
|
||||||
std::string peer_id = wi->text(4).toStdString() ;
|
std::string peer_id = wi->text(4).toStdString() ;
|
||||||
|
|
||||||
|
@ -253,7 +250,7 @@ void NetworkDialog::connecttreeWidgetCostumPopupMenu( QPoint point )
|
||||||
contextMnu.addAction( peerdetailsAct);
|
contextMnu.addAction( peerdetailsAct);
|
||||||
|
|
||||||
|
|
||||||
contextMnu.exec( mevent->globalPos() );
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetworkDialog::denyFriend()
|
void NetworkDialog::denyFriend()
|
||||||
|
|
|
@ -94,8 +94,6 @@ private slots:
|
||||||
private:
|
private:
|
||||||
QTreeWidgetItem *getCurrentNeighbour();
|
QTreeWidgetItem *getCurrentNeighbour();
|
||||||
|
|
||||||
/** Define the popup menus for the Context menu */
|
|
||||||
QMenu* contextMnu;
|
|
||||||
/** Defines the actions for the context menu */
|
/** Defines the actions for the context menu */
|
||||||
QAction* peerdetailsAct;
|
QAction* peerdetailsAct;
|
||||||
QAction* denyFriendAct;
|
QAction* denyFriendAct;
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
|
|
||||||
#include <gpgme.h>
|
#include <gpgme.h>
|
||||||
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QGraphicsItem>
|
#include <QGraphicsItem>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -72,20 +70,6 @@ NetworkView::NetworkView(QWidget *parent)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetworkView::peerCustomPopupMenu( QPoint point )
|
|
||||||
{
|
|
||||||
|
|
||||||
QMenu contextMnu( this );
|
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
//QAction * voteupAct = new QAction(QIcon(IMAGE_EXPIORTFRIEND), tr( "Vote Link Up" ), this );
|
|
||||||
//connect( voteupAct , SIGNAL( triggered() ), this, SLOT( voteup() ) );
|
|
||||||
|
|
||||||
contextMnu.clear();
|
|
||||||
//contextMnu.addAction(voteupAct);
|
|
||||||
contextMnu.exec( mevent->globalPos() );
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkView::changedFoFCheckBox( )
|
void NetworkView::changedFoFCheckBox( )
|
||||||
{
|
{
|
||||||
insertPeers();
|
insertPeers();
|
||||||
|
|
|
@ -38,9 +38,6 @@ public:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
/** Create the context popup menu and it's submenus */
|
|
||||||
void peerCustomPopupMenu( QPoint point );
|
|
||||||
|
|
||||||
void insertPeers();
|
void insertPeers();
|
||||||
void insertSignatures();
|
void insertSignatures();
|
||||||
void insertConnections();
|
void insertConnections();
|
||||||
|
|
|
@ -62,7 +62,6 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QCursor>
|
#include <QCursor>
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
|
@ -255,8 +254,7 @@ void PeersDialog::contextMenu( QPoint point )
|
||||||
QMenu contextMnu(this);
|
QMenu contextMnu(this);
|
||||||
contextMnu.addAction( pasteLinkAct);
|
contextMnu.addAction( pasteLinkAct);
|
||||||
|
|
||||||
QMouseEvent mevent(QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier);
|
contextMnu.exec(QCursor::pos());
|
||||||
contextMnu.exec( mevent.globalPos() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PeersDialog::peertreeWidgetCostumPopupMenu( QPoint point )
|
void PeersDialog::peertreeWidgetCostumPopupMenu( QPoint point )
|
||||||
|
@ -267,9 +265,6 @@ void PeersDialog::peertreeWidgetCostumPopupMenu( QPoint point )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QMenu contextMnu( this );
|
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
QAction* expandAll = new QAction(tr( "Expand all" ), this );
|
QAction* expandAll = new QAction(tr( "Expand all" ), this );
|
||||||
connect( expandAll , SIGNAL( triggered() ), ui.peertreeWidget, SLOT (expandAll()) );
|
connect( expandAll , SIGNAL( triggered() ), ui.peertreeWidget, SLOT (expandAll()) );
|
||||||
|
|
||||||
|
@ -332,7 +327,8 @@ void PeersDialog::peertreeWidgetCostumPopupMenu( QPoint point )
|
||||||
QWidgetAction *widgetAction = new QWidgetAction(this);
|
QWidgetAction *widgetAction = new QWidgetAction(this);
|
||||||
widgetAction->setDefaultWidget(widget);
|
widgetAction->setDefaultWidget(widget);
|
||||||
|
|
||||||
contextMnu.clear();
|
QMenu contextMnu( this );
|
||||||
|
|
||||||
contextMnu.addAction( widgetAction);
|
contextMnu.addAction( widgetAction);
|
||||||
contextMnu.addAction( chatAct);
|
contextMnu.addAction( chatAct);
|
||||||
contextMnu.addAction( msgAct);
|
contextMnu.addAction( msgAct);
|
||||||
|
@ -347,7 +343,8 @@ void PeersDialog::peertreeWidgetCostumPopupMenu( QPoint point )
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction( expandAll);
|
contextMnu.addAction( expandAll);
|
||||||
contextMnu.addAction( collapseAll);
|
contextMnu.addAction( collapseAll);
|
||||||
contextMnu.exec( mevent->globalPos() );
|
|
||||||
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
// replaced by shortcut
|
// replaced by shortcut
|
||||||
|
|
|
@ -172,8 +172,6 @@ private:
|
||||||
/* (2) Utility Fns */
|
/* (2) Utility Fns */
|
||||||
QTreeWidgetItem *getCurrentPeer();
|
QTreeWidgetItem *getCurrentPeer();
|
||||||
|
|
||||||
/** Define the popup menus for the Context menu */
|
|
||||||
QMenu* contextMnu;
|
|
||||||
/** Defines the actions for the context menu */
|
/** Defines the actions for the context menu */
|
||||||
QAction* chatAct;
|
QAction* chatAct;
|
||||||
QAction* pasteLinkAct;
|
QAction* pasteLinkAct;
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QCursor>
|
#include <QCursor>
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
|
|
||||||
|
@ -91,7 +90,6 @@ bool SearchDialog::initialised = false;
|
||||||
SearchDialog::SearchDialog(QWidget *parent)
|
SearchDialog::SearchDialog(QWidget *parent)
|
||||||
: MainPage(parent),
|
: MainPage(parent),
|
||||||
advSearchDialog(NULL),
|
advSearchDialog(NULL),
|
||||||
contextMnu(NULL), contextMnu2(NULL),
|
|
||||||
nextSearchId(1)
|
nextSearchId(1)
|
||||||
{
|
{
|
||||||
/* Invoke the Qt Designer generated object setup routine */
|
/* Invoke the Qt Designer generated object setup routine */
|
||||||
|
@ -228,40 +226,33 @@ void SearchDialog::initialiseFileTypeMappings()
|
||||||
|
|
||||||
void SearchDialog::searchtableWidgetCostumPopupMenu( QPoint point )
|
void SearchDialog::searchtableWidgetCostumPopupMenu( QPoint point )
|
||||||
{
|
{
|
||||||
// block the popup if no results available
|
// block the popup if no results available
|
||||||
if ((ui.searchResultWidget->selectedItems()).size() == 0) return;
|
if ((ui.searchResultWidget->selectedItems()).size() == 0) return;
|
||||||
|
|
||||||
// create the menu as required
|
downloadAct = new QAction(QIcon(IMAGE_START), tr( "Download" ), this );
|
||||||
if (contextMnu == 0)
|
connect( downloadAct , SIGNAL( triggered() ), this, SLOT( download() ) );
|
||||||
{
|
|
||||||
contextMnu = new QMenu(this);
|
|
||||||
|
|
||||||
downloadAct = new QAction(QIcon(IMAGE_START), tr( "Download" ), this );
|
copysearchlinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Copy retroshare Link" ), this );
|
||||||
connect( downloadAct , SIGNAL( triggered() ), this, SLOT( download() ) );
|
connect( copysearchlinkAct , SIGNAL( triggered() ), this, SLOT( copysearchLink() ) );
|
||||||
|
|
||||||
copysearchlinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Copy retroshare Link" ), this );
|
|
||||||
connect( copysearchlinkAct , SIGNAL( triggered() ), this, SLOT( copysearchLink() ) );
|
|
||||||
|
|
||||||
sendrslinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Link" ), this );
|
sendrslinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Link" ), this );
|
||||||
connect( sendrslinkAct , SIGNAL( triggered() ), this, SLOT( sendLinkTo( ) ) );
|
connect( sendrslinkAct , SIGNAL( triggered() ), this, SLOT( sendLinkTo( ) ) );
|
||||||
|
|
||||||
broadcastonchannelAct = new QAction( tr( "Broadcast on Channel" ), this );
|
broadcastonchannelAct = new QAction( tr( "Broadcast on Channel" ), this );
|
||||||
connect( broadcastonchannelAct , SIGNAL( triggered() ), this, SLOT( broadcastonchannel() ) );
|
connect( broadcastonchannelAct , SIGNAL( triggered() ), this, SLOT( broadcastonchannel() ) );
|
||||||
|
|
||||||
recommendtofriendsAct = new QAction( tr( "Recommend to Friends" ), this );
|
recommendtofriendsAct = new QAction( tr( "Recommend to Friends" ), this );
|
||||||
connect( recommendtofriendsAct , SIGNAL( triggered() ), this, SLOT( recommendtofriends() ) );
|
connect( recommendtofriendsAct , SIGNAL( triggered() ), this, SLOT( recommendtofriends() ) );
|
||||||
|
|
||||||
|
QMenu contextMnu(this);
|
||||||
|
|
||||||
contextMnu->clear();
|
contextMnu.addAction( downloadAct);
|
||||||
contextMnu->addAction( downloadAct);
|
contextMnu.addSeparator();
|
||||||
contextMnu->addSeparator();
|
|
||||||
|
|
||||||
contextMnu->addAction( copysearchlinkAct);
|
contextMnu.addAction( copysearchlinkAct);
|
||||||
contextMnu->addAction( sendrslinkAct);
|
contextMnu.addAction( sendrslinkAct);
|
||||||
}
|
|
||||||
|
|
||||||
QMouseEvent *mevent = new QMouseEvent(QEvent::MouseButtonPress,point,Qt::RightButton, Qt::RightButton,Qt::NoModifier);
|
contextMnu.exec(QCursor::pos());
|
||||||
contextMnu->exec( mevent->globalPos() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SearchDialog::download()
|
void SearchDialog::download()
|
||||||
|
@ -366,28 +357,22 @@ void SearchDialog::recommendtofriends()
|
||||||
/** context menu searchTablewidget2 **/
|
/** context menu searchTablewidget2 **/
|
||||||
void SearchDialog::searchtableWidget2CostumPopupMenu( QPoint point )
|
void SearchDialog::searchtableWidget2CostumPopupMenu( QPoint point )
|
||||||
{
|
{
|
||||||
|
|
||||||
// block the popup if no results available
|
// block the popup if no results available
|
||||||
if ((ui.searchSummaryWidget->selectedItems()).size() == 0) return;
|
if ((ui.searchSummaryWidget->selectedItems()).size() == 0) return;
|
||||||
|
|
||||||
// create the menu as required
|
// create the menu as required
|
||||||
if (contextMnu2 == 0)
|
searchRemoveAct = new QAction(QIcon(IMAGE_REMOVE), tr( "Remove" ), this );
|
||||||
{
|
connect( searchRemoveAct , SIGNAL( triggered() ), this, SLOT( searchRemove() ) );
|
||||||
contextMnu2 = new QMenu( this );
|
|
||||||
|
|
||||||
searchRemoveAct = new QAction(QIcon(IMAGE_REMOVE), tr( "Remove" ), this );
|
searchRemoveAllAct = new QAction(QIcon(IMAGE_REMOVEALL), tr( "Remove All" ), this );
|
||||||
connect( searchRemoveAct , SIGNAL( triggered() ), this, SLOT( searchRemove() ) );
|
connect( searchRemoveAllAct , SIGNAL( triggered() ), this, SLOT( searchRemoveAll() ) );
|
||||||
|
|
||||||
searchRemoveAllAct = new QAction(QIcon(IMAGE_REMOVEALL), tr( "Remove All" ), this );
|
QMenu contextMnu(this);
|
||||||
connect( searchRemoveAllAct , SIGNAL( triggered() ), this, SLOT( searchRemoveAll() ) );
|
|
||||||
|
|
||||||
contextMnu2->clear();
|
contextMnu.addAction( searchRemoveAct);
|
||||||
contextMnu2->addAction( searchRemoveAct);
|
contextMnu.addAction( searchRemoveAllAct);
|
||||||
contextMnu2->addAction( searchRemoveAllAct);
|
|
||||||
}
|
|
||||||
|
|
||||||
QMouseEvent *mevent2 = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
contextMnu.exec(QCursor::pos());
|
||||||
contextMnu2->exec( mevent2->globalPos() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** remove selected search result **/
|
/** remove selected search result **/
|
||||||
|
|
|
@ -106,11 +106,6 @@ private:
|
||||||
/** the advanced search dialog instance */
|
/** the advanced search dialog instance */
|
||||||
AdvancedSearchDialog * advSearchDialog;
|
AdvancedSearchDialog * advSearchDialog;
|
||||||
|
|
||||||
/** Define the popup menus for the Context menu */
|
|
||||||
QMenu* contextMnu;
|
|
||||||
|
|
||||||
QMenu* contextMnu2;
|
|
||||||
|
|
||||||
/** Defines the actions for the context menu */
|
/** Defines the actions for the context menu */
|
||||||
QAction* downloadAct;
|
QAction* downloadAct;
|
||||||
QAction* copysearchlinkAct;
|
QAction* copysearchlinkAct;
|
||||||
|
|
|
@ -23,13 +23,6 @@
|
||||||
#include "rsiface/rsfiles.h"
|
#include "rsiface/rsfiles.h"
|
||||||
|
|
||||||
#include <QContextMenuEvent>
|
#include <QContextMenuEvent>
|
||||||
#include <QMenu>
|
|
||||||
#include <QCheckBox>
|
|
||||||
#include <QCursor>
|
|
||||||
#include <QPoint>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QHeaderView>
|
|
||||||
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
|
|
|
@ -28,8 +28,6 @@
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QCursor>
|
#include <QCursor>
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
@ -77,15 +75,13 @@ ShareManager::~ShareManager()
|
||||||
void ShareManager::shareddirListCostumPopupMenu( QPoint point )
|
void ShareManager::shareddirListCostumPopupMenu( QPoint point )
|
||||||
{
|
{
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
removeAct = new QAction(QIcon(IMAGE_CANCEL), tr( "Remove" ), this );
|
removeAct = new QAction(QIcon(IMAGE_CANCEL), tr( "Remove" ), this );
|
||||||
connect( removeAct , SIGNAL( triggered() ), this, SLOT( removeShareDirectory() ) );
|
connect( removeAct , SIGNAL( triggered() ), this, SLOT( removeShareDirectory() ) );
|
||||||
|
|
||||||
|
|
||||||
contextMnu.clear();
|
|
||||||
contextMnu.addAction( removeAct );
|
contextMnu.addAction( removeAct );
|
||||||
contextMnu.exec( mevent->globalPos() );
|
|
||||||
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Loads the settings for this page */
|
/** Loads the settings for this page */
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QCursor>
|
#include <QCursor>
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
@ -222,9 +221,6 @@ void SharedFilesDialog::forceCheck()
|
||||||
|
|
||||||
void SharedFilesDialog::shareddirtreeviewCostumPopupMenu( QPoint point )
|
void SharedFilesDialog::shareddirtreeviewCostumPopupMenu( QPoint point )
|
||||||
{
|
{
|
||||||
QMenu contextMnu( this );
|
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
downloadAct = new QAction(QIcon(IMAGE_DOWNLOAD), tr( "Download" ), this );
|
downloadAct = new QAction(QIcon(IMAGE_DOWNLOAD), tr( "Download" ), this );
|
||||||
connect( downloadAct , SIGNAL( triggered() ), this, SLOT( downloadRemoteSelected() ) );
|
connect( downloadAct , SIGNAL( triggered() ), this, SLOT( downloadRemoteSelected() ) );
|
||||||
|
|
||||||
|
@ -239,13 +235,14 @@ void SharedFilesDialog::shareddirtreeviewCostumPopupMenu( QPoint point )
|
||||||
// connect( addMsgAct , SIGNAL( triggered() ), this, SLOT( addMsgRemoteSelected() ) );
|
// connect( addMsgAct , SIGNAL( triggered() ), this, SLOT( addMsgRemoteSelected() ) );
|
||||||
|
|
||||||
|
|
||||||
contextMnu.clear();
|
QMenu contextMnu( this );
|
||||||
contextMnu.addAction( downloadAct);
|
contextMnu.addAction( downloadAct);
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction( copyremotelinkAct);
|
contextMnu.addAction( copyremotelinkAct);
|
||||||
contextMnu.addAction( sendremotelinkAct);
|
contextMnu.addAction( sendremotelinkAct);
|
||||||
// contextMnu.addAction( addMsgAct);
|
// contextMnu.addAction( addMsgAct);
|
||||||
contextMnu.exec( mevent->globalPos() );
|
|
||||||
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -721,8 +718,7 @@ void SharedFilesDialog::sharedDirTreeWidgetContextMenu( QPoint point )
|
||||||
contextMnu2.addMenu( &msgMenu);
|
contextMnu2.addMenu( &msgMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
QMouseEvent mevent2( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
contextMnu2.exec(QCursor::pos());
|
||||||
contextMnu2.exec( mevent2.globalPos() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QCursor>
|
#include <QCursor>
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
|
@ -276,9 +275,6 @@ TransfersDialog::TransfersDialog(QWidget *parent)
|
||||||
|
|
||||||
void TransfersDialog::downloadListCostumPopupMenu( QPoint point )
|
void TransfersDialog::downloadListCostumPopupMenu( QPoint point )
|
||||||
{
|
{
|
||||||
QMenu contextMnu( this );
|
|
||||||
QMouseEvent mevent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
std::set<QStandardItem *> items;
|
std::set<QStandardItem *> items;
|
||||||
std::set<QStandardItem *>::iterator it;
|
std::set<QStandardItem *>::iterator it;
|
||||||
getIdOfSelectedItems(items);
|
getIdOfSelectedItems(items);
|
||||||
|
@ -331,7 +327,7 @@ void TransfersDialog::downloadListCostumPopupMenu( QPoint point )
|
||||||
chunkMenu.addAction(chunkStreamingAct);
|
chunkMenu.addAction(chunkStreamingAct);
|
||||||
chunkMenu.addAction(chunkRandomAct);
|
chunkMenu.addAction(chunkRandomAct);
|
||||||
|
|
||||||
contextMnu.clear();
|
QMenu contextMnu( this );
|
||||||
|
|
||||||
if (addPlayOption)
|
if (addPlayOption)
|
||||||
contextMnu.addAction(playAct);
|
contextMnu.addAction(playAct);
|
||||||
|
@ -414,7 +410,7 @@ void TransfersDialog::downloadListCostumPopupMenu( QPoint point )
|
||||||
|
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
|
|
||||||
contextMnu.exec( mevent.globalPos() );
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
TransfersDialog::~TransfersDialog()
|
TransfersDialog::~TransfersDialog()
|
||||||
|
|
|
@ -133,8 +133,6 @@ private:
|
||||||
/** Create the actions on the tray menu or menubar */
|
/** Create the actions on the tray menu or menubar */
|
||||||
void createActions();
|
void createActions();
|
||||||
|
|
||||||
/** Define the popup menus for the Context menu */
|
|
||||||
QMenu* contextMnu;
|
|
||||||
/** Defines the actions for the context menu */
|
/** Defines the actions for the context menu */
|
||||||
QAction* showdowninfoAct;
|
QAction* showdowninfoAct;
|
||||||
QAction* playAct;
|
QAction* playAct;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QMenu>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <rsiface/rsturtle.h>
|
#include <rsiface/rsturtle.h>
|
||||||
#include "TurtleRouterDialog.h"
|
#include "TurtleRouterDialog.h"
|
||||||
|
|
||||||
|
|
|
@ -26,18 +26,6 @@
|
||||||
#include <gui/RetroShareLink.h>
|
#include <gui/RetroShareLink.h>
|
||||||
#include "rshare.h"
|
#include "rshare.h"
|
||||||
|
|
||||||
#include <QTextCodec>
|
|
||||||
#include <QTextEdit>
|
|
||||||
#include <QToolBar>
|
|
||||||
#include <QTextCursor>
|
|
||||||
#include <QTextList>
|
|
||||||
#include <QString>
|
|
||||||
#include <QtDebug>
|
|
||||||
#include <QIcon>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QHashIterator>
|
|
||||||
#include <QDesktopServices>
|
|
||||||
|
|
||||||
#include "rsiface/rspeers.h"
|
#include "rsiface/rspeers.h"
|
||||||
#include "rsiface/rsmsgs.h"
|
#include "rsiface/rsmsgs.h"
|
||||||
#include "rsiface/rsfiles.h"
|
#include "rsiface/rsfiles.h"
|
||||||
|
@ -169,8 +157,7 @@ void PopupChatDialog::contextMenu( QPoint point )
|
||||||
QMenu contextMnu(this);
|
QMenu contextMnu(this);
|
||||||
contextMnu.addAction( pasteLinkAct);
|
contextMnu.addAction( pasteLinkAct);
|
||||||
|
|
||||||
QMouseEvent mevent(QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier);
|
contextMnu.exec(QCursor::pos());
|
||||||
contextMnu.exec( mevent.globalPos() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopupChatDialog::resetStatusBar()
|
void PopupChatDialog::resetStatusBar()
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QCursor>
|
#include <QCursor>
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QMouseEvent>
|
|
||||||
|
|
||||||
#include "edge.h"
|
#include "edge.h"
|
||||||
#include "arrow.h"
|
#include "arrow.h"
|
||||||
|
|
|
@ -25,25 +25,6 @@
|
||||||
|
|
||||||
#include <gui/RetroShareLink.h>
|
#include <gui/RetroShareLink.h>
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QFileDialog>
|
|
||||||
#include <QString>
|
|
||||||
#include <QTextStream>
|
|
||||||
#include <QHashIterator>
|
|
||||||
#include <QDesktopServices>
|
|
||||||
#include <QTextCodec>
|
|
||||||
#include <QTextEdit>
|
|
||||||
#include <QTextCursor>
|
|
||||||
#include <QTextList>
|
|
||||||
#include <QString>
|
|
||||||
#include <QtDebug>
|
|
||||||
#include <QIcon>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QContextMenuEvent>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QCursor>
|
|
||||||
#include <QPoint>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
|
||||||
|
|
||||||
#include "rsiface/rsforums.h"
|
#include "rsiface/rsforums.h"
|
||||||
#include "rsiface/rsfiles.h"
|
#include "rsiface/rsfiles.h"
|
||||||
|
@ -100,8 +81,7 @@ void CreateForumMsg::forumMessageCostumPopupMenu( QPoint point )
|
||||||
contextMnu->addAction( pasteLinkAct);
|
contextMnu->addAction( pasteLinkAct);
|
||||||
contextMnu->addAction( pasteLinkFullAct);
|
contextMnu->addAction( pasteLinkFullAct);
|
||||||
|
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
contextMnu->exec(QCursor::pos());
|
||||||
contextMnu->exec( mevent->globalPos() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,29 +33,7 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QContextMenuEvent>
|
|
||||||
#include <QCloseEvent>
|
|
||||||
#include <QColorDialog>
|
|
||||||
#include <QClipboard>
|
|
||||||
#include <QFile>
|
|
||||||
#include <QFileDialog>
|
|
||||||
#include <QFileInfo>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QCursor>
|
|
||||||
#include <QPoint>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QPrintDialog>
|
|
||||||
#include <QPrinter>
|
|
||||||
#include <QHeaderView>
|
|
||||||
#include <QTextCharFormat>
|
|
||||||
#include <QTextCodec>
|
|
||||||
#include <QTextEdit>
|
|
||||||
#include <QTextCursor>
|
|
||||||
#include <QTextList>
|
|
||||||
#include <QTextStream>
|
|
||||||
#include <QTextDocumentFragment>
|
|
||||||
|
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
|
|
|
@ -25,16 +25,7 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <QContextMenuEvent>
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QFile>
|
|
||||||
#include <QFileDialog>
|
|
||||||
#include <QCursor>
|
|
||||||
#include <QPoint>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QPrintDialog>
|
|
||||||
|
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
|
@ -60,9 +51,7 @@ ProfileEdit::ProfileEdit(QWidget *parent)
|
||||||
|
|
||||||
void ProfileEdit::profileCustomPopupMenu( QPoint point )
|
void ProfileEdit::profileCustomPopupMenu( QPoint point )
|
||||||
{
|
{
|
||||||
|
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
QAction *removeAct = new QAction( tr( "Remove Profile Entry" ), this );
|
QAction *removeAct = new QAction( tr( "Remove Profile Entry" ), this );
|
||||||
QAction *moveupAct = new QAction( tr( "Move Profile Entry Up" ), this );
|
QAction *moveupAct = new QAction( tr( "Move Profile Entry Up" ), this );
|
||||||
|
@ -72,11 +61,11 @@ void ProfileEdit::profileCustomPopupMenu( QPoint point )
|
||||||
connect( moveupAct , SIGNAL( triggered() ), this, SLOT( profileEntryMoveUp() ) );
|
connect( moveupAct , SIGNAL( triggered() ), this, SLOT( profileEntryMoveUp() ) );
|
||||||
connect( movedownAct , SIGNAL( triggered() ), this, SLOT( profileEntryMoveDown() ) );
|
connect( movedownAct , SIGNAL( triggered() ), this, SLOT( profileEntryMoveDown() ) );
|
||||||
|
|
||||||
contextMnu.clear();
|
|
||||||
contextMnu.addAction( removeAct );
|
contextMnu.addAction( removeAct );
|
||||||
contextMnu.addAction( moveupAct );
|
contextMnu.addAction( moveupAct );
|
||||||
contextMnu.addAction( movedownAct );
|
contextMnu.addAction( movedownAct );
|
||||||
contextMnu.exec( mevent->globalPos() );
|
|
||||||
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfileEdit::clear()
|
void ProfileEdit::clear()
|
||||||
|
|
|
@ -27,16 +27,16 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <QContextMenuEvent>
|
//#include <QContextMenuEvent>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QFile>
|
//#include <QFile>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QCursor>
|
//#include <QCursor>
|
||||||
#include <QPoint>
|
//#include <QPoint>
|
||||||
#include <QMouseEvent>
|
//#include <QMouseEvent>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPixmap>
|
//#include <QPixmap>
|
||||||
#include <QPrintDialog>
|
//#include <QPrintDialog>
|
||||||
|
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
|
@ -72,7 +72,6 @@ void ProfileView::imageCustomPopupMenu( QPoint point )
|
||||||
}
|
}
|
||||||
|
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
QAction *clearImageAct = new QAction( tr( "Clear Photo" ), this );
|
QAction *clearImageAct = new QAction( tr( "Clear Photo" ), this );
|
||||||
QAction *changeImageAct = new QAction( tr( "Change Photo" ), this );
|
QAction *changeImageAct = new QAction( tr( "Change Photo" ), this );
|
||||||
|
@ -80,10 +79,10 @@ void ProfileView::imageCustomPopupMenu( QPoint point )
|
||||||
connect( clearImageAct , SIGNAL( triggered() ), this, SLOT( clearimage() ) );
|
connect( clearImageAct , SIGNAL( triggered() ), this, SLOT( clearimage() ) );
|
||||||
connect( changeImageAct , SIGNAL( triggered() ), this, SLOT( selectimagefile() ) );
|
connect( changeImageAct , SIGNAL( triggered() ), this, SLOT( selectimagefile() ) );
|
||||||
|
|
||||||
contextMnu.clear();
|
|
||||||
contextMnu.addAction( clearImageAct );
|
contextMnu.addAction( clearImageAct );
|
||||||
contextMnu.addAction( changeImageAct );
|
contextMnu.addAction( changeImageAct );
|
||||||
contextMnu.exec( mevent->globalPos() );
|
|
||||||
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,30 +94,24 @@ void ProfileView::profileCustomPopupMenu( QPoint point )
|
||||||
}
|
}
|
||||||
|
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
QAction *editAct = new QAction( tr( "Edit Profile" ), this );
|
QAction *editAct = new QAction( tr( "Edit Profile" ), this );
|
||||||
|
|
||||||
connect( editAct , SIGNAL( triggered() ), this, SLOT( profileEdit() ) );
|
connect( editAct , SIGNAL( triggered() ), this, SLOT( profileEdit() ) );
|
||||||
|
|
||||||
contextMnu.clear();
|
|
||||||
contextMnu.addAction( editAct );
|
contextMnu.addAction( editAct );
|
||||||
contextMnu.exec( mevent->globalPos() );
|
|
||||||
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfileView::fileCustomPopupMenu( QPoint point )
|
void ProfileView::fileCustomPopupMenu( QPoint point )
|
||||||
{
|
{
|
||||||
|
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
QAction *downloadAct = NULL;
|
QAction *downloadAct = NULL;
|
||||||
QAction *downloadAllAct = NULL;
|
QAction *downloadAllAct = NULL;
|
||||||
QAction *removeAct = NULL;
|
QAction *removeAct = NULL;
|
||||||
QAction *clearAct = NULL;
|
QAction *clearAct = NULL;
|
||||||
|
|
||||||
contextMnu.clear();
|
|
||||||
|
|
||||||
if (mIsOwnId)
|
if (mIsOwnId)
|
||||||
{
|
{
|
||||||
removeAct = new QAction( tr( "Remove Favourite" ), this );
|
removeAct = new QAction( tr( "Remove Favourite" ), this );
|
||||||
|
@ -140,7 +133,7 @@ void ProfileView::fileCustomPopupMenu( QPoint point )
|
||||||
contextMnu.addAction( downloadAllAct );
|
contextMnu.addAction( downloadAllAct );
|
||||||
}
|
}
|
||||||
|
|
||||||
contextMnu.exec( mevent->globalPos() );
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
#include <QContextMenuEvent>
|
#include <QContextMenuEvent>
|
||||||
#include <QCursor>
|
#include <QCursor>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -126,7 +124,6 @@ void BlogsDialog::blogListCustomPopupMenu( QPoint point )
|
||||||
}
|
}
|
||||||
|
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
|
||||||
|
|
||||||
QAction *createblogpostAct = new QAction(QIcon(":/images/mail_reply.png"), tr( "Post to Blog" ), this );
|
QAction *createblogpostAct = new QAction(QIcon(":/images/mail_reply.png"), tr( "Post to Blog" ), this );
|
||||||
connect( createblogpostAct , SIGNAL( triggered() ), this, SLOT( createMsg() ) );
|
connect( createblogpostAct , SIGNAL( triggered() ), this, SLOT( createMsg() ) );
|
||||||
|
@ -161,9 +158,7 @@ void BlogsDialog::blogListCustomPopupMenu( QPoint point )
|
||||||
contextMnu.addAction( blogdetailsAct );
|
contextMnu.addAction( blogdetailsAct );
|
||||||
}
|
}
|
||||||
|
|
||||||
contextMnu.exec( mevent->globalPos() );
|
contextMnu.exec(QCursor::pos());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlogsDialog::createBlog()
|
void BlogsDialog::createBlog()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue