Layout Widget. More...
#include <qrdrawgeoinfos.h>
Public Member Functions | |
QRDrawGeoInfos (QWidget *parent=0, bool showid=true) | |
void | setLayout (RLayout *layout) |
void | setPolys (RFreePolygons *polys) |
void | setStepMode (bool step) |
void | repaint (void) |
void | paintInfo (const RGeoInfo *info, bool fly) |
void | paintFree (const RFreePolygon *poly, bool fly) |
virtual | ~QRDrawGeoInfos (void) |
Protected Member Functions | |
double | x (tCoord x) |
double | y (tCoord y) |
void | paintConnection (const RGeoInfoConnection *connect) |
void | removeConnections (void) |
void | paintConnectors (const RGeoInfo *info) |
virtual void | resizeEvent (QResizeEvent *event) |
Private Attributes | |
void * | Ui |
RFreePolygons * | FreePolygons |
RLayout * | Layout |
QGraphicsScene | Scene |
QBrush | BlueBrush |
QBrush | RedBrush |
QBrush | BlackBrush |
QBrush | YellowBrush |
QBrush | GreenBrush |
QBrush | CyanBrush |
QVector< QGraphicsLineItem * > | Nets |
MyItem * | LastItem |
double | XScale |
double | YScale |
bool | StepMode |
bool | ShowId |
Detailed Description
Layout Widget.
The QRDrawGeoInfos provides a widget that paints a layout.
Constructor & Destructor Documentation
QRDrawGeoInfos | ( | QWidget * | parent = 0 , |
bool | showid = true |
||
) |
Constructor.
- Parameters
-
parent Parent of the widget. showid Should the objects identifiers be showed?
|
virtual |
Destructor.
Member Function Documentation
void setLayout | ( | RLayout * | layout | ) |
Set the layout.
- Parameters
-
layout Layout.
void setPolys | ( | RFreePolygons * | polys | ) |
Set the free polygons.
- Parameters
-
polys Free polygons.
void setStepMode | ( | bool | step | ) |
Set the step mode.
- Parameters
-
step Step mode.
void repaint | ( | void | ) |
The widget has changed and has to be repainted.
void paintInfo | ( | const RGeoInfo * | info, |
bool | fly | ||
) |
Add a geometric information.
- Parameters
-
info Geometric Info to add. fly Is it added on the fly ?
void paintFree | ( | const RFreePolygon * | poly, |
bool | fly | ||
) |
Add a free polygon.
- Parameters
-
poly Free Polygon to add. fly Is it added on the fly ?
|
protected |
- Returns
- the X-coordinate in the scene.
- Parameters
-
x X-coordinate in the problem.
|
protected |
- Returns
- the Y-coordinate in the scene.
- Parameters
-
y Y-coordinate in the problem.
|
protected |
Paint a given connection.
- Parameters
-
connect Connection to paint.
|
protected |
Remove the connections from the board.
|
protected |
Paint the connectors of a geometric information.
- Parameters
-
info Geometric information to use.
|
protectedvirtual |
Repaint the widget with the new sizes.
- Parameters
-
event The paint event.
Member Data Documentation
|
private |
|
private |
Pointer to free polygons to paint.
|
private |
Layout.
|
private |
The scene.
|
private |
A blue brush.
|
private |
A red brush.
|
private |
A black brush.
|
private |
An yellow brush.
|
private |
A green brush.
|
private |
A cyan brush.
|
private |
Elements added to paint the asked connections.
|
private |
Last item inserted.
|
private |
Ratio to adapt the widths of the objects of the scene to the actual width of the widget.
|
private |
Ratio to adapt the heights of the objects of the scene to the actual height of the widget.
|
private |
Draw in a step mode (last object is drawn in a different colour).
|
private |
Should the objects identifiers be showed?