2012-02-13 13:43:15 -05: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".
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2013-07-10 17:57:23 -04:00
|
|
|
#ifndef IDENTITYDIALOG_H
|
|
|
|
#define IDENTITYDIALOG_H
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2013-07-14 14:48:40 -04:00
|
|
|
#include "gui/gxs/RsGxsUpdateBroadcastPage.h"
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2012-06-13 20:36:25 -04:00
|
|
|
#include <retroshare/rsidentity.h>
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2012-06-13 20:36:25 -04:00
|
|
|
#include "util/TokenQueue.h"
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2015-01-23 09:42:28 -05:00
|
|
|
#define IMAGE_IDDIALOG ":/images/user/friends32.png"
|
2014-05-09 22:38:47 -04:00
|
|
|
|
2014-12-24 09:43:06 -05:00
|
|
|
namespace Ui {
|
|
|
|
class IdDialog;
|
|
|
|
}
|
|
|
|
|
2013-07-10 17:57:23 -04:00
|
|
|
class UIStateHelper;
|
2014-12-24 09:43:06 -05:00
|
|
|
class QTreeWidgetItem;
|
2013-07-10 17:57:23 -04:00
|
|
|
|
2013-07-14 14:48:40 -04:00
|
|
|
class IdDialog : public RsGxsUpdateBroadcastPage, public TokenResponse
|
2012-02-13 13:43:15 -05:00
|
|
|
{
|
2013-07-10 17:57:23 -04:00
|
|
|
Q_OBJECT
|
2012-02-13 13:43:15 -05:00
|
|
|
|
|
|
|
public:
|
|
|
|
IdDialog(QWidget *parent = 0);
|
2014-10-12 06:46:09 -04:00
|
|
|
~IdDialog();
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2014-05-09 22:38:47 -04:00
|
|
|
virtual QIcon iconPixmap() const { return QIcon(IMAGE_IDDIALOG) ; } //MainPage
|
2015-01-23 09:42:28 -05:00
|
|
|
virtual QString pageName() const { return tr("People") ; } //MainPage
|
2014-05-09 22:38:47 -04:00
|
|
|
virtual QString helpText() const { return ""; } //MainPage
|
|
|
|
|
2013-07-10 17:57:23 -04:00
|
|
|
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
2012-06-13 20:36:25 -04:00
|
|
|
|
2013-07-14 14:48:40 -04:00
|
|
|
protected:
|
2013-07-19 05:48:51 -04:00
|
|
|
virtual void updateDisplay(bool complete);
|
2013-07-14 14:48:40 -04:00
|
|
|
|
2012-02-13 13:43:15 -05:00
|
|
|
private slots:
|
2013-07-10 17:57:23 -04:00
|
|
|
void filterComboBoxChanged();
|
|
|
|
void filterChanged(const QString &text);
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2013-07-10 17:57:23 -04:00
|
|
|
void addIdentity();
|
2014-05-06 13:15:20 -04:00
|
|
|
void removeIdentity();
|
2013-07-10 17:57:23 -04:00
|
|
|
void editIdentity();
|
2014-06-12 06:28:23 -04:00
|
|
|
void chatIdentity();
|
2015-01-23 11:35:06 -05:00
|
|
|
void sendMsg();
|
|
|
|
|
2012-02-13 13:43:15 -05:00
|
|
|
|
|
|
|
void updateSelection();
|
|
|
|
|
2013-07-10 17:57:23 -04:00
|
|
|
void todo();
|
2014-02-19 06:11:06 -05:00
|
|
|
void modifyReputation();
|
2014-12-24 09:43:06 -05:00
|
|
|
|
|
|
|
/** Create the context popup menu and it's submenus */
|
2014-05-03 13:56:12 -04:00
|
|
|
void IdListCustomPopupMenu( QPoint point );
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2013-07-10 17:57:23 -04:00
|
|
|
private:
|
2014-12-24 09:43:06 -05:00
|
|
|
void processSettings(bool load);
|
|
|
|
|
|
|
|
void requestIdDetails();
|
2012-06-07 13:11:57 -04:00
|
|
|
void insertIdDetails(uint32_t token);
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
void requestIdList();
|
2014-12-24 09:43:06 -05:00
|
|
|
void requestIdData(std::list<RsGxsGroupId> &ids);
|
2014-03-17 16:56:06 -04:00
|
|
|
bool fillIdListItem(const RsGxsIdGroup& data, QTreeWidgetItem *&item, const RsPgpId &ownPgpId, int accept);
|
2012-06-07 13:11:57 -04:00
|
|
|
void insertIdList(uint32_t token);
|
2013-07-10 17:57:23 -04:00
|
|
|
void filterIds();
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2014-12-24 09:43:06 -05:00
|
|
|
void requestRepList();
|
2013-06-04 17:00:43 -04:00
|
|
|
void insertRepList(uint32_t token);
|
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
void requestIdEdit(std::string &id);
|
|
|
|
void showIdEdit(uint32_t token);
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2013-07-10 17:57:23 -04:00
|
|
|
private:
|
2012-06-13 20:36:25 -04:00
|
|
|
TokenQueue *mIdQueue;
|
2013-07-10 17:57:23 -04:00
|
|
|
UIStateHelper *mStateHelper;
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2014-12-24 09:43:06 -05:00
|
|
|
RsGxsGroupId mId;
|
|
|
|
|
2012-02-13 13:43:15 -05:00
|
|
|
/* UI - from Designer */
|
2014-12-24 09:43:06 -05:00
|
|
|
Ui::IdDialog *ui;
|
2012-02-13 13:43:15 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|