mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 11:16:34 -04:00
Merge pull request #1487 from defnax2k/People-V2-improvements
Added more actions to People V2 Thumbed View
This commit is contained in:
commit
8b3f3fe717
5 changed files with 257 additions and 97 deletions
|
@ -52,6 +52,11 @@ IdentityWidget::IdentityWidget(QString name/*=QString()*/, QWidget *parent/*=0*/
|
||||||
ui->labelGXSId->setToolTip(_keyId);
|
ui->labelGXSId->setToolTip(_keyId);
|
||||||
ui->labelGXSId->setVisible(false);
|
ui->labelGXSId->setVisible(false);
|
||||||
|
|
||||||
|
ui->labelPositive->setVisible(false);
|
||||||
|
ui->labelNegative->setVisible(false);
|
||||||
|
ui->label_PosIcon_2->setVisible(false);
|
||||||
|
ui->label_NegIcon_2->setVisible(false);
|
||||||
|
|
||||||
ui->pbAdd->setVisible(false);
|
ui->pbAdd->setVisible(false);
|
||||||
QObject::connect(ui->pbAdd, SIGNAL(clicked()), this, SLOT(pbAdd_clicked()));
|
QObject::connect(ui->pbAdd, SIGNAL(clicked()), this, SLOT(pbAdd_clicked()));
|
||||||
|
|
||||||
|
@ -80,19 +85,19 @@ void IdentityWidget::updateData(const RsGxsIdGroup &gxs_group_info)
|
||||||
_group_info = gxs_group_info;
|
_group_info = gxs_group_info;
|
||||||
_haveGXSId = true;
|
_haveGXSId = true;
|
||||||
|
|
||||||
m_myName = QString::fromUtf8(_group_info.mMeta.mGroupName.c_str());
|
RsReputations::ReputationInfo info ;
|
||||||
ui->labelName->setText(m_myName);
|
rsReputations->getReputationInfo(RsGxsId(_group_info.mMeta.mGroupId),_group_info.mPgpId,info) ;
|
||||||
if (_havePGPDetail) {
|
|
||||||
ui->labelName->setToolTip(tr("GXS name:").append(" "+m_myName).append("\n")
|
|
||||||
.append(tr("PGP name:").append(" "+_nickname)));
|
|
||||||
} else {//if (m_myName != _nickname)
|
|
||||||
ui->labelName->setToolTip(tr("GXS name:").append(" "+m_myName));
|
|
||||||
}//else (m_myName != _nickname)
|
|
||||||
|
|
||||||
|
m_myName = QString::fromUtf8(_group_info.mMeta.mGroupName.c_str());
|
||||||
|
//ui->labelName->setId(RsGxsId(_group_info.mMeta.mGroupId));
|
||||||
|
ui->labelName->setText(m_myName);
|
||||||
|
|
||||||
_gxsId = QString::fromStdString(_group_info.mMeta.mGroupId.toStdString());
|
_gxsId = QString::fromStdString(_group_info.mMeta.mGroupId.toStdString());
|
||||||
|
ui->labelGXSId->setId(RsGxsId(_group_info.mMeta.mGroupId));
|
||||||
ui->labelGXSId->setText(_gxsId);
|
ui->labelGXSId->setText(_gxsId);
|
||||||
ui->labelGXSId->setToolTip(tr("GXS id:").append(" "+_gxsId));
|
|
||||||
|
ui->labelPositive->setText(QString::number(info.mFriendsPositiveVotes));
|
||||||
|
ui->labelNegative->setText(QString::number(info.mFriendsNegativeVotes));
|
||||||
|
|
||||||
if (!_havePGPDetail) {
|
if (!_havePGPDetail) {
|
||||||
QFont font = ui->labelName->font();
|
QFont font = ui->labelName->font();
|
||||||
|
@ -100,8 +105,8 @@ void IdentityWidget::updateData(const RsGxsIdGroup &gxs_group_info)
|
||||||
ui->labelName->setFont(font);
|
ui->labelName->setFont(font);
|
||||||
|
|
||||||
_keyId=QString::fromStdString(_group_info.mMeta.mGroupId.toStdString());
|
_keyId=QString::fromStdString(_group_info.mMeta.mGroupId.toStdString());
|
||||||
|
ui->labelKeyId->setId(RsGxsId(_group_info.mMeta.mGroupId));
|
||||||
ui->labelKeyId->setText(_keyId);
|
ui->labelKeyId->setText(_keyId);
|
||||||
ui->labelKeyId->setToolTip(tr("GXS id:").append(" "+_keyId));
|
|
||||||
ui->labelKeyId->setVisible(false);
|
ui->labelKeyId->setVisible(false);
|
||||||
|
|
||||||
/// (TODO) Get real ident icon
|
/// (TODO) Get real ident icon
|
||||||
|
@ -133,10 +138,10 @@ void IdentityWidget::updateData(const RsPeerDetails &pgp_details)
|
||||||
if (!_haveGXSId) m_myName = _nickname;
|
if (!_haveGXSId) m_myName = _nickname;
|
||||||
ui->labelName->setText(m_myName);
|
ui->labelName->setText(m_myName);
|
||||||
if (_haveGXSId) {
|
if (_haveGXSId) {
|
||||||
ui->labelName->setToolTip(tr("GXS name:").append(" "+m_myName).append("\n")
|
ui->labelName->setToolTip(tr("GXS name:") + (" "+m_myName) + ("\n")
|
||||||
.append(tr("PGP name:").append(" "+_nickname)));
|
+(tr("PGP name:")+(" "+_nickname)));
|
||||||
} else {//if (m_myName != _nickname)
|
} else {//if (m_myName != _nickname)
|
||||||
ui->labelName->setToolTip(tr("PGP name:").append(" "+_nickname));
|
ui->labelName->setToolTip(tr("PGP name:")+(" "+_nickname));
|
||||||
}//else (m_myName != _nickname)
|
}//else (m_myName != _nickname)
|
||||||
|
|
||||||
QFont font = ui->labelName->font();
|
QFont font = ui->labelName->font();
|
||||||
|
@ -145,7 +150,7 @@ void IdentityWidget::updateData(const RsPeerDetails &pgp_details)
|
||||||
|
|
||||||
_keyId = QString::fromStdString(_details.gpg_id.toStdString());
|
_keyId = QString::fromStdString(_details.gpg_id.toStdString());
|
||||||
ui->labelKeyId->setText(_keyId);
|
ui->labelKeyId->setText(_keyId);
|
||||||
ui->labelKeyId->setToolTip(tr("PGP id:").append(" "+_keyId));
|
ui->labelKeyId->setToolTip(tr("PGP id:")+(" "+_keyId));
|
||||||
|
|
||||||
if (!_haveGXSId) {
|
if (!_haveGXSId) {
|
||||||
QPixmap avatar;
|
QPixmap avatar;
|
||||||
|
@ -217,6 +222,10 @@ void IdentityWidget::setIsCurrent(bool value)
|
||||||
m_isCurrent=value;
|
m_isCurrent=value;
|
||||||
ui->labelKeyId->setVisible(value);
|
ui->labelKeyId->setVisible(value);
|
||||||
ui->labelGXSId->setVisible(value && (_haveGXSId && _havePGPDetail));
|
ui->labelGXSId->setVisible(value && (_haveGXSId && _havePGPDetail));
|
||||||
|
ui->labelPositive->setVisible(value);
|
||||||
|
ui->labelNegative->setVisible(value);
|
||||||
|
ui->label_PosIcon_2->setVisible(value);
|
||||||
|
ui->label_NegIcon_2->setVisible(value);
|
||||||
ui->pbAdd->setVisible(value);
|
ui->pbAdd->setVisible(value);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -82,6 +82,8 @@ private:
|
||||||
QString _idtype;
|
QString _idtype;
|
||||||
QString _nickname;
|
QString _nickname;
|
||||||
QString _gxsId;
|
QString _gxsId;
|
||||||
|
QString _postiveVotes;
|
||||||
|
QString _negativeVotes;
|
||||||
|
|
||||||
Ui::IdentityWidget *ui;
|
Ui::IdentityWidget *ui;
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,18 +6,96 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>102</width>
|
<width>101</width>
|
||||||
<height>170</height>
|
<height>272</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="spacing">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="topMargin">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="ElidedLabel" name="labelName">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>15</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Name</string>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="GxsIdLabel" name="labelKeyId">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>15</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>KeyId</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="GxsIdLabel" name="labelGXSId">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>15</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>GXSId</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
<widget class="QGraphicsView" name="graphicsView">
|
<widget class="QGraphicsView" name="graphicsView">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -53,76 +131,89 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="2" column="0">
|
||||||
<widget class="ElidedLabel" name="labelName">
|
<layout class="QHBoxLayout" name="avatarOpinionHLayout_2">
|
||||||
<property name="minimumSize">
|
<property name="spacing">
|
||||||
<size>
|
<number>6</number>
|
||||||
<width>0</width>
|
|
||||||
<height>15</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_PosIcon_2">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>24</width>
|
||||||
<height>16777215</height>
|
<height>24</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Name</string>
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="../icons.qrc">:/icons/png/thumbs-up.png</pixmap>
|
||||||
</property>
|
</property>
|
||||||
<property name="scaledContents">
|
<property name="scaledContents">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
</widget>
|
||||||
<set>Qt::AlignCenter</set>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="labelPositive">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>16</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Positive votes</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>0</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="ElidedLabel" name="labelKeyId">
|
<widget class="Line" name="line_Opinion_2">
|
||||||
<property name="minimumSize">
|
<property name="orientation">
|
||||||
<size>
|
<enum>Qt::Vertical</enum>
|
||||||
<width>0</width>
|
|
||||||
<height>15</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_NegIcon_2">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>24</width>
|
||||||
<height>16777215</height>
|
<height>24</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>KeyId</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="pixmap">
|
||||||
<set>Qt::AlignCenter</set>
|
<pixmap resource="../icons.qrc">:/icons/png/thumbs-down.png</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="ElidedLabel" name="labelGXSId">
|
<widget class="QLabel" name="labelNegative">
|
||||||
<property name="minimumSize">
|
<property name="font">
|
||||||
<size>
|
<font>
|
||||||
<width>0</width>
|
<pointsize>16</pointsize>
|
||||||
<height>15</height>
|
</font>
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="toolTip">
|
||||||
<size>
|
<string>Negative votes</string>
|
||||||
<width>100</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>GXSId</string>
|
<string>0</string>
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" colspan="2">
|
||||||
<widget class="QPushButton" name="pbAdd">
|
<widget class="QPushButton" name="pbAdd">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add</string>
|
<string>Add</string>
|
||||||
|
@ -135,12 +226,18 @@
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>ElidedLabel</class>
|
<class>ElidedLabel</class>
|
||||||
<extends>QLabel</extends>
|
<extends>QLabel</extends>
|
||||||
<header location="global">gui/common/ElidedLabel.h</header>
|
<header>gui/common/ElidedLabel.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>GxsIdLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header>gui/gxs/GxsIdLabel.h</header>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
<include location="../icons.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -23,9 +23,12 @@
|
||||||
#include "gui/common/FlowLayout.h"
|
#include "gui/common/FlowLayout.h"
|
||||||
#include "gui/settings/rsharesettings.h"
|
#include "gui/settings/rsharesettings.h"
|
||||||
#include "gui/msgs/MessageComposer.h"
|
#include "gui/msgs/MessageComposer.h"
|
||||||
|
#include "gui/RetroShareLink.h"
|
||||||
#include "gui/gxs/GxsIdDetails.h"
|
#include "gui/gxs/GxsIdDetails.h"
|
||||||
#include "gui/gxs/RsGxsUpdateBroadcastBase.h"
|
#include "gui/gxs/RsGxsUpdateBroadcastBase.h"
|
||||||
#include "gui/Identity/IdDetailsDialog.h"
|
#include "gui/Identity/IdDetailsDialog.h"
|
||||||
|
#include "gui/Identity/IdDialog.h"
|
||||||
|
#include "gui/MainWindow.h"
|
||||||
|
|
||||||
#include "retroshare/rspeers.h"
|
#include "retroshare/rspeers.h"
|
||||||
#include "retroshare/rsidentity.h"
|
#include "retroshare/rsidentity.h"
|
||||||
|
@ -63,6 +66,8 @@ PeopleDialog::PeopleDialog(QWidget *parent)
|
||||||
|
|
||||||
|
|
||||||
tabWidget->removeTab(1);
|
tabWidget->removeTab(1);
|
||||||
|
//hide circle flow widget not functional yet
|
||||||
|
pictureFlowWidgetExternal->hide();
|
||||||
|
|
||||||
//need erase QtCreator Layout first(for Win)
|
//need erase QtCreator Layout first(for Win)
|
||||||
delete idExternal->layout();
|
delete idExternal->layout();
|
||||||
|
@ -424,6 +429,8 @@ void PeopleDialog::iw_AddButtonClickedExt()
|
||||||
if (dest) {
|
if (dest) {
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
|
|
||||||
|
QMenu *mnu = contextMnu.addMenu(QIcon(":/icons/png/circles.png"),tr("Invite to Circle")) ;
|
||||||
|
|
||||||
std::map<RsGxsGroupId, CircleWidget*>::iterator itCurs;
|
std::map<RsGxsGroupId, CircleWidget*>::iterator itCurs;
|
||||||
for( itCurs =_ext_circles_widgets.begin();
|
for( itCurs =_ext_circles_widgets.begin();
|
||||||
itCurs != _ext_circles_widgets.end();
|
itCurs != _ext_circles_widgets.end();
|
||||||
|
@ -432,7 +439,7 @@ void PeopleDialog::iw_AddButtonClickedExt()
|
||||||
QIcon icon = QIcon(curs->getImage());
|
QIcon icon = QIcon(curs->getImage());
|
||||||
QString name = curs->getName();
|
QString name = curs->getName();
|
||||||
|
|
||||||
QAction *action = contextMnu.addAction(icon, name, this, SLOT(addToCircleExt()));
|
QAction *action = mnu->addAction(icon, name, this, SLOT(addToCircleExt()));
|
||||||
action->setData(QString::fromStdString(curs->groupInfo().mGroupId.toStdString())
|
action->setData(QString::fromStdString(curs->groupInfo().mGroupId.toStdString())
|
||||||
+ ";" + QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
|
+ ";" + QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
|
||||||
}//for( itCurs =_ext_circles_widgets.begin();
|
}//for( itCurs =_ext_circles_widgets.begin();
|
||||||
|
@ -468,9 +475,17 @@ void PeopleDialog::iw_AddButtonClickedExt()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QAction *actionsendmsg = contextMnu.addAction(QIcon(":/images/mail_new.png"), tr("Send message to this person"), this, SLOT(sendMessage()));
|
QAction *actionsendmsg = contextMnu.addAction(QIcon(":/images/mail_new.png"), tr("Send message"), this, SLOT(sendMessage()));
|
||||||
actionsendmsg->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
|
actionsendmsg->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
|
||||||
|
|
||||||
|
QAction *actionsendinvite = contextMnu.addAction(QIcon(":/images/mail_new.png"), tr("Send invite"), this, SLOT(sendInvite()));
|
||||||
|
actionsendinvite->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
|
||||||
|
|
||||||
|
contextMnu.addSeparator();
|
||||||
|
|
||||||
|
QAction *actionaddcontact = contextMnu.addAction(QIcon(":/images/mail_new.png"), tr("Add to Contacts"), this, SLOT(addtoContacts()));
|
||||||
|
actionaddcontact->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
|
||||||
|
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
|
|
||||||
QAction *actionDetails = contextMnu.addAction(QIcon(":/images/info16.png"), tr("Person details"), this, SLOT(personDetails()));
|
QAction *actionDetails = contextMnu.addAction(QIcon(":/images/info16.png"), tr("Person details"), this, SLOT(personDetails()));
|
||||||
|
@ -607,6 +622,36 @@ void PeopleDialog::sendMessage()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PeopleDialog::sendInvite()
|
||||||
|
{
|
||||||
|
QAction *action =
|
||||||
|
qobject_cast<QAction *>(QObject::sender());
|
||||||
|
if (action) {
|
||||||
|
QString data = action->data().toString();
|
||||||
|
|
||||||
|
RsGxsId gxs_id = RsGxsId(data.toStdString());;
|
||||||
|
|
||||||
|
MessageComposer::sendInvite(gxs_id,false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PeopleDialog::addtoContacts()
|
||||||
|
{
|
||||||
|
QAction *action =
|
||||||
|
qobject_cast<QAction *>(QObject::sender());
|
||||||
|
if (action) {
|
||||||
|
QString data = action->data().toString();
|
||||||
|
|
||||||
|
RsGxsId gxs_id = RsGxsId(data.toStdString());;
|
||||||
|
|
||||||
|
rsIdentity->setAsRegularContact(RsGxsId(gxs_id),true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void PeopleDialog::personDetails()
|
void PeopleDialog::personDetails()
|
||||||
{
|
{
|
||||||
QAction *action =
|
QAction *action =
|
||||||
|
@ -620,10 +665,14 @@ void PeopleDialog::personDetails()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IdDetailsDialog *dialog = new IdDetailsDialog(RsGxsGroupId(gxs_id));
|
/* window will destroy itself! */
|
||||||
dialog->show();
|
IdDialog *idDialog = dynamic_cast<IdDialog*>(MainWindow::getPage(MainWindow::People));
|
||||||
|
|
||||||
/* Dialog will destroy itself */
|
if (!idDialog)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
MainWindow::showWindow(MainWindow::People);
|
||||||
|
idDialog->navigate(RsGxsId(gxs_id));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
#include "ui_PeopleDialog.h"
|
#include "ui_PeopleDialog.h"
|
||||||
|
|
||||||
#define IMAGE_IDENTITY ":/icons/friends_128.png"
|
#define IMAGE_IDENTITY ":/icons/png/people.png"
|
||||||
|
|
||||||
class PeopleDialog : public RsGxsUpdateBroadcastPage, public Ui::PeopleDialog, public TokenResponse
|
class PeopleDialog : public RsGxsUpdateBroadcastPage, public Ui::PeopleDialog, public TokenResponse
|
||||||
{
|
{
|
||||||
|
@ -86,6 +86,9 @@ private slots:
|
||||||
void chatIdentity();
|
void chatIdentity();
|
||||||
void sendMessage();
|
void sendMessage();
|
||||||
void personDetails();
|
void personDetails();
|
||||||
|
void sendInvite();
|
||||||
|
void addtoContacts();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void reloadAll();
|
void reloadAll();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue