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 IDEDITDIALOG_H
|
|
|
|
#define IDEDITDIALOG_H
|
2012-02-13 13:43:15 -05:00
|
|
|
|
|
|
|
#include "ui_IdEditDialog.h"
|
|
|
|
|
2012-06-07 13:11:57 -04:00
|
|
|
#include <inttypes.h>
|
|
|
|
|
2012-06-13 20:36:25 -04:00
|
|
|
#include "util/TokenQueue.h"
|
|
|
|
|
2013-07-10 17:57:23 -04:00
|
|
|
class UIStateHelper;
|
|
|
|
|
|
|
|
class IdEditDialog : public QDialog, 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:
|
|
|
|
IdEditDialog(QWidget *parent = 0);
|
|
|
|
|
|
|
|
void setupNewId(bool pseudo);
|
2012-06-13 20:36:25 -04:00
|
|
|
void setupExistingId(std::string keyId);
|
|
|
|
|
2013-07-10 17:57:23 -04:00
|
|
|
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
2012-02-13 13:43:15 -05:00
|
|
|
|
|
|
|
private slots:
|
2013-07-10 17:57:23 -04:00
|
|
|
void idTypeToggled(bool checked);
|
2012-02-13 13:43:15 -05:00
|
|
|
void updateId();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void updateIdType(bool pseudo);
|
2013-07-10 17:57:23 -04:00
|
|
|
void loadExistingId(uint32_t token);
|
2012-02-13 13:43:15 -05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
Ui::IdEditDialog ui;
|
2013-07-10 17:57:23 -04:00
|
|
|
bool mIsNew;
|
|
|
|
UIStateHelper *mStateHelper;
|
2012-02-13 13:43:15 -05:00
|
|
|
|
2012-06-13 20:36:25 -04:00
|
|
|
TokenQueue *mIdQueue;
|
2012-02-13 13:43:15 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|