mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added functionality to edit your own Personal message on Label click
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1724 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b47fc8ce4b
commit
d9d77c0cef
@ -36,6 +36,8 @@
|
|||||||
#include "connect/ConfCertDialog.h"
|
#include "connect/ConfCertDialog.h"
|
||||||
#include "profile/ProfileView.h"
|
#include "profile/ProfileView.h"
|
||||||
#include "profile/ProfileWidget.h"
|
#include "profile/ProfileWidget.h"
|
||||||
|
#include "profile/StatusMessage.h"
|
||||||
|
|
||||||
#include "GenCertDialog.h"
|
#include "GenCertDialog.h"
|
||||||
#include "gui/connect/ConnectFriendWizard.h"
|
#include "gui/connect/ConnectFriendWizard.h"
|
||||||
|
|
||||||
@ -88,12 +90,16 @@ PeersDialog::PeersDialog(QWidget *parent)
|
|||||||
/* Invoke the Qt Designer generated object setup routine */
|
/* Invoke the Qt Designer generated object setup routine */
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
|
|
||||||
|
/* Create RshareSettings object */
|
||||||
|
_settings = new RshareSettings();
|
||||||
|
|
||||||
last_status_send_time = 0 ;
|
last_status_send_time = 0 ;
|
||||||
|
|
||||||
connect( ui.peertreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( peertreeWidgetCostumPopupMenu( QPoint ) ) );
|
connect( ui.peertreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( peertreeWidgetCostumPopupMenu( QPoint ) ) );
|
||||||
connect( ui.peertreeWidget, SIGNAL( itemDoubleClicked ( QTreeWidgetItem *, int)), this, SLOT(chatfriend()));
|
connect( ui.peertreeWidget, SIGNAL( itemDoubleClicked ( QTreeWidgetItem *, int)), this, SLOT(chatfriend()));
|
||||||
|
|
||||||
connect( ui.avatartoolButton, SIGNAL(clicked()), SLOT(getAvatar()));
|
connect( ui.avatartoolButton, SIGNAL(clicked()), SLOT(getAvatar()));
|
||||||
|
connect( ui.mypersonalstatuslabel, SIGNAL(clicked()), SLOT(statusmessage()));
|
||||||
|
|
||||||
/* hide the Tree +/- */
|
/* hide the Tree +/- */
|
||||||
ui.peertreeWidget -> setRootIsDecorated( false );
|
ui.peertreeWidget -> setRootIsDecorated( false );
|
||||||
@ -176,6 +182,7 @@ PeersDialog::PeersDialog(QWidget *parent)
|
|||||||
menu->addAction(ui.actionCreate_new_Profile);
|
menu->addAction(ui.actionCreate_new_Profile);
|
||||||
ui.menupushButton->setMenu(menu);
|
ui.menupushButton->setMenu(menu);
|
||||||
|
|
||||||
|
|
||||||
updateAvatar();
|
updateAvatar();
|
||||||
loadmypersonalstatus();
|
loadmypersonalstatus();
|
||||||
|
|
||||||
@ -329,7 +336,7 @@ void PeersDialog::insertPeers()
|
|||||||
item -> setTextAlignment(1, Qt::AlignCenter | Qt::AlignVCenter );
|
item -> setTextAlignment(1, Qt::AlignCenter | Qt::AlignVCenter );
|
||||||
|
|
||||||
/* (1) Person */
|
/* (1) Person */
|
||||||
item -> setText( 2, QString::fromStdString(detail.name) + tr(" ") + tr(" - ") +
|
item -> setText( 2, QString::fromStdString(detail.name) + tr(" - ") +
|
||||||
QString::fromStdString(rsMsgs->getCustomStateString(detail.id)));
|
QString::fromStdString(rsMsgs->getCustomStateString(detail.id)));
|
||||||
|
|
||||||
/* (2) Auto Connect */
|
/* (2) Auto Connect */
|
||||||
@ -1364,3 +1371,9 @@ void PeersDialog::loadmypersonalstatus()
|
|||||||
|
|
||||||
ui.mypersonalstatuslabel->setText(QString::fromStdString(rsMsgs->getCustomStateString()));
|
ui.mypersonalstatuslabel->setText(QString::fromStdString(rsMsgs->getCustomStateString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PeersDialog::statusmessage()
|
||||||
|
{
|
||||||
|
static StatusMessage *statusmsgdialog = new StatusMessage();
|
||||||
|
statusmsgdialog->show();
|
||||||
|
}
|
||||||
|
@ -109,6 +109,8 @@ class PeersDialog : public MainPage
|
|||||||
void checkChat();
|
void checkChat();
|
||||||
void sendMsg();
|
void sendMsg();
|
||||||
|
|
||||||
|
void statusmessage();
|
||||||
|
|
||||||
//void privchat();
|
//void privchat();
|
||||||
|
|
||||||
void setFont();
|
void setFont();
|
||||||
|
@ -700,10 +700,13 @@ background: white;}</string>
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<property name="topMargin">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0" rowspan="2">
|
||||||
<widget class="QToolButton" name="avatartoolButton">
|
<widget class="QToolButton" name="avatartoolButton">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@ -737,61 +740,33 @@ background: white;}</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1" colspan="2">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QLabel" name="nicklabel">
|
||||||
<item>
|
<property name="minimumSize">
|
||||||
<widget class="QLabel" name="nicklabel">
|
<size>
|
||||||
<property name="minimumSize">
|
<width>0</width>
|
||||||
<size>
|
<height>32</height>
|
||||||
<width>0</width>
|
</size>
|
||||||
<height>32</height>
|
</property>
|
||||||
</size>
|
<property name="maximumSize">
|
||||||
</property>
|
<size>
|
||||||
<property name="maximumSize">
|
<width>16777215</width>
|
||||||
<size>
|
<height>42</height>
|
||||||
<width>16777215</width>
|
</size>
|
||||||
<height>42</height>
|
</property>
|
||||||
</size>
|
<property name="styleSheet">
|
||||||
</property>
|
<string notr="true"/>
|
||||||
<property name="styleSheet">
|
</property>
|
||||||
<string notr="true"/>
|
<property name="text">
|
||||||
</property>
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<property name="text">
|
|
||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; color:#00aa00;">nickname (me)</span></p></body></html></string>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; color:#00aa00;">nickname (me)</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="mypersonalstatuslabel">
|
|
||||||
<property name="text">
|
|
||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">mypersonalstatus</span></p></body></html></string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>98</width>
|
|
||||||
<height>18</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="3">
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -804,6 +779,37 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QPushButton" name="mypersonalstatuslabel">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Edit Personal message</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"> QPushButton:hover {
|
||||||
|
border: 1px solid #CCCCCC;
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2" colspan="2">
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>277</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user