Kstars

ekosliveclient.h
1/*
2 SPDX-FileCopyrightText: 2018 Jasem Mutlaq <mutlaqja@ikarustech.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QDialog>
10#include <QtWebSockets/QWebSocket>
11#include <memory>
12
13#include "ekos/ekos.h"
14#include "ekos/manager.h"
15#include "ekos/align/align.h"
16#include "indi/indicommon.h"
17#include "ksnotification.h"
18
19// Ekos Live Communication Channels
20#include "message.h"
21#include "media.h"
22#include "cloud.h"
23#include "nodemanager.h"
24
25#include "ui_ekoslivedialog.h"
26
29class QNetworkReply;
30
31namespace EkosLive
32{
33class Client : public QDialog, public Ui::EkosLiveDialog
34{
36 public:
37 explicit Client(Ekos::Manager *manager);
38 ~Client();
39
40 bool isConnected() const
41 {
42 return m_isConnected;
43 }
44
45 const QPointer<Message> &message()
46 {
47 return m_Message;
48 }
49 const QPointer<Media> &media()
50 {
51 return m_Media;
52 }
53 const QPointer<Cloud> &cloud()
54 {
55 return m_Cloud;
56 }
57
58 // Current supported server types
59 enum
60 {
61 Online,
62 Offline
63 };
64
65 void setConnected(bool enabled);
66 void syncURLs();
67 void setConfig(bool rememberCredentials, bool autoConnect);
68 void setUser(const QString &user, const QString &pass);
69
70 protected:
71 void showSelectServersDialog();
72
73 signals:
74 void connected();
75 void disconnected();
76
77 private:
78 void onConnected();
79 void onDisconnected();
80
81 Ekos::Manager *m_Manager { nullptr };
82 bool m_isConnected {false};
83
84 QProgressIndicator *pi { nullptr };
86
87 QPointer<Message> m_Message;
88 QPointer<Media> m_Media;
89 QPointer<Cloud> m_Cloud;
90};
91}
The QProgressIndicator class lets an application display a progress indicator to show that a long tas...
Generic record interfaces and implementations.
Definition cloud.cpp:22
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.