Olive
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Private Slots | List of all members
ColorField Class Reference

The ColorField class. More...

#include <colorfield.h>

Inheritance diagram for ColorField:
EffectField

Public Member Functions

 ColorField (EffectRow *parent, const QString &id)
 Reimplementation of EffectField::EffectField(). More...
 
QColor GetColorAt (double timecode)
 Get the color value at a given timecode. More...
 
virtual QWidget * CreateWidget (QWidget *existing=nullptr) override
 CreateWidget. More...
 
virtual void UpdateWidgetValue (QWidget *widget, double timecode) override
 Reimplementation of EffectField::UpdateWidgetValue() 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...
 
- Public Member Functions inherited from EffectField
 EffectField (EffectRow *parent, const QString &i, EffectFieldType t)
 EffectField Constructor. More...
 
EffectRowGetParentRow ()
 Get the EffectRow that this field is a member of. More...
 
const EffectFieldTypetype ()
 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 UpdateFromWidget (const QColor &c)
 Internal function connected to any QWidget made from CreateWidget() to update the value based on user input. More...
 

Additional Inherited Members

- Public Types inherited from EffectField
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...
 
- Signals inherited from EffectField
void Changed ()
 Changed signal. More...
 
void Clicked ()
 Clicked signal. More...
 
void EnabledChanged (bool)
 Enable change state signal. More...
 
- Public Attributes inherited from EffectField
QVariant persistent_data_
 Persistent data object. More...
 
QVector< EffectKeyframekeyframes
 Keyframe array. More...
 

Detailed Description

The ColorField class.

An EffectField derivative that produces color values and uses a ColorButton as its UI representative.

Constructor & Destructor Documentation

ColorField::ColorField ( EffectRow parent,
const QString &  id 
)

Reimplementation of EffectField::EffectField().

Member Function Documentation

QVariant ColorField::ConvertStringToValue ( const QString &  s)
overridevirtual

Reimplementation of EffectField::ConvertStringToValue()

Reimplemented from EffectField.

QString ColorField::ConvertValueToString ( const QVariant &  v)
overridevirtual

Reimplementation of EffectField::ConvertValueToString()

Reimplemented from EffectField.

QWidget * ColorField::CreateWidget ( QWidget *  existing = nullptr)
overridevirtual

CreateWidget.

Creates and connects to a ColorButton.

Implements EffectField.

QColor ColorField::GetColorAt ( double  timecode)

Get the color value at a given timecode.

A convenience function, equivalent to GetValueAt(timecode).value<QColor>().

Parameters
timecodeThe timecode to retrieve the color at
Returns

The color value at this timecode

void ColorField::UpdateFromWidget ( const QColor &  c)
privateslot

Internal function connected to any QWidget made from CreateWidget() to update the value based on user input.

Parameters
bThe current color selected by the QWidget (ColorButton in this case). Automatically triggered when this slot is connected to the ColorButton::color_changed() signal.
void ColorField::UpdateWidgetValue ( QWidget *  widget,
double  timecode 
)
overridevirtual

Reimplementation of EffectField::UpdateWidgetValue()

Reimplemented from EffectField.


The documentation for this class was generated from the following files: