libkpl  4.1
A Library for Graphical Presentation of Data Sets and Functions
vectoritem.h
1 /***************************************************************************
2  vectoritem.h - description
3  -------------------
4 
5  This file is a part of kpl - a program for graphical presentation of
6  data sets and functions.
7 
8  begin : Wed Aug 25 1999
9  copyright : (C) 2015 by Werner Stille
10  email : stille@uni-freiburg.de
11  ***************************************************************************/
12 
13 /***************************************************************************
14  * *
15  * This program is free software; you can redistribute it and/or modify *
16  * it under the terms of the GNU General Public License as published by *
17  * the Free Software Foundation; either version 2 of the License, or *
18  * (at your option) any later version. *
19  * *
20  ***************************************************************************/
21 
22 #ifndef VECTORITEM_H
23 #define VECTORITEM_H
24 
25 #include <kdemacros.h>
26 #include "decoitem.h"
27 
28 class KConfigGroup;
29 
34 class KDE_EXPORT VectorItem : public DecoItem
35 {
36 public:
46  VectorItem(unsigned color = 0, double x0 = 0, double y0 = 0,
47  double length = 1, double dir = 0, double relSize = 1);
53  VectorItem(const KConfigGroup* plo, unsigned color = 0);
55  virtual ~VectorItem();
57  inline double dir() const { return m_dir; };
59  inline double length() const { return m_length; };
64  inline void setDir(double dir) { m_dir = dir; };
69  inline void setLength(double length) { m_length = length; };
75  void writePlo(KConfigGroup* plo, bool visible) const;
76 
77 protected:
78  double m_length, m_dir;
79 };
80 
81 #endif
void setDir(double dir)
Sets rotation angle.
Definition: vectoritem.h:64
double dir() const
Returns rotation angle in deg.
Definition: vectoritem.h:57
void writePlo(KConfigGroup *plo, bool visible) const
Writes into plot file.
double length() const
Returns length in cm.
Definition: vectoritem.h:59
Decoration item class.
Definition: decoitem.h:36
Vector item class.
Definition: vectoritem.h:34
void setLength(double length)
Sets length.
Definition: vectoritem.h:69