2014-01-21 04:45:02 +04:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Daniel Molkentin <danimo@owncloud.com>
|
|
|
|
*
|
|
|
|
* 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
|
2016-10-25 12:00:07 +03:00
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2014-01-21 04:45:02 +04:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SSLBUTTON_H
|
|
|
|
#define SSLBUTTON_H
|
|
|
|
|
|
|
|
#include <QToolButton>
|
|
|
|
#include <QPointer>
|
|
|
|
#include <QSsl>
|
|
|
|
|
|
|
|
class QAction;
|
|
|
|
class QSslCertificate;
|
|
|
|
class QSslConfiguration;
|
|
|
|
|
2014-11-10 00:34:07 +03:00
|
|
|
namespace OCC {
|
2014-01-21 04:45:02 +04:00
|
|
|
|
2014-12-17 16:09:57 +03:00
|
|
|
class AccountState;
|
2014-01-21 04:45:02 +04:00
|
|
|
|
2015-06-29 19:56:09 +03:00
|
|
|
/**
|
|
|
|
* @brief The SslButton class
|
|
|
|
* @ingroup gui
|
2015-06-26 18:07:47 +03:00
|
|
|
*/
|
2014-01-21 04:45:02 +04:00
|
|
|
class SslButton : public QToolButton
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2018-11-11 12:56:22 +03:00
|
|
|
explicit SslButton(QWidget *parent = nullptr);
|
2014-12-17 16:09:57 +03:00
|
|
|
void updateAccountState(AccountState *accountState);
|
2014-01-21 04:45:02 +04:00
|
|
|
|
2015-03-25 17:39:53 +03:00
|
|
|
public slots:
|
|
|
|
void slotUpdateMenu();
|
|
|
|
|
2014-01-21 04:45:02 +04:00
|
|
|
private:
|
|
|
|
QMenu *buildCertMenu(QMenu *parent, const QSslCertificate &cert,
|
2018-03-27 18:42:39 +03:00
|
|
|
const QList<QSslCertificate> &userApproved, int pos, const QList<QSslCertificate> &systemCaCertificates);
|
2015-03-25 17:39:53 +03:00
|
|
|
QPointer<AccountState> _accountState;
|
2015-07-02 11:49:18 +03:00
|
|
|
QMenu *_menu;
|
2014-01-21 04:45:02 +04:00
|
|
|
};
|
|
|
|
|
2014-11-10 00:34:07 +03:00
|
|
|
} // namespace OCC
|
2014-01-21 04:45:02 +04:00
|
|
|
|
|
|
|
#endif // SSLBUTTON_H
|