OTB  6.7.0
Orfeo Toolbox
Signals | Public Member Functions | Properties | Private Slots | Private Member Functions | Private Attributes | List of all members
mvd::ColorSetupWidget Class Reference

#include <mvdColorSetupWidget.h>

+ Inheritance diagram for mvd::ColorSetupWidget:
+ Collaboration diagram for mvd::ColorSetupWidget:

Signals

void AlphaValueChanged (double)
 
void CurrentGrayIndexChanged (int index)
 
void CurrentRgbIndexChanged (RgbwChannel channel, int index)
 
void GrayscaleActivated (bool activated)
 

Public Member Functions

 ColorSetupWidget (QWidget *p=NULL, Qt::WindowFlags flags=0)
 
double GetAlpha () const
 
QStringList GetComponents () const
 
int GetCurrentGrayIndex () const
 
int GetCurrentRgbIndex (RgbwChannel channel) const
 
void SetAlpha (double)
 
void SetCurrentGrayIndex (int index)
 
void SetCurrentRgbIndex (RgbwChannel channel, int index)
 
void SetGrayscaleActivated (bool activated)
 
void SetGrayscaleEnabled (bool enabled)
 
 ~ColorSetupWidget () override
 
void SetComponents (const QStringList &component)
 

Properties

QStringList components
 

Private Slots

void on_alphaSlider_valueChanged (int)
 
void on_bComboBox_currentIndexChanged (int index)
 
void on_gComboBox_currentIndexChanged (int index)
 
void on_rComboBox_currentIndexChanged (int index)
 
void on_wCheckBox_toggled (bool activated)
 
void on_wComboBox_currentIndexChanged (int index)
 

Private Member Functions

int FromAlpha (double) const
 
double ToAlpha (int) const
 

Private Attributes

QStringList m_Components
 
Ui::ColorSetupWidget * m_UI
 

Detailed Description

Definition at line 67 of file mvdColorSetupWidget.h.

Constructor & Destructor Documentation

mvd::ColorSetupWidget::ColorSetupWidget ( QWidget *  p = NULL,
Qt::WindowFlags  flags = 0 
)

Constructor.

mvd::ColorSetupWidget::~ColorSetupWidget ( )
override

Destructor.

Member Function Documentation

void mvd::ColorSetupWidget::AlphaValueChanged ( double  )
signal
void mvd::ColorSetupWidget::CurrentGrayIndexChanged ( int  index)
signal

Signal emitted when the current-index of the white (gray) channel has been modified.

Parameters
indexThe curren-index in the component-list.
void mvd::ColorSetupWidget::CurrentRgbIndexChanged ( RgbwChannel  channel,
int  index 
)
signal

Signal emitted when the current-index of a RGB video-channel has been modified.

Parameters
channelThe RGB video-channel which has been modified.
indexThe curren-index in the component-list.
int mvd::ColorSetupWidget::FromAlpha ( double  ) const
private
double mvd::ColorSetupWidget::GetAlpha ( ) const
QStringList mvd::ColorSetupWidget::GetComponents ( ) const
inline

Get the component-name list.

Example: The user { "Red", "Green", "Blue", "" } list as it were set and not the displayed { "0: Red", "1: Green", "2: Blue", "BAND 3" } combo-box list.

Returns
the component-name list.

Definition at line 126 of file mvdColorSetupWidget.h.

int mvd::ColorSetupWidget::GetCurrentGrayIndex ( ) const
Returns
the current (selected) index of the white (gray) channel in the component-name list.
int mvd::ColorSetupWidget::GetCurrentRgbIndex ( RgbwChannel  channel) const
Returns
the current (selected) index of a RGB video-channel in the component-name list.
void mvd::ColorSetupWidget::GrayscaleActivated ( bool  activated)
signal

Signal emitted when the activation-state of the grayscale-mode has been modified.

Parameters
activatedThe new activation-state.
void mvd::ColorSetupWidget::on_alphaSlider_valueChanged ( int  )
privateslot
void mvd::ColorSetupWidget::on_bComboBox_currentIndexChanged ( int  index)
inlineprivateslot

