Locus No Pilotus
Project of four first grade MIPT DAFE/RSE students (for engineering practical work in the second semester) in Qt C++
|
Class of the arc shape. More...
#include <plot_item_arc.h>
Public Member Functions | |
PlotItemArc (QCustomPlot *parentPlot) | |
Creates an arc item and sets default values. | |
virtual | ~PlotItemArc () override |
QPen | Pen () const |
virtual double | selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const override |
void | SetCenterAndRadiusCoords (double center_x, double center_y, double rad) |
Sets center and radius of the arc by setting topLeft and bottomRight. | |
void | SetPen (const QPen &pen) |
Sets the pen that will be used to draw the line of the arc. | |
void | SetStartAndEnd (double start_angle, double end_angle) |
Sets start and end of current acr. | |
void | SetStartAndEnd (std::pair< double, double > start_and_end) |
Sets start and end of current acr. | |
Public Attributes | |
QCPItemAnchor *const | bottom |
QCPItemAnchor *const | bottomLeftRim |
QCPItemPosition *const | bottomRight |
QCPItemAnchor *const | bottomRightRim |
QCPItemAnchor *const | center |
QCPItemAnchor *const | left |
QCPItemAnchor *const | right |
QCPItemAnchor *const | top |
QCPItemPosition *const | topLeft |
QCPItemAnchor *const | topLeftRim |
QCPItemAnchor *const | topRightRim |
Protected Types | |
enum | AnchorIndex { aiTopLeftRim , aiTop , aiTopRightRim , aiRight , aiBottomRightRim , aiBottom , aiBottomLeftRim , aiLeft , aiCenter } |
Protected Member Functions | |
virtual QPointF | anchorPixelPosition (int anchorId) const override |
virtual void | draw (QCPPainter *painter) override |
QBrush | MainBrush () const |
Returns the brush that should be used for drawing fills of the item Returns mBrush when the item is not selected and mSelectedBrush when it is. | |
QPen | MainPen () const |
Returns the pen that should be used for drawing lines Returns mPen when the item is not selected and mSelectedPen when it is. | |
Protected Attributes | |
QBrush | mBrush |
QPen | mPen |
QBrush | mSelectedBrush |
QPen | mSelectedPen |
Private Attributes | |
int | arc_length_ {90} |
int | arc_start_ {0} |
Class of the arc shape.
|
protected |
Enumerator | |
---|---|
aiTopLeftRim | |
aiTop | |
aiTopRightRim | |
aiRight | |
aiBottomRightRim | |
aiBottom | |
aiBottomLeftRim | |
aiLeft | |
aiCenter |
|
inlineexplicit |
Creates an arc item and sets default values.
The created item is automatically registered with parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead
parentPlot |
|
inlineoverridevirtual |
|
inlineoverrideprotectedvirtual |
|
inlineoverrideprotectedvirtual |
|
inlineprotected |
Returns the brush that should be used for drawing fills of the item Returns mBrush when the item is not selected and mSelectedBrush when it is.
|
inlineprotected |
Returns the pen that should be used for drawing lines Returns mPen when the item is not selected and mSelectedPen when it is.
|
inline |
|
inlineoverridevirtual |
|
inline |
Sets center and radius of the arc by setting topLeft and bottomRight.
center_x | abscissa coord of the arc |
center_y | ordinate coord of the arc |
rad | radius value of the arc |
|
inline |
Sets the pen that will be used to draw the line of the arc.
pen |
|
inline |
Sets start and end of current acr.
start_angle | start value in degree |
end_angle | end value in degree |
|
inline |
Sets start and end of current acr.
start_and_end | pair of start and end |
|
private |
|
private |
QCPItemAnchor* const PlotItemArc::bottom |
QCPItemAnchor* const PlotItemArc::bottomLeftRim |
QCPItemPosition* const PlotItemArc::bottomRight |
QCPItemAnchor* const PlotItemArc::bottomRightRim |
QCPItemAnchor* const PlotItemArc::center |
QCPItemAnchor* const PlotItemArc::left |
|
protected |
|
protected |
|
protected |
|
protected |
QCPItemAnchor* const PlotItemArc::right |
QCPItemAnchor* const PlotItemArc::top |
QCPItemPosition* const PlotItemArc::topLeft |
QCPItemAnchor* const PlotItemArc::topLeftRim |
QCPItemAnchor* const PlotItemArc::topRightRim |