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
|
|
|
|
2012-07-27 11:41:52 -04:00
|
|
|
#include "retroshare-gui/mainpage.h"
|
2012-02-13 13:43:15 -05:00
|
|
|
#include "ui_IdDialog.h"
|
|
|
|
|
2012-06-13 20:36:25 -04:00
|
|
|
#include <retroshare/rsidentity.h>
|
2012-02-13 13:43:15 -05:00
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
#include "gui/Identity/IdEditDialog.h"
|
2012-06-13 20:36:25 -04:00
|
|
|
#include "util/TokenQueue.h"
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2013-07-10 17:57:23 -04:00
|
|
|
class UIStateHelper;
|
|
|
|
|
2012-06-13 20:36:25 -04:00
|
|
|
class IdDialog : public MainPage, 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);
|
|
|
|
|
2013-07-10 17:57:23 -04:00
|
|
|
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
2012-06-13 20:36:25 -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
|
|
|
|
|
|
|
void checkUpdate();
|
2013-07-10 17:57:23 -04:00
|
|
|
void addIdentity();
|
|
|
|
void editIdentity();
|
2012-02-13 13:43:15 -05:00
|
|
|
|
|
|
|
void updateSelection();
|
|
|
|
|
2013-07-10 17:57:23 -04:00
|
|
|
void todo();
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2013-07-10 17:57:23 -04:00
|
|
|
private:
|
2012-06-07 13:11:57 -04:00
|
|
|
void requestIdDetails(std::string &id);
|
|
|
|
void insertIdDetails(uint32_t token);
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
void requestIdList();
|
|
|
|
void requestIdData(std::list<std::string> &ids);
|
2013-07-10 17:57:23 -04:00
|
|
|
bool fillIdListItem(const RsGxsIdGroup& data, QTreeWidgetItem *&item, const std::string &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
|
|
|
|
2013-06-04 17:00:43 -04:00
|
|
|
void requestRepList(const RsGxsGroupId &aboutId);
|
|
|
|
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
|
|
|
|
|
|
|
/* UI - from Designer */
|
|
|
|
Ui::IdDialog ui;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|