2 Copyright (C) 2003 Jasem Mutlaq (mutlaqja@ikarustech.com)
4 This application is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 2004-01-18: Classes that handle INDI Standard properties.
16 #include <indi/lilxml.h>
17 #include <kfileitem.h>
25 class QSocketNotifier
;
26 class KProgressDialog
;
30 /* This class implmements standard properties on the device level*/
31 class INDIStdDevice
: public QObject
35 INDIStdDevice(INDI_D
*associatedDevice
, KStars
* kswPtr
);
38 KStars
*ksw
; /* Handy pointer to KStars */
39 INDI_D
*dp
; /* associated device */
41 StreamWG
*streamWindow
;
42 SkyObject
*currentObject
;
44 KProgressDialog
*downloadDialog
;
47 enum DTypes
{ DATA_FITS
, DATA_STREAM
, DATA_OTHER
};
49 void setTextValue(INDI_P
*pp
);
50 void setLabelState(INDI_P
*pp
);
51 void registerProperty(INDI_P
*pp
);
52 void handleBLOB(unsigned char *buffer
, int bufferSize
, int dataType
);
55 void initDeviceOptions();
56 void handleDevCounter();
57 bool handleNonSidereal(SkyObject
*o
);
58 void streamDisabled();
61 /* INDI STD: Updates device time */
63 /* INDI STD: Updates device location */
64 void updateLocation();
65 /* Update image prefix */
66 void updateSequencePrefix(QString newPrefix
);
77 KDirLister
*seqLister
;
83 void checkSeqBoundary(const KFileItemList
& items
);
88 void FITSReceived(QString deviceLabel
);
92 /* This class implmements standard properties */
93 class INDIStdProperty
: public QObject
97 INDIStdProperty(INDI_P
*associatedProperty
, KStars
* kswPtr
, INDIStdDevice
*stdDevPtr
);
100 KStars
*ksw
; /* Handy pointer to KStars */
101 INDIStdDevice
*stdDev
; /* pointer to common std device */
102 INDI_P
*pp
; /* associated property */
104 /* Perform switch converting */
105 bool convertSwitch(int switchIndex
, INDI_E
*lp
);
106 bool newSwitch(int id
, INDI_E
* el
);