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

step/stepcore

  • sources
  • kde-4.12
  • kdeedu
  • step
  • stepcore
tool.h
Go to the documentation of this file.
1 /* This file is part of StepCore library.
2  Copyright (C) 2007 Vladimir Kuznetsov <ks.vladimir@gmail.com>
3 
4  StepCore library is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  StepCore library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with StepCore; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
23 // TODO: split this file
24 
25 #ifndef STEPCORE_TOOL_H
26 #define STEPCORE_TOOL_H
27 
28 #include "world.h"
29 #include "types.h"
30 #include <QHash>
31 #include <QByteArray>
32 #include <QStringList>
33 
34 namespace StepCore
35 {
36 
40 class NoteImage: public Item
41 {
42  STEPCORE_OBJECT(NoteImage)
43 
44 public:
46  explicit NoteImage(const QString& name = QString(),
47  const QByteArray& image = QByteArray())
48  : Item(name), _image(image) {}
49 
51  const QByteArray& image() const { return _image; }
52 
54  void setImage(const QByteArray& image) { _image = image; }
55 
56 protected:
57  QByteArray _image;
58 };
59 
63 class NoteFormula: public NoteImage
64 {
65  STEPCORE_OBJECT(NoteFormula)
66 
67 public:
69  explicit NoteFormula(const QString& name = QString(),
70  const QByteArray& image = QByteArray(),
71  const QString& code = QString())
72  : NoteImage(name, image), _code(code) {}
73 
75  const QString& code() const { return _code; }
77  void setCode(const QString& code) { _code = code; }
78 
79 protected:
80  QString _code;
81 };
82 
89 class Note: public ItemGroup, public Tool
90 {
91  STEPCORE_OBJECT(Note)
92 
93 public:
95  explicit Note(Vector2d position = Vector2d::Zero(),
96  Vector2d size = Vector2d(250,100), QString text = QString());
97 
99  const Vector2d& position() const { return _position; }
101  void setPosition(const Vector2d& position) { _position = position; }
102 
104  const Vector2d& size() const { return _size; }
106  void setSize(const Vector2d& size) { _size = size.cwise().abs(); }
107 
109  const QString& text() const { return _text; }
111  void setText(const QString& text) { _text = text; }
112 
113 protected:
114  Vector2d _position;
115  Vector2d _size;
116  QString _text;
117 };
118 
125 class Graph: public Item, public Tool
126 {
127  STEPCORE_OBJECT(Graph)
128 
129 public:
131  explicit Graph(Vector2d position = Vector2d::Zero(), Vector2d size = Vector2d(400,300));
132 
134  const Vector2d& position() const { return _position; }
136  void setPosition(const Vector2d& position) { _position = position; }
137 
139  const Vector2d& size() const { return _size; }
141  void setSize(const Vector2d& size) { _size = size.cwise().abs(); }
142 
144  Object* objectX() const { return _objectX; }
146  void setObjectX(Object* objectX) { _objectX = objectX; }
147 
149  QString propertyX() const { return _propertyX; }
151  void setPropertyX(const QString& propertyX) { _propertyX = propertyX; }
152 
154  int indexX() const { return _indexX; }
156  void setIndexX(int indexX) { _indexX = indexX; }
157 
159  Object* objectY() const { return _objectY; }
161  void setObjectY(Object* objectY) { _objectY = objectY; }
162 
164  QString propertyY() const { return _propertyY; }
166  void setPropertyY(const QString& propertyY) { _propertyY = propertyY; }
167 
169  int indexY() const { return _indexY; }
171  void setIndexY(int indexY) { _indexY = indexY; }
172 
174  bool autoLimitsX() const { return _autoLimitsX; }
176  void setAutoLimitsX(bool autoLimitsX) { _autoLimitsX = autoLimitsX; }
177 
179  bool autoLimitsY() const { return _autoLimitsY; }
181  void setAutoLimitsY(bool autoLimitsY) { _autoLimitsY = autoLimitsY; }
182 
184  const Vector2d& limitsX() const { return _limitsX; }
186  void setLimitsX(const Vector2d& limitsX) { _limitsX = limitsX; }
187 
189  const Vector2d& limitsY() const { return _limitsY; }
191  void setLimitsY(const Vector2d& limitsY) { _limitsY = limitsY; }
192 
194  bool showLines() const { return _showLines; }
196  void setShowLines(bool showLines) { _showLines = showLines; }
197 
199  bool showPoints() const { return _showPoints; }
201  void setShowPoints(bool showPoints) { _showPoints = showPoints; }
202 
204  const Vector2dList& points() const { return _points; }
206  void setPoints(const Vector2dList& points) { _points = points; }
207 
209  const MetaProperty* propertyXPtr() const {
210  return _objectX ? _objectX->metaObject()->property(_propertyX) : 0;
211  }
212 
214  const MetaProperty* propertyYPtr() const {
215  return _objectY ? _objectY->metaObject()->property(_propertyY) : 0;
216  }
217 
219  bool isValidX() const;
221  bool isValidY() const;
223  bool isValid() const { return isValidX() && isValidY(); }
224 
226  Vector2d currentValue() const { return currentValue(0); }
227 
230  Vector2d currentValue(bool* ok) const;
231 
234  Vector2d recordPoint(bool* ok = 0);
235 
237  void clearPoints() { _points.clear(); }
238 
240  QString unitsX() const;
241 
243  QString unitsY() const;
244 
245  //void worldItemRemoved(Item* item);
246  //void setWorld(World* world);
247 
248 protected:
249  Vector2d _position;
250  Vector2d _size;
251 
252  Object* _objectX;
253  QString _propertyX;
254  int _indexX;
255 
256  Object* _objectY;
257  QString _propertyY;
258  int _indexY;
259 
260  bool _autoLimitsX;
261  bool _autoLimitsY;
262 
263  Vector2d _limitsX;
264  Vector2d _limitsY;
265 
266  bool _showLines;
267  bool _showPoints;
268 
269  Vector2dList _points;
270 };
271 
278 class Meter: public Item, public Tool
279 {
280  STEPCORE_OBJECT(Meter)
281 
282 public:
284  explicit Meter(Vector2d position = Vector2d::Zero(), Vector2d size = Vector2d(70,24));
285 
287  const Vector2d& position() const { return _position; }
289  void setPosition(const Vector2d& position) { _position = position; }
290 
292  const Vector2d& size() const { return _size; }
294  void setSize(const Vector2d& size) { _size = size.cwise().abs(); }
295 
297  Object* object() const { return _object; }
299  void setObject(Object* object) { _object = object; }
300 
302  QString property() const { return _property; }
304  void setProperty(const QString& property) { _property = property; }
305 
307  int index() const { return _index; }
309  void setIndex(int index) { _index = index; }
310 
312  int digits() const { return _digits; }
314  void setDigits(int digits) { _digits = digits; }
315 
317  bool isValid() const;
318 
320  const MetaProperty* propertyPtr() const {
321  return _object ? _object->metaObject()->property(_property) : 0;
322  }
323 
325  double value() const { return value(0); }
326 
328  virtual void setValue(double) {}
329 
332  double value(bool* ok) const;
333 
335  QString units() const;
336 
337  //void worldItemRemoved(Item* item);
338  //void setWorld(World* world);
339 
340 protected:
341  Vector2d _position;
342  Vector2d _size;
343 
344  Object* _object;
345  QString _property;
346  int _index;
347 
348  int _digits;
349 };
350 
357 class Controller: public Item, public Tool
358 {
359  STEPCORE_OBJECT(Controller)
360 
361 public:
363  explicit Controller(Vector2d position = Vector2d::Zero(), Vector2d size = Vector2d(200,60));
364 
366  const Vector2d& position() const { return _position; }
368  void setPosition(const Vector2d& position) { _position = position; }
369 
371  const Vector2d& size() const { return _size; }
373  void setSize(const Vector2d& size) { _size = size.cwise().abs(); }
374 
376  Object* object() const { return _object; }
378  void setObject(Object* object) { _object = object; }
379 
381  QString property() const { return _property; }
383  void setProperty(const QString& property) { _property = property; }
384 
386  int index() const { return _index; }
388  void setIndex(int index) { _index = index; }
389 
391  const Vector2d& limits() const { return _limits; }
393  void setLimits(const Vector2d& limits) { _limits = limits; }
394 
396  const QString& decreaseShortcut() const { return _decreaseShortcut; }
398  void setDecreaseShortcut(const QString& decreaseShortcut) { _decreaseShortcut = decreaseShortcut; }
399 
401  const QString& increaseShortcut() const { return _increaseShortcut; }
403  void setIncreaseShortcut(const QString& increaseShortcut) { _increaseShortcut = increaseShortcut; }
404 
406  double increment() const { return _increment; }
408  void setIncrement(double increment) { _increment = increment; }
409 
411  bool isValid() const;
412 
414  const MetaProperty* propertyPtr() const {
415  return _object ? _object->metaObject()->property(_property) : 0;
416  }
417 
419  double value() const { return value(0); }
421  void setValue(double value) { setValue(value, 0); }
422 
425  double value(bool* ok) const;
429  void setValue(double value, bool* ok);
430 
432  QString units() const;
433 
434  //void worldItemRemoved(Item* item);
435  //void setWorld(World* world);
436 
437 protected:
438  Vector2d _position;
439  Vector2d _size;
440 
441  Object* _object;
442  QString _property;
443  int _index;
444 
445  Vector2d _limits;
446  QString _decreaseShortcut;
447  QString _increaseShortcut;
448 
449  double _increment;
450 };
451 
452 class Particle;
453 class RigidBody;
454 
461 class Tracer: public Item, public Tool
462 {
463  STEPCORE_OBJECT(Tracer)
464 
465 public:
467  explicit Tracer(Object* body = 0, const Vector2d& localPosition = Vector2d::Zero());
468 
470  Object* body() const { return _body; }
472  void setBody(Object* body);
473 
476  Vector2d localPosition() const { return _localPosition; }
479  void setLocalPosition(const Vector2d& localPosition) { _localPosition = localPosition; }
480 
482  Vector2d position() const;
483 
485  const Vector2dList& points() const { return _points; }
487  void setPoints(const Vector2dList& points) { _points = points; }
488 
490  Vector2d recordPoint() { Vector2d p = position(); _points.push_back(p); return p; }
491 
493  void clearPoints() { _points.clear(); }
494 
495  //void worldItemRemoved(Item* item);
496  //void setWorld(World* world);
497 
498 protected:
499  Object* _body;
500  Vector2d _localPosition;
501  Vector2dList _points;
502 
503  Particle* _p;
504  RigidBody* _r;
505 };
506 
507 } // namespace StepCore
508 
509 #endif
StepCore::Controller::setIndex
void setIndex(int index)
Set vector index of the controlled property.
Definition: tool.h:388
StepCore::Meter::isValid
bool isValid() const
Returns true if observed property is valid.
Definition: tool.cc:251
StepCore::Meter::setProperty
void setProperty(const QString &property)
Set name of the observed property.
Definition: tool.h:304
StepCore::Note::setSize
void setSize(const Vector2d &size)
Set size of the note.
Definition: tool.h:106
StepCore::Controller::setIncrement
void setIncrement(double increment)
Set increment step.
Definition: tool.h:408
StepCore::Meter::index
int index() const
Get vector index of the observed property.
Definition: tool.h:307
StepCore::Meter::size
const Vector2d & size() const
Get size of the meter.
Definition: tool.h:292
StepCore::Meter::setValue
virtual void setValue(double)
Set value of the controlled property.
Definition: tool.h:328
StepCore::Graph::points
const Vector2dList & points() const
Get points list.
Definition: tool.h:204
StepCore::Tracer::_body
Object * _body
Definition: tool.h:499
StepCore::Meter::_index
int _index
Definition: tool.h:346
StepCore::Controller::Controller
Controller(Vector2d position=Vector2d::Zero(), Vector2d size=Vector2d(200, 60))
Constructs Controller.
Definition: tool.cc:302
StepCore::Note
Textual note item.
Definition: tool.h:89
types.h
Type to and from string convertion helpers.
StepCore::Graph::_limitsX
Vector2d _limitsX
Definition: tool.h:263
StepCore::Meter::property
QString property() const
Get name of the observed property.
Definition: tool.h:302
StepCore::Graph::limitsY
const Vector2d & limitsY() const
Get limits for Y axis.
Definition: tool.h:189
StepCore::Graph::showLines
bool showLines() const
Get show-lines flag.
Definition: tool.h:194
StepCore::Controller::setValue
void setValue(double value)
Set value of the controlled property.
Definition: tool.h:421
StepCore::Controller::_size
Vector2d _size
Definition: tool.h:439
StepCore::Graph::_objectY
Object * _objectY
Definition: tool.h:256
StepCore::Meter::setDigits
void setDigits(int digits)
Set display digits.
Definition: tool.h:314
StepCore::Tracer::body
Object * body() const
Get pointer to the first body.
Definition: tool.h:470
StepCore::Meter::setIndex
void setIndex(int index)
Set vector index of the observed property.
Definition: tool.h:309
StepCore::Controller::_object
Object * _object
Definition: tool.h:441
StepCore::Vector2d
Eigen::Vector2d Vector2d
Two-dimensional vector with double components.
Definition: vector.h:29
StepCore::Graph::_showLines
bool _showLines
Definition: tool.h:266
StepCore::Tracer::localPosition
Vector2d localPosition() const
Local position of the tracer on the body or in the world (if the tracer is not connected) ...
Definition: tool.h:476
StepCore::Graph::_position
Vector2d _position
Definition: tool.h:249
StepCore::Object
Root of the StepCore classes hierarchy.
Definition: object.h:57
StepCore::Controller::setDecreaseShortcut
void setDecreaseShortcut(const QString &decreaseShortcut)
Set GUI increase shortcut.
Definition: tool.h:398
StepCore::Controller::setIncreaseShortcut
void setIncreaseShortcut(const QString &increaseShortcut)
Set GUI decrease shortcut.
Definition: tool.h:403
StepCore::Controller::propertyPtr
const MetaProperty * propertyPtr() const
Get pointer to the controlled property.
Definition: tool.h:414
StepCore::Note::_position
Vector2d _position
Definition: tool.h:114
StepCore::Graph::indexX
int indexX() const
Get vector index for the X axis.
Definition: tool.h:154
StepCore::Graph::_autoLimitsX
bool _autoLimitsX
Definition: tool.h:260
StepCore::Controller::value
double value() const
Get value of the controlled property.
Definition: tool.h:419
StepCore::Graph::setShowLines
void setShowLines(bool showLines)
Set show-lines flag.
Definition: tool.h:196
StepCore::Note::_size
Vector2d _size
Definition: tool.h:115
StepCore::Graph::_limitsY
Vector2d _limitsY
Definition: tool.h:264
StepCore::NoteFormula::_code
QString _code
Definition: tool.h:80
StepCore::Meter::value
double value() const
Get value of the observed property.
Definition: tool.h:325
StepCore::Graph::limitsX
const Vector2d & limitsX() const
Get limits for X axis.
Definition: tool.h:184
StepCore::Controller::setPosition
void setPosition(const Vector2d &position)
Set position of the Controller.
Definition: tool.h:368
StepCore::Graph::_objectX
Object * _objectX
Definition: tool.h:252
StepCore::NoteImage
Image embedded in Note.
Definition: tool.h:40
StepCore::Graph::setSize
void setSize(const Vector2d &size)
Set size of the graph.
Definition: tool.h:141
StepCore::Controller::position
const Vector2d & position() const
Get position of the Controller.
Definition: tool.h:366
StepCore::RigidBody
Rigid body.
Definition: rigidbody.h:144
StepCore::Meter::setPosition
void setPosition(const Vector2d &position)
Set position of the meter.
Definition: tool.h:289
StepCore::Graph::_autoLimitsY
bool _autoLimitsY
Definition: tool.h:261
StepCore::Graph::setPropertyY
void setPropertyY(const QString &propertyY)
Set name of the property for Y axis.
Definition: tool.h:166
StepCore::Tracer::_localPosition
Vector2d _localPosition
Definition: tool.h:500
StepCore::Meter::_digits
int _digits
Definition: tool.h:348
StepCore::Controller::object
Object * object() const
Get pointer to the controlled object.
Definition: tool.h:376
StepCore::Graph::setObjectX
void setObjectX(Object *objectX)
Set pointer to the objects for X axis.
Definition: tool.h:146
StepCore::Graph::_showPoints
bool _showPoints
Definition: tool.h:267
StepCore::NoteFormula::NoteFormula
NoteFormula(const QString &name=QString(), const QByteArray &image=QByteArray(), const QString &code=QString())
Constructs NoteFormula.
Definition: tool.h:69
StepCore::Graph::size
const Vector2d & size() const
Get size of the graph.
Definition: tool.h:139
StepCore::Meter::Meter
Meter(Vector2d position=Vector2d::Zero(), Vector2d size=Vector2d(70, 24))
Constructs Meter.
Definition: tool.cc:244
StepCore::Graph::setAutoLimitsX
void setAutoLimitsX(bool autoLimitsX)
Set auto-limits for X axis.
Definition: tool.h:176
StepCore::Controller::index
int index() const
Get vector index of the controlled property.
Definition: tool.h:386
StepCore::Controller::setProperty
void setProperty(const QString &property)
Set name of the controlled property.
Definition: tool.h:383
world.h
Item, Body, Force and Tool interfaces, World class.
StepCore::Meter::_property
QString _property
Definition: tool.h:345
StepCore::Graph::_points
Vector2dList _points
Definition: tool.h:269
StepCore::Controller::increment
double increment() const
Get increment step.
Definition: tool.h:406
StepCore::Graph::setPropertyX
void setPropertyX(const QString &propertyX)
Set name of the property for X axis.
Definition: tool.h:151
StepCore::Tracer::setBody
void setBody(Object *body)
Set pointer to the first connected body.
Definition: tool.cc:383
StepCore::NoteFormula
LaTeX formula embedded in Note.
Definition: tool.h:63
StepCore::Graph::_propertyY
QString _propertyY
Definition: tool.h:257
StepCore::Graph::Graph
Graph(Vector2d position=Vector2d::Zero(), Vector2d size=Vector2d(400, 300))
Constructs Graph.
Definition: tool.cc:148
StepCore::Graph::isValidY
bool isValidY() const
Returns true if Y-axis data source is valid.
Definition: tool.cc:166
StepCore::Tracer::position
Vector2d position() const
Position of the tracer.
Definition: tool.cc:403
StepCore::NoteImage::image
const QByteArray & image() const
Get image data.
Definition: tool.h:51
StepCore::Graph::isValidX
bool isValidX() const
Returns true if X-axis data source is valid.
Definition: tool.cc:158
StepCore::Tracer::_p
Particle * _p
Definition: tool.h:503
StepCore::Graph::setPoints
void setPoints(const Vector2dList &points)
Set points list.
Definition: tool.h:206
StepCore::Controller::_position
Vector2d _position
Definition: tool.h:438
StepCore::NoteFormula::setCode
void setCode(const QString &code)
Set formula code.
Definition: tool.h:77
StepCore::Controller::decreaseShortcut
const QString & decreaseShortcut() const
Get GUI increase shortcut.
Definition: tool.h:396
StepCore::Note::size
const Vector2d & size() const
Get size of the note.
Definition: tool.h:104
StepCore::Controller::_decreaseShortcut
QString _decreaseShortcut
Definition: tool.h:446
StepCore::Graph::setIndexX
void setIndexX(int indexX)
Set vector index for the X axis.
Definition: tool.h:156
StepCore::Tracer::_r
RigidBody * _r
Definition: tool.h:504
StepCore::Graph::propertyYPtr
const MetaProperty * propertyYPtr() const
Get pointer to the property for Y axis (or zero if not defined)
Definition: tool.h:214
StepCore::Meter::digits
int digits() const
Get display digits.
Definition: tool.h:312
StepCore::Tracer
Traces position of the body.
Definition: tool.h:461
StepCore::Item
The root class for any world items (bodies and forces)
Definition: world.h:69
StepCore::Graph::objectX
Object * objectX() const
Get pointer to the objects for X axis.
Definition: tool.h:144
StepCore::Graph::setAutoLimitsY
void setAutoLimitsY(bool autoLimitsY)
Set auto-limits for Y axis.
Definition: tool.h:181
StepCore::Meter::_size
Vector2d _size
Definition: tool.h:342
StepCore::Graph::indexY
int indexY() const
Get vector index for the Y axis.
Definition: tool.h:169
StepCore::Graph::setLimitsY
void setLimitsY(const Vector2d &limitsY)
Set limits for Y axis.
Definition: tool.h:191
StepCore::Graph
Graph item.
Definition: tool.h:125
StepCore::Controller::increaseShortcut
const QString & increaseShortcut() const
Get GUI decrease shortcut.
Definition: tool.h:401
StepCore::Graph::propertyX
QString propertyX() const
Get name of the property for X axis.
Definition: tool.h:149
StepCore::Object::name
const QString & name() const
Returns name of the object.
Definition: object.h:66
StepCore::Controller::isValid
bool isValid() const
Returns true if controlled property is valid.
Definition: tool.cc:309
StepCore::Graph::recordPoint
Vector2d recordPoint(bool *ok=0)
Get current point value and add it to points list.
Definition: tool.cc:193
StepCore::Meter::setSize
void setSize(const Vector2d &size)
Set size of the meter.
Definition: tool.h:294
StepCore::Graph::setObjectY
void setObjectY(Object *objectY)
Set pointer to the objects for Y axis.
Definition: tool.h:161
StepCore::Note::position
const Vector2d & position() const
Get position of the note.
Definition: tool.h:99
StepCore::Graph::position
const Vector2d & position() const
Get position of the graph.
Definition: tool.h:134
StepCore::ItemGroup
Groups several items together.
Definition: world.h:309
StepCore::Note::setPosition
void setPosition(const Vector2d &position)
Set position of the note.
Definition: tool.h:101
StepCore::Meter::setObject
void setObject(Object *object)
Set pointer to the observed object.
Definition: tool.h:299
StepCore::Tracer::points
const Vector2dList & points() const
Get points list.
Definition: tool.h:485
StepCore::Controller::limits
const Vector2d & limits() const
Get GUI slider limits.
Definition: tool.h:391
StepCore::Tracer::recordPoint
Vector2d recordPoint()
Get current position value and add it to points list.
Definition: tool.h:490
StepCore::Graph::objectY
Object * objectY() const
Get pointer to the objects for Y axis.
Definition: tool.h:159
StepCore::Particle
Particle with mass.
Definition: particle.h:103
StepCore::Graph::_size
Vector2d _size
Definition: tool.h:250
StepCore::Graph::showPoints
bool showPoints() const
Get show-points flag.
Definition: tool.h:199
StepCore::Controller::property
QString property() const
Get name of the controlled property.
Definition: tool.h:381
StepCore::Controller::setObject
void setObject(Object *object)
Set pointer to the controlled object.
Definition: tool.h:378
StepCore::Controller::_property
QString _property
Definition: tool.h:442
StepCore::NoteImage::NoteImage
NoteImage(const QString &name=QString(), const QByteArray &image=QByteArray())
Constructs NoteImage.
Definition: tool.h:46
StepCore::Graph::setShowPoints
void setShowPoints(bool showPoints)
Set show-points flag.
Definition: tool.h:201
StepCore::Graph::autoLimitsX
bool autoLimitsX() const
Get auto-limits for X axis.
Definition: tool.h:174
StepCore::Note::setText
void setText(const QString &text)
Set note text.
Definition: tool.h:111
StepCore::NoteFormula::code
const QString & code() const
Get formula code.
Definition: tool.h:75
StepCore::Graph::currentValue
Vector2d currentValue() const
Get current point value.
Definition: tool.h:226
StepCore::Note::_text
QString _text
Definition: tool.h:116
StepCore::Controller
Controller item to control properties of other objects.
Definition: tool.h:357
StepCore::Meter::object
Object * object() const
Get pointer to the observed object.
Definition: tool.h:297
StepCore::Meter::propertyPtr
const MetaProperty * propertyPtr() const
Get pointer to the observed property.
Definition: tool.h:320
StepCore::Graph::_indexY
int _indexY
Definition: tool.h:258
StepCore::Controller::size
const Vector2d & size() const
Get size of the Controller.
Definition: tool.h:371
StepCore::Note::text
const QString & text() const
Get note text.
Definition: tool.h:109
StepCore::Controller::units
QString units() const
Return units of measured property.
Definition: tool.cc:350
StepCore::Graph::setPosition
void setPosition(const Vector2d &position)
Set position of the graph.
Definition: tool.h:136
StepCore::Tool
Interface for tools.
Definition: world.h:290
StepCore::Tracer::_points
Vector2dList _points
Definition: tool.h:501
StepCore::Tracer::clearPoints
void clearPoints()
Clear points list.
Definition: tool.h:493
StepCore::Graph::clearPoints
void clearPoints()
Clear points list.
Definition: tool.h:237
StepCore::NoteImage::_image
QByteArray _image
Definition: tool.h:57
StepCore::Controller::setLimits
void setLimits(const Vector2d &limits)
Set GUI slider limits.
Definition: tool.h:393
StepCore::Meter::position
const Vector2d & position() const
Get position of the meter.
Definition: tool.h:287
StepCore::Graph::autoLimitsY
bool autoLimitsY() const
Get auto-limits for Y axis.
Definition: tool.h:179
StepCore::Vector2dList
std::vector< Vector2d, Eigen::aligned_allocator< Vector2d > > Vector2dList
Definition: types.h:117
StepCore::NoteImage::setImage
void setImage(const QByteArray &image)
Set image data.
Definition: tool.h:54
StepCore::Controller::_index
int _index
Definition: tool.h:443
StepCore::Controller::_increment
double _increment
Definition: tool.h:449
StepCore::Graph::propertyY
QString propertyY() const
Get name of the property for Y axis.
Definition: tool.h:164
StepCore::Tracer::Tracer
Tracer(Object *body=0, const Vector2d &localPosition=Vector2d::Zero())
Constructs Spring.
Definition: tool.cc:376
StepCore::Tracer::setPoints
void setPoints(const Vector2dList &points)
Set points list.
Definition: tool.h:487
StepCore::MetaProperty
Meta-information about property.
Definition: object.h:77
StepCore::Graph::setLimitsX
void setLimitsX(const Vector2d &limitsX)
Set limits for X axis.
Definition: tool.h:186
STEPCORE_OBJECT
#define STEPCORE_OBJECT(_className)
Definition: object.h:49
StepCore::Controller::setSize
void setSize(const Vector2d &size)
Set size of the Controller.
Definition: tool.h:373
StepCore::Graph::_indexX
int _indexX
Definition: tool.h:254
StepCore::Controller::_limits
Vector2d _limits
Definition: tool.h:445
StepCore::Controller::_increaseShortcut
QString _increaseShortcut
Definition: tool.h:447
StepCore::Graph::unitsX
QString unitsX() const
Return units of propertyX.
Definition: tool.cc:228
StepCore::Meter::_object
Object * _object
Definition: tool.h:344
StepCore::Graph::isValid
bool isValid() const
Returns true if X- and Y-axis data source is valid.
Definition: tool.h:223
StepCore::Meter::units
QString units() const
Return units of measured property.
Definition: tool.cc:276
StepCore::Meter::_position
Vector2d _position
Definition: tool.h:341
StepCore::Tracer::setLocalPosition
void setLocalPosition(const Vector2d &localPosition)
Set local position of the tracer on the body or in the world (if the tracer is not connected) ...
Definition: tool.h:479
StepCore::Graph::setIndexY
void setIndexY(int indexY)
Set vector index for the Y axis.
Definition: tool.h:171
StepCore::Graph::_propertyX
QString _propertyX
Definition: tool.h:253
StepCore::Note::Note
Note(Vector2d position=Vector2d::Zero(), Vector2d size=Vector2d(250, 100), QString text=QString())
Constructs Note.
Definition: tool.cc:143
StepCore::Meter
Meter to observe properties of other objects.
Definition: tool.h:278
StepCore::Graph::unitsY
QString unitsY() const
Return units of propertyY.
Definition: tool.cc:236
StepCore::Graph::propertyXPtr
const MetaProperty * propertyXPtr() const
Get pointer to the property for X axis (or zero if not defined)
Definition: tool.h:209
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:43:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

step/stepcore

Skip menu "step/stepcore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • 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