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