27 #include "../../../common/STLUtils.h"
30 #include "ui_SelectedChannelWidgetForm.h"
31 #include "../../../se.h"
42 m_ui(new Ui::SelectedChannelWidgetForm),
43 m_se(new te::se::SelectedChannel)
51 QGridLayout* layout =
new QGridLayout(
m_ui->m_contrastEnhancementFrame);
86 m_ui->m_channelNameComboBox->clear();
87 m_ui->m_channelNameComboBox->addItems(list);
89 m_se->setSourceChannelName(m_ui->m_channelNameComboBox->currentText().toLatin1().data());
99 QString name = m_se->getSourceChannelName().c_str();
103 for(
int i = 0; i < m_ui->m_channelNameComboBox->count(); ++i)
105 if(m_ui->m_channelNameComboBox->itemText(i) == name)
107 m_ui->m_channelNameComboBox->setCurrentIndex(i);
115 m_ui->m_channelNameComboBox->addItem(m_se->getSourceChannelName().c_str());
116 m_ui->m_channelNameComboBox->setCurrentIndex(m_ui->m_channelNameComboBox->count() - 1);
119 if(m_se->getContrastEnhancement())
121 m_contrastWidget->setContrastEnhancement(m_se->getContrastEnhancement());
127 m_se->setSourceChannelName(value.toLatin1().data());
129 emit selectedChannelChanged();
134 m_se->setContrastEnhancement(m_contrastWidget->getContrastEnhancement());
136 emit selectedChannelChanged();
void onContrastEnhancementChanged()
A widget used to build ContrastEnhancement element.
std::auto_ptr< Ui::SelectedChannelWidgetForm > m_ui
Dialog form.
SelectedChannelWidget(QWidget *parent=0, Qt::WindowFlags f=0)
Constructs a SelectedChannelWidget dialog which is a child of parent, with widget flags set to f...
A selected channel to be display.
void initialize()
Internal method to initialize the widget (e.g.: color, combos, icons, etc.)
te::se::SelectedChannel * getSelectedChannel() const
void setSelectedChannel(te::se::SelectedChannel *sc)
void setChannelNames(const QStringList &list)
~SelectedChannelWidget()
Destructor.
te::qt::widgets::ContrastEnhancementWidget * m_contrastWidget
Constrast Widget form.
void setContrastEnhancement(ContrastEnhancement *c)
A dialog used to build a ContrastEnhancementWidget element.
void onChannelNameChanged(QString value)
void updateUi()
Updates the widget form based on internal fill element.
A widget used to build SelectedChannel element.