ICF 3.0.5.47
Technical documentation of ICF Libraries
CVisualRegistryElement.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// Qt includes
10#include <QtGui/QIcon>
11
12
13// ICF includes
14#include <i2d/CObject2dBase.h>
15
16#include <icomp/IRegistry.h>
19
20#include <icmpstr/icmpstr.h>
21
22
23namespace icmpstr
24{
25
26
28{
29public:
31
33
34 const icomp::IRegistry* GetRegistry() const;
36 const QByteArray& GetName() const;
37 void SetName(const QByteArray& name);
38 const QString& GetNote() const;
39 void SetNote(const QString& note);
40
41 // overloaded (icomp::CRegistryElement)
43 const icomp::IRegistry* parentPtr,
44 const icomp::CComponentAddress& address);
45
46 // reimplemented (i2d::IObject2d)
47 virtual i2d::CVector2d GetCenter() const;
48 virtual void MoveCenterTo(const i2d::CVector2d& position);
50 virtual bool Transform(
51 const i2d::ITransformation2d& transformation,
53 double* errorFactorPtr = nullptr);
54 virtual bool InvTransform(
55 const i2d::ITransformation2d& transformation,
57 double* errorFactorPtr = nullptr);
58 virtual bool GetTransformed(
59 const i2d::ITransformation2d& transformation,
60 i2d::IObject2d& result,
62 double* errorFactorPtr = nullptr) const;
63 virtual bool GetInvTransformed(
64 const i2d::ITransformation2d& transformation,
65 i2d::IObject2d& result,
67 double* errorFactorPtr = nullptr) const;
68
69private:
70 i2d::CVector2d m_center;
71 const icomp::IRegistry* m_registryPtr;
73 QByteArray m_name;
74 QString m_note;
75};
76
77
78// inline methods
79
81{
82 return m_registryPtr;
83}
84
85
87{
88 return m_address;
89}
90
91
92inline const QByteArray& CVisualRegistryElement::GetName() const
93{
94 return m_name;
95}
96
97
98} // namespace icmpstr
99
100
Base class for 2D-objects implementing interface i2d::IObject2d.
Definition of rectangle area orthogonal to axis of coordination system.
Definition CRectangle.h:31
Definition of position or mathematical vector on 2D plane.
Definition CVector2d.h:29
Common interface for describing the 2D-objects.
Definition IObject2d.h:30
Common interface for all calibration objects.
@ EM_NONE
There are no preferences, should be automatically selected.
virtual i2d::CRectangle GetBoundingBox() const
Get bounding box of this shape.
virtual bool InvTransform(const i2d::ITransformation2d &transformation, i2d::ITransformation2d::ExactnessMode mode=i2d::ITransformation2d::EM_NONE, double *errorFactorPtr=nullptr)
Do inverse transformation of this object.
const QString & GetNote() const
virtual void MoveCenterTo(const i2d::CVector2d &position)
Move object to position position.
virtual bool GetTransformed(const i2d::ITransformation2d &transformation, i2d::IObject2d &result, i2d::ITransformation2d::ExactnessMode mode=i2d::ITransformation2d::EM_NONE, double *errorFactorPtr=nullptr) const
Calulate transformation of the object into second one.
virtual bool Transform(const i2d::ITransformation2d &transformation, i2d::ITransformation2d::ExactnessMode mode=i2d::ITransformation2d::EM_NONE, double *errorFactorPtr=nullptr)
Transform this object using some transformation.
const QByteArray & GetName() const
void SetNote(const QString &note)
const icomp::IRegistry * GetRegistry() const
void Initialize(const icomp::IRegistry *parentPtr, const icomp::CComponentAddress &address)
void SetName(const QByteArray &name)
virtual bool GetInvTransformed(const i2d::ITransformation2d &transformation, i2d::IObject2d &result, i2d::ITransformation2d::ExactnessMode mode=i2d::ITransformation2d::EM_NONE, double *errorFactorPtr=nullptr) const
Calulate inverse transformation of the object into second one.
const icomp::CComponentAddress & GetAddress() const
virtual i2d::CVector2d GetCenter() const
Returns center of this 2D-object.
Represents global address of component.
Interface representing information stored in component registry.
Definition IRegistry.h:30
This package contains (Qt based) implementations of compositor components.

© Witold Gantzke and Kirill Lepskiy