2007-11-14 22:18:48 -05:00
|
|
|
/****************************************************************
|
|
|
|
* RetroShare is distributed under the following license:
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006, crypton
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _CONFCERTDIALOG_H
|
|
|
|
#define _CONFCERTDIALOG_H
|
|
|
|
|
2008-04-07 20:31:46 -04:00
|
|
|
#include <QDialog>
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
#include "ui_ConfCertDialog.h"
|
|
|
|
|
2008-04-07 20:31:46 -04:00
|
|
|
class ConfCertDialog : public QDialog
|
2007-11-14 22:18:48 -05:00
|
|
|
{
|
2010-10-25 16:19:57 -04:00
|
|
|
Q_OBJECT
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2010-10-25 16:19:57 -04:00
|
|
|
public:
|
|
|
|
enum enumPage { PageDetails, PageTrust, PageCertificate };
|
2009-05-07 18:43:11 -04:00
|
|
|
|
2010-10-25 16:19:57 -04:00
|
|
|
static void showIt(const std::string& id, enumPage page);
|
2009-05-07 18:43:11 -04:00
|
|
|
|
2010-10-25 16:19:57 -04:00
|
|
|
signals:
|
|
|
|
void configChanged();
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2010-10-25 16:19:57 -04:00
|
|
|
private:
|
|
|
|
/** Default constructor */
|
|
|
|
ConfCertDialog(const std::string& id, QWidget *parent = 0, Qt::WFlags flags = 0);
|
|
|
|
/** Default destructor */
|
|
|
|
~ConfCertDialog();
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2010-10-25 16:19:57 -04:00
|
|
|
static ConfCertDialog *instance(const std::string& peer_id);
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2010-10-25 16:19:57 -04:00
|
|
|
static void loadAll();
|
|
|
|
void load();
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
private slots:
|
2010-10-25 16:19:57 -04:00
|
|
|
void listWidgetContextMenuPopup(const QPoint &pos);
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2010-10-25 16:19:57 -04:00
|
|
|
void applyDialog();
|
|
|
|
void makeFriend();
|
|
|
|
void denyFriend();
|
|
|
|
void signGPGKey();
|
2010-06-13 19:42:21 -04:00
|
|
|
|
2010-10-25 16:19:57 -04:00
|
|
|
void showHelpDialog();
|
|
|
|
/** Called when a child window requests the given help <b>topic</b>. */
|
|
|
|
void showHelpDialog(const QString &topic);
|
2010-06-13 19:42:21 -04:00
|
|
|
|
2010-10-25 16:19:57 -04:00
|
|
|
void copyToClipboard();
|
2010-01-13 16:32:56 -05:00
|
|
|
|
2007-11-14 22:18:48 -05:00
|
|
|
private:
|
2010-06-13 19:42:21 -04:00
|
|
|
std::string mId;
|
|
|
|
|
|
|
|
/** Qt Designer generated object */
|
|
|
|
Ui::ConfCertDialog ui;
|
2007-11-14 22:18:48 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|