mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-20 13:24:33 -05: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 "profile/ProfileView.h"
|
||||
#include "profile/ProfileWidget.h"
|
||||
#include "profile/StatusMessage.h"
|
||||
|
||||
#include "GenCertDialog.h"
|
||||
#include "gui/connect/ConnectFriendWizard.h"
|
||||
|
||||
@ -87,6 +89,9 @@ PeersDialog::PeersDialog(QWidget *parent)
|
||||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
/* Create RshareSettings object */
|
||||
_settings = new RshareSettings();
|
||||
|
||||
last_status_send_time = 0 ;
|
||||
|
||||
@ -94,6 +99,7 @@ PeersDialog::PeersDialog(QWidget *parent)
|
||||
connect( ui.peertreeWidget, SIGNAL( itemDoubleClicked ( QTreeWidgetItem *, int)), this, SLOT(chatfriend()));
|
||||
|
||||
connect( ui.avatartoolButton, SIGNAL(clicked()), SLOT(getAvatar()));
|
||||
connect( ui.mypersonalstatuslabel, SIGNAL(clicked()), SLOT(statusmessage()));
|
||||
|
||||
/* hide the Tree +/- */
|
||||
ui.peertreeWidget -> setRootIsDecorated( false );
|
||||
@ -175,10 +181,11 @@ PeersDialog::PeersDialog(QWidget *parent)
|
||||
menu->addSeparator();
|
||||
menu->addAction(ui.actionCreate_new_Profile);
|
||||
ui.menupushButton->setMenu(menu);
|
||||
|
||||
|
||||
updateAvatar();
|
||||
loadmypersonalstatus();
|
||||
|
||||
|
||||
|
||||
/* Hide platform specific features */
|
||||
#ifdef Q_WS_WIN
|
||||
@ -329,7 +336,7 @@ void PeersDialog::insertPeers()
|
||||
item -> setTextAlignment(1, Qt::AlignCenter | Qt::AlignVCenter );
|
||||
|
||||
/* (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)));
|
||||
|
||||
/* (2) Auto Connect */
|
||||
@ -1364,3 +1371,9 @@ void PeersDialog::loadmypersonalstatus()
|
||||
|
||||
ui.mypersonalstatuslabel->setText(QString::fromStdString(rsMsgs->getCustomStateString()));
|
||||
}
|
||||
|
||||
void PeersDialog::statusmessage()
|
||||
{
|
||||
static StatusMessage *statusmsgdialog = new StatusMessage();
|
||||
statusmsgdialog->show();
|
||||
}
|
||||
|
@ -108,6 +108,8 @@ class PeersDialog : public MainPage
|
||||
void insertSendList();
|
||||
void checkChat();
|
||||
void sendMsg();
|
||||
|
||||
void statusmessage();
|
||||
|
||||
//void privchat();
|
||||
|
||||
|
@ -700,10 +700,13 @@ background: white;}</string>
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</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">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -737,61 +740,33 @@ background: white;}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="nicklabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>42</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QLabel" name="nicklabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>42</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<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:'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>
|
||||
</property>
|
||||
</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>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -804,6 +779,37 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</spacer>
|
||||
</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>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user