mirror of
				https://github.com/RetroShare/RetroShare.git
				synced 2025-10-30 22:29:00 -04:00 
			
		
		
		
	Improvements of People dialog. Patch from Phenom (slightly modified).
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7603 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
		
							parent
							
								
									20786dbfeb
								
							
						
					
					
						commit
						d79f5e10fb
					
				
					 12 changed files with 1020 additions and 992 deletions
				
			
		|  | @ -101,11 +101,9 @@ CreateCircleDialog::~CreateCircleDialog() | |||
| 
 | ||||
| void CreateCircleDialog::editExistingId(const RsGxsGroupId &circleId, const bool &clearList /*= true*/) | ||||
| { | ||||
| 	std::cerr << "CreateCircleDialog::editExistingId() : " << circleId; | ||||
| 	std::cerr << std::endl; | ||||
| 
 | ||||
| 	/* load this circle */ | ||||
| 	mIsExistingCircle = true; | ||||
| 
 | ||||
| 	mClearList = clearList; | ||||
| 	requestCircle(circleId); | ||||
| 	 | ||||
|  | @ -240,15 +238,6 @@ void CreateCircleDialog::addCircle(const RsGxsCircleDetails &cirDetails) | |||
| 			QString  nickname = QString::fromUtf8(gxs_details.mNickname.c_str()); | ||||
| 			QString  idtype = tr("Anon Id"); | ||||
| 
 | ||||
| 			/** Can we have known peers on mUnknownPeers (TODO)
 | ||||
| 			if (gxs_details.mPgpKnown) { | ||||
| 				RsPeerDetails details; | ||||
| 				rsPeers->getGPGDetails(gxs_details.mPgpId, details); | ||||
| 				idtype = QString::fromUtf8(details.name.c_str()); | ||||
| 			}else{ | ||||
| 				idtype = tr("PGP Linked Id"); | ||||
| 			}//if (gxs_details.mPgpKnown)*/
 | ||||
| 
 | ||||
| 			addMember(keyId, idtype, nickname); | ||||
| 
 | ||||
| 		}//if(!gxs_id.isNull() && rsIdentity->getIdDetails(gxs_id,gxs_details))
 | ||||
|  | @ -487,7 +476,7 @@ void CreateCircleDialog::loadCircle(uint32_t token) | |||
| 
 | ||||
| 	QTreeWidget *tree = ui.treeWidget_membership; | ||||
| 
 | ||||
| 	if (!mClearList) tree->clear(); | ||||
| 	if (mClearList) tree->clear(); | ||||
| 
 | ||||