Slot called when the current-index of the blue video-channel has been modified.

Parameters
indexThe new current-index of the blue combo-box.

Definition at line 294 of file mvdColorSetupWidget.h.

References mvd::RGBW_CHANNEL_BLUE.

void mvd::ColorSetupWidget::on_gComboBox_currentIndexChanged ( int  index)
inlineprivateslot

Slot called when the current-index of the green video-channel has been modified.

Parameters
indexThe new current-index of the green combo-box.

Definition at line 281 of file mvdColorSetupWidget.h.

References mvd::RGBW_CHANNEL_GREEN.

void mvd::ColorSetupWidget::on_rComboBox_currentIndexChanged ( int  index)
inlineprivateslot

Slot called when the current-index of the red video-channel has been modified.

Parameters
indexThe new current-index of the red combo-box.

Definition at line 268 of file mvdColorSetupWidget.h.

References mvd::RGBW_CHANNEL_RED.

void mvd::ColorSetupWidget::on_wCheckBox_toggled ( bool  activated)
inlineprivateslot

Slot called when the grayscale-mode is activated/deactivated.

Parameters
activatedThe new activation-state of the grayscale-mode.

Definition at line 319 of file mvdColorSetupWidget.h.

void mvd::ColorSetupWidget::on_wComboBox_currentIndexChanged ( int  index)
inlineprivateslot

Slot called when the current-index of the white (gray) channel has been modified.

Parameters
indexThe new current-index of the white (gray) combo-box.

Definition at line 307 of file mvdColorSetupWidget.h.

void mvd::ColorSetupWidget::SetAlpha ( double  )
void mvd::ColorSetupWidget::SetComponents ( const QStringList &  component)

Set the component-name list.

This sets up the content of the red, green and blue combo boxes. Each component name is prepended with its index (e.g. ': NAME'), if non-empty. Otherwise, 'BAND ' is inserted into the combo-box.

Calling SetComponents() resets the current-index of each combo-box to the first entry of the list, which causes the CurrentIndexChanged() signal to be emitted for each component.

Example: The user { "Red", "Green", "Blue", "" } component-name list will be displayed as the { "0: Red", "1: Green", "2: Blue", "BAND 3" } combo-box list.

Parameters
componentcomponent-name list.

void mvd::ColorSetupWidget::SetCurrentGrayIndex ( int  index)

Set the current (selected) index of the white (gray) channel.

Calling SetCurrentGrayIndex() let the CurrentGrayIndexChanged() signal to be emitted.

Parameters
indexThe index in the component-name list.
void mvd::ColorSetupWidget::SetCurrentRgbIndex ( RgbwChannel  channel,
int  index 
)

Set the current (selected) index of a RGB video channel.

Calling SetCurrentRgbIndex() let the CurrentRgbIndexChanged() signal to be emitted.

Parameters
channelThe video channel for which to set the current index.
indexThe index in the component-name list.

Example: If the { "Red", "Green", "Blue", "" } component-name list has been set, index 1 set "1: Green" as the current select combo-box item.

void mvd::ColorSetupWidget::SetGrayscaleActivated ( bool  activated)

Activate/deactivate the gray-scale mode.

Parameters
activatedtrue to enable the grayscale-model.
void mvd::ColorSetupWidget::SetGrayscaleEnabled ( bool  enabled)

Enable/disable the grayscale-mode check-box.

Parameters
enabledtrue to enable the grayscale-mode check-box.
double mvd::ColorSetupWidget::ToAlpha ( int  ) const
private

Member Data Documentation

QStringList mvd::ColorSetupWidget::m_Components
private

The list of (user) component names.

See Also
ColorSetupWidget::component Q_PROPERTY.

Definition at line 255 of file mvdColorSetupWidget.h.

Ui::ColorSetupWidget* mvd::ColorSetupWidget::m_UI
private

uic generated.

Definition at line 249 of file mvdColorSetupWidget.h.

Property Documentation

QStringList mvd::ColorSetupWidget::components
readwrite

The list of (user) component names.

See Also
ColorSetupWidget::m_Components member.

Definition at line 70 of file mvdColorSetupWidget.h.


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