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

kig

  • sources
  • kde-4.12
  • kdeedu
  • kig
  • misc
goniometry.h
Go to the documentation of this file.
1 // This file is part of Kig, a KDE program for Interactive Geometry...
2 // Copyright (C) 2004 Dominique Devriese <devriese@kde.org>
3 // Copyright (C) 2004 Pino Toscano <toscano.pino@tiscali.it>
4 
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 // 02110-1301, USA.
19 
20 #ifndef KIG_MISC_GONIOMETRY_H
21 #define KIG_MISC_GONIOMETRY_H
22 
23 #include <qstringlist.h>
24 
28 class Goniometry
29 {
30 public:
31  enum System { Deg, Rad, Grad };
32  Goniometry();
33  Goniometry( double value, Goniometry::System system );
34  ~Goniometry();
35  void setValue( double value );
36  double value() const;
43  void setSystem( Goniometry::System system );
50  void convertTo( Goniometry::System system );
51  Goniometry::System system() const;
52  double getValue( Goniometry::System system );
57  static double convert( const double angle, const Goniometry::System from, const Goniometry::System to );
61  static QStringList systemList();
62  static Goniometry::System intToSystem( const int index );
63 
64  Goniometry& operator= ( const Goniometry& g );
65 
66 private:
67  double mvalue;
68  typedef Goniometry::System goniosys;
69  goniosys msys;
70 };
71 
72 #endif
Goniometry
Manage an angle and convert it from/to other goniometric systems.
Definition: goniometry.h:28
Goniometry::getValue
double getValue(Goniometry::System system)
Definition: goniometry.cc:75
Goniometry::Deg
Definition: goniometry.h:31
Goniometry::System
System
Definition: goniometry.h:31
Goniometry::setSystem
void setSystem(Goniometry::System system)
Set the system of the current angle to system, but it doesn't convert the value to the new system...
Definition: goniometry.cc:59
Goniometry::intToSystem
static Goniometry::System intToSystem(const int index)
Definition: goniometry.cc:128
Goniometry::Goniometry
Goniometry()
This file is part of Kig, a KDE program for Interactive Geometry...
Definition: goniometry.cc:33
Goniometry::systemList
static QStringList systemList()
Get a list of the supported goniometric systems.
Definition: goniometry.cc:119
Goniometry::Grad
Definition: goniometry.h:31
Goniometry::system
Goniometry::System system() const
Definition: goniometry.cc:70
Goniometry::operator=
Goniometry & operator=(const Goniometry &g)
Definition: goniometry.cc:80
Goniometry::convert
static double convert(const double angle, const Goniometry::System from, const Goniometry::System to)
The most useful method of this class: convert the specified angle from the system from to the system ...
Definition: goniometry.cc:87
Goniometry::~Goniometry
~Goniometry()
Definition: goniometry.cc:45
Goniometry::setValue
void setValue(double value)
Definition: goniometry.cc:49
Goniometry::Rad
Definition: goniometry.h:31
Goniometry::convertTo
void convertTo(Goniometry::System system)
Set the system of the current angle to system and convert the value to the new system using convert()...
Definition: goniometry.cc:64
Goniometry::value
double value() const
Definition: goniometry.cc:54
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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