2013-03-15 17:02:43 -04:00
|
|
|
/*
|
|
|
|
* Retroshare Gxs Support
|
2012-11-19 17:14:45 -05:00
|
|
|
*
|
2013-03-15 17:02:43 -04:00
|
|
|
* Copyright 2012-2013 by Robert Fernie.
|
2012-11-19 17:14:45 -05:00
|
|
|
*
|
2013-03-15 17:02:43 -04:00
|
|
|
* 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.
|
2012-11-19 17:14:45 -05:00
|
|
|
*
|
2013-03-15 17:02:43 -04:00
|
|
|
* 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.
|
2012-11-19 17:14:45 -05:00
|
|
|
*
|
2013-03-15 17:02:43 -04:00
|
|
|
* 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".
|
|
|
|
*
|
|
|
|
*/
|
2012-11-19 17:14:45 -05:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef _GXS_ID_CHOOSER_H
|
|
|
|
#define _GXS_ID_CHOOSER_H
|
|
|
|
|
|
|
|
#include <QComboBox>
|
|
|
|
#include <retroshare/rsidentity.h>
|
|
|
|
|
|
|
|
#define IDCHOOSER_ID_REQUIRED 0x0001
|
|
|
|
#define IDCHOOSER_ANON_DEFAULT 0x0002
|
|
|
|
|
|
|
|
class GxsIdChooser : public QComboBox
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
GxsIdChooser(QWidget *parent = NULL);
|
|
|
|
|
|
|
|
void loadIds(uint32_t chooserFlags, RsGxsId defId);
|
2014-01-28 02:57:58 -05:00
|
|
|
bool setChosenId(RsGxsId &id);
|
2012-11-19 17:14:45 -05:00
|
|
|
bool getChosenId(RsGxsId &id);
|
|
|
|
|
2013-06-23 14:55:30 -04:00
|
|
|
private slots:
|
|
|
|
void timer();
|
|
|
|
|
2012-11-19 17:14:45 -05:00
|
|
|
private:
|
|
|
|
void loadPrivateIds();
|
2013-06-23 14:55:30 -04:00
|
|
|
void addPrivateId(const RsGxsId &gxsId, bool replace);
|
|
|
|
bool MakeIdDesc(const RsGxsId &id, QString &desc);
|
2012-11-19 17:14:45 -05:00
|
|
|
|
|
|
|
uint32_t mFlags;
|
|
|
|
RsGxsId mDefaultId;
|
2013-06-23 14:55:30 -04:00
|
|
|
|
|
|
|
QList<RsGxsId> mPendingId;
|
|
|
|
QTimer *mTimer;
|
|
|
|
unsigned int mTimerCount;
|
2012-11-19 17:14:45 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|