moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / indistd.h
blob048452c255187eb3889ae57a4ca9245ebcd75447
1 /* INDI STD
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.
12 #ifndef INDISTD_H
13 #define INDISTD_H
15 #include <qobject.h>
16 #include <indi/lilxml.h>
17 #include <kfileitem.h>
19 class INDI_E;
20 class INDI_P;
21 class INDI_D;
22 class KStars;
23 class SkyObject;
24 class StreamWG;
25 class QSocketNotifier;
26 class KProgressDialog;
27 class KDirLister;
30 /* This class implmements standard properties on the device level*/
31 class INDIStdDevice : public QObject
33 Q_OBJECT
34 public:
35 INDIStdDevice(INDI_D *associatedDevice, KStars * kswPtr);
36 ~INDIStdDevice();
38 KStars *ksw; /* Handy pointer to KStars */
39 INDI_D *dp; /* associated device */
41 StreamWG *streamWindow;
42 SkyObject *currentObject;
43 QTimer *devTimer;
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);
54 /* Device options */
55 void initDeviceOptions();
56 void handleDevCounter();
57 bool handleNonSidereal(SkyObject *o);
58 void streamDisabled();
61 /* INDI STD: Updates device time */
62 void updateTime();
63 /* INDI STD: Updates device location */
64 void updateLocation();
65 /* Update image prefix */
66 void updateSequencePrefix(QString newPrefix);
68 int dataType;
69 int initDevCounter;
70 QString dataExt;
71 LilXML *parser;
73 QString seqPrefix;
74 int seqCount;
75 bool batchMode;
76 bool ISOMode;
77 KDirLister *seqLister;
79 public slots:
80 void timerDone();
82 protected slots:
83 void checkSeqBoundary(const KFileItemList & items);
85 signals:
86 void linkRejected();
87 void linkAccepted();
88 void FITSReceived(QString deviceLabel);
92 /* This class implmements standard properties */
93 class INDIStdProperty : public QObject
95 Q_OBJECT
96 public:
97 INDIStdProperty(INDI_P *associatedProperty, KStars * kswPtr, INDIStdDevice *stdDevPtr);
98 ~INDIStdProperty();
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);
108 public slots:
109 void newTime();
110 void newText();
116 #endif