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 void fillPickedPoint(double x, double y, std::vector< double > &picked) const
Fills the picked point vector.
void setView(ViewBase *view)
Sets the View object.
Class representing a rectangle.
void draw()
Does the actual drawing in the view.
The class of derived from ViewBase and QCanvasRectangle for drawing on a QCanvas. ...
void setDrawRect(float x, float y, float w, float h)
Sets the drawing rectangle in the paint device space.
int toCanvasX(double dx) const
Converts coordinate from view space to canvas space.
setSize(int width, int height)
A singleton class to draw the border with knobies around the selected display.
bool m_is_drawing
A flag set true when drawing has stared.
int toViewX(double datX) const
Converts the data space coordinate X to the view space coordinate X.
std::vector< double > m_position
A vector containing the percentage position information for every views.
void setPositions()
Set the positions in percentage of every views.
std::vector< ViewBase *> mViews
A vector that keeps all view in the same group view.
virtual void draw(QPainter &)
Re-implement the draw() method in QCanvasItem.
The class of derived from ViewBase for drawing to the screen and PostScript generation using Qt toolk...
int toCanvasY(double dy) const
Converts coordinate from view space to canvas space.
QPainter * m_painter
The current Qt QPainter object.
virtual ~QtGroupView()
Copy constructor.
void setDrawRect(const QRect &rect)
Sets the drawing rectangle in the paint device space.
int toViewY(double datY) const
Converts the data space coordinate Y to the view space coordinate Y.
hippodraw::QtGroupView class interface
virtual Rect getDrawRect() const
Gets the drawing rectangle.
QtGroupView()
The constructor.
DrawBorder class interface.
virtual void moveBy(double dx, double dy)
Re-implement the moveBy() method so that all views in the group will move.
This is the abstract base class for a group view.
static DrawBorder * instance()
Returns the pointer to the singleton instance.