kstars
indidevice.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef INDIDEVICE_H
00012 #define INDIDEVICE_H
00013
00014 #include <kdialogbase.h>
00015 #include <unistd.h>
00016 #include <qptrlist.h>
00017
00018 #include "indielement.h"
00019
00020 class DeviceManager;
00021 class INDI_D;
00022 class INDI_P;
00023 class INDI_G;
00024 class INDI_E;
00025 class INDIMenu;
00026 class INDIStdDevice;
00027 class SkyObject;
00028
00029 class KLed;
00030 class KLineEdit;
00031 class KComboBox;
00032 class KDoubleSpinBox;
00033 class KPushButton;
00034 class KPopupMenu;
00035
00036 class QTable;
00037 class QLabel;
00038 class QHBoxLayout;
00039 class QVBoxLayout;
00040 class QFrame;
00041 class QLineEdit;
00042 class QString;
00043 class QTextEdit;
00044 class QListView;
00045 class QTabWidget;
00046 class QSpacerItem;
00047 class QGridLayout;
00048 class QButtonGroup;
00049 class QCheckBox;
00050 class QScrollView;
00051 class QSocketNotifier;
00052 class QVBox;
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 class INDI_D : public KDialogBase
00071 {
00072 Q_OBJECT
00073 public:
00074 INDI_D(INDIMenu *parentMenu, DeviceManager *parentManager, QString inName, QString inLabel);
00075 ~INDI_D();
00076
00077 QString name;
00078 QString label;
00079 QVBox *deviceVBox;
00080 QTabWidget *groupContainer;
00081 QTextEdit *msgST_w;
00082 unsigned char *dataBuffer;
00083
00084
00085
00086
00087
00088
00089
00090
00091 INDIStdDevice *stdDev;
00092
00093 QPtrList<INDI_G> gl;
00094
00095 INDI_G *curGroup;
00096 bool INDIStdSupport;
00097
00098 INDIMenu *parent;
00099 DeviceManager *parentMgr;
00100
00101 enum DTypes { DATA_FITS, DATA_STREAM, DATA_OTHER, DATA_CCDPREVIEW };
00102
00103
00104
00105
00106 int buildTextGUI (XMLEle *root, char errmsg[]);
00107 int buildNumberGUI (XMLEle *root, char errmsg[]);
00108 int buildSwitchesGUI(XMLEle *root, char errmsg[]);
00109 int buildMenuGUI (INDI_P *pp, XMLEle *root, char errmsg[]);
00110 int buildLightsGUI (XMLEle *root, char errmsg[]);
00111 int buildBLOBGUI (XMLEle *root, char errmsg[]);
00112
00113
00114
00115
00116 INDI_P * addProperty (XMLEle *root, char errmsg[]);
00117
00118
00119
00120
00121 INDI_P * findProp (QString name);
00122 INDI_E * findElem (QString name);
00123 INDI_G * findGroup (QString grouptag, int create, char errmsg[]);
00124 int findPerm (INDI_P *pp , XMLEle *root, PPerm *permp, char errmsg[]);
00125
00126
00127
00128
00129 int setValue (INDI_P *pp, XMLEle *root, char errmsg[]);
00130 int setLabelState (INDI_P *pp, XMLEle *root, char errmsg[]);
00131 int setTextValue (INDI_P *pp, XMLEle *root, char errmsg[]);
00132 int setBLOB (INDI_P *pp, XMLEle * root, char errmsg[]);
00133
00134 int newValue (INDI_P *pp, XMLEle *root, char errmsg[]);
00135 int newTextValue (INDI_P *pp, XMLEle *root, char errmsg[]);
00136
00137 int setAnyCmd (XMLEle *root, char errmsg[]);
00138 int newAnyCmd (XMLEle *root, char errmsg[]);
00139
00140 int removeProperty(INDI_P *pp);
00141
00142
00143
00144
00145 int crackLightState (char *name, PState *psp);
00146 int crackSwitchState (char *name, PState *psp);
00147
00148
00149
00150
00151 int processBlob(INDI_E *blobEL, XMLEle *ep, char errmsg[]);
00152
00153
00154
00155
00156 bool isOn();
00157 void registerProperty(INDI_P *pp);
00158 bool isINDIStd(INDI_P *pp);
00159
00160 };
00161
00162 #endif