#include <Libs/Widgets/ctkCoordinatesWidget.h>
|
QScopedPointer< ctkCoordinatesWidgetPrivate > | d_ptr |
|
ctkCoordinatesWidget is a simple container of dimension coordinates. For each coordinate a double spinbox is associated, everytime a value is modified, the signal valueChanged is fired. TODO: use pimpl
Definition at line 38 of file ctkCoordinatesWidget.h.
◆ ctkCoordinatesWidget()
ctkCoordinatesWidget::ctkCoordinatesWidget |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
◆ ~ctkCoordinatesWidget()
virtual ctkCoordinatesWidget::~ctkCoordinatesWidget |
( |
| ) |
|
|
virtual |
◆ coordinates()
double const* ctkCoordinatesWidget::coordinates |
( |
| ) |
const |
◆ coordinatesAsString()
QString ctkCoordinatesWidget::coordinatesAsString |
( |
| ) |
const |
◆ coordinatesChanged
void ctkCoordinatesWidget::coordinatesChanged |
( |
double * |
pos | ) |
|
|
signal |
valueChanged is fired anytime a coordinate is modified, the returned value is the point coordinates TODO: Don't fire the signal if the new values are not changed
◆ decimals()
int ctkCoordinatesWidget::decimals |
( |
| ) |
const |
Get the number of decimals of each coordinate spin box The default number of decimals is 3.
◆ decimalsOption()
ctkDoubleSpinBox::DecimalsOptions ctkCoordinatesWidget::decimalsOption |
( |
| ) |
const |
◆ dimension()
int ctkCoordinatesWidget::dimension |
( |
| ) |
const |
◆ isNormalized()
bool ctkCoordinatesWidget::isNormalized |
( |
| ) |
const |
◆ maximum()
double ctkCoordinatesWidget::maximum |
( |
| ) |
const |
◆ minimum()
double ctkCoordinatesWidget::minimum |
( |
| ) |
const |
◆ norm()
double ctkCoordinatesWidget::norm |
( |
| ) |
const |
Return the norm of the coordinates.
◆ normalize
void ctkCoordinatesWidget::normalize |
( |
| ) |
|
|
slot |
◆ setCoordinates() [1/2]
void ctkCoordinatesWidget::setCoordinates |
( |
double * |
pos | ) |
|
Set/Get the coordinates The default values are 0.
◆ setCoordinates() [2/2]
void ctkCoordinatesWidget::setCoordinates |
( |
double |
x, |
|
|
double |
y = 0. , |
|
|
double |
z = 0. , |
|
|
double |
w = 0. |
|
) |
| |
Convenient function that sets up to 4 elements of the coordinates.
◆ setCoordinatesAsString()
void ctkCoordinatesWidget::setCoordinatesAsString |
( |
QString |
pos | ) |
|
Set/Get the coordinates. Use commas to separate elements, spaces are allowed: e.g. "0,0.0, 0."
◆ setDecimals
void ctkCoordinatesWidget::setDecimals |
( |
int |
decimals | ) |
|
|
slot |
Set the number of decimals of each coordinate spin box.
◆ setDecimalsOption()
void ctkCoordinatesWidget::setDecimalsOption |
( |
ctkDoubleSpinBox::DecimalsOptions |
option | ) |
|
◆ setDimension()
void ctkCoordinatesWidget::setDimension |
( |
int |
dim | ) |
|
Set/Get the dimension of the point The default dimension is 3
◆ setMaximum()
void ctkCoordinatesWidget::setMaximum |
( |
double |
minimum | ) |
|
Set/Get the maximum value of each coordinate spin box The default maximum is 100000.
◆ setMinimum()
void ctkCoordinatesWidget::setMinimum |
( |
double |
minimum | ) |
|
Set/Get the minimum value of each coordinate spin box The default minimum is -100000.
◆ setNormalized()
void ctkCoordinatesWidget::setNormalized |
( |
bool |
normalize | ) |
|
Change the normalized property. If normalize is true, it normalizes the current coordinates, the range of possible values is reset to [-1, 1].
- See also
- isNormalized
◆ setRange()
void ctkCoordinatesWidget::setRange |
( |
double |
minimum, |
|
|
double |
maximum |
|
) |
| |
Set the minimum and maximum of each coordinate spinbox at once.
- See also
- minimum, maximum
◆ setSingleStep()
void ctkCoordinatesWidget::setSingleStep |
( |
double |
step | ) |
|
Set/Get the single step of each coordinate spin box The default single step is 1.
◆ setSizeHintPolicy()
◆ setValueProxy()
void ctkCoordinatesWidget::setValueProxy |
( |
ctkValueProxy * |
proxy | ) |
|
◆ singleStep()
double ctkCoordinatesWidget::singleStep |
( |
| ) |
const |
◆ sizeHintPolicy()
◆ spinBox()
Return the spinbox identitfied by id.
◆ squaredNorm()
double ctkCoordinatesWidget::squaredNorm |
( |
| ) |
const |
Return the squared norm of the coordinates.
◆ updateCoordinate
void ctkCoordinatesWidget::updateCoordinate |
( |
double |
coordinate | ) |
|
|
protectedslot |
◆ updateCoordinates
void ctkCoordinatesWidget::updateCoordinates |
( |
| ) |
|
|
protectedslot |
◆ valueProxy()
◆ d_ptr
QScopedPointer<ctkCoordinatesWidgetPrivate> ctkCoordinatesWidget::d_ptr |
|
protected |
◆ coordinates
QString ctkCoordinatesWidget::coordinates |
|
readwrite |
◆ decimals
int ctkCoordinatesWidget::decimals |
|
readwrite |
This property controls how many decimals should be displayed by the spinboxes. This number might not be used depending on decimalsOption. In general, the coordinatesWidget tries to use the same number of decimals for all the spinboxes except if numbers require more decimals.
Definition at line 1 of file ctkCoordinatesWidget.h.
◆ decimalsOption
ctkDoubleSpinBox::DecimalsOptions ctkCoordinatesWidget::decimalsOption |
|
readwrite |
This property provides more controls over the decimals.
- See also
- ctkDoubleSpinBox::DecimalsOptions, decimals
Definition at line 1 of file ctkCoordinatesWidget.h.
◆ dimension
int ctkCoordinatesWidget::dimension |
|
readwrite |
◆ maximum
double ctkCoordinatesWidget::maximum |
|
readwrite |
◆ minimum
double ctkCoordinatesWidget::minimum |
|
readwrite |
◆ normalized
bool ctkCoordinatesWidget::normalized |
|
readwrite |
This property controls whether the coordinates must be normalized. If true, the norm of the coordinates is enforced to be 1. False by default.
Definition at line 1 of file ctkCoordinatesWidget.h.
◆ singleStep
double ctkCoordinatesWidget::singleStep |
|
readwrite |
◆ sizeHintPolicy
The documentation for this class was generated from the following file: