#include <densitybase.h>
It allows adding/deleting and changing the visual representation of isodensity surfaces. Up to 2 source densities can be loaded and combined (added/substracted). It provides the functionality for the DensityWidget class (base class).
Definition at line 40 of file densitybase.h.
Public Slots | |
| void | loadDensityA () |
| Loads the contents of a cube file for density A. | |
| void | loadDensityB () |
| Loads the contents of a cube file for density B. | |
| void | addSurface () |
| Generates a new surface with default parameters. | |
| void | addSurfacePair () |
| Generates 2 new surfaces with opposite sign. | |
| void | deleteSurface () |
| Deletes an existing surface. The currently selected surface will be removed. | |
| void | updateAll () |
| Updates all changes. | |
Signals | |
| void | newSurface (const unsigned int surface) |
| void | updatedSurface (const unsigned int surface) |
| void | deletedSurface (const unsigned int surface) |
| void | redrawScene () |
Public Member Functions | |
| DensityBase (IsoSurface *surface, QWidget *parent=0, const char *name=0, bool modal=FALSE, WFlags fl=0) | |
| ~DensityBase () | |
| The default destructor. | |
| bool | surfaceVisible (const unsigned int surface) |
| Returns whether a surface is visible. | |
| QColor | surfaceColor (const unsigned int surface) |
| Returns the color of a surface. | |
| unsigned int | surfaceOpacity (const unsigned int surface) |
| Returns the opacity of a surface. | |
| unsigned int | surfaceType (const unsigned int surface) |
| Returns the drawing type of a surface. | |
Protected Member Functions | |
| void | customEvent (QCustomEvent *e) |
| Handles custom events originating from loadingThread. | |
| void | showEvent (QShowEvent *e) |
| Restores the correct column width for the colour column after a hide/show cycle. | |
| void | hideEvent (QHideEvent *e) |
| Saves the correct column width for the colour column before a hide/show cycle. | |
Private Types | |
| enum | Columns { COLUMN_VISIBLE, COLUMN_ID, COLUMN_RGB, COLUMN_LEVEL, COLUMN_COLOUR, COLUMN_OPACITY, COLUMN_TYPE } |
Private Slots | |
| void | updateSliderLevel () |
| Updates SliderLevel with the contents of LineEditLevel. | |
| void | updateLineEditLevel () |
| Updates LineEditLevel with the contents of SliderLevel. | |
| void | updateListView () |
| Updates ListViewParameters with the contents of the settings. | |
| void | updateSettings () |
| Updates the settings with the contents of the currently selected item in ListViewParameters. | |
| void | updateVisibility (QListViewItem *item, const QPoint &, int column) |
| Updates the visibility of a surface when a Checkbox is clicked. | |
| void | updateOperation (const unsigned int density=0) |
| Updates the possible operations and the isoSurface. | |
| void | updateOpacity () |
| Updates LabelOpacity so its value corresponds with the position of SliderOpacity. | |
Private Member Functions | |
| void | makeConnections () |
| Sets up the permanent connections. Called once from the constructor. | |
| void | loadDensity (const bool densityA) |
| Loads a new density into density A or B. | |
| void | updateDensity () |
| Updates everything after a new density is loaded. | |
| void | updateProgress (const unsigned int progress) |
| Updates the progressbar of the currently loading density. | |
| unsigned int | typeToNum (const QString &type) |
| Returns the number corresponding to a type string. | |
| void | enableWidgets () |
| Enables/disables all widgets depending on the current status of the class. | |
| bool | identicalGrids () |
| Returns true if the densities A and B are located on the same grid. | |
Private Attributes | |
| IsoSurface * | isoSurface |
| A pointer to the IsoSurface. | |
| unsigned int | idCounter |
| A counter for uniquely identifying defined surfaces. | |
| std::vector< SurfaceProperties > | surfaceProperties |
| A list of the properties of each defined surface. | |
| DensityLoadThread * | loadingThread |
| A thread that does the actual reading of the density points from the cube file. | |
| std::vector< double > | densityPointsA |
| An array holding the density values for Density A. | |
| std::vector< double > | densityPointsB |
| An array holding the density values for Density B. | |
| bool | loadingDensityA |
| Indicates which density is loading. | |
| Point3D< float > | originA |
| Holds the coordinates of the origin of density A. | |
| Point3D< float > | originB |
| Holds the coordinates of the origin of density B. | |
| Point3D< unsigned int > | numPointsA |
| Holds the number of data points in each direction of density A. | |
| Point3D< unsigned int > | numPointsB |
| Holds the number of data points in each direction of density B. | |
| Point3D< float > | deltaA |
| Holds the cell lengths of density A. | |
| Point3D< float > | deltaB |
| Holds the cell lengths of density B. | |
| QString | newDescription |
| Holds the description of the contents of a new density. | |
| int | columnColourWidth |
| Holds the right column width for the one containing the colour of the surface. | |
Static Private Attributes | |
| static const double | deltaLevel = 0.001 |
| The minimal change allowed in isoLevels. | |
Classes | |
| struct | SurfaceProperties |
| Contains the properties of a surface. More... | |
|
|
Definition at line 85 of file densitybase.h. |
|
||||||||||||||||||||||||
|
Definition at line 70 of file densitybase.cpp. |
|
|
The default destructor.
Definition at line 91 of file densitybase.cpp. |
|
|
Returns whether a surface is visible.
Definition at line 106 of file densitybase.cpp. |
|
|
Returns the color of a surface.
Definition at line 116 of file densitybase.cpp. |
|
|
Returns the opacity of a surface.
Definition at line 126 of file densitybase.cpp. |
|
|
Returns the drawing type of a surface.
Definition at line 136 of file densitybase.cpp. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Loads the contents of a cube file for density A.
Definition at line 150 of file densitybase.cpp. |
|
|
Loads the contents of a cube file for density B.
Definition at line 157 of file densitybase.cpp. |
|
|
Generates a new surface with default parameters.
Definition at line 164 of file densitybase.cpp. |
|
|
Generates 2 new surfaces with opposite sign. The parameters are not based on the currently selected surface. Definition at line 194 of file densitybase.cpp. |
|
|
Deletes an existing surface. The currently selected surface will be removed.
Definition at line 264 of file densitybase.cpp. |
|
|
Updates all changes.
Definition at line 296 of file densitybase.cpp. |
|
|
Handles custom events originating from loadingThread.
Definition at line 389 of file densitybase.cpp. |
|
|
Restores the correct column width for the colour column after a hide/show cycle.
Definition at line 401 of file densitybase.cpp. |
|
|
Saves the correct column width for the colour column before a hide/show cycle.
Definition at line 411 of file densitybase.cpp. |
|
|
Updates SliderLevel with the contents of LineEditLevel.
Definition at line 424 of file densitybase.cpp. |
|
|
Updates LineEditLevel with the contents of SliderLevel.
Definition at line 437 of file densitybase.cpp. |
|
|
Updates ListViewParameters with the contents of the settings.
Definition at line 444 of file densitybase.cpp. |
|
|
Updates the settings with the contents of the currently selected item in ListViewParameters.
Definition at line 472 of file densitybase.cpp. |
|
||||||||||||||||
|
Updates the visibility of a surface when a Checkbox is clicked.
Definition at line 499 of file densitybase.cpp. |
|
|
Updates the possible operations and the isoSurface.
Possible values of
Definition at line 513 of file densitybase.cpp. |
|
|
Updates LabelOpacity so its value corresponds with the position of SliderOpacity.
Definition at line 732 of file densitybase.cpp. |
|
|
Sets up the permanent connections. Called once from the constructor.
Definition at line 747 of file densitybase.cpp. |
|
|
Loads a new density into density A or B.
This depends on the value of
Definition at line 778 of file densitybase.cpp. |
|
|
Updates everything after a new density is loaded.
Definition at line 893 of file densitybase.cpp. |
|
|
Updates the progressbar of the currently loading density.
Definition at line 940 of file densitybase.cpp. |
|
|
Returns the number corresponding to a type string. Possible input strings:
Definition at line 950 of file densitybase.cpp. |
|
|
Enables/disables all widgets depending on the current status of the class.
Definition at line 967 of file densitybase.cpp. |
|
|
Returns true if the densities A and B are located on the same grid. If true these densities can be succesfully combined. Definition at line 1026 of file densitybase.cpp. |
|
|
A pointer to the IsoSurface.
Definition at line 111 of file densitybase.h. |
|
|
A counter for uniquely identifying defined surfaces.
Definition at line 112 of file densitybase.h. |
|
|
A list of the properties of each defined surface.
Definition at line 113 of file densitybase.h. |
|
|
A thread that does the actual reading of the density points from the cube file.
Definition at line 114 of file densitybase.h. |
|
|
An array holding the density values for Density A.
Definition at line 115 of file densitybase.h. |
|
|
An array holding the density values for Density B.
Definition at line 116 of file densitybase.h. |
|
|
Indicates which density is loading.
Definition at line 117 of file densitybase.h. |
|
|
Holds the coordinates of the origin of density A.
Definition at line 118 of file densitybase.h. |
|
|
Holds the coordinates of the origin of density B.
Definition at line 119 of file densitybase.h. |
|
|
Holds the number of data points in each direction of density A.
Definition at line 120 of file densitybase.h. |
|
|
Holds the number of data points in each direction of density B.
Definition at line 121 of file densitybase.h. |
|
|
Holds the cell lengths of density A.
Definition at line 122 of file densitybase.h. |
|
|
Holds the cell lengths of density B.
Definition at line 123 of file densitybase.h. |
|
|
Holds the description of the contents of a new density.
Definition at line 124 of file densitybase.h. |
|
|
Holds the right column width for the one containing the colour of the surface.
Definition at line 125 of file densitybase.h. |
|
|
The minimal change allowed in isoLevels.
Definition at line 128 of file densitybase.h. |
1.4.6-NO