Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Plot2d Namespace Reference

Enumerations

enum  MarkerType {
  None, Circle, Rectangle, Diamond,
  DTriangle, UTriangle, LTriangle, RTriangle,
  Cross, XCross
}
 
enum  LineType {
  NoPen, Solid, Dash, Dot,
  DashDot, DashDotDot
}
 

Functions

QwtSymbol::Style plot2qwtMarker (MarkerType)
 Convert Plot2d marker type to Qwt marker type. More...
 
MarkerType qwt2plotMarker (QwtSymbol::Style)
 Convert Qwt marker type to Plot2d marker type. More...
 
Qt::PenStyle plot2qwtLine (LineType)
 Convert Plot2d line type to Qt/Qwt line type. More...
 
LineType qwt2plotLine (Qt::PenStyle)
 Convert Qt/Qwt line type to Plot2d line type. More...
 
void drawLine (QPainter *, const QPoint &, const QPoint &, Qt::PenStyle=Qt::SolidLine, const QColor &=Qt::black, int=0)
 Draw line. More...
 
void drawLine (QPainter *, const QPoint &, const QPoint &, LineType=Solid, const QColor &=Qt::black, int=0)
 Draw line. More...
 
void drawLine (QPainter *, int, int, int, int, Qt::PenStyle=Qt::SolidLine, const QColor &=Qt::black, int=0)
 Draw line. More...
 
void drawLine (QPainter *, int, int, int, int, LineType=Solid, const QColor &=Qt::black, int=0)
 Draw line. More...
 
void drawMarker (QPainter *, const QPoint &, const QRect &, QwtSymbol::Style=QwtSymbol::Ellipse, const QColor &=Qt::black)
 Draw marker. More...
 
void drawMarker (QPainter *, const QPoint &, const QRect &, MarkerType=Circle, const QColor &=Qt::black)
 Draw marker. More...
 
void drawMarker (QPainter *, int, int, int, int, QwtSymbol::Style=QwtSymbol::Ellipse, const QColor &=Qt::black)
 Draw marker. More...
 
void drawMarker (QPainter *, int, int, int, int, MarkerType=Circle, const QColor &=Qt::black)
 Draw marker. More...
 
QPixmap markerIcon (const QSize &, const QColor &, Plot2d::MarkerType)
 Create icon pixmap according to the marker type. More...
 
QPixmap lineIcon (const QSize &, const QColor &, Plot2d::LineType)
 Create icon pixmap according to the line type. More...
 
void getNextMarker (const int rtti, const QwtPlot *, QwtSymbol::Style &, QColor &, Qt::PenStyle &)
 
bool existMarker (const int rtti, const QwtPlot *, const QwtSymbol::Style, const QColor &, const Qt::PenStyle)
 
bool closeColors (const QColor &, const QColor &, int distance=-1)
 

Enumeration Type Documentation

Enumerator
NoPen 
Solid 
Dash 
Dot 
DashDot 
DashDotDot 
Enumerator
None 
Circle 
Rectangle 
Diamond 
DTriangle 
UTriangle 
LTriangle 
RTriangle 
Cross 
XCross 

Function Documentation

bool Plot2d::closeColors ( const QColor &  color1,
const QColor &  color2,
int  distance = -1 
)

Checks if two colors are close to each other uses COLOR_DISTANCE variable as max tolerance for comparing of colors

References COLOR_DISTANCE.

void Plot2d::drawLine ( QPainter *  painter,
const QPoint &  p1,
const QPoint &  p2,
Qt::PenStyle  type = Qt::SolidLine,
const QColor &  color = Qt::black,
int  width = 0 
)
Parameters
painterpainter
p1starting point
p2ending point
typeline type
colorline color
widthline width
void Plot2d::drawLine ( QPainter *  painter,
const QPoint &  p1,
const QPoint &  p2,
Plot2d::LineType  type = Solid,
const QColor &  color = Qt::black,
int  width = 0 
)
Parameters
painterpainter
p1starting point
p2ending point
typeline type
colorline color
widthline width

References drawLine(), and plot2qwtLine().

void Plot2d::drawLine ( QPainter *  painter,
int  x1,
int  y1,
int  x2,
int  y2,
Qt::PenStyle  type = Qt::SolidLine,
const QColor &  color = Qt::black,
int  width = 0 
)
Parameters
painterpainter
x1X coordinate of the starting point
y1Y coordinate of the starting point
x2X coordinate of the ending point
y2Y coordinate of the ending point
typeline type
colorline color
widthline width

