Kstars

indidevice.h
1/*
2 SPDX-FileCopyrightText: 2012 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
11#include <QFrame>
12#include <QHBoxLayout>
13#include <QLabel>
14#include <QVBoxLayout>
15#include <QMutex>
16
17#include <indiapi.h>
18#include <basedevice.h>
19
20class QTextEdit;
21class QTabWidget;
22class QSplitter;
23class GUIManager;
24class ClientManager;
25class INDI_G;
26
27/**
28 * @class INDI_D
29 * INDI_D represents an INDI GUI Device. INDI_D is the top level device container. It contains a collection of groups of properties.
30 * Each group is represented as a separate tab within the GUI.
31 *
32 * @author Jasem Mutlaq
33 */
34class INDI_D : public QWidget
35{
37 public:
38 INDI_D(QWidget *parent, INDI::BaseDevice baseDevice, ClientManager *in_cm);
39
40
41 ClientManager *getClientManager() const
42 {
43 return m_ClientManager;
44 }
45
46 INDI_G *getGroup(const QString &groupName) const;
47
48 INDI::BaseDevice getBaseDevice() const
49 {
50 return m_BaseDevice;
51 }
52
53 QList<INDI_G *> getGroups() const
54 {
55 return groupsList;
56 }
57
58 void clearMessageLog();
59
60 const QString &name() const
61 {
62 return m_Name;
63 }
64
65 public slots:
66 bool buildProperty(INDI::Property prop);
67 bool updateProperty(INDI::Property prop);
68 bool removeProperty(INDI::Property prop);
69
70 bool updateSwitchGUI(INDI::Property prop);
71 bool updateTextGUI(INDI::Property prop);
72 bool updateNumberGUI(INDI::Property prop);
73 bool updateLightGUI(INDI::Property prop);
74 bool updateBLOBGUI(INDI::Property prop);
75
76 void updateMessageLog(INDI::BaseDevice idv, int messageID);
77
78 private:
79 QString m_Name;
80
81 // GUI
82 QSplitter *deviceVBox { nullptr };
83 QTabWidget *groupContainer { nullptr };
84 QTextEdit *msgST_w { nullptr };
85
86 // Managers
87 INDI::BaseDevice m_BaseDevice;
88 ClientManager *m_ClientManager { nullptr };
89
90 QList<INDI_G *> groupsList;
91};
ClientManager manages connection to INDI server, creation of devices, and receiving/sending propertie...
GUIManager creates the INDI Control Panel upon receiving a new device.
Definition guimanager.h:34
INDI_D represents an INDI GUI Device.
Definition indidevice.h:35
INDI_G represents a collection of INDI properties that share a common group.
Definition indigroup.h:31
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:51:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.