• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • indi
indidevice.h
Go to the documentation of this file.
1 #ifndef INDI_D_H
2 #define INDI_D_H
3 
4 /* GUI Device Manager
5  Copyright (C) 2012 Jasem Mutlaq (mutlaqja@ikarustech.com)
6 
7  This application is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11  */
12 
13 #include <KDialog>
14 
15 #include <QFrame>
16 #include <QHBoxLayout>
17 #include <QLabel>
18 #include <QVBoxLayout>
19 
20 #include <indiapi.h>
21 #include <basedevice.h>
22 
23 class QTextEdit;
24 class QTabWidget;
25 class QSplitter;
26 class GUIManager;
27 class ClientManager;
28 class INDI_G;
29 
30 class INDI_D : public KDialog
31 {
32  Q_OBJECT
33 public:
34 
35  //enum DTypes { DATA_FITS, ASCII_DATA_STREAM, VIDEO_STREAM, DATA_OTHER, DATA_CCDPREVIEW };
36 
37  INDI_D(GUIManager *in_manager, INDI::BaseDevice *in_idv, ClientManager *in_cm);
38  ~INDI_D();
39 
40  QSplitter *getDeviceBox() { return deviceVBox; }
41 
42  void setTabID(int newTabID) { tabID = newTabID; }
43  int getTabID() { return tabID; }
44 
45  ClientManager *getClientManager() { return clientManager; }
46 
47  INDI_G *getGroup (const QString & groupName);
48 
49  INDI::BaseDevice *getBaseDevice() { return dv;}
50 
51  QList<INDI_G *> getGroups() { return groupsList; }
52 
53  void clearMessageLog();
54 
55 public slots:
56 
57  /*****************************************************************
58  * Build
59  ******************************************************************/
60  bool buildProperty (INDI::Property * prop);
61  bool removeProperty (INDI::Property * prop);
62  bool updateSwitchGUI(ISwitchVectorProperty *svp);
63  bool updateTextGUI (ITextVectorProperty *tvp);
64  bool updateNumberGUI (INumberVectorProperty *nvp);
65  bool updateLightGUI (ILightVectorProperty *lvp);
66  bool updateBLOBGUI (IBLOB *bp);
67 
68  void updateMessageLog(INDI::BaseDevice *idv, int messageID);
69  /*
70  bool buildTextGUI (ITextVectorProperty *tvp, QString & errmsg);
71  bool buildNumberGUI (INumberVectorProperty *nvp, QString & errmsg);
72  bool buildSwitchesGUI(ISwitchVectorProperty *svp, QString & errmsg);
73  bool buildMenuGUI (ISwitchVectorProperty *svp, QString & errmsg);
74  bool buildLightsGUI (ILightVectorProperty *lvp, QString & errmsg);
75  bool buildBLOBGUI (IBLOBVectorProperty *bvp, QString & errmsg);*/
76 
77 
78  /*****************************************************************
79  * Set/New
80  ******************************************************************/
81  /*int setValue (INDI_P *pp, XMLEle *root, QString & errmsg);
82  int setLabelState (INDI_P *pp, XMLEle *root, QString & errmsg);
83  int setTextValue (INDI_P *pp, XMLEle *root, QString & errmsg);
84  int setBLOB (INDI_P *pp, XMLEle * root, QString & errmsg);
85 
86  int newValue (INDI_P *pp, XMLEle *root, QString & errmsg);
87  int newTextValue (INDI_P *pp, XMLEle *root, QString & errmsg);
88 
89  int setAnyCmd (XMLEle *root, QString & errmsg);
90  int newAnyCmd (XMLEle *root, QString & errmsg);
91 
92  int removeProperty(INDI_P *pp);
93 
94 */
95 
96 private:
97 
98  QString name; /* device name */
99  QSplitter *deviceVBox;
100  QTabWidget *groupContainer; /* Groups within the device */
101  QTextEdit *msgST_w; /* scrolled text for messages */
102 
103  INDI::BaseDevice *dv;
104  ClientManager *clientManager;
105  GUIManager *guiManager;
106  int tabID;
107 
108  QList<INDI_G *> groupsList;
109 
110 /*signals:
111  void newSwitch(const QString &sw, ISState value);
112  void newNumber(const QString &nm, double value);
113  void newText(const QString &tx, QString value);
114  void newLight(const QString &lg, IPState value);
115  void newBLOB(const QString &bb, unsigned char *buffer, int bufferSize, const QString &dataFormat, INDI_D::DTypes dataType);
116  void newProperty(INDI_P *p);
117  */
118 
119 };
120 
121 #endif // INDI_D_H
INDI_D::removeProperty
bool removeProperty(INDI::Property *prop)
Definition: indidevice.cpp:104
INDI_D::updateLightGUI
bool updateLightGUI(ILightVectorProperty *lvp)
Definition: indidevice.cpp:220
INDI_D::buildProperty
bool buildProperty(INDI::Property *prop)
Definition: indidevice.cpp:78
INDI_D::~INDI_D
~INDI_D()
Definition: indidevice.cpp:281
INDI_D::clearMessageLog
void clearMessageLog()
Definition: indidevice.cpp:307
INDI_D::INDI_D
INDI_D(GUIManager *in_manager, INDI::BaseDevice *in_idv, ClientManager *in_cm)
Definition: indidevice.cpp:56
INDI_D::updateMessageLog
void updateMessageLog(INDI::BaseDevice *idv, int messageID)
Definition: indidevice.cpp:269
INDI_D::setTabID
void setTabID(int newTabID)
Definition: indidevice.h:42
INDI_D::getGroup
INDI_G * getGroup(const QString &groupName)
Definition: indidevice.cpp:294
KDialog
INDI_D::getTabID
int getTabID()
Definition: indidevice.h:43
INDI_D::getBaseDevice
INDI::BaseDevice * getBaseDevice()
Definition: indidevice.h:49
INDI_D
Definition: indidevice.h:30
INDI_D::getDeviceBox
QSplitter * getDeviceBox()
Definition: indidevice.h:40
INDI_G
Definition: indigroup.h:31
INDI_D::updateTextGUI
bool updateTextGUI(ITextVectorProperty *tvp)
Definition: indidevice.cpp:169
INDI_D::getGroups
QList< INDI_G * > getGroups()
Definition: indidevice.h:51
ClientManager
Definition: clientmanager.h:22
INDI_D::updateNumberGUI
bool updateNumberGUI(INumberVectorProperty *nvp)
Definition: indidevice.cpp:194
INDI_D::getClientManager
ClientManager * getClientManager()
Definition: indidevice.h:45
INDI_D::updateSwitchGUI
bool updateSwitchGUI(ISwitchVectorProperty *svp)
Definition: indidevice.cpp:139
GUIManager
Definition: guimanager.h:46
QList
INDI_D::updateBLOBGUI
bool updateBLOBGUI(IBLOB *bp)
Definition: indidevice.cpp:246
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal