incorporated defnax changes

This commit is contained in:
csoler 2015-09-08 22:40:35 -04:00
parent 734a308aa3
commit 0769dabb2e
5 changed files with 1767 additions and 1645 deletions

View File

@ -1,199 +1,210 @@
#include "gui/People/IdentityWidget.h" #include "gui/People/IdentityWidget.h"
#include "ui_IdentityWidget.h" #include "ui_IdentityWidget.h"
#include "gui/common/AvatarDefs.h" #include "gui/common/AvatarDefs.h"
#include <gui/gxs/GxsIdDetails.h> #include <gui/gxs/GxsIdDetails.h>
#include <QDrag> #include <QDrag>
#include <QMimeData> #include <QMimeData>
#include <QGraphicsProxyWidget> #include <QGraphicsProxyWidget>
IdentityWidget::IdentityWidget(QString name/*=QString()*/, QWidget *parent/*=0*/) : IdentityWidget::IdentityWidget(QString name/*=QString()*/, QWidget *parent/*=0*/) :
FlowLayoutItem(name, parent), FlowLayoutItem(name, parent),
ui(new Ui::IdentityWidget) ui(new Ui::IdentityWidget)
{ {
ui->setupUi(this); ui->setupUi(this);
_haveGXSId = false; _haveGXSId = false;
_havePGPDetail = false; _havePGPDetail = false;
m_myName = name; m_myName = name;
ui->labelName->setText(m_myName); ui->labelName->setText(m_myName);
ui->labelName->setToolTip(m_myName); ui->labelName->setToolTip(m_myName);
QFont font = ui->labelName->font(); QFont font = ui->labelName->font();
font.setItalic(false); font.setItalic(false);
ui->labelName->setFont(font); ui->labelName->setFont(font);
_keyId=""; _keyId="";
ui->labelKeyId->setText(_keyId); ui->labelKeyId->setText(_keyId);
ui->labelKeyId->setToolTip(_keyId); ui->labelKeyId->setToolTip(_keyId);
ui->labelKeyId->setVisible(false); ui->labelKeyId->setVisible(false);
ui->labelGXSId->setText(_keyId); ui->labelGXSId->setText(_keyId);
ui->labelGXSId->setToolTip(_keyId); ui->labelGXSId->setToolTip(_keyId);
ui->labelGXSId->setVisible(false); ui->labelGXSId->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()));
_scene = new QGraphicsScene(this); _scene = new QGraphicsScene(this);
ui->graphicsView->setScene(_scene); ui->graphicsView->setScene(_scene);
//To grab events //To grab events
ui->graphicsView->setEnabled(false); ui->graphicsView->setEnabled(false);
ui->graphicsView->setAlignment(Qt::AlignLeft | Qt::AlignTop); ui->graphicsView->setAlignment(Qt::AlignLeft | Qt::AlignTop);
setIsCurrent(false); setIsCurrent(false);
setIsSelected(false); setIsSelected(false);
setAcceptDrops(true); setAcceptDrops(true);
} }
IdentityWidget::~IdentityWidget() IdentityWidget::~IdentityWidget()
{ {
delete _scene; delete _scene;
delete ui; delete ui;
} }
void IdentityWidget::updateData(const RsGxsIdGroup &gxs_group_info) void IdentityWidget::updateData(const RsGxsIdGroup &gxs_group_info)
{ {
//if (_group_info != gxs_group_info) { //if (_group_info != 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()); m_myName = QString::fromUtf8(_group_info.mMeta.mGroupName.c_str());
ui->labelName->setText(m_myName); ui->labelName->setText(m_myName);
if (_havePGPDetail) { if (_havePGPDetail) {
ui->labelName->setToolTip(tr("GXS name:").append(" "+m_myName).append("\n") ui->labelName->setToolTip(tr("GXS name:").append(" "+m_myName).append("\n")
.append(tr("PGP name:").append(" "+_nickname))); .append(tr("PGP name:").append(" "+_nickname)));
} else {//if (m_myName != _nickname) } else {//if (m_myName != _nickname)
ui->labelName->setToolTip(tr("GXS name:").append(" "+m_myName)); ui->labelName->setToolTip(tr("GXS name:").append(" "+m_myName));
}//else (m_myName != _nickname) }//else (m_myName != _nickname)
_gxsId = QString::fromStdString(_group_info.mMeta.mGroupId.toStdString()); _gxsId = QString::fromStdString(_group_info.mMeta.mGroupId.toStdString());
ui->labelGXSId->setText(_gxsId); ui->labelGXSId->setText(_gxsId);
ui->labelGXSId->setToolTip(tr("GXS id:").append(" "+_gxsId)); ui->labelGXSId->setToolTip(tr("GXS id:").append(" "+_gxsId));
if (!_havePGPDetail) { if (!_havePGPDetail) {
QFont font = ui->labelName->font(); QFont font = ui->labelName->font();
font.setItalic(false); font.setItalic(false);
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->setText(_keyId); ui->labelKeyId->setText(_keyId);
ui->labelKeyId->setToolTip(tr("GXS id:").append(" "+_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
QImage image = GxsIdDetails::makeDefaultIcon(RsGxsId(_group_info.mMeta.mGroupId)); QImage image;
if (_avatar != image) {
_avatar = image; if(_group_info.mImage.mSize > 0 && image.loadFromData(_group_info.mImage.mData, _group_info.mImage.mSize, "PNG"))
_scene->clear(); image = image;
_scene->addPixmap(QPixmap::fromImage(image.scaled(ui->graphicsView->width(),ui->graphicsView->height()))); else
emit imageUpdated(); image = GxsIdDetails::makeDefaultIcon(RsGxsId(_group_info.mMeta.mGroupId));
}
} if (_avatar != image) {
} _avatar = image;
_scene->clear();
void IdentityWidget::updateData(const RsPeerDetails &pgp_details) _scene->addPixmap(QPixmap::fromImage(image.scaled(ui->graphicsView->width(),ui->graphicsView->height())));
{ emit imageUpdated();
//if (_details != pgp_details) { }//if (_avatar != image)
_details = pgp_details; }//if (!_havePGPDetail)
_havePGPDetail = true;
//}//if (_group_info != gxs_group_info)
_nickname = QString::fromUtf8(_details.name.c_str()); }
if (!_haveGXSId) m_myName = _nickname;
ui->labelName->setText(m_myName); void IdentityWidget::updateData(const RsPeerDetails &pgp_details)
if (_haveGXSId) { {
ui->labelName->setToolTip(tr("GXS name:").append(" "+m_myName).append("\n") //if (_details != pgp_details) {
.append(tr("PGP name:").append(" "+_nickname))); _details = pgp_details;
} else {//if (m_myName != _nickname) _havePGPDetail = true;
ui->labelName->setToolTip(tr("PGP name:").append(" "+_nickname));
}//else (m_myName != _nickname) _nickname = QString::fromUtf8(_details.name.c_str());
if (!_haveGXSId) m_myName = _nickname;
QFont font = ui->labelName->font(); ui->labelName->setText(m_myName);
font.setItalic(true); if (_haveGXSId) {
ui->labelName->setFont(font); ui->labelName->setToolTip(tr("GXS name:").append(" "+m_myName).append("\n")
.append(tr("PGP name:").append(" "+_nickname)));
_keyId = QString::fromStdString(_details.gpg_id.toStdString()); } else {//if (m_myName != _nickname)
ui->labelKeyId->setText(_keyId); ui->labelName->setToolTip(tr("PGP name:").append(" "+_nickname));
ui->labelKeyId->setToolTip(tr("PGP id:").append(" "+_keyId)); }//else (m_myName != _nickname)
QPixmap avatar; QFont font = ui->labelName->font();
AvatarDefs::getAvatarFromGpgId(_details.gpg_id, avatar); font.setItalic(true);
if (_avatar != avatar.toImage()) ui->labelName->setFont(font);
{
_avatar = avatar.toImage(); _keyId = QString::fromStdString(_details.gpg_id.toStdString());
_scene->clear(); ui->labelKeyId->setText(_keyId);
_scene->addPixmap(avatar.scaled(ui->graphicsView->width(),ui->graphicsView->height())); ui->labelKeyId->setToolTip(tr("PGP id:").append(" "+_keyId));
emit imageUpdated();
} QPixmap avatar;
} /*AvatarDefs::getAvatarFromGpgId(_details.gpg_id, avatar);
if (_avatar != avatar.toImage()) {
void IdentityWidget::updateData(const RsGxsIdGroup &gxs_group_info, const RsPeerDetails &pgp_details) _avatar = avatar.toImage();
{ _scene->clear();
updateData(gxs_group_info); _scene->addPixmap(avatar.scaled(ui->graphicsView->width(),ui->graphicsView->height()));
updateData(pgp_details); emit imageUpdated();
} }*///if (_avatar != avatar.toImage())
QSize IdentityWidget::sizeHint()
{ //}//if (_details != gpg_details)
QSize size; }
size.setHeight(ui->graphicsView->size().height() + ui->labelName->size().height());
size.setWidth(ui->graphicsView->size().width() > ui->labelName->size().width() void IdentityWidget::updateData(const RsGxsIdGroup &gxs_group_info, const RsPeerDetails &pgp_details)
?ui->graphicsView->size().width() : ui->labelName->size().width()); {
return size; updateData(gxs_group_info);
} updateData(pgp_details);
}
const QPixmap IdentityWidget::getImage()
{ QSize IdentityWidget::sizeHint()
#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0) {
return ui->graphicsView->grab(); QSize size;
//return this->grab(); //QT5 size.setHeight(ui->graphicsView->size().height() + ui->labelName->size().height());
#else size.setWidth(ui->graphicsView->size().width() > ui->labelName->size().width()
return QPixmap::grabWidget(ui->graphicsView); ?ui->graphicsView->size().width() : ui->labelName->size().width());
//return QPixmap::grabWidget(this); return size;
#endif }
}
const QPixmap IdentityWidget::getImage()
const QPixmap IdentityWidget::getDragImage() {
{ #if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0) return ui->graphicsView->grab();
return ui->graphicsView->grab(); //return this->grab(); //QT5
//return this->grab(); //QT5 #else
#else return QPixmap::grabWidget(ui->graphicsView);
return QPixmap::grabWidget(ui->graphicsView); //return QPixmap::grabWidget(this);
//return QPixmap::grabWidget(this); #endif
#endif }
}
const QPixmap IdentityWidget::getDragImage()
void IdentityWidget::setIsSelected(bool value) {
{ #if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
m_isSelected=value; return ui->graphicsView->grab();
QFont font=ui->labelName->font(); //return this->grab(); //QT5
font.setBold(value); #else
ui->labelName->setFont(font); return QPixmap::grabWidget(ui->graphicsView);
} //return QPixmap::grabWidget(this);
/* #endif
bool IdentityWidget::isSelected() }
{
return m_isSelected; void IdentityWidget::setIsSelected(bool value)
}*/ {
m_isSelected=value;
void IdentityWidget::setIsCurrent(bool value) QFont font=ui->labelName->font();
{ font.setBold(value);
m_isCurrent=value; ui->labelName->setFont(font);
ui->labelKeyId->setVisible(value); }
ui->labelGXSId->setVisible(value && (_haveGXSId && _havePGPDetail)); /*
ui->pbAdd->setVisible(value); bool IdentityWidget::isSelected()
} {
/* return m_isSelected;
bool IdentityWidget::isCurrent() }*/
{
return m_isCurrent; void IdentityWidget::setIsCurrent(bool value)
}*/ {
m_isCurrent=value;
void IdentityWidget::pbAdd_clicked() ui->labelKeyId->setVisible(value);
{ ui->labelGXSId->setVisible(value && (_haveGXSId && _havePGPDetail));
emit addButtonClicked(); ui->pbAdd->setVisible(value);
} }
/*
bool IdentityWidget::isCurrent()
{
return m_isCurrent;
}*/
void IdentityWidget::pbAdd_clicked()
{
emit addButtonClicked();
}

View File

@ -1,144 +1,146 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>IdentityWidget</class> <class>IdentityWidget</class>
<widget class="QWidget" name="IdentityWidget"> <widget class="QWidget" name="IdentityWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>102</width> <width>102</width>
<height>158</height> <height>170</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<property name="margin"> <property name="margin">
<number>1</number> <number>1</number>
</property> </property>
<item> <item>
<widget class="QGraphicsView" name="graphicsView"> <widget class="QGraphicsView" name="graphicsView">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>100</height> <height>100</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>100</height> <height>100</height>
</size> </size>
</property> </property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="verticalScrollBarPolicy"> <property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum> <enum>Qt::ScrollBarAlwaysOff</enum>
</property> </property>
<property name="horizontalScrollBarPolicy"> <property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum> <enum>Qt::ScrollBarAlwaysOff</enum>
</property> </property>
<property name="sceneRect"> <property name="sceneRect">
<rectf> <rectf>
<x>0.000000000000000</x> <x>0.000000000000000</x>
<y>0.000000000000000</y> <y>0.000000000000000</y>
<width>100.000000000000000</width> <width>100.000000000000000</width>
<height>100.000000000000000</height> <height>100.000000000000000</height>
</rectf> </rectf>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="ElidedLabel" name="labelName"> <widget class="ElidedLabel" name="labelName">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>15</height> <height>15</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>Name</string> <string>Name</string>
</property> </property>
<property name="scaledContents"> <property name="scaledContents">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="ElidedLabel" name="labelKeyId"> <widget class="ElidedLabel" name="labelKeyId">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>15</height> <height>15</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>KeyId</string> <string>KeyId</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="ElidedLabel" name="labelGXSId"> <widget class="ElidedLabel" name="labelGXSId">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>15</height> <height>15</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>GXSId</string> <string>GXSId</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pbAdd"> <widget class="QPushButton" name="pbAdd">
<property name="text"> <property name="text">
<string>Add</string> <string>Add</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<resources/> <customwidgets>
<customwidgets> <customwidget>
<customwidget> <class>ElidedLabel</class>
<class>ElidedLabel</class> <extends>QLabel</extends>
<extends>QLabel</extends> <header location="global">gui/common/ElidedLabel.h</header>
<header location="global">gui/common/ElidedLabel.h</header> <container>1</container>
<container>1</container> </customwidget>
</customwidget> </customwidgets>
</customwidgets> <resources>
<connections/> <include location="../images.qrc"/>
</ui> </resources>
<connections/>
</ui>

File diff suppressed because it is too large Load Diff

View File

@ -1,105 +1,109 @@
/* /*
* Retroshare Identity. * Retroshare Identity.
* *
* Copyright 2012-2012 by Robert Fernie. * Copyright 2012-2012 by Robert Fernie.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
* License Version 2.1 as published by the Free Software Foundation. * License Version 2.1 as published by the Free Software Foundation.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details. * Library General Public License for more details.
* *
* You should have received a copy of the GNU Library General Public * You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA. * USA.
* *
* Please report all bugs and problems to "retroshare@lunamutt.com". * Please report all bugs and problems to "retroshare@lunamutt.com".
* *
*/ */
#pragma once #pragma once
#include <map> #include <map>
#include <retroshare/rsidentity.h> #include <retroshare/rsidentity.h>
#include "gui/People/CircleWidget.h" #include "gui/People/CircleWidget.h"
#include "gui/People/IdentityWidget.h" #include "gui/People/IdentityWidget.h"
#include "gui/gxs/RsGxsUpdateBroadcastPage.h" #include "gui/gxs/RsGxsUpdateBroadcastPage.h"
#include "util/TokenQueue.h" #include "util/TokenQueue.h"
#include "ui_PeopleDialog.h" #include "ui_PeopleDialog.h"
#define IMAGE_IDENTITY ":/icons/friends_128.png" #define IMAGE_IDENTITY ":/icons/friends_128.png"
class PeopleDialog : public RsGxsUpdateBroadcastPage, public Ui::PeopleDialog, public TokenResponse class PeopleDialog : public RsGxsUpdateBroadcastPage, public Ui::PeopleDialog, public TokenResponse
{ {
Q_OBJECT Q_OBJECT
public: public:
static const uint32_t PD_IDLIST ; static const uint32_t PD_IDLIST ;
static const uint32_t PD_IDDETAILS ; static const uint32_t PD_IDDETAILS ;
static const uint32_t PD_REFRESH ; static const uint32_t PD_REFRESH ;
static const uint32_t PD_CIRCLES ; static const uint32_t PD_CIRCLES ;
PeopleDialog(QWidget *parent = 0); PeopleDialog(QWidget *parent = 0);
~PeopleDialog(); ~PeopleDialog();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_IDENTITY) ; } //MainPage virtual QIcon iconPixmap() const { return QIcon(IMAGE_IDENTITY) ; } //MainPage
virtual QString pageName() const { return tr("People") ; } //MainPage virtual QString pageName() const { return tr("People") ; } //MainPage
virtual QString helpText() const { return ""; } //MainPage virtual QString helpText() const { return ""; } //MainPage
void loadRequest(const TokenQueue * /*queue*/, const TokenRequest &req) ; void loadRequest(const TokenQueue * /*queue*/, const TokenRequest &req) ;
void requestIdList() ; void requestIdList() ;
void requestCirclesList() ; void requestCirclesList() ;
void insertIdList(uint32_t token) ; void insertIdList(uint32_t token) ;
void insertCircles(uint32_t token) ; void insertCircles(uint32_t token) ;
protected: protected:
// Derives from RsGxsUpdateBroadcastPage // Derives from RsGxsUpdateBroadcastPage
virtual void updateDisplay(bool complete); virtual void updateDisplay(bool complete);
//End RsGxsUpdateBroadcastPage //End RsGxsUpdateBroadcastPage
private slots: private slots:
void iw_AddButtonClickedExt(); void iw_AddButtonClickedExt();
void iw_AddButtonClickedInt(); void iw_AddButtonClickedInt();
void addToCircleExt(); void addToCircleExt();
void addToCircleInt(); void addToCircleInt();
void cw_askForGXSIdentityWidget(RsGxsId gxs_id); void cw_askForGXSIdentityWidget(RsGxsId gxs_id);
void cw_askForPGPIdentityWidget(RsPgpId pgp_id); void cw_askForPGPIdentityWidget(RsPgpId pgp_id);
void cw_imageUpdatedExt(); void cw_imageUpdatedExt();
void cw_imageUpdatedInt(); void cw_imageUpdatedInt();
void fl_flowLayoutItemDroppedExt(QList<FlowLayoutItem *> flListItem, bool &bAccept); void fl_flowLayoutItemDroppedExt(QList<FlowLayoutItem *> flListItem, bool &bAccept);
void fl_flowLayoutItemDroppedInt(QList<FlowLayoutItem *> flListItem, bool &bAccept); void fl_flowLayoutItemDroppedInt(QList<FlowLayoutItem *> flListItem, bool &bAccept);
void pf_centerIndexChanged(int index); void pf_centerIndexChanged(int index);
void pf_mouseMoveOverSlideEvent(QMouseEvent* event, int slideIndex); void pf_mouseMoveOverSlideEvent(QMouseEvent* event, int slideIndex);
void pf_dragEnterEventOccurs(QDragEnterEvent *event); void pf_dragEnterEventOccurs(QDragEnterEvent *event);
void pf_dragMoveEventOccurs(QDragMoveEvent *event); void pf_dragMoveEventOccurs(QDragMoveEvent *event);
void pf_dropEventOccursExt(QDropEvent *event); void pf_dropEventOccursExt(QDropEvent *event);
void pf_dropEventOccursInt(QDropEvent *event); void pf_dropEventOccursInt(QDropEvent *event);
private: void chatIdentity();
void reloadAll(); void sendMessage();
void populatePictureFlowExt(); void personDetails();
void populatePictureFlowInt();
private:
TokenQueue *mIdentityQueue; void reloadAll();
TokenQueue *mCirclesQueue; void populatePictureFlowExt();
void populatePictureFlowInt();
FlowLayout *_flowLayoutExt;
std::map<RsGxsId,IdentityWidget *> _gxs_identity_widgets ; TokenQueue *mIdentityQueue;
std::map<RsGxsGroupId,CircleWidget *> _ext_circles_widgets ; TokenQueue *mCirclesQueue;
QList<CircleWidget*> _extListCir;
FlowLayout *_flowLayoutExt;
FlowLayout *_flowLayoutInt; std::map<RsGxsId,IdentityWidget *> _gxs_identity_widgets ;
std::map<RsPgpId,IdentityWidget *> _pgp_identity_widgets ; std::map<RsGxsGroupId,CircleWidget *> _ext_circles_widgets ;
std::map<RsGxsGroupId,CircleWidget *> _int_circles_widgets ; QList<CircleWidget*> _extListCir;
QList<CircleWidget*> _intListCir;
}; FlowLayout *_flowLayoutInt;
std::map<RsPgpId,IdentityWidget *> _pgp_identity_widgets ;
std::map<RsGxsGroupId,CircleWidget *> _int_circles_widgets ;
QList<CircleWidget*> _intListCir;
};

View File

@ -1,265 +1,259 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>PeopleDialog</class> <class>PeopleDialog</class>
<widget class="QWidget" name="PeopleDialog"> <widget class="QWidget" name="PeopleDialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>727</width> <width>727</width>
<height>524</height> <height>524</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string/> <string/>
</property> </property>
<layout class="QGridLayout" name="titleBarLayout"> <layout class="QGridLayout" name="titleBarLayout">
<property name="leftMargin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<property name="topMargin"> <item row="0" column="0">
<number>0</number> <widget class="QFrame" name="titleBarFrame">
</property> <property name="frameShape">
<property name="rightMargin"> <enum>QFrame::Box</enum>
<number>0</number> </property>
</property> <property name="frameShadow">
<property name="bottomMargin"> <enum>QFrame::Sunken</enum>
<number>0</number> </property>
</property> <layout class="QHBoxLayout">
<item row="0" column="0"> <property name="margin">
<widget class="QFrame" name="titleBarFrame"> <number>2</number>
<property name="frameShape"> </property>
<enum>QFrame::Box</enum> <item>
</property> <widget class="QLabel" name="titleBarPixmap">
<property name="frameShadow"> <property name="minimumSize">
<enum>QFrame::Sunken</enum> <size>
</property> <width>0</width>
<layout class="QHBoxLayout"> <height>0</height>
<property name="margin"> </size>
<number>2</number> </property>
</property> <property name="maximumSize">
<item> <size>
<widget class="QLabel" name="titleBarPixmap"> <width>24</width>
<property name="minimumSize"> <height>24</height>
<size> </size>
<width>0</width> </property>
<height>0</height> <property name="text">
</size> <string/>
</property> </property>
<property name="maximumSize"> <property name="pixmap">
<size> <pixmap resource="../images.qrc">:/images/identity/identities_32.png</pixmap>
<width>24</width> </property>
<height>24</height> <property name="scaledContents">
</size> <bool>true</bool>
</property> </property>
<property name="text"> </widget>
<string/> </item>
</property> <item>
<property name="pixmap"> <widget class="StyledLabel" name="titleBarLabel">
<pixmap resource="../images.qrc">:/images/identity/identities_32.png</pixmap> <property name="text">
</property> <string>People</string>
<property name="scaledContents"> </property>
<bool>true</bool> </widget>
</property> </item>
</widget> <item>
</item> <spacer name="titleBarSpacer">
<item> <property name="orientation">
<widget class="StyledLabel" name="titleBarLabel"> <enum>Qt::Horizontal</enum>
<property name="text"> </property>
<string>People</string> <property name="sizeHint" stdset="0">
</property> <size>
</widget> <width>40</width>
</item> <height>20</height>
<item> </size>
<spacer name="titleBarSpacer"> </property>
<property name="orientation"> </spacer>
<enum>Qt::Horizontal</enum> </item>
</property> </layout>
<property name="sizeHint" stdset="0"> </widget>
<size> </item>
<width>40</width> <item row="1" column="0">
<height>20</height> <widget class="QTabWidget" name="tabWidget">
</size> <property name="enabled">
</property> <bool>true</bool>
</spacer> </property>
</item> <property name="currentIndex">
</layout> <number>1</number>
</widget> </property>
</item> <widget class="QWidget" name="tabExternal">
<item row="1" column="0"> <property name="sizePolicy">
<widget class="QTabWidget" name="tabWidget"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<property name="currentIndex"> <horstretch>0</horstretch>
<number>0</number> <verstretch>0</verstretch>
</property> </sizepolicy>
<widget class="QWidget" name="tabExternal"> </property>
<property name="sizePolicy"> <attribute name="title">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <string>People</string>
<horstretch>0</horstretch> </attribute>
<verstretch>0</verstretch> <layout class="QVBoxLayout">
</sizepolicy> <item>
</property> <widget class="QSplitter" name="splitterExternal">
<attribute name="title"> <property name="orientation">
<string>External</string> <enum>Qt::Vertical</enum>
</attribute> </property>
<layout class="QVBoxLayout"> <widget class="QScrollArea" name="scrollAreaExternal">
<item> <property name="minimumSize">
<widget class="QSplitter" name="splitterExternal"> <size>
<property name="orientation"> <width>0</width>
<enum>Qt::Vertical</enum> <height>250</height>
</property> </size>
<widget class="QScrollArea" name="scrollAreaExternal"> </property>
<property name="minimumSize"> <property name="widgetResizable">
<size> <bool>true</bool>
<width>0</width> </property>
<height>250</height> <widget class="FlowLayoutWidget" name="idExternal">
</size> <property name="geometry">
</property> <rect>
<property name="widgetResizable"> <x>0</x>
<bool>true</bool> <y>0</y>
</property> <width>701</width>
<widget class="FlowLayoutWidget" name="idExternal"> <height>248</height>
<property name="geometry"> </rect>
<rect> </property>
<x>0</x> <layout class="QVBoxLayout"/>
<y>0</y> </widget>
<width>685</width> </widget>
<height>248</height> <widget class="QWidget" name="widgetExternal">
</rect> <layout class="QGridLayout" name="layoutExternal">
</property> <item row="0" column="0">
<layout class="QVBoxLayout"/> <widget class="QLabel" name="label_External">
</widget> <property name="sizePolicy">
</widget> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<widget class="QWidget" name="widgetExternal"> <horstretch>0</horstretch>
<layout class="QGridLayout" name="layoutExternal"> <verstretch>0</verstretch>
<item row="0" column="0"> </sizepolicy>
<widget class="QLabel" name="label_External"> </property>
<property name="sizePolicy"> <property name="text">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <string>Drag your circles or people to each other.</string>
<horstretch>0</horstretch> </property>
<verstretch>0</verstretch> <property name="alignment">
</sizepolicy> <set>Qt::AlignCenter</set>
</property> </property>
<property name="text"> </widget>
<string>Drag your circles or people to each other.</string> </item>
</property> <item row="1" column="0">
<property name="alignment"> <widget class="PictureFlow" name="pictureFlowWidgetExternal" native="true">
<set>Qt::AlignCenter</set> <property name="widgetResizable" stdset="0">
</property> <bool>true</bool>
</widget> </property>
</item> </widget>
<item row="1" column="0"> </item>
<widget class="PictureFlow" name="pictureFlowWidgetExternal" native="true"> </layout>
<property name="widgetResizable" stdset="0"> </widget>
<bool>true</bool> </widget>
</property> </item>
</widget> </layout>
</item> </widget>
</layout> <widget class="QWidget" name="tabInternal">
</widget> <property name="sizePolicy">
</widget> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
</item> <horstretch>0</horstretch>
</layout> <verstretch>0</verstretch>
</widget> </sizepolicy>
<widget class="QWidget" name="tabInternal"> </property>
<property name="sizePolicy"> <attribute name="title">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <string>Internal</string>
<horstretch>0</horstretch> </attribute>
<verstretch>0</verstretch> <layout class="QVBoxLayout">
</sizepolicy> <item>
</property> <widget class="QSplitter" name="splitterInternal">
<attribute name="title"> <property name="orientation">
<string>Internal</string> <enum>Qt::Vertical</enum>
</attribute> </property>
<layout class="QVBoxLayout"> <widget class="QScrollArea" name="scrollAreaInternal">
<item> <property name="minimumSize">
<widget class="QSplitter" name="splitterInternal"> <size>
<property name="orientation"> <width>0</width>
<enum>Qt::Vertical</enum> <height>250</height>
</property> </size>
<widget class="QScrollArea" name="scrollAreaInternal"> </property>
<property name="minimumSize"> <property name="widgetResizable">
<size> <bool>true</bool>
<width>0</width> </property>
<height>250</height> <widget class="FlowLayoutWidget" name="idInternal">
</size> <property name="geometry">
</property> <rect>
<property name="widgetResizable"> <x>0</x>
<bool>true</bool> <y>0</y>
</property> <width>701</width>
<widget class="FlowLayoutWidget" name="idInternal"> <height>248</height>
<property name="geometry"> </rect>
<rect> </property>
<x>0</x> <layout class="QVBoxLayout"/>
<y>0</y> </widget>
<width>685</width> </widget>
<height>248</height> <widget class="QWidget" name="widgetInternal">
</rect> <layout class="QGridLayout" name="layoutInternal">
</property> <item row="0" column="0">
<layout class="QVBoxLayout"/> <widget class="QLabel" name="label_Internal">
</widget> <property name="sizePolicy">
</widget> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<widget class="QWidget" name="widgetInternal"> <horstretch>0</horstretch>
<layout class="QGridLayout" name="layoutInternal"> <verstretch>0</verstretch>
<item row="0" column="0"> </sizepolicy>
<widget class="QLabel" name="label_Internal"> </property>
<property name="sizePolicy"> <property name="text">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <string>Drag your circles or people to each other.</string>
<horstretch>0</horstretch> </property>
<verstretch>0</verstretch> <property name="alignment">
</sizepolicy> <set>Qt::AlignCenter</set>
</property> </property>
<property name="text"> </widget>
<string>Drag your circles or people to each other.</string> </item>
</property> <item row="1" column="0">
<property name="alignment"> <widget class="PictureFlow" name="pictureFlowWidgetInternal" native="true">
<set>Qt::AlignCenter</set> <property name="widgetResizable" stdset="0">
</property> <bool>true</bool>
</widget> </property>
</item> </widget>
<item row="1" column="0"> </item>
<widget class="PictureFlow" name="pictureFlowWidgetInternal" native="true"> </layout>
<property name="widgetResizable" stdset="0"> </widget>
<bool>true</bool> </widget>
</property> </item>
</widget> </layout>
</item> </widget>
</layout> </widget>
</widget> </item>
</widget> </layout>
</item> </widget>
</layout> <customwidgets>
</widget> <customwidget>
</widget> <class>StyledLabel</class>
</item> <extends>QLabel</extends>
</layout> <header>gui/common/StyledLabel.h</header>
</widget> </customwidget>
<customwidgets> <customwidget>
<customwidget> <class>PictureFlow</class>
<class>StyledLabel</class> <extends>QWidget</extends>
<extends>QLabel</extends> <header location="global">gui/common/PictureFlow.h</header>
<header>gui/common/StyledLabel.h</header> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>PictureFlow</class> <class>FlowLayoutWidget</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header location="global">gui/common/PictureFlow.h</header> <header location="global">gui/common/FlowLayout.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> </customwidgets>
<class>FlowLayoutWidget</class> <resources>
<extends>QWidget</extends> <include location="../images.qrc"/>
<header location="global">gui/common/FlowLayout.h</header> </resources>
<container>1</container> <connections/>
</customwidget> </ui>
</customwidgets>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>