Input for a vector.
More...
#include <vectorinput.h>
Input for a vector.
For each entry in the vector, a spin button is created. Each time an entry changes, signalChanged()
is emitted.
◆ VectorInput()
goGUI::VectorInput::VectorInput |
( |
const char * |
title = 0 , |
|
|
int |
n = 4 , |
|
|
int |
direction = 0 |
|
) |
| |
Constructor.
- Parameters
-
title | Title shown in the frame around the input (default: 0) |
n | Number of elements in the vector (default: 4) |
direction | If 0, elements are laid out horizontally (default), otherwise they are laid out vertically. |
◆ getVector() [1/2]
void goGUI::VectorInput::getVector |
( |
goVectord & |
v | ) |
const |
Get the vector.
- Parameters
-
v | On return, contains the vector elements. If its size does not match the number of input elements, v will be resized. |
◆ getVector() [2/2]
void goGUI::VectorInput::getVector |
( |
goVectorf & |
v | ) |
const |
Get the vector.
- Parameters
-
v | On return, contains the vector elements. If its size does not match the number of input elements, v will be resized. |
◆ setDigits()
void goGUI::VectorInput::setDigits |
( |
int |
d | ) |
|
Set the number of digits shown.
- Parameters
-
d | Number of digits shown in the input elements. |
◆ setRange()
void goGUI::VectorInput::setRange |
( |
double |
low, |
|
|
double |
high, |
|
|
double |
step = 0.1 , |
|
|
double |
large_step = 1.0 |
|
) |
| |
Set the value range.
All values are for all the input elements. If setRange is not called, the minimal and maximal values of the double type are used, and 0.01 and 0.1 are used as steps.
- Parameters
-
low | Minimal value |
high | Maximal value |
step | Step |
large_step | Page step |
◆ setVector() [1/2]
void goGUI::VectorInput::setVector |
( |
const goVectord & |
v | ) |
|
Set the vector values.
- Parameters
-
v | The vector. If v.getSize() is larger than the number of input elements, only the values of v up to the number of input elements are used. |
◆ setVector() [2/2]
void goGUI::VectorInput::setVector |
( |
const goVectorf & |
v | ) |
|
Set the vector values.
- Parameters
-
v | The vector. If v.getSize() is larger than the number of input elements, only the values of v up to the number of input elements are used. |
◆ signalChanged()
sigc::signal< void > & goGUI::VectorInput::signalChanged |
( |
| ) |
|
Emitted each time an input element changes.
- Returns
◆ valueChangedSlot()
void goGUI::VectorInput::valueChangedSlot |
( |
| ) |
|
The documentation for this class was generated from the following files:
- vectorinput.h
- vectorinput.cpp