Locus No Pilotus
Project of four first grade MIPT DAFE/RSE students (for engineering practical work in the second semester) in Qt C++
Loading...
Searching...
No Matches
gui::Target Class Reference

Фигура контрольной точки More...

#include <target.h>

Inheritance diagram for gui::Target:
Collaboration diagram for gui::Target:

Public Member Functions

 Target ()=default
 
 Target (const lib::Target &data)
 
 Target (const Target &)=default
 
 Target (double x, double y)
 
 Target (lib::Point p)
 
 Target (Target &&)=default
 
virtual void Draw (QCustomPlot *plot) override
 Отрисовывает фигуру на полотне
 
lib::TargetGetData ()
 
const lib::TargetGetData () const
 
QCPGraph * GetGraphPtr () const
 Возвращает значение указателя на полотне
 
lib::Point GetPoint () const
 
Targetoperator= (const Target &)=default
 
Targetoperator= (Target &&)=default
 
bool operator== (const gui::Target &target) const
 
void SetPoint (double x, double y)
 
void SetPoint (lib::Point p)
 

Private Attributes

lib::Target data_
 
QCPGraph * graph_ {nullptr}
 

Detailed Description

Фигура контрольной точки

Фигура представляет собой малую серую окружность (точку)

Constructor & Destructor Documentation

◆ Target() [1/6]

gui::Target::Target ( )
default

◆ Target() [2/6]

gui::Target::Target ( double x,
double y )
inline
17: data_(x, y) {}
lib::Target data_
Definition target.h:52

◆ Target() [3/6]

gui::Target::Target ( lib::Point p)
inline
18: data_(p) {}

◆ Target() [4/6]

gui::Target::Target ( const lib::Target & data)
inline
19: data_(data) {}

◆ Target() [5/6]

gui::Target::Target ( const Target & )
default

◆ Target() [6/6]

gui::Target::Target ( Target && )
default

Member Function Documentation

◆ Draw()

void gui::Target::Draw ( QCustomPlot * plot)
inlineoverridevirtual

Отрисовывает фигуру на полотне

Фигура представляет собой малую серую окружность (точку)

Parameters
plotуказатель на полотно

Implements gui::Drawable.

Reimplemented in gui::Airport.

57 {
58 graph_ = plot->addGraph(plot->xAxis, plot->yAxis);
59
60 graph_->setPen(QColor(50, 50, 50, 255));
61 graph_->setLineStyle(QCPGraph::lsNone);
62 graph_->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssCircle, 4));
63
64 graph_->setData({GetPoint().x}, {GetPoint().y});
65}
lib::Point GetPoint() const
Definition target.h:30
QCPGraph * graph_
Definition target.h:54
double y
Definition point.h:18
double x
Definition point.h:17
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetData() [1/2]

lib::Target & gui::Target::GetData ( )
inline
31{ return data_; }
Here is the caller graph for this function:

◆ GetData() [2/2]

const lib::Target & gui::Target::GetData ( ) const
inline
32{ return data_; }

◆ GetGraphPtr()

QCPGraph * gui::Target::GetGraphPtr ( ) const
inline

Возвращает значение указателя на полотне

Returns
QCPGraph*: указатель
45{ return graph_; }
Here is the caller graph for this function:

◆ GetPoint()

lib::Point gui::Target::GetPoint ( ) const
inline
30{ return data_.GetPoint(); }
Point GetPoint() const
Definition target.h:29
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

Target & gui::Target::operator= ( const Target & )
default

◆ operator=() [2/2]

Target & gui::Target::operator= ( Target && )
default

◆ operator==()

bool gui::Target::operator== ( const gui::Target & target) const
inline
47 {
48 return data_ == target.GetData();
49 }
lib::Target & GetData()
Definition target.h:31
Here is the call graph for this function:

◆ SetPoint() [1/2]

void gui::Target::SetPoint ( double x,
double y )
inline
28{ data_.SetPoint(x, y); }
void SetPoint(const Point &p)
Definition target.h:31
Here is the call graph for this function:

◆ SetPoint() [2/2]

void gui::Target::SetPoint ( lib::Point p)
inline
27{ data_.SetPoint(p); }
Here is the call graph for this function:

Member Data Documentation

◆ data_

lib::Target gui::Target::data_
private

◆ graph_

QCPGraph* gui::Target::graph_ {nullptr}
private
54{nullptr};

The documentation for this class was generated from the following file: