The class of derived from ViewBase for drawing to the screen and PostScript generation using Qt toolkit. More...
#include <QtViewImp.h>
Public Member Functions | |
virtual const QFont & | defaultFont () |
virtual void | drawColorLines (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, const std::vector< Color > &colors, float size) |
Draws multiple line segments, each with a different color - that is, a line between x0,y0 and x1,y1, with color[0] =color[1] another between x2,y2 and x3,y3 with color[2]=color[3] and so on. | |
virtual void | drawImage (const std::string &filename, int position=0) |
Draws a image. | |
virtual void | drawLatex (const std::string &eq, int position=0) |
Draws a Latex equation. | |
virtual void | drawLines (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, const Color &color, float size) |
Draws multiple line segments - that is, a line between x0,y0 and x1,y2, another between x2,y2 and x3,y3 and so on. | |
virtual void | drawPoints (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Symbol::Type type, float sym_size) |
virtual void | drawPoints (const std::vector< double > &x, const std::vector< double > &y, const std::vector< Color > &colors, hippodraw::Symbol::Type type, float sym_size) |
virtual void | drawPolygon (const std::vector< double > &x, const std::vector< double > &y, const Color &color, const Color &edge) |
Draws a polygon. | |
virtual void | drawPolyLine (const std::vector< double > &xpoints, const std::vector< double > &ypoints, hippodraw::Line::Style style, const Color &color, float size) |
Draws a polyline. | |
virtual void | drawSelf () |
Draws itself. | |
virtual void | drawSquare (double x1, double y1, double x2, double y2, int red, int green, int blue) |
Draws a colored square. | |
virtual void | drawText (const std::string &s, float x, float y, float fontsize, float angle, char xp, char yp, bool resize) |
virtual void | drawText (const std::string &s, float x, float y, float fontsize, float angle, char xp, char yp, bool resize, const FontBase *font, const Color *color) |
Draws a text string at a point in the view's coordinate system. | |
virtual void | drawViewLines (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, bool color, float size) |
virtual void | drawViewLines (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, const Color &color, float size) |
Draws multiple line segments. | |
virtual void | drawViewSquare (float x1, float y1, float x2, float y2, int red, int green, int blue) |
Draws a colored square in view space. | |
virtual void | fillPickedPoint (double x, double y, std::vector< double > &picked) const =0 |
Fills the picked point vector. | |
virtual double | getAspectRatio () const |
Get the aspect ratio. | |
virtual Rect | getDrawRect () const =0 |
Returns the drawing Rectangle in the devices coordinate system. | |
const Rect & | getMarginRect () const |
Returns the rectangle area in which data points are drawn. | |
PlotterBase * | getPlotter () const |
Returns the plotter used by this view. | |
PlotterBase * | getPlotter () |
Returns the plotter used by this view. | |
const Range & | getRange (Axes::Type axis) const |
Returns the range of the data space on specified axis. | |
const Rect & | getRawRect () const |
Returns the rectangle before transform. | |
const Rect & | getUserRect () const |
Is called by the AxisRepBase object (or one of its derived objects), and returns the rectangle where the drawing is made. | |
QtViewImp (PlotterBase *plotter) | |
The constructor. | |
QtViewImp () | |
void | setCrossX (double val) |
Set the crossX value. | |
void | setCrossY (double val) |
Set the crossY value. | |
virtual void | setDefaultFont (const QFont &font) |
virtual void | setDrawRect (float x, float y, float w, float h)=0 |
Sets the drawing Rectangle in the devices coordinate system. | |
void | setInspector (QObject *) |
Sets the receiver of update messages. | |
void | setMarginRect (const Rect &) |
Sets the margin rectangle. | |
virtual void | setPlotter (PlotterBase *plotter) |
Sets the PlotterBase object to plotter. | |
int | toView (double x) const |
Converts the view space coordinate x expressed as a double to one expressed as an int . | |
virtual int | toViewX (double datX) const =0 |
Converts the data space coordinate X to the view space coordinate X. | |
virtual int | toViewY (double datY) const =0 |
Converts the data space coordinate Y to the view space coordinate Y. | |
virtual void | updateDrawRect () |
Update the drawing Rectangle in the devices coordinate system. | |
float | userToDrawColor (double c) const |
Converts a coordinate in user space to drawing space along the color (X) axis. | |
float | userToDrawX (double x) const |
Converts a coordinate in user space to drawing space along the X axis. | |
float | userToDrawXAutoInv (double x) const |
float | userToDrawY (double x) const |
Converts a coordinate in user space to drawing space along the Y axis. | |
virtual void | willDelete (const Observable *plotter) |
Responds to notification that the PlotterBase object is being deleted. |
Protected Member Functions | |
virtual void | draw_Text (const std::string &s, float x, float y, float fontsize, float angle, char xp, char yp, bool resize, QFont &font, const QColor &color) |
virtual double | marginToInvertedUserX (double x) const |
Converts from view coordinate to data conordiate, take into account the inversion of x axes. | |
virtual double | marginToInvertedUserY (double y) const |
Converts from inverted view coordinate to data coordinate, without taking into account transforms or scaling. | |
virtual double | marginToUserX (double x) const |
Converts from view coordinate to data coordinate, without taking into account transforms or scaling. | |
virtual double | marginToUserY (double y) const |
Converts from view coordinate to data coordinate, without taking into account transforms or scaling. | |
void | prepareMarginRect () |
Prepares the margin rectangle. | |
virtual void | update (const Observable *display) |
Responds to update message from Observable. | |
virtual float | userToInvertedMarginX (double x) const |
Converts the user X coordinate into the inverted X coordinate. | |
virtual float | userToInvertedMarginY (double y) const |
Converts the user Y coordinate into the top-left based margin Y coordinate. | |
virtual float | userToMarginColor (double c) const |
Converts the user Z coordinate into the margin color (X) coordinate. | |
virtual float | userToMarginX (double x) const |
Converts the user X coordinate into the margin X coordinate. | |
virtual float | userToMarginY (double y) const |
Converts the user Y coordinate into the margin Y coordinate. |
Protected Attributes | |
QFont | m_font_default |
QObject * | m_inspector |
The receiver of update messages. | |
Rect | m_margin_rect |
The rectangle area in which the projected points are plotted. | |
QPainter * | m_painter |
The current Qt QPainter object. | |
PlotterBase * | m_plotter |
The plotter object used by this view. |
Private Member Functions | |
QPen | createPen (const Color &color, float size, hippodraw::Line::Style style) |
Creates a QPen object from the arguments. | |
void | drawMethod (const std::vector< double > &x, const std::vector< double > &y, int opt1, int opt2) |
Draws in the view using the specified method. | |
virtual void | drawPoints (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Symbol::Type type, float sym_size, const Color &color) |
void | drawViewMethod (const std::vector< double > &x, const std::vector< double > &y, int opt1, int opt2) |
Draws in the view using the specified method. | |
virtual int | toCanvasX (double dx) const =0 |
Converts coordinate from view space to canvas space. | |
virtual int | toCanvasY (double dy) const =0 |
Converts coordinate from view space to canvas space. | |
void | transformAndFill (QPointArray &array, const std::vector< double > &x, const std::vector< double > &y, int(QtViewImp::*xfunc)(double) const, int(QtViewImp::*yfunc)(double) const ) |
Fills the array with QPoint objects whose coordinates are in the QPaintDevice space from the vectors x and y whose coordinates are in the data space. |
Private Attributes | |
std::map< const std::string, std::string > | m_eq_png |
The mapping from LaTex equation to PNG filename. |
Static Private Attributes | |
static std::map < hippodraw::Line::Style, Qt::PenStyle > | s_line_style |
The mapping from LineStyle::Type to QPen PenStyle. |
The class of derived from ViewBase for drawing to the screen and PostScript generation using Qt toolkit.
This class is most of the implementation of a concrete view. A derived class is needed to handle size attributes.
Definition at line 47 of file QtViewImp.h.
QtViewImp | ( | PlotterBase * | plotter | ) |
The constructor.
plotter | The plotter of the class derived from PlotterBase to be used in a drawing. |
Definition at line 73 of file QtViewImp.cxx.
References hippodraw::Line::Dash, hippodraw::Line::DashDot, hippodraw::Line::DashDotDot, hippodraw::Line::Dot, hippodraw::FontWeight::Invisible, QtViewImp::m_eq_png, QtViewImp::s_line_style, and hippodraw::Line::Solid.
QtViewImp | ( | ) |
Definition at line 54 of file QtViewImp.cxx.
References hippodraw::Line::Dash, hippodraw::Line::DashDot, hippodraw::Line::DashDotDot, hippodraw::Line::Dot, hippodraw::FontWeight::Invisible, QtViewImp::m_eq_png, QtViewImp::s_line_style, and hippodraw::Line::Solid.
|
private |
Creates a QPen object from the arguments.
Definition at line 502 of file QtViewImp.cxx.
References Color::getBlue(), Color::getGreen(), Color::getRed(), QtViewImp::s_line_style, and num_util::size().
Referenced by QtViewImp::drawLines(), QtViewImp::drawPolyLine(), and QtViewImp::drawViewLines().
|
virtual |
Definition at line 1007 of file QtViewImp.cxx.
References QtViewImp::m_font_default.
|
protectedvirtual |
Definition at line 698 of file QtViewImp.cxx.
References QFontMetrics::boundingRect(), QPainter::boundingRect(), QPainter::drawText(), QtViewImp::drawText(), ViewBase::getDrawRect(), Rect::getHeight(), Rect::getWidth(), Rect::getX(), Rect::getY(), QRect::height(), QtViewImp::m_painter, QPainter::restore(), QPainter::rotate(), QPainter::save(), ViewBase::setDrawRect(), QPainter::setFont(), QFont::setPixelSize(), QFont::setPointSize(), QStringList::split(), QPainter::translate(), and QRect::width().
Referenced by QtViewImp::drawText().
|
virtual |
Draws multiple line segments, each with a different color - that is, a line between x0,y0 and x1,y1, with color[0] =color[1] another between x2,y2 and x3,y3 with color[2]=color[3] and so on.
x
pairs of coordinates in user space on the X axis for the beginning and the end of the line segment.
y
pairs of coordinates in user space on the Y axis for the beginning and the end of the line segment.
style
the line style.
color
The RGB values for the color of the line.
size
The thickness of the line.
Implements ViewBase.
Definition at line 609 of file QtViewImp.cxx.
References QPainter::drawLine(), Color::getBlue(), Color::getGreen(), Color::getRed(), QtViewImp::m_painter, QPainter::restore(), QtViewImp::s_line_style, QPainter::save(), QPainter::setPen(), QtViewImp::toViewX(), and QtViewImp::toViewY().
|
virtual |
Draws a image.
This is called by drawLatex. Meaning of position: 0.Full 1.Top 2.Bottom 3.Left TODO: use enum for position.
Reimplemented from ViewBase.
Definition at line 1014 of file QtViewImp.cxx.
References QPainter::drawPixmap(), ViewBase::getDrawRect(), Rect::getHeight(), DataView::getMarginRect(), Rect::getWidth(), Rect::getX(), Rect::getY(), QPixmap::height(), QPixmap::load(), QtViewImp::m_painter, QWMatrix::rotate(), ViewBase::setDrawRect(), QPixmap::width(), and QPixmap::xForm().
Referenced by QtViewImp::drawLatex().
|
virtual |
Draws a Latex equation.
This function will call drawImage. Meaning of position: 0.Full 1.Top 2.Bottom 3.Left
Reimplemented from ViewBase.
Definition at line 1174 of file QtViewImp.cxx.
References QFile::close(), QDateTime::currentDateTime(), QtViewImp::drawImage(), QString::latin1(), QtViewImp::m_eq_png, QFile::open(), and QDir::setCurrent().
|
virtual |
Draws multiple line segments - that is, a line between x0,y0 and x1,y2, another between x2,y2 and x3,y3 and so on.
x
pairs of coordinates in user space on the X axis for the beginning and the end of the line segment. y
pairs of coordinates in user space on the Y axis for the beginning and the end of the line segment. style
the line style. color
The color size
The thickness of the line.
Implements ViewBase.
Definition at line 578 of file QtViewImp.cxx.
References QtViewImp::createPen(), QPainter::drawLineSegments(), QtViewImp::m_painter, QPainter::restore(), QPainter::save(), QPainter::setPen(), QtViewImp::toViewX(), QtViewImp::toViewY(), and QtViewImp::transformAndFill().
|
private |
Draws in the view using the specified method.
The coordinates are in the user space.
Definition at line 189 of file QtViewImp.cxx.
References QPainter::drawPolyline(), QtViewImp::m_painter, num_util::size(), QtViewImp::toViewX(), QtViewImp::toViewY(), and QtViewImp::transformAndFill().
Referenced by QtViewImp::drawPolyLine().
|
privatevirtual |
Definition at line 212 of file QtViewImp.cxx.
References hippodraw::Symbol::CIRCLE, QPainter::drawEllipse(), QPainter::drawPie(), QPainter::drawPolygon(), hippodraw::Symbol::FILLED_CIRCLE, hippodraw::Symbol::FILLED_TRIANGLE, QPainter::fillRect(), Color::getBlue(), Color::getGreen(), Color::getRed(), QtViewImp::m_painter, hippodraw::Symbol::PLUS, QPainter::restore(), QPainter::save(), QPainter::setBrush(), QPainter::setPen(), hippodraw::Symbol::SOLIDSQUARE, hippodraw::Symbol::SQUARE, hippodraw::Symbol::TIMES, QtViewImp::toViewX(), QtViewImp::toViewY(), and hippodraw::Symbol::TRIANGLE.
|
virtual |
Definition at line 350 of file QtViewImp.cxx.
|
virtual |
Implements ViewBase.
Definition at line 367 of file QtViewImp.cxx.
References hippodraw::Symbol::CIRCLE, QPainter::drawEllipse(), QPainter::drawPie(), QPainter::drawPolygon(), hippodraw::Symbol::FILLED_CIRCLE, hippodraw::Symbol::FILLED_TRIANGLE, QPainter::fillRect(), Color::getBlue(), Color::getGreen(), Color::getRed(), QtViewImp::m_painter, hippodraw::Symbol::PLUS, QPainter::restore(), QPainter::save(), QPainter::setBrush(), QPainter::setPen(), hippodraw::Symbol::SOLIDSQUARE, hippodraw::Symbol::SQUARE, hippodraw::Symbol::TIMES, QtViewImp::toViewX(), QtViewImp::toViewY(), and hippodraw::Symbol::TRIANGLE.
|
virtual |
Draws a polygon.
xpoints
points along the X axis. ypoints
points along the Y axis. color
The color.
Reimplemented from ViewBase.
Definition at line 518 of file QtViewImp.cxx.
References QPainter::drawPolygon(), Color::getBlue(), Color::getGreen(), Color::getRed(), QtViewImp::m_painter, QPainter::restore(), QPainter::save(), QPainter::setBrush(), QPainter::setPen(), num_util::size(), QtViewImp::toViewX(), QtViewImp::toViewY(), and QtViewImp::transformAndFill().
|
virtual |
Draws a polyline.
xpoints
points along the X axis. ypoints
points along the Y axis. style
the line style. color
The color. size
The thickness of the line.
Implements ViewBase.
Definition at line 559 of file QtViewImp.cxx.
References QtViewImp::createPen(), QtViewImp::drawMethod(), QtViewImp::m_painter, QPainter::restore(), QPainter::save(), and QPainter::setPen().
|
virtualinherited |
Draws itself.
Definition at line 60 of file ViewBase.cxx.
References PlotterBase::drawIn(), and ViewBase::m_plotter.
Referenced by QtViewWidget::draw(), QtView::draw(), QtView::drawWithPixmap(), OpenGLWindow::paint(), and QtViewWidget::paintEvent().
|
virtual |
Draws a colored square.
Used for shading on the cuts and the gray plot.
Implements ViewBase.
Definition at line 950 of file QtViewImp.cxx.
References QPainter::fillRect(), QtViewImp::m_painter, ViewBase::m_plotter, QtViewImp::toViewX(), and QtViewImp::toViewY().
|
virtual |
Definition at line 906 of file QtViewImp.cxx.
Referenced by QtViewImp::draw_Text().
|
virtual |
Draws a text string at a point in the view's coordinate system.
s | The string to be drawn. |
x | The x coordinate in the view's coordinate system. |
y | The y coordinate in the view's coordinate system. |
fontsize | The font size. If zero, then taken from the font object. |
angle | The angle to draw. 90 degrees is vertical with the beginning of the text towards the bottom. |
xp | The horizontal alignment with respect to the coordinate. 'r' means the coordinate is on the right side of the text, 'c' means centered, and 'l' for the left side. |
yp | The vertical alignment with respect to the coordinate. 't' means toward the top, 'c' means centered, and 'b' means bottom. |
resize | If true , the bounding rectangle of the view should be re-sized to fit the text string. |
font | If not a null pointer, then the font object to be used, otherwise the default font will be used. |
color | If not given as argument, the default color is that of the default Color constructor which is black. |
Implements ViewBase.
Definition at line 917 of file QtViewImp.cxx.
References QtViewImp::draw_Text(), Color::getBlue(), ViewBase::getDrawRect(), Color::getGreen(), Color::getRed(), Rect::getX(), Rect::getY(), QtViewImp::m_font_default, and QtViewImp::m_painter.
|
virtual |
Implements ViewBase.
Definition at line 645 of file QtViewImp.cxx.
References QtViewImp::drawViewMethod(), QtViewImp::m_painter, QPainter::pen(), QPainter::restore(), QtViewImp::s_line_style, QPainter::save(), and QPainter::setPen().
|
virtual |
Draws multiple line segments.
x
pairs of coordinates in view space on the X axis for the beginning and the end of the line segment. y
pairs of coordinates in view space on the Y axis for the beginning and the end of the line segment. style
the line style. color
The color size
The thickness of the line.
Implements ViewBase.
Definition at line 667 of file QtViewImp.cxx.
References QtViewImp::createPen(), QPainter::drawLineSegments(), QtViewImp::m_painter, QPainter::restore(), QPainter::save(), QPainter::setPen(), QtViewImp::toCanvasX(), QtViewImp::toCanvasY(), and QtViewImp::transformAndFill().
|
private |
Draws in the view using the specified method.
The coordinates are in the view space.
Definition at line 164 of file QtViewImp.cxx.
References QPainter::drawLineSegments(), QtViewImp::m_painter, num_util::size(), QtViewImp::toCanvasX(), QtViewImp::toCanvasY(), and QtViewImp::transformAndFill().
Referenced by QtViewImp::drawViewLines().
|
virtual |
Draws a colored square in view space.
Used for shading on the cuts and the gray plot.
Implements ViewBase.
Definition at line 974 of file QtViewImp.cxx.
References QPainter::fillRect(), QtViewImp::m_painter, QtViewImp::toCanvasX(), and QtViewImp::toCanvasY().
|
pure virtual |
Fills the picked point vector.
Converts the view coordinates x and y to data coordinates. The results are put in the vector picked.
Implemented in QtView, QtViewWidget, and QtGroupView.
|
virtualinherited |
Get the aspect ratio.
Definition at line 88 of file ViewBase.cxx.
References ViewBase::m_plotter.
Referenced by CanvasView::contentsMouseMoveEvent(), DataView::prepareMarginRect(), QtViewWidget::update(), and QtView::updateDrawRect().
|
pure virtualinherited |
Returns the drawing Rectangle in the devices coordinate system.
Must be implemented in derived class.
Implemented in QtView, EpsView, QtViewWidget, QtGroupView, and OpenGLView.
Referenced by ViewBaseXML::createElement(), DrawBorder::draw(), QtViewImp::draw_Text(), QtViewImp::drawImage(), AxisRepBase::drawReferencePoint(), QtViewImp::drawText(), AxisRepBase::drawTitle(), AxisRepBase::drawXLabels(), AxisRepBase::drawXMag(), AxisRepBase::drawYLabels(), AxisRepColor::drawZLabels(), DataView::prepareMarginRect(), AxisRepBase::setFontSize(), AxisRepBase::setXFontSize(), AxisRepBase::setYFontSize(), AxisRepBase::setZFontSize(), XPADDING(), YPADDING(), and ZPADDING().
|
inherited |
Returns the rectangle area in which data points are drawn.
Definition at line 45 of file DataView.cxx.
References DataView::m_margin_rect.
Referenced by AxisRepColor::drawColorScale(), ContourPointRep::drawContourTicks(), QtViewImp::drawImage(), AxisRepBase::drawReferencePoint(), AxisRepBase::drawTitle(), AxisRepBase::drawXLabels(), AxisRepBase::drawXMag(), AxisRepBase::drawXTickLabels(), AxisRepBase::drawXTickLines(), AxisRepBase::drawYLabels(), AxisRepBase::drawYMag(), AxisRepBase::drawYTickLines(), AxisRepColor::drawZLabels(), AxisRepColor::drawZTickLabels(), AxisRepColor::drawZTickLines(), OpenGLView::toViewY(), and EpsView::toViewY().
|
inherited |
Returns the plotter used by this view.
Reimplemented in OpenGLView.
Definition at line 50 of file ViewBase.cxx.
References ViewBase::m_plotter.
Referenced by DisplayController::addTextViewToList(), ViewBaseXML::areDataSourcesSaved(), CutController::connectDataRep(), CanvasView::contentsMouseMoveEvent(), CanvasView::controlMousePressEvent(), ViewBaseXML::createChild(), DisplayController::createTextView(), AxisRepColor::drawColorScale(), CanvasView::fillPlotterList(), CutController::fillTupleCutList(), PyCanvas::getDisplays(), GroupViewBase::getPlotters(), CanvasView::getViewFor(), PlotTable::initialize(), FigureEditor::movePlotterWithText(), CanvasView::placeItems(), DataView::prepareMarginRect(), DisplayController::removeTextObservers(), PyCanvas::saveAsImage(), CanvasView::saveSelectedAsEps(), CanvasView::setIntervalEnabled(), and CanvasView::viewShowPickTable().
|
inherited |
Returns the plotter used by this view.
Definition at line 55 of file ViewBase.cxx.
References ViewBase::m_plotter.
|
inherited |
Returns the range of the data space on specified axis.
Definition at line 69 of file ViewBase.cxx.
References ViewBase::m_plotter.
Referenced by ContourPointRep::drawContourTicks().
|
inherited |
Returns the rectangle before transform.
Definition at line 83 of file ViewBase.cxx.
References PlotterBase::getRawRect(), and ViewBase::m_plotter.
|
inherited |
Is called by the AxisRepBase object (or one of its derived objects), and returns the rectangle where the drawing is made.
Definition at line 76 of file ViewBase.cxx.
References PlotterBase::getUserRect(), and ViewBase::m_plotter.
Referenced by ContourPointRep::drawValues(), ContourPointRep::drawValuesWithStyle(), AxisRepBase::initAxisRect(), DataView::marginToInvertedUserX(), DataView::marginToInvertedUserY(), DataView::marginToUserX(), DataView::marginToUserY(), DataView::userToInvertedMarginX(), DataView::userToInvertedMarginY(), DataView::userToMarginColor(), DataView::userToMarginX(), and DataView::userToMarginY().
|
protectedvirtualinherited |
Converts from view coordinate to data conordiate, take into account the inversion of x axes.
Definition at line 187 of file DataView.cxx.
References ViewBase::getUserRect(), Rect::getWidth(), Rect::getX(), DataView::m_margin_rect, and ViewBase::m_plotter.
Referenced by QtView::fillPickedPoint().
|
protectedvirtualinherited |
Converts from inverted view coordinate to data coordinate, without taking into account transforms or scaling.
Definition at line 209 of file DataView.cxx.
References Rect::getHeight(), ViewBase::getUserRect(), Rect::getY(), DataView::m_margin_rect, and ViewBase::m_plotter.
Referenced by QtViewWidget::fillPickedPoint(), and QtView::fillPickedPoint().
|
protectedvirtualinherited |
Converts from view coordinate to data coordinate, without taking into account transforms or scaling.
Definition at line 176 of file DataView.cxx.
References ViewBase::getUserRect(), Rect::getWidth(), Rect::getX(), DataView::m_margin_rect, and ViewBase::m_plotter.
Referenced by QtViewWidget::fillPickedPoint(), and QtView::fillPickedPoint().
|
protectedvirtualinherited |
Converts from view coordinate to data coordinate, without taking into account transforms or scaling.
Definition at line 198 of file DataView.cxx.
References Rect::getHeight(), ViewBase::getUserRect(), Rect::getY(), DataView::m_margin_rect, and ViewBase::m_plotter.
|
protectedinherited |
Prepares the margin rectangle.
Definition at line 62 of file DataView.cxx.
References ViewBase::getAspectRatio(), PlotterBase::getBottomMargin(), ViewBase::getDrawRect(), Rect::getHeight(), PlotterBase::getLeftMargin(), ViewBase::getPlotter(), PlotterBase::getTopMargin(), Rect::getWidth(), PlotterBase::getZMargin(), PlotterBase::labelFont(), DataView::m_margin_rect, ViewBase::m_plotter, FontBase::pointSize(), Rect::setRect(), PlotterBase::titleFont(), hippodraw::Axes::X, and hippodraw::Axes::Z.
Referenced by QtViewWidget::paintEvent(), QtViewWidget::resizeEvent(), QtView::setDrawRect(), QtViewWidget::setGeometry(), and QtViewWidget::update().
void setCrossX | ( | double | val | ) |
Set the crossX value.
Definition at line 987 of file QtViewImp.cxx.
References ViewBase::m_plotter, and PlotterBase::setCrossX().
Referenced by CanvasView::contentsMouseMoveEvent().
void setCrossY | ( | double | val | ) |
Set the crossY value.
Definition at line 992 of file QtViewImp.cxx.
References ViewBase::m_plotter, and PlotterBase::setCrossY().
Referenced by CanvasView::contentsMouseMoveEvent().
|
virtual |
Definition at line 1000 of file QtViewImp.cxx.
References QtViewImp::m_font_default.
|
pure virtualinherited |
Sets the drawing Rectangle in the devices coordinate system.
Implemented in QtView, EpsView, QtViewWidget, QtGroupView, and OpenGLView.
Referenced by QtViewImp::draw_Text(), QtViewImp::drawImage(), and ViewBaseXML::getObjects().
void setInspector | ( | QObject * | inspector | ) |
Sets the receiver of update messages.
When this object receives update() from one of it Observable objects, it emits a custom event message to this object, if one exists.
Definition at line 92 of file QtViewImp.cxx.
References QtViewImp::m_inspector.
|
inherited |
Sets the margin rectangle.
Sets the rectangular are in which the data points are drawn. The coordinate system is that of the view.
Definition at line 52 of file DataView.cxx.
References DataView::m_margin_rect.
|
virtualinherited |
Sets the PlotterBase object to plotter.
The ViewBase object does not own the plotter. If the plotter is being changed, it is up to client code to decide to destroy the previous plotter or not.
Reimplemented in QtViewWidget, and OpenGLView.
Definition at line 45 of file ViewBase.cxx.
References ViewBase::m_plotter.
|
privatepure virtual |
Converts coordinate from view space to canvas space.
Referenced by QtViewImp::drawViewLines(), QtViewImp::drawViewMethod(), and QtViewImp::drawViewSquare().
|
privatepure virtual |
Converts coordinate from view space to canvas space.
Referenced by QtViewImp::drawViewLines(), QtViewImp::drawViewMethod(), and QtViewImp::drawViewSquare().
|
inline |
Converts the view space coordinate x expressed as a double
to one expressed as an int
.
Definition at line 259 of file QtViewImp.h.
|
pure virtual |
Converts the data space coordinate X to the view space coordinate X.
Implemented in QtView, QtViewWidget, and QtGroupView.
Referenced by QtViewImp::drawColorLines(), QtViewImp::drawLines(), QtViewImp::drawMethod(), QtViewImp::drawPoints(), QtViewImp::drawPolygon(), and QtViewImp::drawSquare().
|
pure virtual |
Converts the data space coordinate Y to the view space coordinate Y.
Implemented in QtView, QtViewWidget, and QtGroupView.
Referenced by QtViewImp::drawColorLines(), QtViewImp::drawLines(), QtViewImp::drawMethod(), QtViewImp::drawPoints(), QtViewImp::drawPolygon(), and QtViewImp::drawSquare().
|
private |
Fills the array with QPoint objects whose coordinates are in the QPaintDevice space from the vectors x and y whose coordinates are in the data space.
The member functions xfunc and yfunc of the QtViewImp class are used for the transformation.
Definition at line 139 of file QtViewImp.cxx.
References num_util::size().
Referenced by QtViewImp::drawLines(), QtViewImp::drawMethod(), QtViewImp::drawPolygon(), QtViewImp::drawViewLines(), and QtViewImp::drawViewMethod().
|
protectedvirtual |
Responds to update message from Observable.
Implements ViewBase.
Reimplemented in QtView, and QtViewWidget.
Definition at line 99 of file QtViewImp.cxx.
References QtViewImp::m_inspector, QApplication::postEvent(), and QApplication::removePostedEvents().
|
virtualinherited |
Update the drawing Rectangle in the devices coordinate system.
Reimplemented in QtView.
Definition at line 105 of file ViewBase.cxx.
Referenced by XyPlotter::drawIn().
|
virtual |
Converts a coordinate in user space to drawing space along the color (X) axis.
Implements ViewBase.
Definition at line 131 of file QtViewImp.cxx.
References DataView::userToMarginColor().
|
virtual |
Converts a coordinate in user space to drawing space along the X axis.
Implements ViewBase.
Definition at line 121 of file QtViewImp.cxx.
References DataView::userToMarginX().
|
virtual |
Implements ViewBase.
Definition at line 113 of file QtViewImp.cxx.
References ViewBase::m_plotter, DataView::userToInvertedMarginX(), and DataView::userToMarginX().
|
virtual |
Converts a coordinate in user space to drawing space along the Y axis.
Implements ViewBase.
Definition at line 126 of file QtViewImp.cxx.
References DataView::userToInvertedMarginY().
|
protectedvirtualinherited |
Converts the user X coordinate into the inverted X coordinate.
Definition at line 133 of file DataView.cxx.
References ViewBase::getUserRect(), Rect::getWidth(), Rect::getX(), DataView::m_margin_rect, and ViewBase::m_plotter.
Referenced by QtView::toViewX(), EpsView::userToDrawXAutoInv(), and QtViewImp::userToDrawXAutoInv().
|
protectedvirtualinherited |
Converts the user Y coordinate into the top-left based margin Y coordinate.
Definition at line 154 of file DataView.cxx.
References Rect::getHeight(), ViewBase::getUserRect(), Rect::getY(), DataView::m_margin_rect, and ViewBase::m_plotter.
Referenced by QtViewWidget::toViewY(), QtView::toViewY(), OpenGLView::userToDrawY(), EpsView::userToDrawY(), and QtViewImp::userToDrawY().
|
protectedvirtualinherited |
Converts the user Z coordinate into the margin color (X) coordinate.
Definition at line 165 of file DataView.cxx.
References Rect::getDepth(), ViewBase::getUserRect(), Rect::getWidth(), Rect::getX(), Rect::getZ(), DataView::m_margin_rect, and ViewBase::m_plotter.
Referenced by OpenGLView::userToDrawColor(), EpsView::userToDrawColor(), and QtViewImp::userToDrawColor().
|
protectedvirtualinherited |
Converts the user X coordinate into the margin X coordinate.
Definition at line 122 of file DataView.cxx.
References ViewBase::getUserRect(), Rect::getWidth(), Rect::getX(), DataView::m_margin_rect, and ViewBase::m_plotter.
Referenced by OpenGLView::toViewX(), QtViewWidget::toViewX(), EpsView::toViewX(), QtView::toViewX(), OpenGLView::userToDrawX(), EpsView::userToDrawX(), QtViewImp::userToDrawX(), EpsView::userToDrawXAutoInv(), and QtViewImp::userToDrawXAutoInv().
|
protectedvirtualinherited |
Converts the user Y coordinate into the margin Y coordinate.
Definition at line 144 of file DataView.cxx.
References Rect::getHeight(), ViewBase::getUserRect(), Rect::getY(), DataView::m_margin_rect, and ViewBase::m_plotter.
Referenced by OpenGLView::toViewY(), and EpsView::toViewY().
|
virtualinherited |
Responds to notification that the PlotterBase object is being deleted.
Reimplemented from Observer.
Definition at line 96 of file ViewBase.cxx.
References ViewBase::m_plotter.
|
private |
The mapping from LaTex equation to PNG filename.
Definition at line 57 of file QtViewImp.h.
Referenced by QtViewImp::drawLatex(), and QtViewImp::QtViewImp().
|
protected |
Definition at line 76 of file QtViewImp.h.
Referenced by QtViewImp::defaultFont(), QtViewImp::drawText(), and QtViewImp::setDefaultFont().
|
protected |
The receiver of update messages.
Definition at line 69 of file QtViewImp.h.
Referenced by QtViewImp::setInspector(), and QtViewImp::update().
|
protectedinherited |
The rectangle area in which the projected points are plotted.
The coordinate system is that of the view device. X increase to the right and Y increases downward. Outside of this area are the axis labels, title, etc.
Definition at line 48 of file DataView.h.
Referenced by DataView::getMarginRect(), DataView::marginToInvertedUserX(), DataView::marginToInvertedUserY(), DataView::marginToUserX(), DataView::marginToUserY(), DataView::prepareMarginRect(), QtView::setDrawRect(), DataView::setMarginRect(), DataView::userToInvertedMarginX(), DataView::userToInvertedMarginY(), DataView::userToMarginColor(), DataView::userToMarginX(), and DataView::userToMarginY().
|
protected |
The current Qt QPainter object.
Definition at line 72 of file QtViewImp.h.
Referenced by QtGroupView::draw(), QtViewWidget::draw(), QtView::draw(), QtViewImp::draw_Text(), QtViewImp::drawColorLines(), QtViewImp::drawImage(), QtViewImp::drawLines(), QtViewWidget::drawMethod(), QtView::drawMethod(), QtViewImp::drawMethod(), QtViewImp::drawPoints(), QtViewImp::drawPolygon(), QtViewImp::drawPolyLine(), QtViewImp::drawSquare(), QtViewImp::drawText(), QtViewImp::drawViewLines(), QtViewWidget::drawViewMethod(), QtView::drawViewMethod(), QtViewImp::drawViewMethod(), QtViewImp::drawViewSquare(), QtView::drawWithPixmap(), and QtViewWidget::paintEvent().
|
protectedinherited |
The plotter object used by this view.
Although the plotter object was created externally, the view owns the plotter object.
Definition at line 69 of file ViewBase.h.
Referenced by DataView::DataView(), QtView::draw(), ViewBase::drawSelf(), QtViewImp::drawSquare(), QtViewWidget::fillPickedPoint(), QtView::fillPickedPoint(), ViewBase::getAspectRatio(), ViewBase::getPlotter(), ViewBase::getRange(), ViewBase::getRawRect(), ViewBase::getUserRect(), QtView::isTextView(), DataView::marginToInvertedUserX(), DataView::marginToInvertedUserY(), DataView::marginToUserX(), DataView::marginToUserY(), QtViewWidget::mousePressEvent(), QtViewWidget::paintEvent(), DataView::prepareMarginRect(), QtView::QtView(), QtViewWidget::resizeEvent(), QtViewImp::setCrossX(), QtViewImp::setCrossY(), QtViewWidget::setGeometry(), ViewBase::setPlotter(), QtView::toViewX(), QtViewWidget::update(), EpsView::userToDrawXAutoInv(), QtViewImp::userToDrawXAutoInv(), DataView::userToInvertedMarginX(), DataView::userToInvertedMarginY(), DataView::userToMarginColor(), DataView::userToMarginX(), DataView::userToMarginY(), ViewBase::willDelete(), and QtView::~QtView().
|
staticprivate |
The mapping from LineStyle::Type to QPen PenStyle.
Definition at line 53 of file QtViewImp.h.
Referenced by QtViewImp::createPen(), QtViewImp::drawColorLines(), QtViewImp::drawViewLines(), and QtViewImp::QtViewImp().