The DoubleField class. More...
#include <doublefield.h>
Signals | |
void | MaximumChanged (double maximum) |
Signal emitted when the field's maximum value has changed. More... | |
void | MinimumChanged (double minimum) |
Signal emitted when the field's minimum value has changed. More... | |
![]() | |
void | Changed () |
Changed signal. More... | |
void | Clicked () |
Clicked signal. More... | |
void | EnabledChanged (bool) |
Enable change state signal. More... | |
Public Member Functions | |
DoubleField (EffectRow *parent, const QString &id) | |
Reimplementation of EffectField::EffectField(). More... | |
double | GetDoubleAt (double timecode) |
Get double value at timecode. More... | |
void | SetMinimum (double minimum) |
Sets the minimum allowed number for the user to set to minimum . More... | |
void | SetMaximum (double maximum) |
Sets the maximum allowed number for the user to set to maximum . More... | |
void | SetDefault (double d) |
Sets the default number for this field to d . More... | |
void | SetDisplayType (LabelSlider::DisplayType type) |
Sets the UI display type to a member of LabelSlider::DisplayType. More... | |
void | SetFrameRate (const double &rate) |
For a timecode-based display type, sets the frame rate to be used for the displayed timecode. More... | |
virtual QVariant | ConvertStringToValue (const QString &s) override |
Reimplementation of EffectField::ConvertStringToValue() More... | |
virtual QString | ConvertValueToString (const QVariant &v) override |
Reimplementation of EffectField::ConvertValueToString() More... | |
virtual QWidget * | CreateWidget (QWidget *existing=nullptr) override |
Reimplementation of EffectField::CreateWidget() More... | |
virtual void | UpdateWidgetValue (QWidget *widget, double timecode) override |
Reimplementation of EffectField::UpdateWidgetValue() More... | |
![]() | |
EffectField (EffectRow *parent, const QString &i, EffectFieldType t) | |
EffectField Constructor. More... | |
EffectRow * | GetParentRow () |
Get the EffectRow that this field is a member of. More... | |
const EffectFieldType & | type () |
Get the type of data to expect from this field. More... | |
const QString & | id () |
Get the unique identifier of this field set in the constructor. More... | |
QVariant | GetValueAt (double timecode) |
Get the value of this field at a given timecode. More... | |
void | SetValueAt (double time, const QVariant &value) |
Set the value of this field at a given timecode. More... | |
double | Now () |
Get the current clip/media time. More... | |
void | PrepareDataForKeyframing (bool enabled, ComboAction *ca) |
Set up keyframing on this field. More... | |
int | GetColumnSpan () |
Get field's column span. More... | |
void | SetColumnSpan (int i) |
Set field's column span. More... | |
double | GetValidKeyframeHandlePosition (int key, bool post) |
Get the correct X position/time value of a bezier keyframe's handles. More... | |
bool | IsEnabled () |
Return whether this field is enabled or not. More... | |
void | SetEnabled (bool e) |
Set the enabled state of this field. More... | |
Private Slots | |
void | ValueHasBeenSet () |
Connected to EffectField::Changed() to ensure value_set_ gets set to TRUE whenever a value is set on this field. More... | |
void | UpdateFromWidget (double d) |
Internal function connected to any QWidget made from CreateWidget() to update the value based on user input. More... | |
Private Attributes | |
double | min_ |
Internal minimum value. More... | |
double | max_ |
Internal maximum value. More... | |
double | default_ |
Internal default value. More... | |
LabelSlider::DisplayType | display_type_ |
Internal display type value. More... | |
double | frame_rate_ |
Internal frame rate value. More... | |
bool | value_set_ |
Internal value used to allow SetDefault() to set the value as well if none has been set. More... | |
KeyframeDataChange * | kdc_ |
An internal KeyframeDataChange undoable command. More... | |
Additional Inherited Members | |
![]() | |
enum | EffectFieldType { EFFECT_FIELD_DOUBLE, EFFECT_FIELD_COLOR, EFFECT_FIELD_STRING, EFFECT_FIELD_BOOL, EFFECT_FIELD_COMBO, EFFECT_FIELD_FONT, EFFECT_FIELD_FILE, EFFECT_FIELD_UI } |
The EffectFieldType enum. More... | |
![]() | |
QVariant | persistent_data_ |
Persistent data object. More... | |
QVector< EffectKeyframe > | keyframes |
Keyframe array. More... | |
The DoubleField class.
An EffectField derivative the produces number values (integer or floating-point) and uses a LabelSlider as its visual representation.
DoubleField::DoubleField | ( | EffectRow * | parent, |
const QString & | id | ||
) |
Reimplementation of EffectField::EffectField().
|
overridevirtual |
Reimplementation of EffectField::ConvertStringToValue()
Reimplemented from EffectField.
|
overridevirtual |
Reimplementation of EffectField::ConvertValueToString()
Reimplemented from EffectField.
|
overridevirtual |
Reimplementation of EffectField::CreateWidget()
Creates and connects to a LabelSlider.
Implements EffectField.
double DoubleField::GetDoubleAt | ( | double | timecode | ) |
Get double value at timecode.
Convenience function. Equivalent to GetValueAt().toDouble()
timecode | Timecode to retrieve value at |
Double value at the set timecode
|
signal |
Signal emitted when the field's maximum value has changed.
This signal gets connected to any LabelSlider created from CreateWidget() so the maximum value is always synchronized between them.
Note: A connection is not made both ways as you should never manipulate a UI object created from an EffectField directly. Always access data through the EffectField itself.
maximum | The new maximum value. |
|
signal |
Signal emitted when the field's minimum value has changed.
This signal gets connected to any LabelSlider created from CreateWidget() so the minimum value is always synchronized between them.
Note: A connection is not made both ways as you should never manipulate a UI object created from an EffectField directly. Always access data through the EffectField itself.
minimum | The new minimum value. |
void DoubleField::SetDefault | ( | double | d | ) |
Sets the default number for this field to d
.
void DoubleField::SetDisplayType | ( | LabelSlider::DisplayType | type | ) |
Sets the UI display type to a member of LabelSlider::DisplayType.
void DoubleField::SetFrameRate | ( | const double & | rate | ) |
For a timecode-based display type, sets the frame rate to be used for the displayed timecode.
void DoubleField::SetMaximum | ( | double | maximum | ) |
Sets the maximum allowed number for the user to set to maximum
.
void DoubleField::SetMinimum | ( | double | minimum | ) |
Sets the minimum allowed number for the user to set to minimum
.
|
privateslot |
Internal function connected to any QWidget made from CreateWidget() to update the value based on user input.
b | The current number value of the QWidget (LabelSlider in this case). Automatically set when this slot is connected to the LabelSlider::valueChanged() signal. |
|
overridevirtual |
Reimplementation of EffectField::UpdateWidgetValue()
Reimplemented from EffectField.
|
privateslot |
Connected to EffectField::Changed() to ensure value_set_ gets set to TRUE whenever a value is set on this field.
|
private |
Internal default value.
|
private |
Internal display type value.
|
private |
Internal frame rate value.
|
private |
An internal KeyframeDataChange undoable command.
This is stored to allow for the value to be changed by dragging without every single "step" being pushed to the undo stack. Instead an undo command can be created at the start of a drag, and then pushed at the end to make it one single undoable action.
|
private |
Internal maximum value.
|
private |
Internal minimum value.
|
private |
Internal value used to allow SetDefault() to set the value as well if none has been set.
Initialized to FALSE, then set to TRUE indefinitely whenever the value gets set on this field.