#include <plotmaplabel.h>
The input is provided by a parent PlotMapBase class.
Definition at line 42 of file plotmaplabel.h.
Public Member Functions | |
PlotMapLabel (QWidget *parent, const char *name=0, WFlags fl=0) | |
~PlotMapLabel () | |
The default destructor. | |
void | setDrawStyle (const unsigned int style, const bool cubic) |
Sets the draw style. | |
void | setDensityPixmap (const QPixmap &pixmap) |
Sets the pixmap containing the raw density values. | |
void | setCrosses (const vector< Point3D< double > > ¢ers) |
Sets the list of positions of the atoms to be drawn as crosses. | |
void | setGrid (const Point3D< unsigned int > &pointDimension, const Point3D< double > &pointDelta) |
Sets the parameters for the source density to be used as a reference while scaling. | |
void | setIsoCurves (const vector< vector< Point3D< double > > * > &curves, const vector< QColor > &lineColors) |
Sets the isocurves to be drawn. | |
void | setPolygons (const vector< vector< Point3D< double > > > &polygons, const vector< QColor > &colors) |
Sets the polygons to be drawn. | |
void | setColors (const QColor &zero, const QColor &atom) |
Sets the primary drawing colors. | |
void | startDrag (const QPoint &pos) |
Sets the starting position for a drag. | |
void | moveDrag (const QPoint &pos) |
Sets the ending position for a drag. | |
void | endDrag () |
Signals dragging has ended . | |
Protected Member Functions | |
virtual void | drawContents (QPainter *p) |
Reimplemented from QLabel::drawContents. | |
Private Member Functions | |
QPointArray | pointCurve (const vector< Point3D< double > > &curve, const bool cubicInterpolation, const double scaleX, const double scaleY, const unsigned int numInterpolated=0) |
Calculates the points of the specified isodensity curve. | |
QPointArray | cardinalSpline (const Point3D< double > &controlPoint1, const Point3D< double > &startPoint, const Point3D< double > &endPoint, const Point3D< double > &controlPoint2, const unsigned int numInterpolated) |
Calculates the points for a cardinal spline defined by the 4 given points (2D only). | |
Private Attributes | |
QPixmap * | densityPixmap |
A local copy of the pixmap containing density values. | |
vector< Point3D< double > > | crosses |
The atomic positions to be drawn as crosses. | |
Point3D< unsigned int > | numPoints |
A Point3D containing the number of points in 2 directions. | |
Point3D< double > | delta |
A Point3D containing the cell lengths in 2 directions. | |
QPoint | startPosition |
Starting position for a mousedrag rectangle. | |
QPoint | endPosition |
Ending position for a mousedrag rectangle. | |
bool | drawDrag |
= true if a dragging rectangle should be drawn. | |
vector< vector< Point3D< double > > * > | isoCurves |
Contains the data for drawing the isolines. | |
vector< QColor > | isoLineColors |
Contains the color of each isoline. | |
QColor | crossColor |
The color the crosses should be drawn in. | |
QColor | zeroColor |
The background color. | |
unsigned int | drawStyle |
The drawing style. | |
bool | cubicInterpolation |
Interpolation type. Linear or cubic interpolation. | |
vector< vector< Point3D< double > > > | isoPolygons |
Contains the data for drawing the polygons. | |
vector< QColor > | isoPolygonColors |
Contains the color of each polygon. |
|
Definition at line 42 of file plotmaplabel.cpp. |
|
The default destructor.
Definition at line 50 of file plotmaplabel.cpp. |
|
Sets the draw style.
Possible values for
Definition at line 58 of file plotmaplabel.cpp. |
|
Sets the pixmap containing the raw density values.
Definition at line 73 of file plotmaplabel.cpp. |
|
Sets the list of positions of the atoms to be drawn as crosses.
Definition at line 83 of file plotmaplabel.cpp. |
|
Sets the parameters for the source density to be used as a reference while scaling. These include the number of gridpoints in each direction and the cell size. Definition at line 95 of file plotmaplabel.cpp. |
|
Sets the isocurves to be drawn.
Definition at line 105 of file plotmaplabel.cpp. |
|
Sets the polygons to be drawn.
Definition at line 122 of file plotmaplabel.cpp. |
|
Sets the primary drawing colors.
Definition at line 143 of file plotmaplabel.cpp. |
|
Sets the starting position for a drag.
Definition at line 151 of file plotmaplabel.cpp. |
|
Sets the ending position for a drag.
Definition at line 164 of file plotmaplabel.cpp. |
|
Signals dragging has ended .
Definition at line 175 of file plotmaplabel.cpp. |
|
Reimplemented from QLabel::drawContents. Does the actual drawing of the density points, isolines, polygons, crosses and selection box. Definition at line 187 of file plotmaplabel.cpp. |
|
Calculates the points of the specified isodensity curve. Curves can either be linearly or cubically interpolated. Definition at line 410 of file plotmaplabel.cpp. |
|
Calculates the points for a cardinal spline defined by the 4 given points (2D only).
The hardcoded constant Definition at line 481 of file plotmaplabel.cpp. |
|
A local copy of the pixmap containing density values.
Definition at line 71 of file plotmaplabel.h. |
|
The atomic positions to be drawn as crosses.
Definition at line 72 of file plotmaplabel.h. |
|
A Point3D containing the number of points in 2 directions.
Definition at line 73 of file plotmaplabel.h. |
|
A Point3D containing the cell lengths in 2 directions.
Definition at line 74 of file plotmaplabel.h. |
|
Starting position for a mousedrag rectangle.
Definition at line 75 of file plotmaplabel.h. |
|
Ending position for a mousedrag rectangle.
Definition at line 76 of file plotmaplabel.h. |
|
= true if a dragging rectangle should be drawn.
Definition at line 77 of file plotmaplabel.h. |
|
Contains the data for drawing the isolines.
Definition at line 78 of file plotmaplabel.h. |
|
Contains the color of each isoline.
Definition at line 80 of file plotmaplabel.h. |
|
The color the crosses should be drawn in.
Definition at line 81 of file plotmaplabel.h. |
|
The background color.
Definition at line 82 of file plotmaplabel.h. |
|
The drawing style.
Definition at line 83 of file plotmaplabel.h. |
|
Interpolation type. Linear or cubic interpolation.
Definition at line 84 of file plotmaplabel.h. |
|
Contains the data for drawing the polygons.
Definition at line 85 of file plotmaplabel.h. |
|
Contains the color of each polygon.
Definition at line 86 of file plotmaplabel.h. |