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