-
Notifications
You must be signed in to change notification settings - Fork 19
/
webauthdialog.h
42 lines (34 loc) · 1.04 KB
/
webauthdialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef WEBAUTHDIALOG_H
#define WEBAUTHDIALOG_H
#include <QDialog>
#include <QButtonGroup>
#include <QScrollArea>
#include <QWebEngineWebAuthUxRequest>
#include "ui_webauthdialog.h"
#include "qwebenginewebauthuxrequest.h"
class WebAuthDialog : public QDialog
{
Q_OBJECT
public:
WebAuthDialog(QWebEngineWebAuthUxRequest *request, QWidget *parent = nullptr);
~WebAuthDialog();
void updateDisplay();
private:
QWebEngineWebAuthUxRequest *uxRequest;
QButtonGroup *buttonGroup = nullptr;
QScrollArea *scrollArea = nullptr;
QWidget *selectAccountWidget = nullptr;
QVBoxLayout *selectAccountLayout = nullptr;
void setupSelectAccountUI();
void setupCollectPinUI();
void setupFinishCollectTokenUI();
void setupErrorUI();
void onCancelRequest();
void onRetry();
void onAcceptRequest();
void clearSelectAccountButtons();
Ui::WebAuthDialog *uiWebAuthDialog;
};
#endif // WEBAUTHDIALOG_H