File indexing completed on 2024-05-12 16:42:16
0001 /* 0002 SPDX-FileCopyrightText: 2017 Thomas Baumgart <tbaumgart@kde.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef WEBCONNECT_H 0007 #define WEBCONNECT_H 0008 0009 #include <QObject> 0010 #include <QLoggingCategory> 0011 Q_DECLARE_LOGGING_CATEGORY(WebConnectLog) 0012 0013 class WebConnect : public QObject 0014 { 0015 Q_OBJECT 0016 public: 0017 explicit WebConnect(QObject* parent); 0018 virtual ~WebConnect(); 0019 0020 bool isClient() const; 0021 0022 public Q_SLOTS: 0023 void loadFile(const QUrl& url); 0024 0025 private Q_SLOTS: 0026 void serverConnected(); 0027 void serverDisconnected(); 0028 void clientConnected(); 0029 void clientDisconnected(); 0030 void dataAvailable(); 0031 0032 Q_SIGNALS: 0033 void gotUrl(const QUrl& url); 0034 0035 private: 0036 /// \internal d-pointer class. 0037 class Private; 0038 /// \internal d-pointer instance. 0039 Private* const d; 0040 }; 0041 0042 #endif // WEBCONNECT_H