The class of derived from ViewBase for drawing as a Qt Widget. More...
#include <QtViewWidget.h>
Public Member Functions | |
acceptDrops () const | |
adjustSize () | |
autoMask () const | |
backgroundBrush () const | |
backgroundMode () const | |
backgroundOrigin () const | |
baseSize () const | |
caption () const | |
childAt (int x, int y, bool includeThis=FALSE) const | |
childAt (const QPoint &p, bool includeThis=FALSE) const | |
childrenRect () const | |
childrenRegion () const | |
clearFocus () | |
clearMask () | |
clearWFlags (WFlags f) | |
clipRegion () const | |
close () | |
close (bool alsoDelete) | |
closeEvent (QCloseEvent *e) | |
colorGroup () const | |
constPolish () const | |
contextMenuEvent (QContextMenuEvent *e) | |
create (WId window=0, bool initializeWindow=TRUE, bool destroyOldWindow=TRUE) | |
cursor () const | |
customWhatsThis () const | |
virtual const QFont & | defaultFont () |
destroy (bool destroyWindow=TRUE, bool destroySubWindows=TRUE) | |
dragEnterEvent (QDragEnterEvent *) | |
dragLeaveEvent (QDragLeaveEvent *) | |
dragMoveEvent (QDragMoveEvent *) | |
virtual void | draw (QPainter &) |
Re-implements the inherited function. | |
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. | |
drawText (int x, int y, const QString &str) | |
drawText (const QPoint &pos, const QString &str) | |
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. | |
dropEvent (QDropEvent *) | |
enabledChange (bool oldEnabled) | |
enterEvent (QEvent *) | |
enum {NoFocus=0, TabFocus=0x1, ClickFocus=0x2, StrongFocus=TabFocus|ClickFocus|0x8, WheelFocus=StrongFocus|0x4} | |
enum {WidgetOrigin, ParentOrigin, WindowOrigin, AncestorOrigin} | |
erase () | |
erase (int x, int y, int w, int h) | |
erase (const QRect &r) | |
erase (const QRegion ®) | |
eraseColor () const | |
erasePixmap () const | |
event (QEvent *e) | |
virtual void | fillPickedPoint (double x, double y, std::vector< double > &picked) const |
Fills the picked point vector. | |
find (WId id) | |
focusData () | |
focusInEvent (QFocusEvent *) | |
focusNextPrevChild (bool next) | |
focusOutEvent (QFocusEvent *) | |
focusPolicy () const | |
focusProxy () const | |
focusWidget () const | |
font () const | |
fontChange (const QFont &oldFont) | |
fontInfo () const | |
fontMetrics () const | |
foregroundColor () const | |
frameGeometry () const | |
frameSize () const | |
geometry () const | |
virtual double | getAspectRatio () const |
Get the aspect ratio. | |
virtual Rect | getDrawRect () const |
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. | |
getWFlags () const | |
grabKeyboard () | |
grabMouse () | |
grabMouse (const QCursor &cursor) | |
hasFocus () const | |
hasMouse () const | |
hasMouseTracking () const | |
height () const | |
heightForWidth (int w) const | |
hide () | |
hideEvent (QHideEvent *) | |
icon () const | |
iconText () const | |
imComposeEvent (QIMEvent *e) | |
imEndEvent (QIMEvent *e) | |
imStartEvent (QIMEvent *e) | |
isActiveWindow () const | |
isDesktop () const | |
isDialog () const | |
isEnabled () const | |
isEnabledTo (QWidget *ancestor) const | |
isFocusEnabled () const | |
isFullScreen () const | |
isHidden () const | |
isInputMethodEnabled () const | |
isMaximized () const | |
isMinimized () const | |
isModal () const | |
isPopup () const | |
isShown () const | |
isTopLevel () const | |
isUpdatesEnabled () const | |
isVisible () const | |
isVisibleTo (QWidget *ancestor) const | |
keyboardGrabber () | |
keyPressEvent (QKeyEvent *e) | |
keyReleaseEvent (QKeyEvent *e) | |
layout () const | |
leaveEvent (QEvent *) | |
lower () | |
macEvent (MSG *) | |
mapFrom (QWidget *parent, const QPoint &pos) const | |
mapFromGlobal (const QPoint &pos) const | |
mapFromParent (const QPoint &pos) const | |
mapTo (QWidget *parent, const QPoint &pos) const | |
mapToGlobal (const QPoint &pos) const | |
mapToParent (const QPoint &pos) const | |
maximumHeight () const | |
maximumSize () const | |
maximumWidth () const | |
metric (int m) const | |
microFocusHint () const | |
minimumHeight () const | |
minimumSize () const | |
minimumSizeHint () const | |
minimumWidth () const | |
mouseDoubleClickEvent (QMouseEvent *e) | |
mouseGrabber () | |
mouseMoveEvent (QMouseEvent *e) | |
virtual void | mousePressEvent (QMouseEvent *e) |
overrides the inherited virtual function. | |
mouseReleaseEvent (QMouseEvent *e) | |
move (int x, int y) | |
move (const QPoint &) | |
moveEvent (QMoveEvent *) | |
ownCursor () const | |
ownFont () const | |
ownPalette () const | |
virtual void | paintEvent (QPaintEvent *) |
Overrides virtual function of QWidget to do drawing. | |
palette () const | |
paletteBackgroundColor () const | |
paletteBackgroundPixmap () const | |
paletteChange (const QPalette &oldPalette) | |
paletteForegroundColor () const | |
parentWidget (bool sameWindow=FALSE) const | |
polish () | |
pos () const | |
prop -the current color group of the widget palette | |
prop -the cursor shape for this widget | |
prop -whether the widget wants to handle What's This help manually | |
prop -whether mouse tracking is enabled for the widget | |
prop -whether this widget(or its focus proxy) has the keyboard input focus | |
prop -the way the widget accepts keyboard focus | |
prop -geometry of the widget relative to its parent including any window frame | |
prop -the size of the widget including any window frame | |
prop -whether the widget is full screen | |
prop -whether the widget accepts keyboard focus | |
prop -the height of the widget excluding any window frame | |
prop -the widget's icon | |
prop -the origin of the widget's background | |
prop -enables or disables the use of input methods for this widget | |
prop -whether this widget is the active window | |
prop -whether the widget is a desktop widget, i.e.represents the desktop | |
prop -whether the widget is explicitly hidden | |
prop -whether the widget is a modal widget | |
prop -whether the widget is a top-level widget | |
prop -the widget's minimum height | |
prop -the widget's maximum height | |
prop -the widget's maximum width | |
prop -the geometry of the widget relative to its parent and excluding the window frame | |
prop -whether this widget is minimized(iconified) | |
prop -the widget's minimum size | |
prop -the widget's minimum width | |
prop -whether the widget uses its own cursor | |
prop -whether the widget uses its own font | |
prop -whether the widget uses its own palette | |
prop -the background color of the widget | |
prop -the foreground color of the widget | |
prop -the internal geometry of the widget excluding any window frame | |
prop -the size of the widget excluding any window frame | |
prop -the size increment of the widget | |
prop -the widget's maximum size | |
prop -whether the widget is under the mouse cursor | |
prop -whether the widget is visible | |
prop -the level of opacity for the window | |
prop -the position of the widget within its parent widget | |
prop -the combined region occupied by the widget's children | |
prop -whether updates are enabled | |
prop -the font currently set for the widget | |
prop -whether the widget is enabled | |
prop -whether the widget is a dialog widget | |
prop -the x coordinate of the widget relative to its parent including any window frame | |
prop -the recommended minimum size for the widget | |
prop -the widget's palette | |
prop -whether the widget is a popup widget | |
prop -the widget's icon text | |
prop -the recommended size for the widget | |
prop -the width of the widget excluding any window frame | |
prop -the default layout behavior of the widget | |
prop -whether this widget is maximized | |
prop -the currently set micro focus hint for this widget | |
prop -the background pixmap of the widget | |
prop -the y coordinate of the widget relative to its parent and including any window frame | |
prop -whether drop events are enabled for this widget | |
prop -whether the widget is shown | |
prop -whether the auto mask feature is enabled for the widget | |
prop -the widget's background brush | |
prop -the color role used for painting the background of the widget | |
prop -the base size of the widget | |
prop -the window caption(title) | |
prop -the bounding rectangle of the widget's children | |
QtViewWidget (QWidget *parent=0, const char *name=0, Qt::WFlags wflags=0) | |
The standard QWidget constructor. | |
qwsEvent (QWSEvent *) | |
raise () | |
rect () const | |
releaseKeyboard () | |
releaseMouse () | |
repaint (const QRect &r, bool erase=TRUE) | |
repaint () | |
repaint (bool erase) | |
repaint (int x, int y, int w, int h, bool erase=TRUE) | |
repaint (const QRegion ®, bool erase=TRUE) | |
reparent (QWidget *parent, WFlags f, const QPoint &p, bool showIt=FALSE) | |
reparent (QWidget *parent, const QPoint &p, bool showIt=FALSE) | |
resetInputContext () | |
resize (const QSize &) | |
resize (int w, int h) | |
virtual void | resizeEvent (QResizeEvent *event) |
Overloads the inherit member function to set the margin rectangle. | |
scroll (int dx, int dy) | |
scroll (int dx, int dy, const QRect &r) | |
setAcceptDrops (bool on) | |
setActiveWindow () | |
setAutoMask (bool) | |
setBackgroundMode (BackgroundMode m, BackgroundMode visual) | |
setBackgroundMode (BackgroundMode) | |
setBackgroundOrigin (BackgroundOrigin) | |
setBaseSize (const QSize &) | |
setBaseSize (int basew, int baseh) | |
setCaption (const QString &) | |
void | setCrossX (double val) |
Set the crossX value. | |
void | setCrossY (double val) |
Set the crossY value. | |
setCursor (const QCursor &) | |
virtual void | setDefaultFont (const QFont &font) |
setDisabled (bool disable) | |
virtual void | setDoubleBuffering (unsigned dblbuf) |
void | setDrawRect (const QRect &rect) |
Sets the drawing rectangle in the paint device space. | |
virtual void | setDrawRect (float x, float y, float width, float height) |
Sets the drawing rectangle in the paint device space. | |
setEnabled (bool) | |
setEraseColor (const QColor &color) | |
setErasePixmap (const QPixmap &pixmap) | |
setFixedHeight (int h) | |
setFixedSize (const QSize &s) | |
setFixedSize (int w, int h) | |
setFixedWidth (int w) | |
setFocus () | |
setFocusPolicy (FocusPolicy) | |
setFocusProxy (QWidget *w) | |
setFont (const QFont &) | |
virtual void | setGeometry (int x, int y, int w, int h) |
Overloads the inherit member function in order to prepare the margin rectangle. | |
virtual void | setGeometry (const QRect &) |
Overloads the inherit member function in order to prepare the margin rectangle. | |
setHidden (bool hide) | |
setIcon (const QPixmap &) | |
setIconText (const QString &) | |
setInputMethodEnabled (bool b) | |
void | setInspector (QObject *) |
Sets the receiver of update messages. | |
setKeyCompression (bool compress) | |
void | setMarginRect (const Rect &) |
Sets the margin rectangle. | |
setMask (const QRegion ®ion) | |
setMask (const QBitmap &bitmap) | |
setMaximumHeight (int maxh) | |
setMaximumSize (const QSize &) | |
setMaximumSize (int maxw, int maxh) | |
setMaximumWidth (int maxw) | |
setMicroFocusHint (int x, int y, int width, int height, bool text=TRUE, QFont *f=0) | |
setMinimumHeight (int minh) | |
setMinimumSize (int minw, int minh) | |
setMinimumSize (const QSize &) | |
setMinimumWidth (int minw) | |
setMouseTracking (bool enable) | |
setPalette (const QPalette &) | |
setPaletteBackgroundColor (const QColor &) | |
setPaletteBackgroundPixmap (const QPixmap &) | |
setPaletteForegroundColor (const QColor &) | |
void | setPlotter (PlotterBase *) |
Re-implements inherited member to test something for SIP. | |
setShown (bool show) | |
setSizeIncrement (int w, int h) | |
setSizeIncrement (const QSize &) | |
setSizePolicy (QSizePolicy::SizeType hor, QSizePolicy::SizeType ver, bool hfw=FALSE) | |
setSizePolicy (QSizePolicy) | |
setStyle (QStyle *style) | |
setStyle (const QString &style) | |
setTabOrder (QWidget *first, QWidget *second) | |
setUpdatesEnabled (bool enable) | |
setWFlags (WFlags f) | |
setWindowOpacity (double level) | |
setWindowState (uint windowState) | |
show () | |
showEvent (QShowEvent *) | |
showFullScreen () | |
showMaximized () | |
showMinimized () | |
showNormal () | |
size () const | |
virtual QSize | sizeHint () const |
Re-implements inherited member to return a reasonable size. | |
sizeIncrement () const | |
sizePolicy () const | |
stackUnder (QWidget *w) | |
style () const | |
styleChange (QStyle &oldStyle) | |
tabletEvent (QTabletEvent *e) | |
testWFlags (WFlags f) const | |
topLevelWidget () const | |
int | toView (double x) const |
Converts the view space coordinate x expressed as a double to one expressed as an int . | |
int | toViewX (double datX) const |
Converts the data space coordinate X to the view space coordinate X. | |
int | toViewY (double datY) const |
Converts the data space coordinate Y to the view space coordinate Y. | |
unsetCursor () | |
unsetFont () | |
unsetPalette () | |
update (const QRect &r) | |
update (int x, int y, int w, int h) | |
update () | |
virtual void | update (const Observable *) |
Responds to update message from Observable. | |
virtual void | updateDrawRect () |
Update the drawing Rectangle in the devices coordinate system. | |
updateGeometry () | |
updateMask () | |
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. | |
wheelEvent (QWheelEvent *e) | |
width () const | |
virtual void | willDelete (const Observable *plotter) |
Responds to notification that the PlotterBase object is being deleted. | |
windowActivationChange (bool oldActive) | |
windowOpacity () const | |
windowState () const | |
winEvent (MSG *) | |
winId () const | |
x () const | |
x11Event (XEvent *) | |
y () const | |
virtual | ~QtViewWidget () |
The required virtual destructor. |
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 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 | |
void | drawMethod (const std::vector< double > &x, const std::vector< double > &y, int opt1, int opt2) |
Draws in the view using the specified method. | |
void | drawViewMethod (const std::vector< double > &x, const std::vector< double > &y, int opt1, int opt2) |
Draws in the view using the specified method. | |
QtViewWidget (const QtViewWidget &) | |
The copy constructor. | |
int | toCanvasX (double dx) const |
Converts coordinate from view space to canvas space. | |
int | toCanvasY (double dy) const |
Converts coordinate from view space to canvas space. | |
void | transformAndFill (QPointArray &array, const std::vector< double > &x, const std::vector< double > &y, int(QtViewWidget::*xfunc)(double) const, int(QtViewWidget::*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 | |
int | double_buffer |
QPixmap | offscr |
The class of derived from ViewBase for drawing as a Qt Widget.
It is derived from QWidget in order to get a position and size in its parent. It also derives from QtViewImp where most of the drawing code is implemented.
Definition at line 37 of file QtViewWidget.h.
|
private |
The copy constructor.
QtViewWidget | ( | QWidget * | parent = 0 , |
const char * | name = 0 , |
||
Qt::WFlags | wflags = 0 |
||
) |
The standard QWidget constructor.
See Qt documentation for details.
Definition at line 40 of file QtViewWidget.cxx.
References QtViewWidget::setDoubleBuffering(), and QWidget::setPaletteBackgroundColor().
|
virtual |
The required virtual destructor.
Definition at line 48 of file QtViewWidget.cxx.
|
virtualinherited |
Definition at line 1007 of file QtViewImp.cxx.
References QtViewImp::m_font_default.
|
virtual |
Re-implements the inherited function.
First calls base class to draw the contents and then draws the border if selected.
Definition at line 68 of file QtViewWidget.cxx.
References ViewBase::drawSelf(), and QtViewImp::m_painter.
|
protectedvirtualinherited |
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().
|
virtualinherited |
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().
|
virtualinherited |
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().
|
virtualinherited |
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().
|
virtualinherited |
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 261 of file QtViewWidget.cxx.
References QPainter::drawPolyline(), QtViewImp::m_painter, QWidget::size(), QtViewWidget::toViewX(), QtViewWidget::toViewY(), and QtViewWidget::transformAndFill().
|
virtualinherited |
Definition at line 350 of file QtViewImp.cxx.
|
virtualinherited |
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.
|
virtualinherited |
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().
|
virtualinherited |
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().
|
virtualinherited |
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().
|
virtualinherited |
Definition at line 906 of file QtViewImp.cxx.
Referenced by QtViewImp::draw_Text().
|
virtualinherited |
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.
|
virtualinherited |
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().
|
virtualinherited |
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 238 of file QtViewWidget.cxx.
References QPainter::drawLineSegments(), QtViewImp::m_painter, QWidget::size(), QtViewWidget::toCanvasX(), QtViewWidget::toCanvasY(), and QtViewWidget::transformAndFill().
|
virtualinherited |
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().
|
virtual |
Fills the picked point vector.
Converts the view coordinates x and y to data coordinates. The results are put in the vector picked.
Implements QtViewImp.
Definition at line 191 of file QtViewWidget.cxx.
References ViewBase::m_plotter, DataView::marginToInvertedUserY(), and DataView::marginToUserX().
|
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().
|
virtual |
Returns the drawing Rectangle in the devices coordinate system.
Must be implemented in derived class.
Implements ViewBase.
Definition at line 106 of file QtViewWidget.cxx.
References QWidget::geometry(), QRect::height(), QWidget::rect(), and QRect::width().
|
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.
|
virtual |
overrides the inherited virtual function.
If the event is a mouse event with control key down, then toggles the active DataRep. Otherwise, passes passes the event to QObject.
Reimplemented from QWidget.
Definition at line 290 of file QtViewWidget.cxx.
References ViewBase::m_plotter.
|
virtual |
Overrides virtual function of QWidget to do drawing.
Reimplemented from QWidget.
Definition at line 77 of file QtViewWidget.cxx.
References QtViewWidget::double_buffer, ViewBase::drawSelf(), QRect::isValid(), QtViewImp::m_painter, ViewBase::m_plotter, QwtPaintBuffer::painter(), DataView::prepareMarginRect(), and QPaintEvent::rect().
|
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().
|
virtual |
Overloads the inherit member function to set the margin rectangle.
Reimplemented from QWidget.
Definition at line 171 of file QtViewWidget.cxx.
References ViewBase::m_plotter, and DataView::prepareMarginRect().
|
inherited |
Set the crossX value.
Definition at line 987 of file QtViewImp.cxx.
References ViewBase::m_plotter, and PlotterBase::setCrossX().
Referenced by CanvasView::contentsMouseMoveEvent().
|
inherited |
Set the crossY value.
Definition at line 992 of file QtViewImp.cxx.
References ViewBase::m_plotter, and PlotterBase::setCrossY().
Referenced by CanvasView::contentsMouseMoveEvent().
|
virtualinherited |
Definition at line 1000 of file QtViewImp.cxx.
References QtViewImp::m_font_default.
|
virtual |
Definition at line 283 of file QtViewWidget.cxx.
References QtViewWidget::double_buffer.
Referenced by QtViewWidget::QtViewWidget().
void setDrawRect | ( | const QRect & | rect | ) |
Sets the drawing rectangle in the paint device space.
Definition at line 136 of file QtViewWidget.cxx.
References QWidget::height(), QRect::width(), QRect::x(), and QRect::y().
|
virtual |
Sets the drawing rectangle in the paint device space.
Implements ViewBase.
Definition at line 141 of file QtViewWidget.cxx.
References QtViewWidget::setGeometry(), QWidget::x(), and QWidget::y().
|
virtual |
Overloads the inherit member function in order to prepare the margin rectangle.
Reimplemented from QWidget.
Definition at line 153 of file QtViewWidget.cxx.
References ViewBase::m_plotter, and DataView::prepareMarginRect().
Referenced by QtViewWidget::setDrawRect(), and QtViewWidget::setGeometry().
|
virtual |
Overloads the inherit member function in order to prepare the margin rectangle.
Reimplemented from QWidget.
Definition at line 163 of file QtViewWidget.cxx.
References QRect::height(), QtViewWidget::setGeometry(), QRect::width(), QRect::x(), and QRect::y().
|
inherited |
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.
|
virtual |
Re-implements inherited member to test something for SIP.
Reimplemented from ViewBase.
Definition at line 62 of file QtViewWidget.cxx.
|
virtual |
Re-implements inherited member to return a reasonable size.
Reimplemented from QWidget.
Definition at line 55 of file QtViewWidget.cxx.
References QWidget::size().
|
private |
Converts coordinate from view space to canvas space.
Definition at line 200 of file QtViewWidget.cxx.
Referenced by QtViewWidget::drawViewMethod().
|
private |
Converts coordinate from view space to canvas space.
Definition at line 205 of file QtViewWidget.cxx.
Referenced by QtViewWidget::drawViewMethod().
|
inlineinherited |
Converts the view space coordinate x expressed as a double
to one expressed as an int
.
Definition at line 259 of file QtViewImp.h.
|
virtual |
Converts the data space coordinate X to the view space coordinate X.
Implements QtViewImp.
Definition at line 179 of file QtViewWidget.cxx.
References DataView::userToMarginX().
Referenced by QtViewWidget::drawMethod().
|
virtual |
Converts the data space coordinate Y to the view space coordinate Y.
Implements QtViewImp.
Definition at line 184 of file QtViewWidget.cxx.
References DataView::userToInvertedMarginY().
Referenced by QtViewWidget::drawMethod().
|
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 QtViewWidget class are used for the transformation.
Definition at line 213 of file QtViewWidget.cxx.
References num_util::size().
Referenced by QtViewWidget::drawMethod(), and QtViewWidget::drawViewMethod().
|
virtual |
Responds to update message from Observable.
Reimplemented from QtViewImp.
Definition at line 112 of file QtViewWidget.cxx.
References ViewBase::getAspectRatio(), QWidget::height(), ViewBase::m_plotter, DataView::prepareMarginRect(), QWidget::setFixedSize(), QWidget::update(), and QWidget::width().
|
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().
|
virtualinherited |
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().
|
virtualinherited |
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().
|
virtualinherited |
Implements ViewBase.
Definition at line 113 of file QtViewImp.cxx.
References ViewBase::m_plotter, DataView::userToInvertedMarginX(), and DataView::userToMarginX().
|
virtualinherited |
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 |
Definition at line 83 of file QtViewWidget.h.
Referenced by QtViewWidget::paintEvent(), and QtViewWidget::setDoubleBuffering().
|
protectedinherited |
Definition at line 76 of file QtViewImp.h.
Referenced by QtViewImp::defaultFont(), QtViewImp::drawText(), and QtViewImp::setDefaultFont().
|
protectedinherited |
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().
|
protectedinherited |
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().
|
private |
Definition at line 82 of file QtViewWidget.h.