• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

indidevice.h

Go to the documentation of this file.
00001 /*  INDI Device
00002     Copyright (C) 2003 Jasem Mutlaq (mutlaqja@ikarustech.com)
00003                    Elwood C. Downey
00004 
00005     This application is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
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 ** The INDI Tree
00056 **
00057 ** INDI_ELEMENT <----------------------------------------
00058 **     |                        |
00059 **     -----> INDI_PROPERTY             |
00060 **                        |             |
00061 **                        -----> INDI_GROUP     |
00062 **                                        |     |
00063 **                                        -----> INDI_DEVICE
00064 **                                               |         |
00065                                           Device Manager  INDI Menu
00066 **************************************************************************/
00067 
00068 
00069 /* INDI device */
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;           /* device name */
00078     QString label;          /* device label */
00079     QVBox   *deviceVBox;        /* device tab frame */
00080     QTabWidget  *groupContainer;    /* Groups within the device */
00081     QTextEdit   *msgST_w;       /* scrolled text for messages */
00082     unsigned char *dataBuffer;          /* Generic buffer */
00083     //QScrollView *sv;          /* Scroll view */
00084     //QVBoxLayout *mainLayout;
00085     //QVBox       *propertyLayout;
00086     //QSpacerItem *vSpacer;
00087     //QSpacerItem *hSpacer;
00088 
00089     //QPushButton  *clear;
00090     //QHBoxLayout  *buttonLayout;
00091     INDIStdDevice  *stdDev;
00092 
00093     QPtrList<INDI_G> gl;        /* list of pointers to groups */
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    * Build
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    * Add
00115    ******************************************************************/
00116    INDI_P *  addProperty (XMLEle *root, char errmsg[]);
00117 
00118    /*****************************************************************
00119    * Find
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    * Set/New
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    * Crack
00144    ******************************************************************/
00145    int crackLightState  (char *name, PState *psp);
00146    int crackSwitchState (char *name, PState *psp);
00147    
00148    /*****************************************************************
00149    * Data processing
00150    ******************************************************************/
00151    int processBlob(INDI_E *blobEL, XMLEle *ep, char errmsg[]);
00152    
00153    /*****************************************************************
00154    * INDI standard property policy
00155    ******************************************************************/
00156    bool isOn();
00157    void registerProperty(INDI_P *pp);
00158    bool isINDIStd(INDI_P *pp);
00159 
00160 };
00161 
00162 #endif

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal