2014-05-03 12:50:40 +00:00
|
|
|
/*
|
|
|
|
* Retroshare Identity.
|
|
|
|
*
|
|
|
|
* Copyright 2012-2012 by Robert Fernie.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License Version 2.1 as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
* USA.
|
|
|
|
*
|
|
|
|
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
#include <retroshare/rsidentity.h>
|
|
|
|
|
2014-09-28 20:46:56 +00:00
|
|
|
#include "gui/People/CircleWidget.h"
|
|
|
|
#include "gui/People/IdentityWidget.h"
|
|
|
|
#include "gui/gxs/RsGxsUpdateBroadcastPage.h"
|
|
|
|
#include "util/TokenQueue.h"
|
2014-05-03 12:50:40 +00:00
|
|
|
|
|
|
|
#include "ui_PeopleDialog.h"
|
|
|
|
|
2014-05-10 02:38:47 +00:00
|
|
|
#define IMAGE_IDENTITY ":/images/identity/identities_32.png"
|
|
|
|
|
2014-05-03 12:50:40 +00:00
|
|
|
class UIStateHelper;
|
2014-09-28 20:46:56 +00:00
|
|
|
//class IdentityItem ;
|
|
|
|
//class CircleItem ;
|
2014-05-03 12:50:40 +00:00
|
|
|
|
2014-09-28 20:46:56 +00:00
|
|
|
class PeopleDialog : public RsGxsUpdateBroadcastPage, public Ui::PeopleDialog, public TokenResponse
|
2014-05-03 12:50:40 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2014-09-28 20:46:56 +00:00
|
|
|
static const uint32_t PD_IDLIST ;
|
|
|
|
static const uint32_t PD_IDDETAILS ;
|
|
|
|
static const uint32_t PD_REFRESH ;
|
|
|
|
static const uint32_t PD_CIRCLES ;
|
|
|
|
|
2014-05-03 12:50:40 +00:00
|
|
|
PeopleDialog(QWidget *parent = 0);
|
|
|
|
|
2014-05-10 02:38:47 +00:00
|
|
|
virtual QIcon iconPixmap() const { return QIcon(IMAGE_IDENTITY) ; } //MainPage
|
|
|
|
virtual QString pageName() const { return tr("People") ; } //MainPage
|
|
|
|
virtual QString helpText() const { return ""; } //MainPage
|
|
|
|
|
2014-09-28 20:46:56 +00:00
|
|
|
// Derives from RsGxsUpdateBroadcastPage
|
|
|
|
// virtual void updateDisplay(bool) ;
|
|
|
|
void loadRequest(const TokenQueue * /*queue*/, const TokenRequest &req) ;
|
|
|
|
|
|
|
|
void requestIdList() ;
|
|
|
|
void requestCirclesList() ;
|
|
|
|
|
|
|
|
void insertIdList(uint32_t token) ;
|
|
|
|
void insertCircles(uint32_t token) ;
|
|
|
|
|
2014-05-03 12:50:40 +00:00
|
|
|
protected:
|
|
|
|
virtual void updateDisplay(bool complete);
|
|
|
|
|
2014-09-28 20:46:56 +00:00
|
|
|
private slots:
|
|
|
|
void cw_askForGXSIdentityWidget(RsGxsId gxs_id);
|
|
|
|
void cw_askForPGPIdentityWidget(RsPgpId pgp_id);
|
|
|
|
void fl_flowLayoutItemDropped(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);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void populatePictureFlow();
|
|
|
|
|
|
|
|
TokenQueue *mIdentityQueue;
|
|
|
|
TokenQueue *mCirclesQueue;
|
|
|
|
UIStateHelper *mStateHelper;
|
|
|
|
|
|
|
|
FlowLayout *_flowLayout;
|
|
|
|
std::map<RsPgpId,IdentityWidget *> _pgp_identity_widgets ;
|
|
|
|
std::map<RsGxsId,IdentityWidget *> _gxs_identity_widgets ;
|
|
|
|
std::map<RsGxsGroupId,CircleWidget *> _circles_widgets ;
|
|
|
|
//QList<IdentityWidget*> listId;
|
|
|
|
QList<CircleWidget*> _listCir;
|
2014-05-03 12:50:40 +00:00
|
|
|
};
|
|
|
|
|