• 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
  • widgets
dmsbox.h
Go to the documentation of this file.
1 /***************************************************************************
2  dmsbox.h - description
3  -------------------
4  begin : Wed Dec 19 2002
5  copyright : (C) 2001-2002 by Pablo de Vicente
6  email : vicente@oan.es
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef DMSBOX_H
19 #define DMSBOX_H
20 
21 #include <QFocusEvent>
22 #include <klineedit.h>
23 
24 #include "dms.h"
25 
44 class dmsBox : public KLineEdit {
45  Q_OBJECT
46  Q_PROPERTY (bool degType READ degType WRITE setDegType)
47 
48 public:
54  explicit dmsBox(QWidget *parent, bool deg=true);
55 
57  ~dmsBox();
58 
62  void showInHours(dms t);
68  void showInHours(const dms *t);
69 
73  void showInDegrees(dms t);
79  void showInDegrees(const dms *t);
80 
87  void show(dms t, bool deg=true);
96  void show(const dms *t,bool deg=true);
97 
102  void setDMS(const QString& s) { setText(s); }
103 
114  dms createDms(bool deg=true, bool *ok=0);
115 
118  bool degType(void) const {return deg;}
119 
124  void setDegType( bool t );
125 
128  void clearFields (void) { setDMS(QString()); }
129 
130  inline bool isEmpty() { return EmptyFlag; }
131 
132 protected:
133  void focusInEvent( QFocusEvent *e );
134  void focusOutEvent( QFocusEvent *e );
135 
136 private slots:
137  void slotTextChanged( const QString &t );
138 
139 private:
140  void setEmptyText();
141 
142  int degree, minute, hour;
143  double second;
144  int second_int, msecond;
145  bool deg, EmptyFlag;
146  dms degValue;
147 };
148 
149 #endif
dmsBox::degType
bool degType(void) const
Definition: dmsbox.h:118
dmsBox::focusOutEvent
void focusOutEvent(QFocusEvent *e)
Definition: dmsbox.cpp:70
dmsBox::focusInEvent
void focusInEvent(QFocusEvent *e)
Definition: dmsbox.cpp:60
dmsBox::setDMS
void setDMS(const QString &s)
Simply display a string.
Definition: dmsbox.h:102
QWidget
dmsBox::createDms
dms createDms(bool deg=true, bool *ok=0)
Parse the text in the dmsBox as an angle.
Definition: dmsbox.cpp:163
dms.h
dmsBox::dmsBox
dmsBox(QWidget *parent, bool deg=true)
Constructor for the dmsBox object.
Definition: dmsbox.cpp:29
dmsBox::showInDegrees
void showInDegrees(dms t)
Display an angle using Deg/Arcmin/Arcsec.
Definition: dmsbox.cpp:141
dmsBox::showInHours
void showInHours(dms t)
Display an angle using Hours/Min/Sec.
Definition: dmsbox.cpp:148
dms
An angle, stored as degrees, but expressible in many ways.
Definition: dms.h:42
KLineEdit
dmsBox
A KLineEdit which is capable of displaying and parsing angle values flexibly and robustly.
Definition: dmsbox.h:44
dmsBox::isEmpty
bool isEmpty()
Definition: dmsbox.h:130
dmsBox::show
void show(dms t, bool deg=true)
Display an angle.
Definition: dmsbox.cpp:155
dmsBox::clearFields
void clearFields(void)
Clears the KLineEdit.
Definition: dmsbox.h:128
dmsBox::setDegType
void setDegType(bool t)
set the dmsBox to Degrees or Hours
Definition: dmsbox.cpp:90
dmsBox::~dmsBox
~dmsBox()
Destructor (empty)
Definition: dmsbox.cpp:173
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