#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 |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
virtual ctkCoordinatesWidget::~ctkCoordinatesWidget |
( |
| ) |
|
|
virtual |
double const* ctkCoordinatesWidget::coordinates |
( |
| ) |
const |
QString ctkCoordinatesWidget::coordinatesAsString |
( |
| ) |
const |
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
int ctkCoordinatesWidget::decimals |
( |
| ) |
const |
Get the number of decimals of each coordinate spin box The default number of decimals is 3.
ctkDoubleSpinBox::DecimalsOptions ctkCoordinatesWidget::decimalsOption |
( |
| ) |
const |
int ctkCoordinatesWidget::dimension |
( |
| ) |
const |
bool ctkCoordinatesWidget::isNormalized |
( |
| ) |
const |
double ctkCoordinatesWidget::maximum |
( |
| ) |
const |
double ctkCoordinatesWidget::minimum |
( |
| ) |
const |
double ctkCoordinatesWidget::norm |
( |
| ) |
const |
Return the norm of the coordinates.
void ctkCoordinatesWidget::normalize |
( |
| ) |
|
|
slot |
void ctkCoordinatesWidget::setCoordinates |
( |
double * |
pos | ) |
|
Set/Get the coordinates The default values are 0.
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.
void ctkCoordinatesWidget::setCoordinatesAsString |
( |
QString |
pos | ) |
|
Set/Get the coordinates. Use commas to separate elements, spaces are allowed: e.g. "0,0.0, 0."
void ctkCoordinatesWidget::setDecimals |
( |
int |
decimals | ) |
|
|
slot |
Set the number of decimals of each coordinate spin box.
void ctkCoordinatesWidget::setDecimalsOption |
( |
ctkDoubleSpinBox::DecimalsOptions |
option | ) |
|
void ctkCoordinatesWidget::setDimension |
( |
int |
dim | ) |
|
Set/Get the dimension of the point The default dimension is 3
void ctkCoordinatesWidget::setMaximum |
( |
double |
minimum | ) |
|
Set/Get the maximum value of each coordinate spin box The default maximum is 100000.
void ctkCoordinatesWidget::setMinimum |
( |
double |
minimum | ) |
|
Set/Get the minimum value of each coordinate spin box The default minimum is -100000.
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
void ctkCoordinatesWidget::setRange |
( |
double |
minimum, |
|
|
double |
maximum |
|
) |
| |
Set the minimum and maximum of each coordinate spinbox at once.
- See also
- minimum, maximum
void ctkCoordinatesWidget::setSingleStep |
( |
double |
step | ) |
|
Set/Get the single step of each coordinate spin box The default single step is 1.
void ctkCoordinatesWidget::setValueProxy |
( |
ctkValueProxy * |
proxy | ) |
|
double ctkCoordinatesWidget::singleStep |
( |
| ) |
const |
Return the spinbox identitfied by id.
double ctkCoordinatesWidget::squaredNorm |
( |
| ) |
const |
Return the squared norm of the coordinates.
void ctkCoordinatesWidget::updateCoordinate |
( |
double |
coordinate | ) |
|
|
protectedslot |
void ctkCoordinatesWidget::updateCoordinates |
( |
| ) |
|
|
protectedslot |
QScopedPointer<ctkCoordinatesWidgetPrivate> ctkCoordinatesWidget::d_ptr |
|
protected |
QString ctkCoordinatesWidget::coordinates |
|
readwrite |
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 52 of file ctkCoordinatesWidget.h.
ctkDoubleSpinBox::DecimalsOptions ctkCoordinatesWidget::decimalsOption |
|
readwrite |
This property provides more controls over the decimals.
- See also
- ctkDoubleSpinBox::DecimalsOptions, decimals
Definition at line 55 of file ctkCoordinatesWidget.h.
int ctkCoordinatesWidget::dimension |
|
readwrite |
double ctkCoordinatesWidget::maximum |
|
readwrite |
double ctkCoordinatesWidget::minimum |
|
readwrite |
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 46 of file ctkCoordinatesWidget.h.
double ctkCoordinatesWidget::singleStep |
|
readwrite |
The documentation for this class was generated from the following file: