mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-15 12:32:37 -04:00
Added new ProfileView and ProfileEdit to Blog Feed.
Added Context menus to BlogDialog to open windows. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@588 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
4a58c71f9e
commit
9f8f0e46f5
9 changed files with 1600 additions and 548 deletions
|
@ -25,6 +25,8 @@
|
|||
#include "rsiface/rsQblog.h"
|
||||
#include "rsiface/rspeers.h" //to retrieve peer/usrId info
|
||||
|
||||
#include "profile/ProfileView.h"
|
||||
|
||||
/** Constructor */
|
||||
BlogDialog::BlogDialog(QWidget *parent)
|
||||
: MainPage (parent)
|
||||
|
@ -38,7 +40,9 @@ BlogDialog::BlogDialog(QWidget *parent)
|
|||
connect(underlineBtn, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||
connect(italicBtn, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||
connect(refreshBtn, SIGNAL(clicked()), this, SLOT(update()));
|
||||
|
||||
|
||||
connect(userList, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( peerCustomPopupMenu( QPoint ) ) );
|
||||
|
||||
/* Current Font */
|
||||
mCurrentFont = QFont("Comic Sans MS", 8);
|
||||
|
||||
|
@ -48,6 +52,55 @@ BlogDialog::BlogDialog(QWidget *parent)
|
|||
}
|
||||
|
||||
|
||||
void BlogDialog::peerCustomPopupMenu( QPoint point )
|
||||
{
|
||||
/*
|
||||
*/
|
||||
|
||||
QMenu contextMnu( this );
|
||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
||||
|
||||
QAction *profileAct = new QAction( tr( "Show Profile" ), this );
|
||||
QAction *onlyoneAct = new QAction( tr( "Show Only This Blog" ), this );
|
||||
QAction *allAct = new QAction( tr( "Show All Blogs" ), this );
|
||||
|
||||
connect( profileAct , SIGNAL( triggered() ), this, SLOT( showuserprofile() ) );
|
||||
connect( onlyoneAct , SIGNAL( triggered() ), this, SLOT( showoneblog() ) );
|
||||
connect( allAct , SIGNAL( triggered() ), this, SLOT( showallblogs() ) );
|
||||
|
||||
contextMnu.clear();
|
||||
contextMnu.addAction( profileAct );
|
||||
contextMnu.addAction( onlyoneAct );
|
||||
contextMnu.addAction( allAct );
|
||||
contextMnu.exec( mevent->globalPos() );
|
||||
|
||||
}
|
||||
|
||||
void BlogDialog::showuserprofile()
|
||||
{
|
||||
showprofile("");
|
||||
}
|
||||
|
||||
void BlogDialog::showprofile(std::string id)
|
||||
{
|
||||
static ProfileView *oneProfile = new ProfileView(NULL);
|
||||
|
||||
oneProfile -> setPeerId(id);
|
||||
oneProfile -> show();
|
||||
}
|
||||
|
||||
void BlogDialog::showoneblog()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void BlogDialog::showallblogs()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void BlogDialog::sendBlog()
|
||||
{
|
||||
QString blogMsg = lineEdit->toPlainText();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue