File indexing completed on 2024-12-08 04:34:12
0001 /* 0002 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 #include "authenticationinfo.h" 0009 #include "libruqolawidgets_private_export.h" 0010 #include <QWidget> 0011 class QLineEdit; 0012 class KMessageWidget; 0013 class KBusyIndicatorWidget; 0014 class QPushButton; 0015 class LIBRUQOLAWIDGETS_TESTS_EXPORT CreateNewServerCheckUrlWidget : public QWidget 0016 { 0017 Q_OBJECT 0018 public: 0019 struct LIBRUQOLAWIDGETS_TESTS_EXPORT ServerInfo { 0020 QString url; 0021 QVector<AuthenticationInfo> authenticationInfos; 0022 bool canResetPassword = false; 0023 bool canRegisterAccount = false; 0024 }; 0025 0026 explicit CreateNewServerCheckUrlWidget(QWidget *parent = nullptr); 0027 ~CreateNewServerCheckUrlWidget() override; 0028 0029 Q_SIGNALS: 0030 void serverUrlFound(const CreateNewServerCheckUrlWidget::ServerInfo &info); 0031 0032 private: 0033 LIBRUQOLAWIDGETS_NO_EXPORT void slotTestConnection(); 0034 LIBRUQOLAWIDGETS_NO_EXPORT void slotErrorConnection(); 0035 QLineEdit *const mServerUrl; 0036 KBusyIndicatorWidget *const mBusyIndicatorWidget; 0037 KMessageWidget *const mFailedError; 0038 QPushButton *const mConnectionPushButton; 0039 }; 0040 Q_DECLARE_TYPEINFO(CreateNewServerCheckUrlWidget::ServerInfo, Q_RELOCATABLE_TYPE);