13 #include "msdevstudio/MSconfig.h"
36 #if QT_VERSION < 0x040000
39 Q3CanvasRectangle ( 0 )
48 #if QT_VERSION < 0x040000
51 Q3CanvasRectangle ( 0 )
58 vector < ViewBase * >::const_iterator first =
mViews.begin();
59 for ( ; first !=
mViews.end(); ++first ) {
76 int iw =
static_cast< int > ( w );
77 int ih =
static_cast< int > ( h );
85 vector < ViewBase * >::const_iterator first =
mViews.begin();
86 for (
unsigned int i = 0; first !=
mViews.end(); ++first, i=i+4 ) {
114 const QColor color (
"black" );
133 std::vector < double > & picked )
const
139 return static_cast <
int > ( x() + dx );
144 return static_cast <
int > ( y() + dy );
162 #if QT_VERSION < 0x040000
163 QCanvasRectangle::moveBy ( dx, dy );
165 Q3CanvasRectangle::moveBy (dx, dy);
170 vector < ViewBase * >::const_iterator first =
mViews.begin();
171 for ( ; first !=
mViews.end(); ++first ) {
173 qtview->moveBy ( dx, dy );
181 vector < ViewBase * >::const_iterator first =
mViews.begin();
182 for ( ; first !=
mViews.end(); ++first ) {
virtual Rect getDrawRect() const
Gets the drawing rectangle.
virtual void draw(QPainter &)
Re-implement the draw() method in QCanvasItem.
void setDrawRect(float x, float y, float w, float h)
Sets the drawing rectangle in the paint device space.
virtual void fillPickedPoint(double x, double y, std::vector< double > &picked) const
Fills the picked point vector.
void setPositions()
Set the positions in percentage of every views.
int toViewY(double datY) const
Converts the data space coordinate Y to the view space coordinate Y.
The class of derived from ViewBase and QCanvasRectangle for drawing on a QCanvas. ...
virtual ~QtGroupView()
Copy constructor.
int toCanvasX(double dx) const
Converts coordinate from view space to canvas space.
std::vector< ViewBase * > mViews
A vector that keeps all view in the same group view.
bool m_is_drawing
A flag set true when drawing has stared.
int toCanvasY(double dy) const
Converts coordinate from view space to canvas space.
setSize(int width, int height)
This is the abstract base class for a group view.
QtGroupView()
The constructor.
QPainter * m_painter
The current Qt QPainter object.
int toViewX(double datX) const
Converts the data space coordinate X to the view space coordinate X.
static DrawBorder * instance()
Returns the pointer to the singleton instance.
std::vector< double > m_position
A vector containing the percentage position information for every views.
void draw()
Does the actual drawing in the view.
The class of derived from ViewBase for drawing to the screen and PostScript generation using Qt toolk...
Class representing a rectangle.
virtual void moveBy(double dx, double dy)
Re-implement the moveBy() method so that all views in the group will move.
void setDrawRect(const QRect &rect)
Sets the drawing rectangle in the paint device space.
DrawBorder class interface.
void setView(ViewBase *view)
Sets the View object.
hippodraw::QtGroupView class interface
A singleton class to draw the border with knobies around the selected display.