References drawLine().

void Plot2d::drawLine ( QPainter *  painter,
int  x1,
int  y1,
int  x2,
int  y2,
Plot2d::LineType  type = Solid,
const QColor &  color = Qt::black,
int  width = 0 
)
Parameters
painterpainter
x1X coordinate of the starting point
y1Y coordinate of the starting point
x2X coordinate of the ending point
y2Y coordinate of the ending point
typeline type
colorline color
widthline width

References drawLine(), and plot2qwtLine().

void Plot2d::drawMarker ( QPainter *  painter,
const QPoint &  p,
const QRect &  r,
QwtSymbol::Style  type = QwtSymbol::Ellipse,
const QColor &  color = Qt::black 
)
Parameters
painterpainter
pcentral point
rmarker rectangle
typemarker type
colormarker color

References Cross, Diamond, DTriangle, LTriangle, RTriangle, UTriangle, and XCross.

void Plot2d::drawMarker ( QPainter *  painter,
const QPoint &  p,
const QRect &  r,
Plot2d::MarkerType  type = Circle,
const QColor &  color = Qt::black 
)
Parameters
painterpainter
pcentral point
rmarker rectangle
typemarker type
colormarker color

References drawMarker(), and plot2qwtMarker().

void Plot2d::drawMarker ( QPainter *  painter,
int  x,
int  y,
int  w,
int  h,
QwtSymbol::Style  type = QwtSymbol::Ellipse,
const QColor &  color = Qt::black 
)
Parameters
painterpainter
xX coordinate of the central point
yY coordinate of the central point
wmarker rectangle width
hmarker rectangle height
typemarker type
colormarker color

References drawMarker().

void Plot2d::drawMarker ( QPainter *  painter,
int  x,
int  y,
int  w,
int  h,
Plot2d::MarkerType  type = Circle,
const QColor &  color = Qt::black 
)
Parameters
painterpainter
xX coordinate of the central point
yY coordinate of the central point
wmarker rectangle width
hmarker rectangle height
typemarker type
colormarker color

References drawMarker(), and plot2qwtMarker().

bool Plot2d::existMarker ( const int  rtti,
const QwtPlot thePlot,
const QwtSymbol::Style  typeMarker,
const QColor &  color,
const Qt::PenStyle  typeLine 
)

Checks if marker belongs to any enitity

References closeColors().

void Plot2d::getNextMarker ( const int  rtti,
const QwtPlot thePlot,
QwtSymbol::Style &  typeMarker,
QColor &  color,
Qt::PenStyle &  typeLine 
)

Gets new unique marker for item if possible

References existMarker(), and MAX_ATTEMPTS.

QPixmap Plot2d::lineIcon ( const QSize &  size,
const QColor &  color,
Plot2d::LineType  type 
)
Parameters
sizeicon size
typeline type
coloricon color
Returns
icon

References OCCViewer::color(), drawLine(), and px().

QPixmap Plot2d::markerIcon ( const QSize &  size,
const QColor &  color,
Plot2d::MarkerType  type 
)
Parameters
sizeicon size
typemarker type
coloricon color
Returns
icon

References OCCViewer::color(), drawMarker(), MSIZE, and px().

Qt::PenStyle Plot2d::plot2qwtLine ( Plot2d::LineType  p)
Parameters
pPlot2d line type
Returns
Qt/Qwt line type

References Dash, DashDot, DashDotDot, Dot, NoPen, and Solid.

QwtSymbol::Style Plot2d::plot2qwtMarker ( Plot2d::MarkerType  m)
Parameters
mPlot2d marker type
Returns
Qwt marker type

References Circle, Cross, Diamond, DTriangle, LTriangle, None, Rectangle, RTriangle, UTriangle, and XCross.

Plot2d::LineType Plot2d::qwt2plotLine ( Qt::PenStyle  p)
Parameters
pQt/Qwt line type
Returns
Plot2d line type

References Dash, DashDot, DashDotDot, Dot, NoPen, and Solid.

Plot2d::MarkerType Plot2d::qwt2plotMarker ( QwtSymbol::Style  m)
Parameters
mQwt marker type
Returns
Plot2d marker type

References Circle, Cross, Diamond, DTriangle, LTriangle, None, Rectangle, RTriangle, UTriangle, and XCross.