• 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
indielement.h
Go to the documentation of this file.
1 /* INDI Element
2  Copyright (C) 2003 Jasem Mutlaq (mutlaqja@ikarustech.com)
3 
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.
8 
9  2004-01-15 INDI element is the most basic unit of the INDI KStars client.
10  */
11 
12 #ifndef INDIELEMENT_H_
13 #define INDIELEMENT_H_
14 
15 #include <kdialog.h>
16 #include <unistd.h>
17 
18 #include <QLabel>
19 #include <QVBoxLayout>
20 #include <QHBoxLayout>
21 
22 #include <indiapi.h>
23 #include <indiproperty.h>
24 #include "indicommon.h"
25 
26 /* Forward decleration */
27 class KLed;
28 class KLineEdit;
29 class QDoubleSpinBox;
30 class KPushButton;
31 class KSqueezedTextLabel;
32 
33 class QLabel;
34 class QHBoxLayout;
35 class QVBoxLayout;
36 class QSpacerItem;
37 class QCheckBox;
38 class QButtonGroup;
39 class QSlider;
40 
41 class INDI_P;
42 
43 /* INDI Element */
44 class INDI_E : public QObject
45 {
46  Q_OBJECT
47 public:
48  INDI_E(INDI_P *gProp, INDI::Property *dProp);
49  ~INDI_E();
50 
51  const QString &getLabel() { return label; }
52  const QString &getName() { return name;}
53 
54  QString getWriteField();
55  QString getReadField();
56 
57 
58  void buildSwitch(QButtonGroup* groupB, ISwitch *sw);
59  void buildMenuItem(ISwitch *sw);
60  void buildText(IText *itp);
61  void buildNumber(INumber *inp);
62  void buildLight(ILight *ilp);
63  void buildBLOB(IBLOB *ibp);
64 
65 
66 
67  // Updates GUI from data in INDI properties
68  void syncSwitch();
69  void syncText();
70  void syncNumber();
71  void syncLight();
72 
73  // Save GUI data in INDI properties
74  void updateTP();
75  void updateNP();
76 
77  void setText(const QString & newText);
78 
79 
80  void setMin ();
81  void setMax ();
82 
83  void setupElementLabel();
84  void setupElementRead(int length);
85  void setupElementWrite(int length);
86  void setupElementScale(int length);
87  void setupBrowseButton();
88 
89  bool getBLOBDirty() { return blobDirty; }
90  void setBLOBDirty(bool isDirty) { blobDirty = isDirty; }
91 
92 
93 private:
94  QString name; /* name */
95  QString label; /* label is the name by default, unless specified */
96 
97  INDI::Property *dataProp; /* parent DATA property */
98  INDI_P *guiProp; /* parent GUI property */
99 
100  QHBoxLayout *EHBox; /* Horizontal layout */
101 
102  /* GUI widgets, only malloced when needed */
103  KSqueezedTextLabel *label_w; // label
104  KLineEdit *read_w; // read field
105  KLineEdit *write_w; // write field
106  KLed *led_w; // light led
107  QDoubleSpinBox *spin_w; // spinbox
108  QSlider *slider_w; // Slider
109  KPushButton *push_w; // push button
110  KPushButton *browse_w; // browse button
111  QCheckBox *check_w; // check box
112  QSpacerItem *hSpacer; // Horizontal spacer
113 
114  ISwitch *sp;
115  INumber *np;
116  IText *tp;
117  ILight *lp;
118  IBLOB *bp;
119 
120  bool blobDirty;
121  QString text; // current text
122 
123 public slots:
124  void spinChanged(double value);
125  void sliderChanged(int value);
126  void browseBlob();
127 
128 
129 };
130 
131 #endif
INDI_P
Definition: indiproperty.h:38
INDI_E::setupElementWrite
void setupElementWrite(int length)
Definition: indielement.cpp:576
INDI_E::syncText
void syncText()
Definition: indielement.cpp:249
INDI_E::~INDI_E
~INDI_E()
Definition: indielement.cpp:70
INDI_E::setupElementScale
void setupElementScale(int length)
Definition: indielement.cpp:490
INDI_E::getBLOBDirty
bool getBLOBDirty()
Definition: indielement.h:89
INDI_E::syncLight
void syncLight()
Definition: indielement.cpp:461
INDI_E
Definition: indielement.h:44
INDI_E::INDI_E
INDI_E(INDI_P *gProp, INDI::Property *dProp)
Definition: indielement.cpp:45
QObject
INDI_E::getName
const QString & getName()
Definition: indielement.h:52
INDI_E::updateNP
void updateNP()
Definition: indielement.cpp:291
INDI_E::syncSwitch
void syncSwitch()
Definition: indielement.cpp:213
INDI_E::syncNumber
void syncNumber()
Definition: indielement.cpp:259
INDI_E::sliderChanged
void sliderChanged(int value)
Definition: indielement.cpp:533
INDI_E::browseBlob
void browseBlob()
Definition: indielement.cpp:622
INDI_E::getLabel
const QString & getLabel()
Definition: indielement.h:51
INDI_E::buildText
void buildText(IText *itp)
Definition: indielement.cpp:142
INDI_E::getWriteField
QString getWriteField()
Definition: indielement.cpp:689
INDI_E::buildLight
void buildLight(ILight *ilp)
Definition: indielement.cpp:431
INDI_E::buildNumber
void buildNumber(INumber *inp)
Definition: indielement.cpp:374
INDI_E::setupBrowseButton
void setupBrowseButton()
Definition: indielement.cpp:610
INDI_E::getReadField
QString getReadField()
Definition: indielement.cpp:697
INDI_E::setupElementRead
void setupElementRead(int length)
Definition: indielement.cpp:593
INDI_E::buildMenuItem
void buildMenuItem(ISwitch *sw)
Definition: indielement.cpp:137
INDI_E::updateTP
void updateTP()
Definition: indielement.cpp:282
INDI_E::setText
void setText(const QString &newText)
Definition: indielement.cpp:310
KLineEdit
INDI_E::setMax
void setMax()
Definition: indielement.cpp:560
INDI_E::setupElementLabel
void setupElementLabel()
Definition: indielement.cpp:186
QLabel
INDI_E::buildBLOB
void buildBLOB(IBLOB *ibp)
Definition: indielement.cpp:332
INDI_E::setMin
void setMin()
Definition: indielement.cpp:542
indiproperty.h
INDI_E::spinChanged
void spinChanged(double value)
Definition: indielement.cpp:525
indicommon.h
INDI_E::setBLOBDirty
void setBLOBDirty(bool isDirty)
Definition: indielement.h:90
INDI_E::buildSwitch
void buildSwitch(QButtonGroup *groupB, ISwitch *sw)
Definition: indielement.cpp:85
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