#include <TxqDrawable.h>
Inheritance diagram for TxqDrawable::

Public Methods | |
| TxqDrawable () | |
| The constructor is default. More... | |
| virtual void | setColor (QColor c) |
| Set the color of the object. More... | |
| virtual QColor | getColor () |
| Gets the current color of the object. More... | |
| virtual void | setPrintColor (QColor c) |
| Set the print color of the object. More... | |
| QColor | getPrintColor () |
| Get the print color of the object. More... | |
| virtual void | setPrint (bool pr) |
| Set the flag to print this object. More... | |
| void | setTranslatable (bool b) |
| Set the translatable state of the drawable. More... | |
| bool | isTranslatable () |
| Get the translable state of the drawable. More... | |
| void | setResizable (bool b) |
| Set the resizable state of the drawable. More... | |
| bool | isResizable () |
| Get the resizable state of the drawable. More... | |
| void | setRotatable (bool b) |
| Set the rotatable state of the drawable. More... | |
| bool | isRotatable () |
| Get the rotatable state of the drawable. More... | |
| void | setControlable (bool b) |
| Get the controlable state of the drawable, i.e. More... | |
| bool | isControlable () |
| Get the controlable state of the drawable. More... | |
| void | setLabel (QString *s) |
| Set the drawable's label. More... | |
| QString* | getLabel () |
| Get the drawable's label. More... | |
| void | setLabelColor (QColor *c) |
| Set the color of the drawable's label. More... | |
| QColor* | getLabelColor () |
| Get the color of the drawable's label. More... | |
| void | constrainY () |
| Constrains the motion of the drawable to only along the y axis. More... | |
| bool | isConstrainedY () |
| Gets the state of constrainment along the y axis. More... | |
| void | constrainX () |
| Constrains the motion of the drawable to only along the x axis. More... | |
| bool | isConstrainedX () |
| Gets the state of constrainment along the x axis. More... | |
| void | setLimitsX (int lower, int upper) |
| Constrains the motion of the drawable to only along the x axis to be between the limits. More... | |
| void | setLimitsY (int lower, int upper) |
| Constrains the motion of the drawable to only along the y axis to be between the limits. More... | |
| bool | isInXRange (int x) |
| Returns true if x is within the limits on the x axis and false if not. More... | |
| bool | isInYRange (int y) |
| Returns true if y is within the limits on the y axis and false if not. More... | |
| void | processRotation (double delta) |
| Processes the rotation by firing an action event and calling the rotate() method. More... | |
| virtual void | rotate (double delta) |
| Rotates the drawable to the specified angle measured from the positive x-axis and increasing in the clockwise direction. More... | |
| void | setRotationPoint (double x, double y) |
| Set the point about which to rotate the object For most classes, this will be defaulted to the centerPoint. More... | |
| void | setRotationPoint (TxqDoublePoint point) |
| Set the point about which to rotate the object For most classes, this will be defaulted to the centerPoint. More... | |
| TxqDoublePoint | getRotationPoint () |
| Get the rotation point. More... | |
| void | setAngle (double newAngle) |
| Set the current angle of the drawable. More... | |
| double | getAngle () |
| Returns the current angle of the drawable. More... | |
| void | findCenterPoint () |
| Finds center of drawables bounds in the TxqCanvas coordinate system. More... | |
| void | findCenterFromBounds () |
| Finds center of drawables bounds in the TxqCanvas's coordinate system. More... | |
| TxqDoublePoint | getCenterPoint () |
| Returns the current center of the TxqDrawable in the TxqCanvas's coordinate system. More... | |
| void | setCenterPoint (TxqDoublePoint cp) |
| Set the center of the TxqDrawable in the TxqCanvas's coordinate system. More... | |
| void | setCenterPoint (double x, double y) |
| Set the center of the TxqDrawable in the TxqCanvas's coordinate system. More... | |
| virtual void | setLocation (int x, int y) |
| Set the location of the objects. More... | |
| void | setDrawRect (int x, int y, int w, int h) |
| Set the bounds of the rectangle which initially determines the size of the TxqDrawable. More... | |
| QRect* | getDrawRect () |
| Gets the bounds of the rectangle which initially determines the size of the TxqDrawable. More... | |
| void | clicked (TxqDoublePoint *point) |
| Handles clicking by registering the clicked point and firing an action event. More... | |
| QPoint* | getClickedPoint () |
| Returns the last clicked point. More... | |
| void | movedTo (QPoint *point) |
| Moves the drawable to the specified point. More... | |
| QPoint* | getMovedToPoint () |
| Returns the last point that the drawable was moved to. More... | |
| QPoint* | topPoint () |
| Returns the top-middle point of this drawable. More... | |
| QPoint* | bottomPoint () |
| Returns the bottom-middle point of this drawable. More... | |
| QPoint* | leftPoint () |
| Returns the left-middle point of this drawable. More... | |
| QPoint* | rightPoint () |
| Returns the right-middle point of this drawable. More... | |
| void | fireAction (QString s) |
| Fire the action to a listener. More... | |
| void | setDump (bool df) |
| Set the dump flag. More... | |
| virtual void | dump (QTextStream *ts) |
| Dump the obect contents to the text stream ts. More... | |
| virtual | ~TxqDrawable () |
| the destructor. More... | |
Protected Methods | |
| virtual void | initialize () |
| Initialize data. More... | |
Protected Attributes | |
| bool | translatable |
| bool | resizable |
| bool | rotatable |
| bool | controlable |
| int | controlFrameIndex |
| QPoint* | movedToPoint |
| bool | xConstrained |
| bool | yConstrained |
| int | xLowerLimit |
| int | xUpperLimit |
| int | yLowerLimit |
| int | yUpperLimit |
| TxqDoublePoint | centerPoint |
| TxqDoublePoint | rotationPoint |
| double | angle |
| TxqDoublePoint* | clickedPoint |
| QString* | label |
| The label pointer. More... | |
| QColor* | labelColor |
| The label pointer color. More... | |
| QRect* | drawRect |
| The draw rectangle pointer. More... | |
| QColor | color |
| The color of the object. More... | |
| QColor | prcolor |
| The print color of the object. More... | |
| bool | isPrint |
| The flag to determine if the paint method is printing. More... | |
| std::vector<TxqDoublePoint> | points |
| The vector of points making up the object. More... | |
| bool | dumpFlag |
| The dump flag true if this object can dump contents. More... | |
Static Protected Attributes | |
| const double | PI |
| const double | HALFPI |
| const double | THREEHALFPI |
| const double | TWOPI |
| const double | physBoundsWidth |
A TxqDrawable is an object which can be rendered on a TxqCanvas and can contain a QColor.
Copyright 2000 by Tech-X Corporation
Definition at line 50 of file TxqDrawable.h.
|
|
The constructor is default.
|
|
|
the destructor.
|
|
|
Returns the bottom-middle point of this drawable.
|
|
|
Handles clicking by registering the clicked point and firing an action event.
|
|
|
Constrains the motion of the drawable to only along the x axis.
|
|
|
Constrains the motion of the drawable to only along the y axis.
|
|
|
Dump the obect contents to the text stream ts.
Reimplemented in Txq2dLabel, Txq2dLine, Txq2dLineArray, Txq2dLineSeg, Txq2dPoint, Txq2dPointArray, Txq2dPoints, Txq2dPolygon, Txq2dPolygonArray, Txq2dVector, Txq3dLabel, Txq3dLine, Txq3dPoints, and TxqAttribDrawable. |
|
|
Finds center of drawables bounds in the TxqCanvas's coordinate system. One pixel is subtracted because for a given dimension "d" one can only draw to the (d-1)th pixel. Reimplemented in Txq2dLineSeg. |
|
|
Finds center of drawables bounds in the TxqCanvas coordinate system.
|
|
|
Fire the action to a listener.
|
|
|
Returns the current angle of the drawable.
|
|
|
Returns the current center of the TxqDrawable in the TxqCanvas's coordinate system.
|
|
|
Returns the last clicked point.
|
|
|
Gets the current color of the object.
|
|
|
Gets the bounds of the rectangle which initially determines the size of the TxqDrawable.
|
|
|
Get the drawable's label.
Reimplemented in Txq2dLabel, and Txq3dLabel. |
|
|
Get the color of the drawable's label.
|
|
|
Returns the last point that the drawable was moved to.
|
|
|
Get the print color of the object.
|
|
|
Get the rotation point.
|
|
|
Initialize data.
Reimplemented in Txq2dLine, Txq2dLineSeg, Txq2dPoint, Txq2dPointArray, Txq2dPoints, Txq2dPolygon, Txq2dVector, Txq3dLine, and Txq3dPoints. |
|
|
Gets the state of constrainment along the x axis.
|
|
|
Gets the state of constrainment along the y axis.
|
|
|
Get the controlable state of the drawable.
|
|
|
Returns true if x is within the limits on the x axis and false if not.
|
|
|
Returns true if y is within the limits on the y axis and false if not.
|
|
|
Get the resizable state of the drawable.
|
|
|
Get the rotatable state of the drawable.
|
|
|
Get the translable state of the drawable.
|
|
|
Returns the left-middle point of this drawable.
|
|
|
Moves the drawable to the specified point.
|
|
|
Processes the rotation by firing an action event and calling the rotate() method.
|
|
|
Returns the right-middle point of this drawable.
|
|
|
Rotates the drawable to the specified angle measured from the positive x-axis and increasing in the clockwise direction. This method is abstract and relies on derived classes to provide the implementation. Reimplemented in Txq2dPolygon. |
|
|
Set the current angle of the drawable.
Reimplemented in Txq2dLineSeg. |
|
|
Set the center of the TxqDrawable in the TxqCanvas's coordinate system.
|
|
|
Set the center of the TxqDrawable in the TxqCanvas's coordinate system.
|
|
|
Set the color of the object.
Reimplemented in Txq2dLine, Txq2dOutlined, Txq2dPoints, Txq2dVector, and Txq3dDrawable. |
|
|
Get the controlable state of the drawable, i.e. if the drawable is rotatable, resizable, or otherwise controllable
|
|
|
Set the bounds of the rectangle which initially determines the size of the TxqDrawable. The component bounds may be later increased to allow for rotation, but if one wants to reset the drawable's original position+size, the drawRect is the bounds to set. |
|
|
Set the dump flag.
|
|
|
Set the drawable's label.
|
|
|
Set the color of the drawable's label.
|
|
|
Constrains the motion of the drawable to only along the x axis to be between the limits.
|
|
|
Constrains the motion of the drawable to only along the y axis to be between the limits.
|
|
|
Set the location of the objects.
Reimplemented in Txq2dLabel, Txq2dPoint, Txq2dPointArray, Txq2dPoints, Txq2dSeg, Txq3dAxis, and Txq3dLabel. Referenced by Txq3dLabel::setLocation(), and Txq3dAxis::setLocation().
|
|
|
Set the flag to print this object.
Reimplemented in Txq2dOutlined. |
|
|
Set the print color of the object.
Reimplemented in Txq2dLine, Txq2dOutlined, Txq2dPoints, and Txq2dVector. |
|
|
Set the resizable state of the drawable. If this is false the drawable can not be resized.
|
|
|
Set the rotatable state of the drawable. If this is false the drawable can not be rotated.
|
|
|
Set the point about which to rotate the object For most classes, this will be defaulted to the centerPoint.
|
|
|
Set the point about which to rotate the object For most classes, this will be defaulted to the centerPoint.
|
|
|
Set the translatable state of the drawable. If this is false the drawable can not be moved.
|
|
|
Returns the top-middle point of this drawable.
|
|
|
Definition at line 397 of file TxqDrawable.h. |
|
|
Definition at line 396 of file TxqDrawable.h. |
|
|
Definition at line 398 of file TxqDrawable.h. |
|
|
Definition at line 399 of file TxqDrawable.h. |
|
|
Definition at line 402 of file TxqDrawable.h. |
|
|
Definition at line 400 of file TxqDrawable.h. |
|
|
Definition at line 406 of file TxqDrawable.h. |
|
|
The color of the object.
Reimplemented in Txq2dLineArray, and TxqAttribDrawable. Definition at line 427 of file TxqDrawable.h. |
|
|
Definition at line 384 of file TxqDrawable.h. |
|
|
Definition at line 383 of file TxqDrawable.h. |
|
|
The draw rectangle pointer.
Definition at line 422 of file TxqDrawable.h. |
|
|
The dump flag true if this object can dump contents.
Definition at line 449 of file TxqDrawable.h. |
|
|
The flag to determine if the paint method is printing.
Definition at line 438 of file TxqDrawable.h. |
|
|
The label pointer.
Reimplemented in Txq2dLabel, and Txq3dLabel. Definition at line 412 of file TxqDrawable.h. |
|
|
The label pointer color.
Definition at line 417 of file TxqDrawable.h. |
|
|
Definition at line 387 of file TxqDrawable.h. |
|
|
Definition at line 407 of file TxqDrawable.h. |
|
|
The vector of points making up the object.
Definition at line 443 of file TxqDrawable.h. |
|
|
The print color of the object.
Definition at line 432 of file TxqDrawable.h. |
|
|
Definition at line 381 of file TxqDrawable.h. |
|
|
Definition at line 382 of file TxqDrawable.h. |
|
|
Definition at line 401 of file TxqDrawable.h. |
|
|
Definition at line 380 of file TxqDrawable.h. |
|
|
Definition at line 388 of file TxqDrawable.h. |
|
|
Definition at line 390 of file TxqDrawable.h. |
|
|
Definition at line 391 of file TxqDrawable.h. |
|
|
Definition at line 389 of file TxqDrawable.h. |
|
|
Definition at line 392 of file TxqDrawable.h. |
|
|
Definition at line 393 of file TxqDrawable.h. |
Copyright Tech-X Corporation, all rights reserved.