File indexing completed on 2024-12-22 04:45:37

0001 /*
0002    SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QDebug>
0010 #include <QWidget>
0011 
0012 #include "libruqolawidgets_private_export.h"
0013 class QCheckBox;
0014 class QLineEdit;
0015 class LIBRUQOLAWIDGETS_TESTS_EXPORT AdministratorOauthCreateWidget : public QWidget
0016 {
0017     Q_OBJECT
0018 public:
0019     struct OauthCreateInfo {
0020         QString applicationName;
0021         QString redirectUrl;
0022         bool active = false;
0023     };
0024 
0025     explicit AdministratorOauthCreateWidget(QWidget *parent = nullptr);
0026     ~AdministratorOauthCreateWidget() override;
0027 
0028     [[nodiscard]] OauthCreateInfo oauthInfo() const;
0029     void setOauthInfo(const OauthCreateInfo &info);
0030 Q_SIGNALS:
0031     void enableOkButton(bool enabled);
0032 
0033 private:
0034     LIBRUQOLAWIDGETS_NO_EXPORT void slotTextChanged();
0035     QCheckBox *const mActiveCheckBox;
0036     QLineEdit *const mApplicationName;
0037     QLineEdit *const mRedirectUrl;
0038 };
0039 LIBRUQOLAWIDGETS_EXPORT QDebug operator<<(QDebug d, const AdministratorOauthCreateWidget::OauthCreateInfo &t);