| 	std::vector<RsGxsCircleGroup> groups; | ||||
| 	if (!rsGxsCircles->getGroupData(token, groups)) { | ||||
|  |  | |||
|  | @ -13,12 +13,11 @@ CircleWidget::CircleWidget(QString name/*=QString()*/ | |||
|   ui(new Ui::CircleWidget) | ||||
| { | ||||
| 	ui->setupUi(this); | ||||
| 	std::string desc_string = _group_info.mGroupName ; | ||||
| 	QString cirName = QString::fromUtf8(desc_string.c_str()); | ||||
| 	if (name=="") m_myName = cirName; | ||||
| 	m_myName = name; | ||||
| 	ui->label->setText(m_myName); | ||||
| 	ui->label->setToolTip(m_myName); | ||||
| 	_scene = new QGraphicsScene(this); | ||||
| 	_scene->addText(tr("Empty %1").arg(getName())); | ||||
| 	_scene->addText(tr("Empty Circle")); | ||||
| 	ui->graphicsView->setScene(_scene); | ||||
| 
 | ||||
| 	//To grab events
 | ||||
|  | @ -48,8 +47,9 @@ void CircleWidget::updateData(const RsGroupMetaData& gxs_group_info | |||
| 		QString cirName = QString::fromUtf8(desc_string.c_str()); | ||||
| 		m_myName = cirName; | ||||
| 		ui->label->setText(m_myName); | ||||
| 		ui->label->setToolTip(m_myName); | ||||
| 		update(); | ||||
| 	}//if (gxs_group_info!=_group_info)
 | ||||
| 	}//if (_group_info != gxs_group_info)
 | ||||
| 
 | ||||
| 	if (_circle_details != details) { | ||||
| 		_circle_details=details; | ||||
|  | @ -67,10 +67,9 @@ void CircleWidget::updateData(const RsGroupMetaData& gxs_group_info | |||
| 		for (itAllowedPeers it = _circle_details.mAllowedPeers.begin() | ||||
| 		     ; it != _circle_details.mAllowedPeers.end() | ||||
| 		     ; ++it ) { | ||||
| 			RsPgpId id = it->first; | ||||
| 			emit askForPGPIdentityWidget(id); | ||||
| 			RsPgpId pgp_id = it->first; | ||||
| 			emit askForPGPIdentityWidget(pgp_id); | ||||
| 
 | ||||
| 			///** (TODO) Is it needed?
 | ||||
| 			std::list<RsGxsId> gxs_id_list = it->second; | ||||
| 			typedef std::list<RsGxsId>::const_iterator itGxsId; | ||||
| 			for (itGxsId curs=gxs_id_list.begin() | ||||
|  | @ -81,7 +80,6 @@ void CircleWidget::updateData(const RsGroupMetaData& gxs_group_info | |||
| 					emit askForGXSIdentityWidget(gxs_id); | ||||
| 				}//if(!gxs_id.isNull())
 | ||||
| 			}//for (itGxsId curs=gxs_id_list.begin()
 | ||||
| 			//*//
 | ||||
| 		}//for (itAllowedPeers it = _circle_details.mAllowedPeers.begin()
 | ||||
| 
 | ||||
| 		update(); | ||||
|  | @ -122,14 +120,25 @@ const QPixmap CircleWidget::getDragImage() | |||
| void CircleWidget::addIdent(IdentityWidget *item) | ||||
| { | ||||
| 	if (item){ | ||||
| 		RsGxsId id = RsGxsId(item->groupInfo().mMeta.mGroupId); | ||||
| 		std::string id; | ||||
| 		if (item->haveGXSId()) { | ||||
| 			id =item->groupInfo().mMeta.mGroupId.toStdString(); | ||||
| 		} else {//if (item->haveGXSId())
 | ||||
| 			id =item->keyId().toStdString(); | ||||
| 		}//else (item->haveGXSId())
 | ||||
| 		if (!_list.contains(id)){ | ||||
| 			_list[id] = item; | ||||
| 			connect(item,SIGNAL(imageUpdated()), this, SLOT(updateIdImage())); | ||||
| 			updateScene(); | ||||
| 		}//if (!list.contains(item))
 | ||||
| 		}//if (!_list.contains(id))
 | ||||
| 	}//if (item)
 | ||||
| } | ||||
| 
 | ||||
| void CircleWidget::updateIdImage() | ||||
| { | ||||
| 	updateScene(); | ||||
| } | ||||
| 
 | ||||
| void CircleWidget::updateScene() | ||||
| { | ||||
| 	const qreal PI = qAtan(1.0)*4; | ||||
|  | @ -151,7 +160,7 @@ void CircleWidget::updateScene() | |||
| 	qreal sizeY = topleftY*2; | ||||
| 
 | ||||
| 	int curs = 0; | ||||
| 	typedef QMap<RsGxsId, IdentityWidget*>::const_iterator itList; | ||||
| 	typedef QMap<std::string, IdentityWidget*>::const_iterator itList; | ||||
| 	for (itList it=_list.constBegin(); it!=_list.constEnd(); ++it){ | ||||
| 		QPixmap pix = it.value()->getImage(); | ||||
| 		pix = pix.scaled(sizeX, sizeY); | ||||
|  | @ -159,6 +168,15 @@ void CircleWidget::updateScene() | |||
| 		qreal x = (qCos(curs*pitch)*radiusX)-(sizeX/2)+topleftX+radiusX; | ||||
| 		qreal y = (qSin(curs*pitch)*radiusY)-(sizeY/2)+topleftY+radiusY; | ||||
| 		item->setPos(QPointF(x, y)); | ||||
| 
 | ||||
| 		QString name = it.value()->getName(); | ||||
| 		QString idKey = it.value()->keyId(); | ||||
| 		QString gxsId = it.value()->gxsId(); | ||||
| 		if (idKey == gxsId) gxsId.clear(); | ||||
| 		item->setToolTip(name.append("\n") | ||||
| 		                 .append(idKey).append(gxsId.isEmpty()?"":"\n") | ||||
| 		                 .append(gxsId)); | ||||
| 		++curs; | ||||
| 	}//for (itList it=_list.constBegin(); it!=_list.constEnd(); ++it)
 | ||||
| 	emit imageUpdated(); | ||||
| } | ||||
|  |  | |||
|  | @ -31,7 +31,7 @@ public: | |||
| 	//End Properties
 | ||||
| 
 | ||||
| 	void addIdent(IdentityWidget* item); | ||||
| 	const QMap<RsGxsId, IdentityWidget*> idents() const {return _list;} | ||||
| 	const QMap<std::string, IdentityWidget*> idents() const {return _list;} | ||||
| 
 | ||||
| 	const RsGroupMetaData& groupInfo() const { return _group_info;} | ||||
| 	const RsGxsCircleDetails& circleDetails() const {return _circle_details;} | ||||
|  | @ -40,11 +40,14 @@ signals: | |||
| 	void askForGXSIdentityWidget(RsGxsId gxs_id); | ||||
| 	void askForPGPIdentityWidget(RsPgpId pgp_id); | ||||
| 
 | ||||
| private slots: | ||||
| 	void updateIdImage(); | ||||
| 
 | ||||
| private: | ||||
| 	void updateScene(); | ||||
| 
 | ||||
| 	QGraphicsScene* _scene; | ||||
| 	QMap<RsGxsId, IdentityWidget*> _list; | ||||
| 	QMap<std::string, IdentityWidget*> _list; | ||||
| 	RsGroupMetaData _group_info ; | ||||
| 	RsGxsCircleDetails _circle_details ; | ||||
| 
 | ||||
|  |  | |||
|  | @ -54,13 +54,19 @@ | |||
|     </widget> | ||||
|    </item> | ||||
|    <item> | ||||
|     <widget class="QLabel" name="label"> | ||||
|     <widget class="ElidedLabel" name="label"> | ||||
|      <property name="minimumSize"> | ||||
|       <size> | ||||
|        <width>0</width> | ||||
|        <height>15</height> | ||||
|       </size> | ||||
|      </property> | ||||
|      <property name="maximumSize"> | ||||
|       <size> | ||||
|        <width>200</width> | ||||
|        <height>16777215</height> | ||||
|       </size> | ||||
|      </property> | ||||
|      <property name="text"> | ||||
|       <string>TextLabel</string> | ||||
|      </property> | ||||
|  | @ -71,6 +77,14 @@ | |||
|    </item> | ||||
|   </layout> | ||||
|  </widget> | ||||
|  <customwidgets> | ||||
|   <customwidget> | ||||
|    <class>ElidedLabel</class> | ||||
|    <extends>QLabel</extends> | ||||
|    <header location="global">gui/common/ElidedLabel.h</header> | ||||
|    <container>1</container> | ||||
|   </customwidget> | ||||
|  </customwidgets> | ||||
|  <resources/> | ||||
|  <connections/> | ||||
| </ui> | ||||
|  |  | |||
|  | @ -8,68 +8,34 @@ | |||
| #include <QMimeData> | ||||
| #include <QGraphicsProxyWidget> | ||||
| 
 | ||||
| IdentityWidget::IdentityWidget(const RsGxsIdGroup &gxs_group_info, QString name/*=QString()*/, QWidget *parent/*=0*/) : | ||||
| IdentityWidget::IdentityWidget(QString name/*=QString()*/, QWidget *parent/*=0*/) : | ||||
|   FlowLayoutItem(name, parent), | ||||
|   _group_info(gxs_group_info), | ||||
|   ui(new Ui::IdentityWidget) | ||||
| { | ||||
| 	ui->setupUi(this); | ||||
| 	_isGXS=true; | ||||
| 	_haveGXSId = false; | ||||
| 	_havePGPDetail = false; | ||||
| 
 | ||||
| 	std::string desc_string = _group_info.mMeta.mGroupName ; | ||||
| 	QString idName = QString::fromUtf8(desc_string.c_str()); | ||||
| 	if (name=="") m_myName = idName; | ||||
| 	m_myName = name; | ||||
| 	ui->labelName->setText(m_myName); | ||||
| 	ui->labelName->setToolTip(m_myName); | ||||
| 	QFont font = ui->labelName->font(); | ||||
| 	font.setItalic(false); | ||||
| 	ui->labelKeyId->setText(QString::fromStdString(_group_info.mMeta.mGroupId.toStdString())); | ||||
| 	ui->labelName->setFont(font); | ||||
| 
 | ||||
| 	_keyId=""; | ||||
| 	ui->labelKeyId->setText(_keyId); | ||||
| 	ui->labelKeyId->setToolTip(_keyId); | ||||
| 	ui->labelKeyId->setVisible(false); | ||||
| 
 | ||||
| 	ui->pbAdd->setVisible(false); | ||||
| 	_scene = new QGraphicsScene(this); | ||||
| 	/// (TODO) Get real ident icon
 | ||||
| 	QImage image = GxsIdDetails::makeDefaultIcon(RsGxsId(_group_info.mMeta.mGroupId)); | ||||
| 	_scene->addPixmap(QPixmap::fromImage(image.scaled(ui->graphicsView->width(),ui->graphicsView->height()))); | ||||
| 	//scene->setBackgroundBrush(QBrush(QColor(qrand()%255,qrand()%255,qrand()%255)));
 | ||||
| 	//scene->addText(QString("Hello, %1").arg(getName()));
 | ||||
| 	ui->graphicsView->setScene(_scene); | ||||
| 
 | ||||
| 	//To grab events
 | ||||
| 	ui->graphicsView->setEnabled(false); | ||||
| 
 | ||||
| 	ui->graphicsView->setAlignment(Qt::AlignLeft | Qt::AlignTop); | ||||
| 
 | ||||
| 	setIsCurrent(false); | ||||
| 	setIsSelected(false); | ||||
| 	setAcceptDrops(true); | ||||
| } | ||||
| 
 | ||||
| IdentityWidget::IdentityWidget(const RsPeerDetails &pgp_details, QString name/*=QString()*/, QWidget *parent/*=0*/) : | ||||
|   FlowLayoutItem(name, parent), | ||||
|   _details(pgp_details), | ||||
|   ui(new Ui::IdentityWidget) | ||||
| { | ||||
| 	ui->setupUi(this); | ||||
| 	_isGXS=false; | ||||
| 
 | ||||
| 	QString idName = QString::fromUtf8(pgp_details.name.c_str()); | ||||
| 	if (name=="") m_myName = idName; | ||||
| 	ui->labelName->setText(m_myName); | ||||
| 	QFont font = ui->labelName->font(); | ||||
| 	font.setItalic(true); | ||||
| 	ui->labelKeyId->setText(QString::fromStdString(pgp_details.gpg_id.toStdString())); | ||||
| 	ui->labelName->setFont(font); | ||||
| 	ui->labelKeyId->setVisible(false); | ||||
| 	ui->labelGXSId->setText(_keyId); | ||||
| 	ui->labelGXSId->setToolTip(_keyId); | ||||
| 	ui->labelGXSId->setVisible(false); | ||||
| 
 | ||||
| 	ui->pbAdd->setVisible(false); | ||||
| 	QObject::connect(ui->pbAdd, SIGNAL(clicked()), this, SLOT(pbAdd_clicked())); | ||||
| 
 | ||||
| 	_scene = new QGraphicsScene(this); | ||||
| 	/// (TODO) Get real ident icon
 | ||||
| 	QPixmap avatar; | ||||
| 	AvatarDefs::getAvatarFromSslId(pgp_details.id.toStdString(), avatar); | ||||
| 	_scene->addPixmap(avatar.scaled(ui->graphicsView->width(),ui->graphicsView->height())); | ||||
| 	//scene->setBackgroundBrush(QBrush(QColor(qrand()%255,qrand()%255,qrand()%255)));
 | ||||
| 	//scene->addText(QString("Hello, %1").arg(getName()));
 | ||||
| 	ui->graphicsView->setScene(_scene); | ||||
| 
 | ||||
| 	//To grab events
 | ||||
|  | @ -88,6 +54,92 @@ IdentityWidget::~IdentityWidget() | |||
| 	delete ui; | ||||
| } | ||||
| 
 | ||||
| void IdentityWidget::updateData(const RsGxsIdGroup &gxs_group_info) | ||||
| { | ||||
| 	if (_group_info.mMeta.mGroupId != gxs_group_info.mMeta.mGroupId) { | ||||
| 		_group_info = gxs_group_info; | ||||
| 		_haveGXSId = true; | ||||
| 
 | ||||
| 		m_myName = QString::fromUtf8(_group_info.mMeta.mGroupName.c_str()); | ||||
| 	ui->labelName->setText(m_myName); | ||||
| 		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)
 | ||||
| 
 | ||||
| 
 | ||||
| 		_gxsId = QString::fromStdString(_group_info.mMeta.mGroupId.toStdString()); | ||||
| 		ui->labelGXSId->setText(_gxsId); | ||||
| 		ui->labelGXSId->setToolTip(tr("GXS id: ").append(_gxsId)); | ||||
| 
 | ||||
| 		if (!_havePGPDetail) { | ||||
| 	QFont font = ui->labelName->font(); | ||||
| 			font.setItalic(false); | ||||
| 	ui->labelName->setFont(font); | ||||
| 
 | ||||
| 			_keyId=QString::fromStdString(_group_info.mMeta.mGroupId.toStdString()); | ||||
| 			ui->labelKeyId->setText(_keyId); | ||||
| 			ui->labelKeyId->setToolTip(tr("GXS id: ").append(_keyId)); | ||||
| 	ui->labelKeyId->setVisible(false); | ||||
| 
 | ||||
| 	/// (TODO) Get real ident icon
 | ||||
| 			QImage image = GxsIdDetails::makeDefaultIcon(RsGxsId(_group_info.mMeta.mGroupId)); | ||||
| 			if (_avatar != image) { | ||||
| 				_avatar = image; | ||||
| 				_scene->clear(); | ||||
| 				_scene->addPixmap(QPixmap::fromImage(image.scaled(ui->graphicsView->width(),ui->graphicsView->height()))); | ||||
| 				emit imageUpdated(); | ||||
| 			}//if (_avatar != image)
 | ||||
| 		}//if (!_havePGPDetail)
 | ||||
| 
 | ||||
| 	}//if (_group_info != gxs_group_info)
 | ||||
| } | ||||
| 
 | ||||
| void IdentityWidget::updateData(const RsPeerDetails &pgp_details) | ||||
| { | ||||
| 	if (_details.id != pgp_details.id) | ||||
| 	{ | ||||
| 		_details = pgp_details; | ||||
| 		_havePGPDetail = true; | ||||
| 
 | ||||
| 		_nickname = QString::fromUtf8(_details.name.c_str()); | ||||
| 		if (!_haveGXSId) m_myName = _nickname; | ||||
| 		ui->labelName->setText(m_myName); | ||||
| 		if (_haveGXSId) { | ||||
| 			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("PGP name: ").append(_nickname)); | ||||
| 		}//else (m_myName != _nickname)
 | ||||
| 
 | ||||
| 		QFont font = ui->labelName->font(); | ||||
| 		font.setItalic(true); | ||||
| 		ui->labelName->setFont(font); | ||||
| 
 | ||||
| 		_keyId = QString::fromStdString(_details.gpg_id.toStdString()); | ||||
| 		ui->labelKeyId->setText(_keyId); | ||||
| 		ui->labelKeyId->setToolTip(tr("PGP id: ").append(_keyId)); | ||||
| 
 | ||||
| 		QPixmap avatar; | ||||
| 		AvatarDefs::getAvatarFromGpgId(_details.gpg_id.toStdString(), avatar); | ||||
| 		if (_avatar != avatar.toImage()) { | ||||
| 			_avatar = avatar.toImage(); | ||||
| 			_scene->clear(); | ||||
| 			_scene->addPixmap(avatar.scaled(ui->graphicsView->width(),ui->graphicsView->height())); | ||||
| 			emit imageUpdated(); | ||||
| 		}//if (_avatar != avatar.toImage())
 | ||||
| 
 | ||||
| 	}//if (_details != gpg_details)
 | ||||
| } | ||||
| 
 | ||||
| void IdentityWidget::updateData(const RsGxsIdGroup &gxs_group_info, const RsPeerDetails &pgp_details) | ||||
| { | ||||
| 	updateData(gxs_group_info); | ||||
| 	updateData(pgp_details); | ||||
| } | ||||
| 
 | ||||
| QSize IdentityWidget::sizeHint() | ||||
| { | ||||
| 	QSize size; | ||||
|  | @ -136,6 +188,7 @@ void IdentityWidget::setIsCurrent(bool value) | |||
| { | ||||
| 	m_isCurrent=value; | ||||
| 	ui->labelKeyId->setVisible(value); | ||||
| 	ui->labelGXSId->setVisible(value && (_haveGXSId && _havePGPDetail)); | ||||
| 	ui->pbAdd->setVisible(value); | ||||
| } | ||||
| /*
 | ||||
|  | @ -143,3 +196,8 @@ bool IdentityWidget::isCurrent() | |||
| { | ||||
| 	return m_isCurrent; | ||||
| }*/ | ||||
| 
 | ||||
| void IdentityWidget::pbAdd_clicked() | ||||
| { | ||||
| 	emit addButtonClicked(); | ||||
| } | ||||
|  |  | |||
|  | @ -2,8 +2,9 @@ | |||
| #define IDENTITYWIDGET_H | ||||
| 
 | ||||
| #include "gui/common/FlowLayout.h" | ||||
| #include <QWidget> | ||||
| #include <QImage> | ||||
| #include <QGraphicsScene> | ||||
| #include <QWidget> | ||||
| #include <retroshare/rsidentity.h> | ||||
| #include <retroshare/rspeers.h> | ||||
| 
 | ||||
|  | @ -16,9 +17,13 @@ class IdentityWidget : public FlowLayoutItem | |||
| 	Q_OBJECT | ||||
| 
 | ||||
| public: | ||||
| 	explicit IdentityWidget(const RsGxsIdGroup& gxs_group_info, QString name = QString(), QWidget *parent = 0); | ||||
| 	explicit IdentityWidget(const RsPeerDetails& gpg_details, QString name = QString(), QWidget *parent = 0); | ||||
| 	explicit IdentityWidget(QString name = QString() | ||||
| 	                        , QWidget *parent = 0); | ||||
| 	~IdentityWidget(); | ||||
| 	void updateData(const RsGxsIdGroup& gxs_group_info); | ||||
| 	void updateData(const RsPeerDetails& pgp_details); | ||||
| 	void updateData(const RsGxsIdGroup& gxs_group_info | ||||
| 	          , const RsPeerDetails& pgp_details); | ||||
| 
 | ||||
| 	//Start QWidget Properties
 | ||||
| 	QSize sizeHint(); | ||||
|  | @ -26,20 +31,36 @@ public: | |||
| 	virtual const QPixmap getImage(); | ||||
| 	virtual const QPixmap getDragImage(); | ||||
| 	virtual void setIsSelected(bool value); | ||||
| 	//virtual bool isSelected();
 | ||||
| 	virtual void setIsCurrent(bool value); | ||||
| 	//virtual bool isCurrent();
 | ||||
| 
 | ||||
| 	//End Properties
 | ||||
| 	const bool isGXS() { return _isGXS; } | ||||
| 
 | ||||
| 	bool haveGXSId() { return _haveGXSId; } | ||||
| 	bool havePGPDetail() { return _havePGPDetail; } | ||||
| 	const RsGxsIdGroup& groupInfo() const { return _group_info; } | ||||
| 	const RsPeerDetails& details() const { return _details; } | ||||
| 	const QString keyId() const { return _keyId; } | ||||
| 	const QString idtype() const { return _idtype; } | ||||
| 	const QString nickname() const { return _nickname; } | ||||
| 	const QString gxsId() const { return _gxsId; } | ||||
| 
 | ||||
| signals: | ||||
| 	void addButtonClicked(); | ||||
| 
 | ||||
| private slots: | ||||
| 	void pbAdd_clicked(); | ||||
| 
 | ||||
| private: | ||||
| 	bool _isGXS; | ||||
| 	bool _haveGXSId; | ||||
| 	bool _havePGPDetail; | ||||
| 	RsGxsIdGroup _group_info; | ||||
| 	RsPeerDetails _details; | ||||
| 	QGraphicsScene* _scene; | ||||
| 	QImage _avatar; | ||||
| 
 | ||||
| 	QString _keyId; | ||||
| 	QString _idtype; | ||||
| 	QString _nickname; | ||||
| 	QString _gxsId; | ||||
| 
 | ||||
| 	Ui::IdentityWidget *ui; | ||||
| }; | ||||
|  |  | |||
|  | @ -7,7 +7,7 @@ | |||
|     <x>0</x> | ||||
|     <y>0</y> | ||||
|     <width>102</width> | ||||
|     <height>153</height> | ||||
|     <height>158</height> | ||||
|    </rect> | ||||
|   </property> | ||||
|   <layout class="QVBoxLayout" name="verticalLayout"> | ||||
|  | @ -54,13 +54,19 @@ | |||
|     </widget> | ||||
|    </item> | ||||
|    <item> | ||||
|     <widget class="QLabel" name="labelName"> | ||||
|     <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> | ||||
|  | @ -73,7 +79,13 @@ | |||
|     </widget> | ||||
|    </item> | ||||
|    <item> | ||||
|     <widget class="QLabel" name="labelKeyId"> | ||||
|     <widget class="ElidedLabel" name="labelKeyId"> | ||||
|      <property name="minimumSize"> | ||||
|       <size> | ||||
|        <width>0</width> | ||||
|        <height>15</height> | ||||
|       </size> | ||||
|      </property> | ||||
|      <property name="maximumSize"> | ||||
|       <size> | ||||
|        <width>100</width> | ||||
|  | @ -88,6 +100,28 @@ | |||
|      </property> | ||||
|     </widget> | ||||
|    </item> | ||||
|    <item> | ||||
|     <widget class="ElidedLabel" 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> | ||||
|     <widget class="QPushButton" name="pbAdd"> | ||||
|      <property name="text"> | ||||
|  | @ -98,5 +132,13 @@ | |||
|   </layout> | ||||
|  </widget> | ||||
|  <resources/> | ||||
|  <customwidgets> | ||||
|   <customwidget> | ||||
|    <class>ElidedLabel</class> | ||||
|    <extends>QLabel</extends> | ||||
|    <header location="global">gui/common/ElidedLabel.h</header> | ||||
|    <container>1</container> | ||||
|   </customwidget> | ||||
|  </customwidgets> | ||||
|  <connections/> | ||||
| </ui> | ||||
|  |  | |||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							|  | @ -36,10 +36,6 @@ | |||
| 
 | ||||
| #define IMAGE_IDENTITY          ":/images/identity/identities_32.png" | ||||
| 
 | ||||
| class UIStateHelper; | ||||
| //class IdentityItem ;
 | ||||
| //class CircleItem ;
 | ||||
| 
 | ||||
| class PeopleDialog : public RsGxsUpdateBroadcastPage, public Ui::PeopleDialog, public TokenResponse | ||||
| { | ||||
| 	Q_OBJECT | ||||
|  | @ -57,8 +53,6 @@ class PeopleDialog : public RsGxsUpdateBroadcastPage, public Ui::PeopleDialog, p | |||
| 		virtual QString pageName() const { return tr("People") ; } //MainPage
 | ||||
| 		virtual QString helpText() const { return ""; } //MainPage
 | ||||
| 
 | ||||
| 	// Derives from RsGxsUpdateBroadcastPage
 | ||||
| //	virtual void updateDisplay(bool) ;
 | ||||
| 	void loadRequest(const TokenQueue * /*queue*/, const TokenRequest &req) ; | ||||
| 
 | ||||
| 	void requestIdList() ; | ||||
|  | @ -68,30 +62,44 @@ class PeopleDialog : public RsGxsUpdateBroadcastPage, public Ui::PeopleDialog, p | |||
| 	void insertCircles(uint32_t token) ; | ||||
| 
 | ||||
| 	protected: | ||||
| 	// Derives from RsGxsUpdateBroadcastPage
 | ||||
| 		virtual void updateDisplay(bool complete); | ||||
| 	//End RsGxsUpdateBroadcastPage
 | ||||
| 
 | ||||
| private slots: | ||||
| 	void iw_AddButtonClickedExt(); | ||||
| 	void iw_AddButtonClickedInt(); | ||||
| 	void addToCircleExt(); | ||||
| 	void addToCircleInt(); | ||||
| 	void cw_askForGXSIdentityWidget(RsGxsId gxs_id); | ||||
| 	void cw_askForPGPIdentityWidget(RsPgpId pgp_id); | ||||
| 	void fl_flowLayoutItemDropped(QList<FlowLayoutItem *> flListItem, bool &bAccept); | ||||
| 	void cw_imageUpdatedExt(); | ||||
| 	void cw_imageUpdatedInt(); | ||||
| 	void fl_flowLayoutItemDroppedExt(QList<FlowLayoutItem *> flListItem, bool &bAccept); | ||||
| 	void fl_flowLayoutItemDroppedInt(QList<FlowLayoutItem *> flListItem, bool &bAccept); | ||||
| 	void pf_centerIndexChanged(int index); | ||||
| 	void pf_mouseMoveOverSlideEvent(QMouseEvent* event, int slideIndex); | ||||
| 	void pf_dragEnterEventOccurs(QDragEnterEvent *event); | ||||
| 	void pf_dragMoveEventOccurs(QDragMoveEvent *event); | ||||
| 	void pf_dropEventOccurs(QDropEvent *event); | ||||
| 	void pf_dropEventOccursExt(QDropEvent *event); | ||||
| 	void pf_dropEventOccursInt(QDropEvent *event); | ||||
| 
 | ||||
| private: | ||||
| 	void populatePictureFlow(); | ||||
| 	void reloadAll(); | ||||
| 	void populatePictureFlowExt(); | ||||
| 	void populatePictureFlowInt(); | ||||
| 
 | ||||
| 	TokenQueue *mIdentityQueue; | ||||
| 	TokenQueue *mCirclesQueue; | ||||
| 	UIStateHelper *mStateHelper; | ||||
| 
 | ||||
| 	FlowLayout *_flowLayout; | ||||
| 	std::map<RsPgpId,IdentityWidget *> _pgp_identity_widgets ; | ||||
| 	FlowLayout *_flowLayoutExt; | ||||
| 	std::map<RsGxsId,IdentityWidget *> _gxs_identity_widgets ; | ||||
| 	std::map<RsGxsGroupId,CircleWidget *> _circles_widgets ; | ||||
| 	//QList<IdentityWidget*> listId;
 | ||||
| 	QList<CircleWidget*> _listCir; | ||||
| 	std::map<RsGxsGroupId,CircleWidget *> _ext_circles_widgets ; | ||||
| 	QList<CircleWidget*> _extListCir; | ||||
| 
 | ||||
| 	FlowLayout *_flowLayoutInt; | ||||
| 	std::map<RsPgpId,IdentityWidget *> _pgp_identity_widgets ; | ||||
| 	std::map<RsGxsGroupId,CircleWidget *> _int_circles_widgets ; | ||||
| 	QList<CircleWidget*> _intListCir; | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,183 +1,265 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <ui version="4.0"> | ||||
|  <class>PeopleDialog</class> | ||||
|  <widget class="QWidget" name="PeopleDialog"> | ||||
|   <property name="geometry"> | ||||
|    <rect> | ||||
|     <x>0</x> | ||||
|     <y>0</y> | ||||
|     <width>727</width> | ||||
|     <height>524</height> | ||||
|    </rect> | ||||
|   </property> | ||||
|   <property name="sizePolicy"> | ||||
|    <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | ||||
|     <horstretch>0</horstretch> | ||||
|     <verstretch>0</verstretch> | ||||
|    </sizepolicy> | ||||
|   </property> | ||||
|   <property name="windowTitle"> | ||||
|    <string/> | ||||
|   </property> | ||||
|   <layout class="QGridLayout" name="gridLayout_2"> | ||||
|    <item row="1" column="0"> | ||||
|     <widget class="QLabel" name="label"> | ||||
|      <property name="font"> | ||||
|       <font> | ||||
|        <pointsize>11</pointsize> | ||||
|       </font> | ||||
|      </property> | ||||
|      <property name="text"> | ||||
|       <string>People you may know on RetroShare</string> | ||||
|      </property> | ||||
|     </widget> | ||||
|    </item> | ||||
|    <item row="0" column="0"> | ||||
|     <widget class="QFrame" name="titleBarFrame"> | ||||
|      <property name="frameShape"> | ||||
|       <enum>QFrame::Box</enum> | ||||
|      </property> | ||||
|      <property name="frameShadow"> | ||||
|       <enum>QFrame::Sunken</enum> | ||||
|      </property> | ||||
|      <layout class="QHBoxLayout" name="horizontalLayout_5"> | ||||
|       <property name="margin"> | ||||
|        <number>2</number> | ||||
|       </property> | ||||
|       <item> | ||||
|        <widget class="QLabel" name="titleBarPixmap_3"> | ||||
|         <property name="minimumSize"> | ||||
|          <size> | ||||
|           <width>0</width> | ||||
|           <height>0</height> | ||||
|          </size> | ||||
|         </property> | ||||
|         <property name="maximumSize"> | ||||
|          <size> | ||||
|           <width>24</width> | ||||
|           <height>24</height> | ||||
|          </size> | ||||
|         </property> | ||||
|         <property name="text"> | ||||
|          <string/> | ||||
|         </property> | ||||
|         <property name="pixmap"> | ||||
|          <pixmap resource="../images.qrc">:/images/identity/identities_32.png</pixmap> | ||||
|         </property> | ||||
|         <property name="scaledContents"> | ||||
|          <bool>true</bool> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|       <item> | ||||
|        <widget class="QLabel" name="titleBarLabel_3"> | ||||
|         <property name="font"> | ||||
|          <font> | ||||
|           <pointsize>10</pointsize> | ||||
|           <weight>75</weight> | ||||
|           <bold>true</bold> | ||||
|          </font> | ||||
|         </property> | ||||
|         <property name="text"> | ||||
|          <string><html><head/><body><p>People</p></body></html></string> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|       <item> | ||||
|        <spacer name="titleBarSpacer_3"> | ||||
|         <property name="orientation"> | ||||
|          <enum>Qt::Horizontal</enum> | ||||
|         </property> | ||||
|         <property name="sizeHint" stdset="0"> | ||||
|          <size> | ||||
|           <width>40</width> | ||||
|           <height>20</height> | ||||
|          </size> | ||||
|         </property> | ||||
|        </spacer> | ||||
|       </item> | ||||
|      </layout> | ||||
|     </widget> | ||||
|    </item> | ||||
|    <item row="3" column="0"> | ||||
|     <widget class="QSplitter" name="splitter"> | ||||
|      <property name="orientation"> | ||||
|       <enum>Qt::Vertical</enum> | ||||
|      </property> | ||||
|      <widget class="QScrollArea" name="scrollArea"> | ||||
|       <property name="minimumSize"> | ||||
|        <size> | ||||
|         <width>0</width> | ||||
|         <height>250</height> | ||||
|        </size> | ||||
|       </property> | ||||
|       <property name="widgetResizable"> | ||||
|        <bool>true</bool> | ||||
|       </property> | ||||
|       <widget class="FlowLayoutWidget" name="id"> | ||||
|        <property name="geometry"> | ||||
|         <rect> | ||||
|          <x>0</x> | ||||
|          <y>0</y> | ||||
|          <width>707</width> | ||||
|          <height>248</height> | ||||
|         </rect> | ||||
|        </property> | ||||
|        <layout class="QVBoxLayout"/> | ||||
|       </widget> | ||||
|      </widget> | ||||
|      <widget class="QWidget" name="layoutWidget"> | ||||
|       <layout class="QGridLayout" name="gridLayout"> | ||||
|        <item row="0" column="0"> | ||||
|         <widget class="QLabel" name="label_2"> | ||||
|          <property name="sizePolicy"> | ||||
|           <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> | ||||
|            <horstretch>0</horstretch> | ||||
|            <verstretch>0</verstretch> | ||||
|           </sizepolicy> | ||||
|          </property> | ||||
|          <property name="font"> | ||||
|           <font> | ||||
|            <pointsize>11</pointsize> | ||||
|           </font> | ||||
|          </property> | ||||
|          <property name="text"> | ||||
|           <string>Drag people to your Circles</string> | ||||
|          </property> | ||||
|          <property name="alignment"> | ||||
|           <set>Qt::AlignCenter</set> | ||||
|          </property> | ||||
|         </widget> | ||||
|        </item> | ||||
|        <item row="1" column="0"> | ||||
|         <widget class="PictureFlow" name="pictureFlowWidget" native="true"> | ||||
|          <property name="widgetResizable" stdset="0"> | ||||
|           <bool>true</bool> | ||||
|          </property> | ||||
|         </widget> | ||||
|        </item> | ||||
|       </layout> | ||||
|      </widget> | ||||
|     </widget> | ||||
|    </item> | ||||
|   </layout> | ||||
|  </widget> | ||||
|  <customwidgets> | ||||
|   <customwidget> | ||||
|    <class>PictureFlow</class> | ||||
|    <extends>QWidget</extends> | ||||
|    <header location="global">gui/common/PictureFlow.h</header> | ||||
|    <container>1</container> | ||||
|   </customwidget> | ||||
|   <customwidget> | ||||
|    <class>FlowLayoutWidget</class> | ||||
|    <extends>QWidget</extends> | ||||
|    <header location="global">gui/common/FlowLayout.h</header> | ||||
|    <container>1</container> | ||||
|   </customwidget> | ||||
|  </customwidgets> | ||||
|  <resources> | ||||
|   <include location="../images.qrc"/> | ||||
|  </resources> | ||||
|  <connections/> | ||||
| </ui> | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <ui version="4.0"> | ||||
|  <class>PeopleDialog</class> | ||||
|  <widget class="QWidget" name="PeopleDialog"> | ||||
|   <property name="geometry"> | ||||
|    <rect> | ||||
|     <x>0</x> | ||||
|     <y>0</y> | ||||
|     <width>727</width> | ||||
|     <height>524</height> | ||||
|    </rect> | ||||
|   </property> | ||||
|   <property name="sizePolicy"> | ||||
|    <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | ||||
|     <horstretch>0</horstretch> | ||||
|     <verstretch>0</verstretch> | ||||
|    </sizepolicy> | ||||
|   </property> | ||||
|   <property name="windowTitle"> | ||||
|    <string/> | ||||
|   </property> | ||||
|   <layout class="QGridLayout" name="titleBarLayout"> | ||||
|    <item row="0" column="0"> | ||||
|     <widget class="QFrame" name="titleBarFrame"> | ||||
|      <property name="frameShape"> | ||||
|       <enum>QFrame::Box</enum> | ||||
|      </property> | ||||
|      <property name="frameShadow"> | ||||
|       <enum>QFrame::Sunken</enum> | ||||
|      </property> | ||||
|      <layout class="QHBoxLayout"> | ||||
|       <property name="margin"> | ||||
|        <number>2</number> | ||||
|       </property> | ||||
|       <item> | ||||
|        <widget class="QLabel" name="titleBarPixmap"> | ||||
|         <property name="minimumSize"> | ||||
|          <size> | ||||
|           <width>0</width> | ||||
|           <height>0</height> | ||||
|          </size> | ||||
|         </property> | ||||
|         <property name="maximumSize"> | ||||
|          <size> | ||||
|           <width>24</width> | ||||
|           <height>24</height> | ||||
|          </size> | ||||
|         </property> | ||||
|         <property name="text"> | ||||
|          <string/> | ||||
|         </property> | ||||
|         <property name="pixmap"> | ||||
|          <pixmap resource="../images.qrc">:/images/identity/identities_32.png</pixmap> | ||||
|         </property> | ||||
|         <property name="scaledContents"> | ||||
|          <bool>true</bool> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|       <item> | ||||
|        <widget class="QLabel" name="titleBarLabel"> | ||||
|         <property name="font"> | ||||
|          <font> | ||||
|           <pointsize>10</pointsize> | ||||
|           <weight>75</weight> | ||||
|           <bold>true</bold> | ||||
|          </font> | ||||
|         </property> | ||||
|         <property name="text"> | ||||
|          <string><html><head/><body><p>People</p></body></html></string> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|       <item> | ||||
|        <spacer name="titleBarSpacer"> | ||||
|         <property name="orientation"> | ||||
|          <enum>Qt::Horizontal</enum> | ||||
|         </property> | ||||
|         <property name="sizeHint" stdset="0"> | ||||
|          <size> | ||||
|           <width>40</width> | ||||
|           <height>20</height> | ||||
|          </size> | ||||
|         </property> | ||||
|        </spacer> | ||||
|       </item> | ||||
|      </layout> | ||||
|     </widget> | ||||
|    </item> | ||||
|    <item row="1" column="0"> | ||||
|     <widget class="QTabWidget" name="tabWidget"> | ||||
|      <property name="currentIndex"> | ||||
|       <number>0</number> | ||||
|      </property> | ||||
|      <widget class="QWidget" name="tabExternal"> | ||||
|       <property name="sizePolicy"> | ||||
|        <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> | ||||
|         <horstretch>0</horstretch> | ||||
|         <verstretch>0</verstretch> | ||||
|        </sizepolicy> | ||||
|       </property> | ||||
|       <attribute name="title"> | ||||
|        <string>External</string> | ||||
|       </attribute> | ||||
|       <layout class="QVBoxLayout"> | ||||
|        <item> | ||||
|         <widget class="QSplitter" name="splitterExternal"> | ||||
|      <property name="orientation"> | ||||
|       <enum>Qt::Vertical</enum> | ||||
|      </property> | ||||
|          <widget class="QScrollArea" name="scrollAreaExternal"> | ||||
|       <property name="minimumSize"> | ||||
|        <size> | ||||
|         <width>0</width> | ||||
|         <height>250</height> | ||||
|        </size> | ||||
|       </property> | ||||
|       <property name="widgetResizable"> | ||||
|        <bool>true</bool> | ||||
|       </property> | ||||
|           <widget class="FlowLayoutWidget" name="idExternal"> | ||||
|        <property name="geometry"> | ||||
|         <rect> | ||||
|          <x>0</x> | ||||
|          <y>0</y> | ||||
|              <width>685</width> | ||||
|          <height>248</height> | ||||
|         </rect> | ||||
|        </property> | ||||
|        <layout class="QVBoxLayout"/> | ||||
|       </widget> | ||||
|      </widget> | ||||
|          <widget class="QWidget" name="widgetExternal"> | ||||
|           <layout class="QGridLayout" name="layoutExternal"> | ||||
|        <item row="0" column="0"> | ||||
|             <widget class="QLabel" name="label_External"> | ||||
|          <property name="sizePolicy"> | ||||
|           <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> | ||||
|            <horstretch>0</horstretch> | ||||
|            <verstretch>0</verstretch> | ||||
|           </sizepolicy> | ||||
|          </property> | ||||
|          <property name="font"> | ||||
|           <font> | ||||
|            <pointsize>11</pointsize> | ||||
|           </font> | ||||
|          </property> | ||||
|          <property name="text"> | ||||
|               <string>Drag your circles or people to each other.</string> | ||||
|          </property> | ||||
|          <property name="alignment"> | ||||
|           <set>Qt::AlignCenter</set> | ||||
|          </property> | ||||
|         </widget> | ||||
|        </item> | ||||
|        <item row="1" column="0"> | ||||
|             <widget class="PictureFlow" name="pictureFlowWidgetExternal" native="true"> | ||||
|          <property name="widgetResizable" stdset="0"> | ||||
|           <bool>true</bool> | ||||
|          </property> | ||||
|         </widget> | ||||
|        </item> | ||||
|       </layout> | ||||
|          </widget> | ||||
|         </widget> | ||||
|        </item> | ||||
|       </layout> | ||||
|      </widget> | ||||
|      <widget class="QWidget" name="tabInternal"> | ||||
|       <property name="sizePolicy"> | ||||
|        <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> | ||||
|         <horstretch>0</horstretch> | ||||
|         <verstretch>0</verstretch> | ||||
|        </sizepolicy> | ||||
|       </property> | ||||
|       <attribute name="title"> | ||||
|        <string>Internal</string> | ||||
|       </attribute> | ||||
|       <layout class="QVBoxLayout"> | ||||
|        <item> | ||||
|         <widget class="QSplitter" name="splitterInternal"> | ||||
|          <property name="orientation"> | ||||
|           <enum>Qt::Vertical</enum> | ||||
|          </property> | ||||
|          <widget class="QScrollArea" name="scrollAreaInternal"> | ||||
|           <property name="minimumSize"> | ||||
|            <size> | ||||
|             <width>0</width> | ||||
|             <height>250</height> | ||||
|            </size> | ||||
|           </property> | ||||
|           <property name="widgetResizable"> | ||||
|            <bool>true</bool> | ||||
|           </property> | ||||
|           <widget class="FlowLayoutWidget" name="idInternal"> | ||||
|            <property name="geometry"> | ||||
|             <rect> | ||||
|              <x>0</x> | ||||
|              <y>0</y> | ||||
|              <width>685</width> | ||||
|              <height>248</height> | ||||
|             </rect> | ||||
|            </property> | ||||
|            <layout class="QVBoxLayout"/> | ||||
|           </widget> | ||||
|          </widget> | ||||
|          <widget class="QWidget" name="widgetInternal"> | ||||
|           <layout class="QGridLayout" name="layoutInternal"> | ||||
|            <item row="0" column="0"> | ||||
|             <widget class="QLabel" name="label_Internal"> | ||||
|              <property name="sizePolicy"> | ||||
|               <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> | ||||
|                <horstretch>0</horstretch> | ||||
|                <verstretch>0</verstretch> | ||||
|               </sizepolicy> | ||||
|              </property> | ||||
|              <property name="font"> | ||||
|               <font> | ||||
|                <pointsize>11</pointsize> | ||||
|               </font> | ||||
|              </property> | ||||
|              <property name="text"> | ||||
|               <string>Drag your circles or people to each other.</string> | ||||
|              </property> | ||||
|              <property name="alignment"> | ||||
|               <set>Qt::AlignCenter</set> | ||||
|              </property> | ||||
|             </widget> | ||||
|            </item> | ||||
|            <item row="1" column="0"> | ||||
|             <widget class="PictureFlow" name="pictureFlowWidgetInternal" native="true"> | ||||
|              <property name="widgetResizable" stdset="0"> | ||||
|               <bool>true</bool> | ||||
|              </property> | ||||
|             </widget> | ||||
|            </item> | ||||
|           </layout> | ||||
|          </widget> | ||||
|         </widget> | ||||
|        </item> | ||||
|       </layout> | ||||
|      </widget> | ||||
|     </widget> | ||||
|    </item> | ||||
|   </layout> | ||||
|  </widget> | ||||
|  <customwidgets> | ||||
|   <customwidget> | ||||
|    <class>PictureFlow</class> | ||||
|    <extends>QWidget</extends> | ||||
|    <header location="global">gui/common/PictureFlow.h</header> | ||||
|    <container>1</container> | ||||
|   </customwidget> | ||||
|   <customwidget> | ||||
|    <class>FlowLayoutWidget</class> | ||||
|    <extends>QWidget</extends> | ||||
|    <header location="global">gui/common/FlowLayout.h</header> | ||||
|    <container>1</container> | ||||
|   </customwidget> | ||||
|  </customwidgets> | ||||
|  <resources> | ||||
|   <include location="../images.qrc"/> | ||||
|  </resources> | ||||
|  <connections/> | ||||
| </ui> | ||||
|  |  | |||
|  | @ -97,7 +97,7 @@ PhotoShare::PhotoShare(QWidget *parent) | |||
|         requestAlbumData(); | ||||
| } | ||||
| 
 | ||||
| void PhotoShare::~PhotoShare() | ||||
| PhotoShare::~PhotoShare() | ||||
| { | ||||
|     delete(mPhotoQueue); | ||||
| } | ||||
|  |  | |||
|  | @ -122,6 +122,10 @@ signals: | |||
| 	///Signales when the widget is dropped.
 | ||||
| 	void flowLayoutItemDropped(QList <FlowLayoutItem*> listItem, bool &bAccept); | ||||
| 
 | ||||
| 	/// \brief updated
 | ||||
| 	///Signales when the image (getImage) is updated.
 | ||||
| 	void imageUpdated(); | ||||
| 
 | ||||
| protected: | ||||
| 	void keyPressEvent(QKeyEvent *event){event->ignore();} | ||||
| 	void keyReleaseEvent(QKeyEvent *event){event->ignore();} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 csoler
						csoler